diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-07-03 15:34:27 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-07-03 16:00:34 +0200 |
commit | 2bc3801a5f4ffacce4d8b34cdf2e22f6291401e2 (patch) | |
tree | bf7a991e08e8b7c749965e8d359af9f0f76b59b5 /gbp/scripts/import_dsc.py | |
parent | b1e2b96dee730e92e6db3ff96d42677f6b7383e6 (diff) |
import_dsc: don't assume component tarballs have the correct name
The tarball needs to be unpacked into component/ regardless how
the toplevel directory in the tarball itself is named.
Closes: #829458
Diffstat (limited to 'gbp/scripts/import_dsc.py')
-rw-r--r-- | gbp/scripts/import_dsc.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py index 4bd726cd..4cbf8d56 100644 --- a/gbp/scripts/import_dsc.py +++ b/gbp/scripts/import_dsc.py @@ -1,6 +1,6 @@ # vim: set fileencoding=utf-8 : # -# (C) 2006, 2007, 2011, 2012, 2015 Guido Guenther <agx@sigxcpu.org> +# (C) 2006, 2007, 2011, 2012, 2015, 2016 Guido Guenther <agx@sigxcpu.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -27,7 +27,7 @@ import pipes import time import gbp.command_wrappers as gbpc from gbp.deb.dscfile import DscFile -from gbp.deb.upstreamsource import DebianUpstreamSource +from gbp.deb.upstreamsource import DebianUpstreamSource, unpack_subtarball from gbp.deb.git import (DebianGitRepository, GitRepositoryError) from gbp.deb.changelog import ChangeLog from gbp.git import rfc822_date_to_git @@ -346,10 +346,9 @@ def main(argv): dirs['tmp'] = os.path.abspath(tempfile.mkdtemp(dir='..')) upstream = DebianUpstreamSource(src.tgz) upstream.unpack(dirs['tmp'], options.filters) - for tarball in src.additional_tarballs.values(): + for (component, tarball) in src.additional_tarballs.items(): gbp.log.info("Found component tarball '%s'" % os.path.basename(tarball)) - subtarball = DebianUpstreamSource(tarball) - subtarball.unpack(upstream.unpacked, options.filters) + unpack_subtarball(upstream.unpacked, component, tarball, options.filters) format = [(options.upstream_tag, "Upstream"), (options.debian_tag, "Debian")][src.native] tag = repo.version_to_tag(format[0], src.upstream_version) |