# 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