public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] PATCH: Bumping portage to top of dependancy list (bug 48531)
@ 2005-10-18  7:49 Zac Medico
  2005-10-18 10:32 ` Jason Stubbs
  0 siblings, 1 reply; 5+ messages in thread
From: Zac Medico @ 2005-10-18  7:49 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

http://bugs.gentoo.org/show_bug.cgi?id=48531

This simple patch automatically bumps portage to the top of the merge list.  I've always wanted this feature and it is a dependency of bug 108262.  Feedback please. :)

Zac

[-- Attachment #2: bump_portage_top_mergelist.patch --]
[-- Type: text/x-patch, Size: 1173 bytes --]

Index: bin/emerge
===================================================================
--- bin/emerge	(revision 2139)
+++ bin/emerge	(working copy)
@@ -1383,6 +1383,7 @@
 		for x in dolist:
 			for y in portage.db[x]["merge"]:
 				retlist.append(y)
+		bump_portage_top_mergelist(retlist)
 		return retlist
 
 	def xcreate(self,mode="system"):
@@ -1805,7 +1806,7 @@
 							print ">>> Recording",myfavkey,"in \"world\" favorites file..."
 			if not "--fetchonly" in myopts:
 				portage.writedict(myfavdict,portage.root+portage.WORLD_FILE,writekey=0)
-
+			bump_portage_top_mergelist(mymergelist)
 			portage.mtimedb["resume"]["mergelist"]=mymergelist[:]
 
 		# We need to yank the harmful-to-new-builds settings from features.
@@ -2372,6 +2373,14 @@
 			print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
 		print
 
+def bump_portage_top_mergelist(mergelist):
+	for x in mergelist:
+		mysplit=portage.pkgsplit(x[2])
+		if mysplit[0]=="sys-apps/portage":
+			mergelist.remove(x)
+			mergelist.insert(0,x)
+			break
+
 # general options that should be taken into account before any action
 if "--debug" in myopts:
 	edebug=1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-19  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-18  7:49 [gentoo-portage-dev] PATCH: Bumping portage to top of dependancy list (bug 48531) Zac Medico
2005-10-18 10:32 ` Jason Stubbs
2005-10-18 10:52   ` Marius Mauch
2005-10-18 11:25     ` Jason Stubbs
2005-10-19  9:04   ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox