[Slapt-get-devel] hello

Jason Woodward woodwardj at jaos.org
Mon Aug 30 20:53:48 EDT 2004


Hi Chris,

> Well before I bring up something, I need to know how slapt-get evaluates 
> version expressions - specifically the qualifications of less/greater 
> than. How exactly to the arch and build fields factor in to the 
> equation? Do they affect less/greater than at all?

This is covered lightly in the FAQ: http://software.jaos.org/BUILD/slapt-get/FAQ (29. How does
the package version comparison algorithm work?)

> An example (or several) might be more concise. First off, lets take the 
> package libdvdread-0.9.4-i486-1.tgz. Lets say this pkg is a dep of 
> dvdbackup-0.1-i486-1.tgz, listed as the minimum threshold version (>=) 
> of libdvdread. According the the FAQ the version arch and build factor 
> into the composite package version. so this package is 0.9.4-i486-1. 
> What if the user had this library installed by any of the following 
> package names:
> 
>     libdvdread-0.9.4-i386-1.tgz        (differing yet upward compatible 
> arch)

They are seen as the same.  For the cmp_pkg_versions() function, the arch is ignored if the
package follows the standard package naming convention (established in 8.1).  If not, an
attempt to parse out the version #'s is made, and a comparison is done.  If that still doesn't
yield a greater or lesser version, standard strcmp() is used as the final word in which version
is greater, lesser, or equivalent.

>     libdvdread-0.9.4-i586-1.tgz        (differing yet backward 
> compatible arch)

They are seen as the same.

>     libdvdread-0.9.4-i686-1.tgz        (differing yet backward 
> compatible arch)

They are seen as the same.

>     libdvdread-0.9.4-i486-2.tgz        (up one build #)

0.9.4-i386-1 is less than 0.9.4-486-2

>     libdvdread-0.9.4-i686-5.tgz        (differing yet backward 
> compatible arch, and higher build 

0.9.4-i386-1 is less than 0.9.4-686-5

> One more question. I have seen many 3rd party packages that include the 
> "tag" of the packager appended to the build #. How does slapt-get handle 
> this? Say the user has the following package installed:
>    
>     libdvdread-0.9.4-i486-1burn.tgz

The integer value of the build strings are compared (0.9.4-i486-1 and 0.9.4-i486-1burn).  So
"1burn" has an integer value of 1, and "1" has an integer value of 1.  So in our example, both
package versions are the same.

> Would this package satisfy the libdvdread-0.9.4-i486-1.tgz dependency?

Yes.
 
> Or if the installed version was one of the pkgs in the previous example?

Yes, as long as it was equal or greater, as I showed in each previous examples.

> Thanks for your insight, and thanks for slapt-get!

No problem whatsoever.  Let me know where the documentation is weak and I'll work on improving it.


take care,
jason

--
Jason Woodward
woodwardj at jaos.org

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
 
mQGiBDrwHPoRBAC3nDJRLKTcFcJWid9PN08ChMI7tuQevomWoVeZpZZ0zzip2w/E
ts55Mx58eRRGFFmgZZGeP7EhyUPzb668LIsU62gFO7G5/oWCr3U3g3peabZsqRC9
FchdiM8DJqQu/7ryAjbQ4OFCSW+jAsMC3tKXrdaB48WiipiXUcKR/sONGwCgzGPf
yxDgOc7n9xWVH0qbUDC/vZsEAKvbckkhpe9/x2A4E15l6DUbliEmboeHiT9NJaok
vLo3ElSO1o6ld5+VhFIkhRmmovrS8oyttZNv8HjMEYf6L3NdZybTHfcdS5EIpguH
Xx2/IGzJKbgX3vM/qhJ0+F1LPuN20mOT0NO/29AXJn3V7rTKoKf/uOOKD+Eqh4r1
QVMoBAC3ZPF3idmuW3j4tqhOaWe2qHlLwEClwdsTG+KOsVYh1sU4RvyMErDIU6r/
MomkLAJfbtBTXKcknW68Y4Uv4B+UkyopklktRBFiMBffoHLUfkkQk/L9Yg1YG27N
COsECiamylF8hNSTcNIQqYXDpyoRcSi2p7gqkxJZrk7GwrX2ObQjSmFzb24gV29v
ZHdhcmQgPHdvb2R3YXJkakBqYW9zLm9yZz6IVwQTEQIAFwUCOvAc+gULBwoDBAMV
AwIDFgIBAheAAAoJEGu22odUp/oeN2IAoKHS+qH8AenlOTKL0Ifl3q1QSlDBAKDL
bvvgl7HoRTHY2b9n3pEPr+KIh7kBDQQ68Bz9EAQA2Ds/2VKc08qaNIkA1okxITmQ
aaNjUrm/au9jNzm9lyEFXWXBNegzP5Y4A1ESDKUt5RETgVhNKd9mGkP7tgPTs3f6
Z595K6W7xeZWONKbl578RbWwE1CiMqEOuXwr1/q0DzfwmNQLcqDcX3o0DEpWE+uZ
G+5CtpkXYiDmccigDKMAAwUD/iZDxEr1HC4iLnGXUCDpxXEtp7Fx150baFzZITns
4hpKRAbTR65s2tL8rh5d8ThDgqW5C9JQja9fMxI2u7zlyM2ALFXJP1xwgZTSOYvn
sq+x41i5tJpce+pDmMEl8X0wew2Z5ZRPfDLv64kKPIGNgVXsAHirH2KjChZat4VC
qkZciEYEGBECAAYFAjrwHP0ACgkQa7bah1Sn+h7qkQCePz0ds5O/dsZrm450pjLs
2V3BkMAAn2/6alBBC9b9F94svdOf0mGY/G5w
=4p8c
-----END PGP PUBLIC KEY BLOCK-----

my($c, at s)=(0,qw( | / - \ ));$|++;my$p;&{sub{map{$p.=chr$_}
unpack(join('a',('',split(//,$_->[1]))),$_->[0]);}}foreach
[qw/74117115116 2333/],[qw/65110111116104101114 2333333/],
[qw/80101114108 2333/],[qw/729799107101114 222333/];{my$z=
$c<4?$s[$c++]:$s [$c=0];printf"\ec%s%s%s",$z,$p,$z,select*
STDOUT,*STDOUT,*STDOUT,0.1,;redo;}##########JAPH##########


More information about the Slapt-get-devel mailing list