This is a discussion on What is the "name" of a package? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Below are the instructions from the Slack site about upgradepkg. Something I've always wanted to know: was is meant ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Below are the instructions from the Slack site about upgradepkg. Something I've always wanted to know: was is meant by "same name" I did upgradepkg automake-1.8.5-noarch-1.tgz. It worked. Does the installer only look for the name "automake"? How does upgradepkg know whether you have "name" already installed? I've looked EVERYWHERE for where the "name" is defined. Anyone know? -Al Upgrades a currently installed package with the package specified. If the packages have the same name, then you only need to run upgradepkg packagename to perform the upgrade. If the new package has a different name than the currently installed package, you must use this syntax: upgradepkg oldpackagename%newpackagename |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Al C. wrote: > Below are the instructions from the Slack site about upgradepkg. Something > I've always wanted to know: was is meant by "same name" > > I did upgradepkg automake-1.8.5-noarch-1.tgz. It worked. Does the installer > only look for the name "automake"? How does upgradepkg know whether you have > "name" already installed? > > I've looked EVERYWHERE for where the "name" is defined. Anyone know? Slackware pkgtools looks at - - /var/adm/packages for the currently installed packages, - - /var/adm/scripts for the install scripts for the currently installed packages, - - /var/adm/removed_packages for the packages removed or replaced, and - - /var/adm/removed_scripts for the removal scripts for removed packages - -- Lew Pitcher Master Codewright & JOAT-in-training | GPG public key available on request Registered Linux User #112576 (http://counter.li.org/) Slackware - Because I know what I'm doing. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBfziHagVFX4UWr64RAha5AKCT3SxMMJoHPj0FnrtjhZ CJqTljhgCg86g8 W0zGhjamNgWlcG8NU2YRRnE= =wxND -----END PGP SIGNATURE----- |
| |||
| Lew Pitcher <lpitcher@sympatico.ca> wrote: > > Al C. wrote: > > Below are the instructions from the Slack site about upgradepkg. Something > > I've always wanted to know: was is meant by "same name" > > > > I did upgradepkg automake-1.8.5-noarch-1.tgz. It worked. Does the installer > > only look for the name "automake"? How does upgradepkg know whether you have > > "name" already installed? > > > > I've looked EVERYWHERE for where the "name" is defined. Anyone know? > > Slackware pkgtools looks at > - - /var/adm/packages for the currently installed packages, > - - /var/adm/scripts for the install scripts for the currently installed > packages, > - - /var/adm/removed_packages for the packages removed or replaced, and > - - /var/adm/removed_scripts for the removal scripts for removed packages > Er, yes, and what exactly has that got to do with the question? The OP was asking what upgradepkg regards as the name of a package, is it the whole name of the tgz file (automake-1.8.5-noarch-1.tgz), is it just the application name (automake) or what is it? I seem to remember I had exactly this problem a while ago and I don't think I ever found out what the answer was either. -- Chris Green |
| |||
| usenet@isbd.co.uk wrote: [name of package according to upgradepkg] > I seem to remember I had exactly this problem a while ago and I don't > think I ever found out what the answer was either. well, the answer, of course, is in upgradepkg itself. it's just a shell script, so you can view it: #v+ # Here's a function to figure out the package name from one of those # new long filenames. We'll need this to double check the name of the # old package. package_name() { STRING=`basename $1 .tgz` # Check for old style package name with one segment: if [ "`echo $STRING | cut -f 1 -d -`" = "`echo $STRING | cut -f 2 -d -`" ]; then echo $STRING else # has more than one dash delimited segment # Count number of segments: INDEX=1 while [ ! "`echo $STRING | cut -f $INDEX -d -`" = "" ]; do INDEX=`expr $INDEX + 1` done INDEX=`expr $INDEX - 1` # don't include the null value # If we don't have four segments, return the old-style (or out of spec) package name: if [ "$INDEX" = "2" -o "$INDEX" = "3" ]; then echo $STRING else # we have four or more segments, so we'll consider this a new-style name: NAME=`expr $INDEX - 3` NAME="`echo $STRING | cut -f 1-$NAME -d -`" echo $NAME # cruft for later #VER=`expr $INDEX - 2` #VER="`echo $STRING | cut -f $VER -d -`" #ARCH=`expr $INDEX - 1` #ARCH="`echo $STRING | cut -f $ARCH -d -`" #BUILD="`echo $STRING | cut -f $INDEX -d -`" fi fi } #v- essentially what it comes down to is that the last three segments of a package name, the program version number, architecture and the package version number, are discarded. i.e., if you have a package such as yaboot-1.3.6-powerpc-1, the package name for upgradepkg is yaboot; if you have a package such as xfce4-xkb-plugin-0.3.1-powerpc-2, the package name is xfce4-xkb-plugin. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| |||
| On Wed, 27 Oct 2004 01:56:23 -0400, lpitcher@sympatico.ca wrote: >> Below are the instructions from the Slack site about upgradepkg. Something >> I've always wanted to know: was is meant by "same name" I'm not sure if anybody else has mentioned this already but the "same name" probably comes about because prior to Slackware 8.1 each package was named as an 8.3 file name - eg glibcso.tgz rather than glibc-solibs-2.32-i486-1.tgz If you were upgrading from an old 'short' (8.3) named package to a new 'long' name package, you'd do: upgradepkg glibcso%glibc-solibs-2.32-i486-1.tgz -- www.interlude.org.uk & www.armedslack.org | "Washing machines live longer with Calgon" |
| ||||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 usenet@isbd.co.uk wrote: > Lew Pitcher <lpitcher@sympatico.ca> wrote: > >>Al C. wrote: [snip] >>>I've looked EVERYWHERE for where the "name" is defined. Anyone know? >> >>Slackware pkgtools looks at >>- - /var/adm/packages for the currently installed packages, [snip] > Er, yes, and what exactly has that got to do with the question? Ahhh. Nothing, I guess Chalk it up to an insomniac's half-awake ramblings @ 1:30 AM Sorry [snip] - -- Lew Pitcher Master Codewright & JOAT-in-training | GPG public key available on request Registered Linux User #112576 (http://counter.li.org/) Slackware - Because I know what I'm doing. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBgFlPagVFX4UWr64RAlfyAJ0YLlwCx53EfWHm9n+eSL crt1xH9wCfc8tR WBn+nG0NoMJRDYHt6Yek+Z0= =RPBc -----END PGP SIGNATURE----- |