Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11321 - main/branches/prefix/bin
Date: Sun, 03 Aug 2008 19:14:57
Message-Id: E1KPj2c-00050B-LL@stork.gentoo.org
1 Author: grobian
2 Date: 2008-08-03 19:14:53 +0000 (Sun, 03 Aug 2008)
3 New Revision: 11321
4
5 Modified:
6 main/branches/prefix/bin/repoman
7 Log:
8 revert my manifest recommit patch (bug #229033), such that I can cleanly merge zmedico's slightly adapted version
9
10 Modified: main/branches/prefix/bin/repoman
11 ===================================================================
12 --- main/branches/prefix/bin/repoman 2008-08-03 05:51:33 UTC (rev 11320)
13 +++ main/branches/prefix/bin/repoman 2008-08-03 19:14:53 UTC (rev 11321)
14 @@ -1745,23 +1745,19 @@
15 mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./")
16 myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./")
17 bin_blob_pattern = re.compile("^-kb$")
18 - expansion = set(portage.cvstree.findoption(mycvstree, bin_blob_pattern,
19 + bin_blobs = set(portage.cvstree.findoption(mycvstree, bin_blob_pattern,
20 recursive=1, basedir="./"))
21
22
23 if vcs == "svn":
24 svnstatus = os.popen("svn status").readlines()
25 mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("M") ]
26 - mynew = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
27 + for manifest in [ file for file in mychanged if '/Manifest' in file ]:
28 + mychanged.remove(manifest)
29 + mynew = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
30 myremoved = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
31 - # in contrast to CVS, SVN expands nothing by default.
32 - # bin_blobs historically
33 - # were just there to see what files need to be checked for
34 - # keyword expansion, which is exactly what we do here, so
35 - # slightly change the semantic meaning of "bin_blob"... In the
36 - # future we could store which keyword is expanded.
37 - props = os.popen("svn propget -R svn:keywords").readlines()
38 - expansion = [ prop.split("-")[0].strip() for prop in props ]
39 + # no idea how to detect binaries in SVN
40 + bin_blobs = []
41
42 if vcs:
43 if not (mychanged or mynew or myremoved):
44 @@ -1781,12 +1777,8 @@
45 headerstring = "'\$(Header|Id)"
46 headerstring += ".*\$'"
47 for myfile in myupdates:
48 - # for CVS, expansion contains files that are excluded from expansion
49 - if vcs == "cvs" and myfile in expansion:
50 + if myfile in bin_blobs:
51 continue
52 - # for SVN, expansion contains files that are included in expansion
53 - if vcs == "svn" and myfile not in expansion:
54 - continue
55 myout = commands.getstatusoutput("egrep -q "+headerstring+" "+myfile)
56 if myout[0] == 0:
57 myheaders.append(myfile)
58 @@ -1841,8 +1833,6 @@
59
60 if myupdates or myremoved:
61 myfiles = myupdates + myremoved
62 - if not myheaders and "sign" not in repoman_settings.features:
63 - myfiles += mymanifests
64 fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
65 mymsg = os.fdopen(fd, "w")
66 mymsg.write(commitmessage)
67 @@ -1929,8 +1919,8 @@
68 write_atomic(x, "".join(mylines))
69
70 manifest_commit_required = True
71 - if myupdates or myremoved or mynew:
72 - myfiles=myupdates+myremoved+mynew
73 + if myheaders or myupdates or myremoved or mynew:
74 + myfiles=myheaders+myupdates+myremoved+mynew
75 for x in range(len(myfiles)-1, -1, -1):
76 if myfiles[x].count("/") < 4-repolevel:
77 del myfiles[x]