aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-02-26 01:25:46 +0000
committerNicolas Vigier <boklm@mageia.org>2011-02-26 01:25:46 +0000
commit6cea0b80173313340eaadb8a425f9082e192e548 (patch)
treea49434c6c380340225bc354235e545267f528943 /MgaRepo
parent77af19aadf95f2c1f9e92332136cc489fe3a1f5e (diff)
downloadmgarepo-6cea0b80173313340eaadb8a425f9082e192e548.tar
mgarepo-6cea0b80173313340eaadb8a425f9082e192e548.tar.gz
mgarepo-6cea0b80173313340eaadb8a425f9082e192e548.tar.bz2
mgarepo-6cea0b80173313340eaadb8a425f9082e192e548.tar.xz
mgarepo-6cea0b80173313340eaadb8a425f9082e192e548.zip
Add support for rpm 4.8: spec.sources is now a list instead of a method
Diffstat (limited to 'MgaRepo')
-rw-r--r--MgaRepo/rpmutil.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index ef3780a..861fbf5 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -520,8 +520,10 @@ def sync(dryrun=False, commit=False, download=False):
spec = rpm.TransactionSet().parseSpec(specpath)
except rpm.error, e:
raise Error, "could not load spec file: %s" % e
+ srclist = spec.sources if isinstance(spec.sources, (list, tuple)) \
+ else spec.sources()
sources = dict((os.path.basename(name), name)
- for name, no, flags in spec.sources())
+ for name, no, flags in srclist)
sourcesst = dict((os.path.basename(path), (path, st))
for st, path in svn.status(sourcesdir, noignore=True))
toadd = []