summaryrefslogtreecommitdiff
path: root/gbp/pkg
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-06-05 14:20:04 +0300
commit1316d56c0e91d26d50fbdfc09d1a2dc0bc5260c9 (patch)
tree1337615627f8a33b1bfacbd93e67a2a4521d20f2 /gbp/pkg
parente5ff67f24351feb71417a0de673170c591f9acb1 (diff)
downloadgit-buildpackage-1316d56c0e91d26d50fbdfc09d1a2dc0bc5260c9.tar.gz
git-buildpackage-1316d56c0e91d26d50fbdfc09d1a2dc0bc5260c9.tar.bz2
git-buildpackage-1316d56c0e91d26d50fbdfc09d1a2dc0bc5260c9.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>
Diffstat (limited to 'gbp/pkg')
-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 4759e3ea..ffaf0fba 100644
--- a/gbp/pkg/__init__.py
+++ b/gbp/pkg/__init__.py
@@ -478,7 +478,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():