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

* Re: [gentoo-portage-dev] PATCH: Bumping portage to top of dependancy list (bug 48531)
  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-19  9:04   ` Zac Medico
  0 siblings, 2 replies; 5+ messages in thread
From: Jason Stubbs @ 2005-10-18 10:32 UTC (permalink / raw
  To: gentoo-portage-dev

On Tuesday 18 October 2005 16:49, Zac Medico wrote:
> 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. :)

No good. ;)

What if portage's dependencies aren't satisfied? Something like the below 
(possibly combined with the pprovided stuff) would be better...

--- emerge      (revision 2138)
+++ emerge      (working copy)
@@ -875,8 +875,15 @@
                                        mynewlines.remove(atom)
                                        break

-       return mynewlines
+       mynewlist = []
+       for atom in mynewlines:
+               if portage.dep_getkey(atom) == "sys-apps/portage":
+                       mynewlist.insert(0, atom)
+               else:
+                       mynewlist.append(atom)

+       return mynewlist
+
 def genericdict(mylist):
        mynewdict={}
        for x in mylist:
-- 
gentoo-portage-dev@gentoo.org mailing list



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

* Re: [gentoo-portage-dev] PATCH: Bumping portage to top of dependancy list (bug 48531)
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Marius Mauch @ 2005-10-18 10:52 UTC (permalink / raw
  To: gentoo-portage-dev

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

On Tue, 18 Oct 2005 19:32:26 +0900
Jason Stubbs <jstubbs@gentoo.org> wrote:

> On Tuesday 18 October 2005 16:49, Zac Medico wrote:
> > 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. :)
> 
> No good. ;)
> 
> What if portage's dependencies aren't satisfied? Something like the
> below (possibly combined with the pprovided stuff) would be better...

Hmm, how would that work with virtual/portage != sys-apps/portage?
(rhetoric question)

Marius

-- 
Public Key at http://www.genone.de/info/gpg-key.pub

In the beginning, there was nothing. And God said, 'Let there be
Light.' And there was still nothing, but you could see a bit better.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-portage-dev] PATCH: Bumping portage to top of dependancy list (bug 48531)
  2005-10-18 10:52   ` Marius Mauch
@ 2005-10-18 11:25     ` Jason Stubbs
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Stubbs @ 2005-10-18 11:25 UTC (permalink / raw
  To: gentoo-portage-dev

On Tuesday 18 October 2005 19:52, Marius Mauch wrote:
> On Tue, 18 Oct 2005 19:32:26 +0900
>
> Jason Stubbs <jstubbs@gentoo.org> wrote:
> > On Tuesday 18 October 2005 16:49, Zac Medico wrote:
> > > 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. :)
> >
> > No good. ;)
> >
> > What if portage's dependencies aren't satisfied? Something like the
> > below (possibly combined with the pprovided stuff) would be better...
>
> Hmm, how would that work with virtual/portage != sys-apps/portage?
> (rhetoric question)

That's where the "something like" comes into it. What do you expect for less 
than one minute's work? (rhetoric question)

--
Jason Stubbs
-- 
gentoo-portage-dev@gentoo.org mailing list



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

* Re: [gentoo-portage-dev] PATCH: Bumping portage to top of dependancy list (bug 48531)
  2005-10-18 10:32 ` Jason Stubbs
  2005-10-18 10:52   ` Marius Mauch
@ 2005-10-19  9:04   ` Zac Medico
  1 sibling, 0 replies; 5+ messages in thread
From: Zac Medico @ 2005-10-19  9:04 UTC (permalink / raw
  To: gentoo-portage-dev

Jason Stubbs wrote:
> What if portage's dependencies aren't satisfied? Something like the below 
> (possibly combined with the pprovided stuff) would be better...

Silly me, I forgot that portage had dependencies. Your patch looks good.  It's sad that simple little bugs like this have been sitting for so long.  :/

Zac
-- 
gentoo-portage-dev@gentoo.org mailing list



^ 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