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

Collapse All | Expand All

(-)bin/repoman (-3 / +47 lines)
Lines 562-570 Link Here
562
if not kwlist:
562
if not kwlist:
563
	err("Couldn't read KEYWORDS from arch.list")
563
	err("Couldn't read KEYWORDS from arch.list")
564
564
565
manifest1_compat = not os.path.exists(
566
	os.path.join(portdir, "manifest1_obsolete"))
565
if portdir_overlay != portdir:
567
if portdir_overlay != portdir:
566
	kwlist.update(portage.grabfile(
568
	kwlist.update(portage.grabfile(
567
		os.path.join(portdir_overlay, "profiles", "arch.list")))
569
		os.path.join(portdir_overlay, "profiles", "arch.list")))
570
	manifest1_compat = not os.path.exists(
571
		os.path.join(portdir_overlay, "manifest1_obsolete"))
568
572
569
scanlist=[]
573
scanlist=[]
570
if repolevel==2:
574
if repolevel==2:
Lines 825-832 Link Here
825
829
826
	if os.path.exists(checkdir+"/files"):
830
	if os.path.exists(checkdir+"/files"):
827
		filesdirlist=os.listdir(checkdir+"/files")
831
		filesdirlist=os.listdir(checkdir+"/files")
828
		for y in filesdirlist:
832
		if manifest1_compat:
829
			if y[:7]=="digest-":
833
			for y in filesdirlist:
834
				if not y.startswith("digest-"):
835
					continue
830
				if y[7:] not in dadded:
836
				if y[7:] not in dadded:
831
					#digest not added to cvs
837
					#digest not added to cvs
832
					stats["digest.notadded"]=stats["digest.notadded"]+1
838
					stats["digest.notadded"]=stats["digest.notadded"]+1
Lines 955-961 Link Here
955
			if y in dadded:
961
			if y in dadded:
956
				stats["ebuild.disjointed"]=stats["ebuild.disjointed"]+1
962
				stats["ebuild.disjointed"]=stats["ebuild.disjointed"]+1
957
				fails["ebuild.disjointed"].append(x+"/"+y+".ebuild")
963
				fails["ebuild.disjointed"].append(x+"/"+y+".ebuild")
958
		if not os.path.exists(checkdir+"/files/digest-"+y):
964
		if manifest1_compat and \
965
			not os.path.exists(os.path.join(checkdir, "files", "digest-"+y)):
959
			if mymode=="fix":
966
			if mymode=="fix":
960
				if "--pretend" in myoptions:
967
				if "--pretend" in myoptions:
961
					print "You will need to run:"
968
					print "You will need to run:"
Lines 1597-1602 Link Here
1597
		commitmessage+="\n(Portage version: Unknown)"
1604
		commitmessage+="\n(Portage version: Unknown)"
1598
	if myupdates or myremoved:
1605
	if myupdates or myremoved:
1599
		myfiles = myupdates + myremoved
1606
		myfiles = myupdates + myremoved
1607
1608
		if not manifest1_compat:
1609
			filesdirs = set()
1610
			if repolevel == 3:
1611
				filesdirs.add(os.path.join(".", "files"))
1612
			elif repolevel in (1, 2):
1613
				for x in myfiles:
1614
					xs = x.split(os.path.sep)
1615
					xs = xs[0:4-repolevel]
1616
					xs.append("files")
1617
					filesdirs.add(os.path.join(*xs))
1618
			else:
1619
				raise AssertionError("repolevel=%s" % str(repolevel))
1620
			digest_files = []
1621
			for x in filesdirs:
1622
				dir_path = os.path.join(mydir, x)
1623
				if not os.path.isdir(dir_path):
1624
					continue
1625
				for y in os.listdir(dir_path):
1626
					if y.startswith("digest-"):
1627
						digest_files.append(os.path.join(x, y))
1628
			if digest_files:
1629
				digest_files.sort()
1630
				if "--pretend" in myoptions:
1631
					print "(rm %s)" % " ".join(digest_files)
1632
					print "(/usr/bin/cvs remove %s)" % " ".join(digest_files)
1633
				else:
1634
					for x in digest_files:
1635
						os.unlink(os.path.join(mydir, x))
1636
					retval = spawn(["/usr/bin/cvs", "remove"] + digest_files,
1637
						env=os.environ)
1638
					if retval != os.EX_OK:
1639
						print "!!! Exiting on cvs (shell) error code:",retval
1640
						sys.exit(retval)
1641
				myfiles.extend(digest_files)
1642
				myfiles = list(set(myfiles))
1643
				myfiles.sort()
1600
		fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
1644
		fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
1601
		mymsg = os.fdopen(fd, "w")
1645
		mymsg = os.fdopen(fd, "w")
1602
		mymsg.write(commitmessage)
1646
		mymsg.write(commitmessage)

Return to bug 167667