From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DMARC_MISSING, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=4.0.0 Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by chiba.3jane.net (Postfix) with ESMTP id DF1EFAC4CA for ; Sat, 20 Apr 2002 01:28:33 -0500 (CDT) Received: from bucky.dawgdayz.com ([12.231.121.88]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020420062832.OHHJ1102.rwcrmhc54.attbi.com@bucky.dawgdayz.com> for ; Sat, 20 Apr 2002 06:28:32 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Mike Payson To: gentoo-dev@gentoo.org Subject: Re: [gentoo-dev] stabilitylevels and such issues. Date: Fri, 19 Apr 2002 21:37:19 -0700 X-Mailer: KMail [version 1.4] References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200204192137.19703.mike@bucky.dawgdayz.com> Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: 8693f3c4-059d-4cf2-a21d-2e815a931241 X-Archives-Hash: 3f5d680710d639ac1c16cab2c09b0f25 This looks GREAT. Exactly what I had in mind! Obviously PORTAGE_LEVEL sho= uld=20 be in one of the config files, and you need to be able to override the le= vel=20 by specifying a specific version, but excellent for, what, 23 lines of=20 code?!?! =20 On Friday 19 April 2002 05:56 pm, Terje Kvernes wrote: > I've done some hacking (okay, ugly hacking) with portage lately. > reading some source and trying to get a grasp at the code. so far > I've only patched 'dep_bestmatch' to deal with stability-symlinks in > the portage tree. > > this is what the patch actually does: > > almach freeciv # PORTAGE_LEVEL=3D"STABLE" emerge --pretend freeciv > These are the packages that I would merge, in order. > Calculating dependencies ...done! > [ebuild N ] app-games/freeciv-1.12.0-r1 to / > > almach freeciv # emerge --pretend freeciv > These are the packages that I would merge, in order. > Calculating dependencies ...done! > [ebuild N ] app-games/freeciv-1.12.0-r2 to / > > almach / # ls -la /usr/portage/app-games/freeciv/ > total 15 > drwxr-xr-x 3 root root 216 Apr 20 01:47 . > drwxr-xr-x 60 root root 1608 Apr 19 12:20 .. > -rw-r--r-- 1 root root 987 Mar 29 15:52 ChangeLog > drwxr-xr-x 2 root root 128 Apr 19 12:20 files > -rw-r--r-- 1 root root 1288 Feb 6 23:58 freeciv-1.12.0-r1.ebuild > -rw-r--r-- 1 root root 1321 Mar 29 15:52 freeciv-1.12.0-r2.ebuild > lrwxrwxrwx 1 root root 24 Apr 20 01:47 freeciv-stable -> > freeciv-1.12.0-r1.ebuild > > notice that last symlink. :) > > this is against 1.9.1, I haven't even looked at any other version of > portage. > > now, I don't expect this to get anywhere near the main tree. don't > worry about that. :) > > I am however curious to how what people think of the idea, and the > implementation. it probably shows that I haven't coded python in a > year or so. and no, this hasn't been tested overly much, just > enough for me to feel that it apparently "works for me". please, > thump me over the head if there is a reason to do so. > > I know some people want a package.mask to do separate stable > releases, and they probably know I don't like that one bit. > personally, I'm going to take a snapshot of my now stable system > using this scheme. all I need to do is to make a > "-sysok"-symlink for each installed package. this should > also hopefully allow me to do rollbacks if I need to do so. > > if anyone is wondering on the status of the update-flags I also > want, well, that'll need quite a bit more work. it will need to be > integrated into the datastructure that portage uses to keep track of > packages internally -- which will take time. > > anyhow, the patch. I know, I should patch against the portage > sourcecode directly. but still. :) > > --- /usr/lib/python2.2/site-packages/portage-clean.py Sat Apr 20 01:1= 9:57 > 2002 +++ /usr/lib/python2.2/site-packages/portage.py Sat Apr 20 02:29:0= 4 > 2002 @@ -2081,6 +2081,21 @@ > else: > return mymatch > elif not isspecific(mypkgdep): > + keys =3D os.environ.keys() > + > + if 'PORTAGE_LEVEL' in keys: > + if mypkgdep.find("/") > -1: > + level =3D os.environ['PORTAGE_L= EVEL'] > + [ dir, name ] =3D mypkgdep.spli= t("/") > + try: > + ebuild =3D > os.readlink("/usr/portage/" + mypkgdep + "/" + name + "-" + level.lower= ()) > + ebuild =3D > ebuild.replace(".ebuild", "") + = =20 > return self.dep_bestmatch("=3D" + ebuild) + = =20 > except OSError: > + print "\n>>> " + mypkgd= ep + > " has no ebuild with label '" + level + "'." + = =20 > sys.exit(1) > + > + > if not self.hasnode(mypkgdep): > return "" > mynodes=3Dself.getnode(mypkgdep)[:]