Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/
Date: Mon, 01 Feb 2016 07:21:11
Message-Id: 1454311189.37e0e67a673286f519a689586087960505898c43.zmedico@gentoo
1 commit: 37e0e67a673286f519a689586087960505898c43
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 1 07:19:49 2016 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 1 07:19:49 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=37e0e67a
7
8 repoman/actions: fix headerstring UnboundLocalError
9
10 pym/repoman/actions.py | 10 ++++++----
11 1 file changed, 6 insertions(+), 4 deletions(-)
12
13 diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py
14 index d7f343b..fbcef6e 100644
15 --- a/pym/repoman/actions.py
16 +++ b/pym/repoman/actions.py
17 @@ -566,6 +566,7 @@ class Actions(object):
18
19
20 def thick_manifest(self, myupdates, myheaders, no_expansion, expansion):
21 + headerstring = None
22 if self.vcs_settings.vcs == 'cvs':
23 headerstring = "'\$(Header|Id).*\$'"
24 elif self.vcs_settings.vcs == "svn":
25 @@ -606,10 +607,11 @@ class Actions(object):
26
27 headerstring = "'\$(%s).*\$'" % "|".join(enabled_keywords)
28
29 - myout = repoman_getstatusoutput(
30 - "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile)))
31 - if myout[0] == 0:
32 - myheaders.append(myfile)
33 + if headerstring is not None:
34 + myout = repoman_getstatusoutput(
35 + "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile)))
36 + if myout[0] == 0:
37 + myheaders.append(myfile)
38
39 print("%s have headers that will change." % green(str(len(myheaders))))
40 print(