I just put portage-2.0.51-r13 into the tree. It's hardmasked
and arch, so just unmask it in package.unmask. I'm looking for
comments here. If you don't care to wrap your brain around my
7 step program below, you could just try it and see if your
virtuals seem better in -r3, -r12, or -r13.

-------------------------------------------
-r13 only has changes to virtuals handling.
-------------------------------------------

It no longer uses /etc/portage/virtuals.

It expands upon Jason's "promotion" idea that is in -r12.

When given the selection of virtuals, give preference to what
is already installed as that will most likely reduce the cost
when updating packages. If a package should be absolutely the
first candidate, then users can set that package and then merge
it which will give them the results that /etc/portage/virtuals
(DEPRECATED) used to provide them. Specifying packages in the
user virtuals file now will only provide first choice if there
are no installed options available. User selections always
override the profile defaults, but installed packages and
combinations thereof supercede the base selections.

There are 3 ways to get virtuals: Profiles, Installed Packages, and
user defined virtuals (/etc/portage/profile/virtuals).

When users specify virtuals they are added to the list from left
to right. Negation operators are treated specially in this scheme.

Here are some lists to illustrate:
  User:              virtual/editor -app-editors/nano app-misc/mc
  Installed:         virtual/editor app-editors/vim
  Profile:           virtual/editor app-editors/nano

1. Take user virtuals, copy the negations into a seperate list.
  NegUser:           virtual/editor -app-editors/nano
  User:              virtual/editor -app-editors/nano app-misc/mc
  Installed:         virtual/editor app-misc/mc app-editors/vim
  Profile:           virtual/editor app-editors/nano

2. Condense the user virtuals so it only contains positive terms.
  NegUser:           virtual/editor -app-editors/nano
  User:              virtual/editor app-misc/mc
  Installed:         virtual/editor app-misc/mc app-editors/vim
  Profile:           virtual/editor app-editors/nano

3. Create a list of installed packages that are also profile virtuals.
  NegUser:           virtual/editor -app-editors/nano
  User:              virtual/editor app-misc/mc
  Installed:         virtual/editor app-misc/mc app-editors/vim
  Profile:           virtual/editor app-editors/nano
  Profile+Installed: virtual/editor [none]

4. Create a list of installed packages that are also user virtuals.
  NegUser:           virtual/editor -app-editors/nano
  Profile:           virtual/editor app-editors/nano
  User:              virtual/editor app-misc/mc
  Installed:         virtual/editor app-misc/mc app-editors/vim
  User+Installed:    virtual/editor app-misc/mc

5. Apply the negations to P+I, Tree, and Profile virtuals.
   We already applied these to user virtuals, and consequently U+I.
  Profile:           virtual/editor [none]
  User:              virtual/editor app-misc/mc
  Installed:         virtual/editor app-misc/mc app-editors/vim
  Profile+Installed: virtual/editor [none]
  User+Installed:    virtual/editor app-misc/mc

6. Now stack the lists together to form the final result in this order
   of preference. (Internally this is reversed in two ways)
   Profile, User, Installed, Profile+Installed, User+Installed

[none] | app-misc/mc | app-misc/mc app-editors/vim | [none] | app-misc/mc

7. Condense the list and use it select the right most thing as the
   best selection of virtuals.

  virtual/editor app-editors/vim app-misc/mc



Opinions? Commentary?

--NJ

Attachment: pgpZvqWX3fjCA.pgp
Description: PGP signature

Reply via email to