[pacman-dev] messy %REASON% handling

Nagy Gabor ngaba at bibl.u-szeged.hu
Fri Sep 7 12:27:34 EDT 2007

> >     sync400 : Install package with dep that conflicts with older version
> of
> > package
> This should prove the PS of
> http://www.archlinux.org/pipermail/pacman-dev/2007-August/009078.html
> Bye, ngaba
This may not prove that, because the old version of pkg2 is installed; but as I
see, in these case the reason field is not copied.

I'm suggest to work out a %REASON% policy, because I don't like the current method:
-A/U copies the old reason field, if the old package is installed... OK, but the
package may become orphan, so we can say, the reason is the _original_ reason;
if the package is not installed, we get "explicitly installed" reason; fine.
-however, -S seems buggy: it owerwrites the old reason iff the new reason is
depend; so [1] if you have a pkg with depend reason, -S pkg will NOT overwrite
the reason to explicit (here -S is an ~upgrade). [2] And if you have an
explicitly installed pkg2, and "-S pkg1" also upgrades pkg2 (since pkg1 needs a
newer version), the reason of pkg2 will be overwritten to depend (I don't like
this.). Replace makes things even worse...
So we should define and document the rules, then implement it;-)

My suggestion:
-A/U OK, user can use --asdeps, if he want to change the reason (--asexplicit is
also needed IMHO)
-S: the reason field should be kept iff the oldpkg is exists
-change reason of localpkg switch can also be useful: this would let user change
the depend reason to explicit (see [1])

Bye, ngaba

A bit off:
So I prefer "original reason" way, which can be changed by the user later.
Only explicit packages are important to the user, all others are needed to
satisfy deps of explicit packages. So I prefer using the important word instead
of reason (HoldPkgs are the most important packages.)
So I'd prefer
important = 0 <=> depend && !HoldPkg
important = 1 <=> explicit && !HoldPkg
important = 2 <=> HoldPkg; so I think HoldPkg should be stored in local db; and
in sync db

SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/

More information about the pacman-dev mailing list