From b692905a6cb7191f678f12d01845a6b3fd65b08c Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 18 Mar 2015 13:03:45 -0400 Subject: [PATCH] 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 --- pbr/packaging.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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