summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-06-06 15:21:48 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-14 14:22:08 +0200
commit9444c653983b27eeae93b0a3f12fb8c2ca471d2f (patch)
tree6e0278af20962301f21788d5a144608793093d29
parentaa7179eac94111bff602f0a04e186ee19e0cb29a (diff)
downloadgit-buildpackage-9444c653983b27eeae93b0a3f12fb8c2ca471d2f.tar.gz
git-buildpackage-9444c653983b27eeae93b0a3f12fb8c2ca471d2f.tar.bz2
git-buildpackage-9444c653983b27eeae93b0a3f12fb8c2ca471d2f.zip
UpstreamSource.pack: reuse unpacked dir if no filter is used
Set the unpacked attribute to the source dir if the content is not filtered. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--gbp/pkg/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gbp/pkg/__init__.py b/gbp/pkg/__init__.py
index b6d77ae6..2029ec5f 100644
--- a/gbp/pkg/__init__.py
+++ b/gbp/pkg/__init__.py
@@ -540,7 +540,11 @@ class UpstreamSource(object):
except gbpc.CommandExecFailed:
# repackArchive already printed an error
raise GbpError
- return type(self)(newarchive)
+ new = type(self)(newarchive)
+ # Reuse the same unpacked dir if the content matches
+ if not filters:
+ new.unpacked = self.unpacked
+ return new
@staticmethod
def known_compressions():