summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-03-18 13:03:45 -0400
committerMonty Taylor <mordred@inaugust.com>2015-03-18 13:06:43 -0400
commitb692905a6cb7191f678f12d01845a6b3fd65b08c (patch)
treef3eda8c2e1cd91cac6b3d065ddd572984c47bad5
parente5e13df52e8b27f79cc70346db594774f0e544cd (diff)
downloadpbr-b692905a6cb7191f678f12d01845a6b3fd65b08c.tar.gz
Don't avoid egg-info quite so often
There are times when we need to run egg-info more frequently than we had before. Change-Id: Ie6ec39f7db28ec7807f1a74bc724f0781380c6cc Closes-Bug: 1433681
-rw-r--r--pbr/packaging.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py
index 486f029..8863651 100644
--- a/pbr/packaging.py
+++ b/pbr/packaging.py
@@ -436,9 +436,13 @@ class LocalEggInfo(egg_info.egg_info):
If we are in an sdist command, then we always want to update
SOURCES.txt. If we are not in an sdist command, then it doesn't
matter one flip, and is actually destructive.
+ However, if we're in a git context, it's always the right thing to do
+ to recreate SOURCES.txt
"""
manifest_filename = os.path.join(self.egg_info, "SOURCES.txt")
- if not os.path.exists(manifest_filename) or 'sdist' in sys.argv:
+ if (not os.path.exists(manifest_filename) or
+ os.path.exists('.git') or
+ 'sdist' in sys.argv):
log.info("[pbr] Processing SOURCES.txt")
mm = LocalManifestMaker(self.distribution)
mm.manifest = manifest_filename