]> piware.de Git - bin.git/commitdiff
syncpackage: fix for versions with multiple dashes
authorMartin Pitt <martin@piware.de>
Fri, 31 Dec 2010 14:48:42 +0000 (15:48 +0100)
committerMartin Pitt <martin@piware.de>
Fri, 31 Dec 2010 14:48:42 +0000 (15:48 +0100)
syncpackage

index bbf81a68a96331d32f0c4450401b673294735621..8275f61828dea6e704a6019214e4acd44f146275 100755 (executable)
@@ -94,7 +94,7 @@ if need_orig:
 
 # extract package, build Source
 assert subprocess.call(['dpkg-source', '-x', dscname]) == 0
-os.chdir(srcpkg + '-' + new_ver.split('-')[0])
+os.chdir(srcpkg + '-' + new_ver.rsplit('-', 1)[0])
 assert subprocess.call("dpkg-genchanges -q -S %s -v%s -e\"$(getent passwd $(id -u)|cut -f5 -d:|cut -f1 -d,) <$DEBEMAIL>\" | \
        sed 's/^Distribution:.*$/Distribution: %s/; 1 i\Origin: debian/unstable' > ../%s_%s_source.changes" % 
        (orig_arg, cur_ver, release, srcpkg, new_ver), shell=True) == 0