[Slapt-get-user] Sources with different priority?

Eugene Crosser crosser at average.org
Mon Apr 25 01:27:42 EDT 2005


Jason Woodward wrote:

>>Suppose I have three sources: official Slackware mirror, third party
>>Gnome distribution site, and linuxpackages.net.  Gnome distribution has
>>several packages overlapping with official ones, and I want them
>>installed even if they have lower version than official.  On the other
>>hand, I have a few extra packages from linuxpackages.net, and I want
>>them up to date.  But linuxpackages.net has some packages overlapping
>>with official ones, and I want them never installed, even if they have
>>higher version than official.
>
> You can use the --config option at runtime.  For your gnome sources, you could run:
>
> # install gnome packages even if downgrade
> slapt-get --config /etc/slapt-get/gnomerc --update && slapt-get --install {pkgs} --reinstall
>
> # install linuxpackages.net packages
> slapt-get --config /etc/slapt-get/lp_net_rc --update && slapt-get --install {pkgs}
>
> # fall back to normal rc with just slackware proper sources
> slapt-get --update && slapt-get --upgrade

Wouldn't the last command overwrite gsb packages with the those that
have higher version in official distribution?

Wouldn't a number of packages be first "upgraded" by second command,
then downloaded again and "downgraded to normal" by third?

One of the reasons to use slapt-get is to minimize network traffic, and
having to download some of the packages more than once (or at least keep
more than one copy in the disk cache), only to get them junked on the
next step, is not very good.  Also, if I understand right, --reinstall
would reinstall a whole bunch of packages, which is rather time-consuming.

>>As far as I understand, this cannot be done with current slapt-get.  If
>>that's true, I'd like to propose a possible modification: associate
>>"priority" with every "source".  When multiple packages with the same
>>name are found, they are first sorted by source priority, and then best
>>version is searched only within the sources of the same, highest
>>priority.  Provided the default priority (for backward compatibility) is
>>set to zero, slapt-getrc might look like this:
>>
>>SOURCE=http://mirror.switch.ch/ftp/mirror/slackware/slackware-current/
>>SOURCE=ftp://ftp.brownjava.org/pub/frg/frg-current/ PRIORITY=1
>>SOURCE=http://www2.linuxpackages.net/Slackware-10.1/ PRIORITY=-1
>
>
> It would be better, I think, to assign priority in each package rather than by the source, but
> there is not format for that within slackware packages at the moment.

In my opinion, prioritizing from within slapt-getrc is more appropriate,
because the decision about which packages are "better" is left to the
user rather than the package maintainer.  Some people may want to
override official packages with custom "cutting edge" ones, others may not.

Initially, I thought about prioritizing by regexp (like "anything that
has 'frg' in the name has priority over everything else"), but that
would not fit in situation when some site carry packages that are not
easily distinguishable by their name.

I understand that my proposal has its limitations too, but IMHO it would
be fitting in many practical cases.  It also should be quite easy to
implement, by just adding one more step in the sorting algorithm.

Eugene
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://software.jaos.org/pipermail/slapt-get-user/attachments/20050425/901d218f/signature.pgp


More information about the Slapt-get-user mailing list