Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 229033 | Differences between
and this patch

Collapse All | Expand All

(-)bin/repoman (-9 / +18 lines)
Lines 1737-1755 Link Here
1737
		mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./")
1744
		mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./")
1738
		myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./")
1745
		myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./")
1739
		bin_blob_pattern = re.compile("^-kb$")
1746
		bin_blob_pattern = re.compile("^-kb$")
1740
		bin_blobs = set(portage.cvstree.findoption(mycvstree, bin_blob_pattern,
1747
		expansion = set(portage.cvstree.findoption(mycvstree, bin_blob_pattern,
1741
			recursive=1, basedir="./"))
1748
			recursive=1, basedir="./"))
1742
1749
1743
1750
1744
	if vcs == "svn":
1751
	if vcs == "svn":
1745
		svnstatus = os.popen("svn status").readlines()
1752
		svnstatus = os.popen("svn status").readlines()
1746
		mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("M") ]
1753
		mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("M") ]
1747
		for manifest in [ file for file in mychanged if '/Manifest' in file ]:
1754
		mynew     = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
1748
			mychanged.remove(manifest)
1749
		mynew = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
1750
		myremoved = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
1755
		myremoved = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
1751
		# no idea how to detect binaries in SVN
1756
		# in contrast to CVS, SVN expands nothing by default, but of
1752
		bin_blobs = []
1757
		# course proplist's output is horrible.  bin_blobs historically
1758
		# were just there to see what files need to be checked for
1759
		# keyword expansion, which is exactly what we do here, so
1760
		# slightly change the semantic meaning of "bin_blob"...
1761
		props = os.popen("svn proplist -R").readlines()
1762
		expansion = [ prop[15:-3] for prop in props if prop.startswith("Properties on '") ]
1753
1763
1754
	if vcs:
1764
	if vcs:
1755
		if not (mychanged or mynew or myremoved):
1765
		if not (mychanged or mynew or myremoved):
Lines 1769-1776 Link Here
1769
	headerstring = "'\$(Header|Id)"
1779
	headerstring = "'\$(Header|Id)"
1770
	headerstring += ".*\$'"
1780
	headerstring += ".*\$'"
1771
	for myfile in myupdates:
1781
	for myfile in myupdates:
1772
		if myfile in bin_blobs:
1782
		# for CVS, expansion contains files that are excluded from expansion
1783
		if vcs == "cvs" and myfile in expansion:
1773
			continue
1784
			continue
1785
		# for SVN, expansion contains files that are included in expansion
1786
		if vcs == "svn" and myfile not in expansion:
1787
			continue
1774
		myout = commands.getstatusoutput("egrep -q "+headerstring+" "+myfile)
1788
		myout = commands.getstatusoutput("egrep -q "+headerstring+" "+myfile)
1775
		if myout[0] == 0:
1789
		if myout[0] == 0:
1776
			myheaders.append(myfile)
1790
			myheaders.append(myfile)
Lines 1825-1830 Link Here
1825
1839
1826
	if myupdates or myremoved:
1840
	if myupdates or myremoved:
1827
		myfiles = myupdates + myremoved
1841
		myfiles = myupdates + myremoved
1842
		if not myheaders and "sign" not in repoman_settings.features:
1843
			myfiles += mymanifests
1828
		fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
1844
		fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
1829
		mymsg = os.fdopen(fd, "w")
1845
		mymsg = os.fdopen(fd, "w")
1830
		mymsg.write(commitmessage)
1846
		mymsg.write(commitmessage)
Lines 1911-1918 Link Here
1911
			write_atomic(x, "".join(mylines))
1927
			write_atomic(x, "".join(mylines))
1912
1928
1913
	manifest_commit_required = True
1929
	manifest_commit_required = True
1914
	if myheaders or myupdates or myremoved or mynew:
1930
	if myupdates or myremoved or mynew:
1915
		myfiles=myheaders+myupdates+myremoved+mynew
1931
		myfiles=myupdates+myremoved+mynew
1916
		for x in range(len(myfiles)-1, -1, -1):
1932
		for x in range(len(myfiles)-1, -1, -1):
1917
			if myfiles[x].count("/") < 4-repolevel:
1933
			if myfiles[x].count("/") < 4-repolevel:
1918
				del myfiles[x]
1934
				del myfiles[x]

Return to bug 229033