public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Payson <mike@bucky.dawgdayz.com>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] stabilitylevels and such issues.
Date: Fri, 19 Apr 2002 21:37:19 -0700	[thread overview]
Message-ID: <200204192137.19703.mike@bucky.dawgdayz.com> (raw)
In-Reply-To: <wxxd6wvrxvh.fsf@nommo.uio.no>

This looks GREAT. Exactly what I had in mind! Obviously PORTAGE_LEVEL should 
be in one of the config files, and you need to be able to override the level 
by specifying a specific version, but excellent for, what, 23 lines of 
code?!?!   

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="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
>   "<package>-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:19:57
> 2002 +++ /usr/lib/python2.2/site-packages/portage.py Sat Apr 20 02:29:04
> 2002 @@ -2081,6 +2081,21 @@
>                         else:
>                                 return mymatch
>                 elif not isspecific(mypkgdep):
> +                       keys = os.environ.keys()
> +
> +                       if 'PORTAGE_LEVEL' in keys:
> +                               if mypkgdep.find("/") > -1:
> +                                       level = os.environ['PORTAGE_LEVEL']
> +                                       [ dir, name ] = mypkgdep.split("/")
> +                                       try:
> +                                               ebuild =
> os.readlink("/usr/portage/" + mypkgdep + "/" + name + "-" + level.lower())
> +                                               ebuild =
> ebuild.replace(".ebuild", "") +                                            
>   return self.dep_bestmatch("=" + ebuild) +                                
>       except OSError:
> +                                               print "\n>>> " + mypkgdep +
> " has no ebuild with label '" + level + "'." +                             
>                  sys.exit(1)
> +
> +
>                         if not self.hasnode(mypkgdep):
>                                 return ""
>                         mynodes=self.getnode(mypkgdep)[:]



  reply	other threads:[~2002-04-20  6:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-20  0:56 [gentoo-dev] stabilitylevels and such issues Terje Kvernes
2002-04-20  4:37 ` Mike Payson [this message]
2002-04-20 10:56   ` Terje Kvernes
2002-04-20 18:31     ` Mike Payson
2002-04-21  2:12       ` Terje Kvernes
2002-04-21  5:26         ` Mike Payson
2002-04-21  5:29         ` Mike Payson
2002-04-21 23:47     ` Terje Kvernes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200204192137.19703.mike@bucky.dawgdayz.com \
    --to=mike@bucky.dawgdayz.com \
    --cc=gentoo-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox