summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-09-14 16:04:49 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-09-14 16:04:49 +0100
commit8ad45af9d37eeed9797e955f75200a244d675f7d (patch)
tree89caf31fd50b16bd7f2a299e3d03a176b17a0912
parent3e6927876b64665fa8a2259707052aec1ff2ef5d (diff)
downloadfebootstrap-8ad45af9d37eeed9797e955f75200a244d675f7d.zip
febootstrap-8ad45af9d37eeed9797e955f75200a244d675f7d.tar.gz
febootstrap-8ad45af9d37eeed9797e955f75200a244d675f7d.tar.xz
yum-rpm: Add more debugging to the Python code.
-rw-r--r--src/febootstrap_yum_rpm.ml22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/febootstrap_yum_rpm.ml b/src/febootstrap_yum_rpm.ml
index ca74f4a..028492a 100644
--- a/src/febootstrap_yum_rpm.ml
+++ b/src/febootstrap_yum_rpm.ml
@@ -40,20 +40,27 @@ import yum
import yum.misc
import sys
+verbose = %d
+
+if verbose:
+ print \"febootstrap_yum_rpm: running python code to query yum and resolve deps\"
+
yb = yum.YumBase ()
-yb.preconf.debuglevel = %d
-yb.preconf.errorlevel = %d
+yb.preconf.debuglevel = verbose
+yb.preconf.errorlevel = verbose
if %s:
yb.preconf.fn = %S
yb.setCacheDir ()
-# Look up the base packages from the command line.
+if verbose:
+ print \"febootstrap_yum_rpm: looking up the base packages from the command line\"
deps = dict ()
pkgs = yb.pkgSack.returnPackages (patterns=sys.argv[1:])
for pkg in pkgs:
deps[pkg] = False
-# Recursively find all the dependencies.
+if verbose:
+ print \"febootstrap_yum_rpm: recursively finding all the dependencies\"
stable = False
while not stable:
stable = True
@@ -61,6 +68,9 @@ while not stable:
if deps[pkg] == False:
deps[pkg] = []
stable = False
+ if verbose:
+ print (\"febootstrap_yum_rpm: examining deps of %%s\" %%
+ pkg.name)
for r in pkg.requires:
ps = yb.whatProvides (r[0], r[1], r[2])
best = yb._bestPackageFromList (ps.returnPackages ())
@@ -76,9 +86,11 @@ for pkg in deps.keys ():
f.write (\"%%s %%s %%s %%s %%s\\n\" %%
(pkg.name, pkg.epoch, pkg.version, pkg.release, pkg.arch))
f.close ()
+
+if verbose:
+ print \"febootstrap_yum_rpm: finished python code\"
"
(if verbose then 1 else 0)
- (if verbose then 1 else 0)
(match yum_config with None -> "False" | Some _ -> "True")
(match yum_config with None -> "" | Some filename -> filename)
tmpfile in