summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-07 12:45:08 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-07 12:45:08 -0700
commitabb7c534eee48795354ae3ab1b17ef319bf5e6e3 (patch)
treec3a03622c864f08d703e4096093d564472e4e607 /bin/repoman
parent121ec040d163d955f1ce41eecb755e462cd745f6 (diff)
downloadportage-abb7c534eee48795354ae3ab1b17ef319bf5e6e3.tar.gz
portage-abb7c534eee48795354ae3ab1b17ef319bf5e6e3.tar.bz2
portage-abb7c534eee48795354ae3ab1b17ef319bf5e6e3.zip
repoman: Don't count git snapshots as live.
This solves bug #339939 by searching for a EGIT_COMMIT variable definition.
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index 1308ec717..e20accf10 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -442,6 +442,8 @@ live_eclasses = frozenset([
"tla",
])
+_git_snapshot_re = re.compile('^\s*EGIT_COMMIT=')
+
suspect_rdepend = frozenset([
"app-arch/cabextract",
"app-arch/rpm2targz",
@@ -1466,6 +1468,19 @@ for x in scanlist:
eapi = myaux["EAPI"]
inherited = pkg.inherited
live_ebuild = live_eclasses.intersection(inherited)
+ if len(live_ebuild) == 1 and next(iter(live_ebuild)) == 'git':
+ is_snapshot = False
+ f = codecs.open(_unicode_encode(full_path,
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'],
+ errors='replace')
+ for line in f:
+ if _git_snapshot_re.match(line) is not None:
+ is_snapshot = True
+ break
+ f.close()
+ if is_snapshot:
+ live_ebuild = frozenset()
for k, v in myaux.items():
if not isinstance(v, basestring):