LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-14-2009, 08:15 AM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
Possible bug or strange feature of upgradepkg?


I use Slackware 12.2 on two machines. Today fan in my primary machine broke down so I started my secondary machine. I didn't use it for a few months, so I decided to upgrade all out of date packages. I put into the directory with the patches sixteen new packages from USB flash drive. Among them there were newer versions of six packages already existing in that directory: bind, mozilla-firefox, mozilla-thunderbird, ntp, samba, and seamonkey. In result I had in that directory these six packages in two versions each:

bind-9.4.3_P3-i486-1_slack12.2
bind-9.4.3_P1-i486-1_slack12.2
mozilla-firefox-3.0.6-i686-1
mozilla-firefox-3.0.13-i686-1
mozilla-thunderbird-2.0.0.22-i686-1
mozilla-thunderbird-2.0.0.19-i686-1
ntp-4.2.4p7-i486-1_slack12.2
ntp-4.2.4p6-i486-1_slack12.2
samba-3.2.7-i486-1_slack12.2
samba-3.2.13-i486-1_slack12.2
seamonkey-1.1.17-i486-1_slack12.2
seamonkey-1.1.14-i486-1_slack12.2

Then I run the command:

Code:
upgradepkg *.tgz
During the update process I observed that upgradepkg program had problems with mentioned packages. Instead of simply upgrade all the packages it did strange things. In the case of bind, mozilla-thunderbird, ntp, and seamonkey it first downgraded these packages and then upgraded them. In the case of mozilla-firefox and samba it first upgraded these packages and then downgraded them. So it did a lot of unnecessary work and after the upgrade process I remained with the old versions of mozilla-firefox and samba.

This is concise abstract from upgradepkg log:

Code:
Upgrading bind-9.4.3_P3-i486-1_slack12.2 package using ./bind-9.4.3_P1-i486-1_slack12.2.tgz
Upgrading bind-9.4.3_P1-i486-1_slack12.2 package using ./bind-9.4.3_P3-i486-1_slack12.2.tgz
Upgrading mozilla-firefox-3.0.6-i686-1 package using ./mozilla-firefox-3.0.13-i686-1.tgz
Upgrading mozilla-firefox-3.0.13-i686-1 package using ./mozilla-firefox-3.0.6-i686-1.tgz
Upgrading mozilla-thunderbird-2.0.0.22-i686-1 package using ./mozilla-thunderbird-2.0.0.19-i686-1.tgz
Upgrading mozilla-thunderbird-2.0.0.19-i686-1 package using ./mozilla-thunderbird-2.0.0.22-i686-1.tgz
Upgrading ntp-4.2.4p7-i486-1_slack12.2 package using ./ntp-4.2.4p6-i486-1_slack12.2.tgz
Upgrading ntp-4.2.4p6-i486-1_slack12.2 package using ./ntp-4.2.4p7-i486-1_slack12.2.tgz
Upgrading samba-3.2.7-i486-1_slack12.2 package using ./samba-3.2.13-i486-1_slack12.2.tgz
Upgrading samba-3.2.13-i486-1_slack12.2 package using ./samba-3.2.7-i486-1_slack12.2.tgz
Upgrading seamonkey-1.1.17-i486-1_slack12.2 package using ./seamonkey-1.1.14-i486-1_slack12.2.tgz
Upgrading seamonkey-1.1.14-i486-1_slack12.2 package using ./seamonkey-1.1.17-i486-1_slack12.2.tgz
This is longer log including all packages skipped and updated:

Code:
+==============================================================================
| Skipping package apr-1.3.8-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package apr-util-1.3.9-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Upgrading bind-9.4.3_P3-i486-1_slack12.2 package using ./bind-9.4.3_P1-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package bind-9.4.3_P1-i486-1_slack12.2...

Removing package /var/log/packages/bind-9.4.3_P3-i486-1_slack12.2-upgraded-2009-08-14,13:37:47...
.
.
.

Installing package bind-9.4.3_P1-i486-1_slack12.2... 
.
.
.

Package bind-9.4.3_P3-i486-1_slack12.2 upgraded with new package ./bind-9.4.3_P1-i486-1_slack12.2.tgz.

+==============================================================================
| Upgrading bind-9.4.3_P1-i486-1_slack12.2 package using ./bind-9.4.3_P3-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package bind-9.4.3_P3-i486-1_slack12.2...

Removing package /var/log/packages/bind-9.4.3_P1-i486-1_slack12.2-upgraded-2009-08-14,13:37:56...
.
.
.

Installing package bind-9.4.3_P3-i486-1_slack12.2... 
.
.
.

Package bind-9.4.3_P1-i486-1_slack12.2 upgraded with new package ./bind-9.4.3_P3-i486-1_slack12.2.tgz.

+==============================================================================
| Skipping package dhcp-3.1.2p1-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package fetchmail-6.3.11-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package ghostscript-8.63-i486-3_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package httpd-2.2.12-i486-2_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package libpng-1.2.37-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package mkinitrd-1.3.3-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Upgrading mozilla-firefox-3.0.6-i686-1 package using ./mozilla-firefox-3.0.13-i686-1.tgz
+==============================================================================

Pre-installing package mozilla-firefox-3.0.13-i686-1...

Removing package /var/log/packages/mozilla-firefox-3.0.6-i686-1-upgraded-2009-08-14,13:38:02...
.
.
.

Installing package mozilla-firefox-3.0.13-i686-1... 
.
.
.

Package mozilla-firefox-3.0.6-i686-1 upgraded with new package ./mozilla-firefox-3.0.13-i686-1.tgz.

+==============================================================================
| Upgrading mozilla-firefox-3.0.13-i686-1 package using ./mozilla-firefox-3.0.6-i686-1.tgz
+==============================================================================

Pre-installing package mozilla-firefox-3.0.6-i686-1...

Removing package /var/log/packages/mozilla-firefox-3.0.13-i686-1-upgraded-2009-08-14,13:38:14...
.
.
.

Installing package mozilla-firefox-3.0.6-i686-1... 
.
.
.

Package mozilla-firefox-3.0.13-i686-1 upgraded with new package ./mozilla-firefox-3.0.6-i686-1.tgz.

+==============================================================================
| Upgrading mozilla-thunderbird-2.0.0.22-i686-1 package using ./mozilla-thunderbird-2.0.0.19-i686-1.tgz
+==============================================================================

Pre-installing package mozilla-thunderbird-2.0.0.19-i686-1...

Removing package /var/log/packages/mozilla-thunderbird-2.0.0.22-i686-1-upgraded-2009-08-14,13:38:23...
.
.
.

Installing package mozilla-thunderbird-2.0.0.19-i686-1... 
.
.
.

Package mozilla-thunderbird-2.0.0.22-i686-1 upgraded with new package ./mozilla-thunderbird-2.0.0.19-i686-1.tgz.

+==============================================================================
| Upgrading mozilla-thunderbird-2.0.0.19-i686-1 package using ./mozilla-thunderbird-2.0.0.22-i686-1.tgz
+==============================================================================

Pre-installing package mozilla-thunderbird-2.0.0.22-i686-1...

Removing package /var/log/packages/mozilla-thunderbird-2.0.0.19-i686-1-upgraded-2009-08-14,13:38:33...
.
.
.

Installing package mozilla-thunderbird-2.0.0.22-i686-1... 
.
.
.

Package mozilla-thunderbird-2.0.0.19-i686-1 upgraded with new package ./mozilla-thunderbird-2.0.0.22-i686-1.tgz.

+==============================================================================
| Upgrading ntp-4.2.4p7-i486-1_slack12.2 package using ./ntp-4.2.4p6-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package ntp-4.2.4p6-i486-1_slack12.2...

Removing package /var/log/packages/ntp-4.2.4p7-i486-1_slack12.2-upgraded-2009-08-14,13:38:43...
.
.
.

Installing package ntp-4.2.4p6-i486-1_slack12.2... 
.
.
.

Package ntp-4.2.4p7-i486-1_slack12.2 upgraded with new package ./ntp-4.2.4p6-i486-1_slack12.2.tgz.

+==============================================================================
| Upgrading ntp-4.2.4p6-i486-1_slack12.2 package using ./ntp-4.2.4p7-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package ntp-4.2.4p7-i486-1_slack12.2...

Removing package /var/log/packages/ntp-4.2.4p6-i486-1_slack12.2-upgraded-2009-08-14,13:38:51...
.
.
.

Installing package ntp-4.2.4p7-i486-1_slack12.2... 
.
.
.

Package ntp-4.2.4p6-i486-1_slack12.2 upgraded with new package ./ntp-4.2.4p7-i486-1_slack12.2.tgz.

+==============================================================================
| Skipping package openssl-0.9.8i-i486-2_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package openssl-solibs-0.9.8i-i486-2_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package php-5.2.10-i486-2_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package ruby-1.8.7_p174-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Upgrading samba-3.2.7-i486-1_slack12.2 package using ./samba-3.2.13-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package samba-3.2.13-i486-1_slack12.2...

Removing package /var/log/packages/samba-3.2.7-i486-1_slack12.2-upgraded-2009-08-14,13:38:56...
.
.
.

Installing package samba-3.2.13-i486-1_slack12.2... 
.
.
.

Package samba-3.2.7-i486-1_slack12.2 upgraded with new package ./samba-3.2.13-i486-1_slack12.2.tgz.

+==============================================================================
| Upgrading samba-3.2.13-i486-1_slack12.2 package using ./samba-3.2.7-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package samba-3.2.7-i486-1_slack12.2...

Removing package /var/log/packages/samba-3.2.13-i486-1_slack12.2-upgraded-2009-08-14,13:39:23...
.
.
.

Installing package samba-3.2.7-i486-1_slack12.2... 
.
.
.

Package samba-3.2.13-i486-1_slack12.2 upgraded with new package ./samba-3.2.7-i486-1_slack12.2.tgz.

+==============================================================================
| Upgrading seamonkey-1.1.17-i486-1_slack12.2 package using ./seamonkey-1.1.14-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package seamonkey-1.1.14-i486-1_slack12.2...

Removing package /var/log/packages/seamonkey-1.1.17-i486-1_slack12.2-upgraded-2009-08-14,13:39:41...
.
.
.

Installing package seamonkey-1.1.14-i486-1_slack12.2... 
.
.
.

Package seamonkey-1.1.17-i486-1_slack12.2 upgraded with new package ./seamonkey-1.1.14-i486-1_slack12.2.tgz.

+==============================================================================
| Upgrading seamonkey-1.1.14-i486-1_slack12.2 package using ./seamonkey-1.1.17-i486-1_slack12.2.tgz
+==============================================================================

Pre-installing package seamonkey-1.1.17-i486-1_slack12.2...

Removing package /var/log/packages/seamonkey-1.1.14-i486-1_slack12.2-upgraded-2009-08-14,13:40:21...
.
.
.

Installing package seamonkey-1.1.17-i486-1_slack12.2... 
.
.
.

Package seamonkey-1.1.14-i486-1_slack12.2 upgraded with new package ./seamonkey-1.1.17-i486-1_slack12.2.tgz.

+==============================================================================
| Skipping package subversion-1.5.7-i486-1_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package svgalib_helper-1.9.25_2.6.27.7-i486-2_slack12.2 (already installed)
+==============================================================================


+==============================================================================
| Skipping package xdg-utils-1.0.2-noarch-3_slack12.2 (already installed)
+==============================================================================
Is it a bug or a ``feature'' of upgradepkg? Have I report it to Patrick or just remember to manually remove older package's sources before updating to the newer ones?
 
Old 08-14-2009, 08:46 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
It's always done that. Caught me out a long while ago too, when I used to manually download all the patches (nowadays I use a rsync mirror so I don't see the duplicates). Upgradepkg doesn't make any distinctions about whether the version is newer than the installed version or not. Probably best to think of it as 'replacepkg'.
 
Old 08-14-2009, 09:07 AM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
So what you do you think of that: is it a bug or a feature? Report it or live with it?
 
Old 08-14-2009, 09:11 AM   #4
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Notabug
 
Old 08-14-2009, 09:14 AM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
It is a feature, not a bug!
The slackware package tools do not work with the concept of "older" or "newer", only with the concept of "different". So, using upgradepkg you can just as easily downgrade a package to an earlier version as upgrade to a newer version.

It is you, the admin of the Slackware system, who is being forced to do some housekeeping.

Eric
 
1 members found this post helpful.
Old 08-14-2009, 10:20 AM   #6
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
I only wonder why upgradepkg used with the wildcard such as *.tgz or mozilla-firefox-* doesn't try to inspect the entire directory and doesn't try to recognize the newest packages.

If someone has in the directory the packages:

Code:
mozilla-firefox-3.0.6-i686-1.tgz
mozilla-firefox-3.0.13-i686-1.tgz
mozilla-thunderbird-2.0.0.22-i686-1.tgz
mozilla-thunderbird-2.0.0.19-i686-1.tgz
and uses the command:

Code:
upgradepkg mozilla-firefox-3.0.6-i686-1.tgz mozilla-thunderbird-2.0.0.19-i686-1.tgz
he explicitly decides to downgrade both these programs.

But if he uses wildcarded commands such as:

Code:
upgradepkg *.tgz
or:

Code:
upgradepkg mozilla-*
he obviously wants to update the packages to the newest versions.

Program upgradepkg interpreting wildcards in an intelligent way could be still used to downgrade the programs.
 
Old 08-14-2009, 10:32 AM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Nope... upgradepkg is not intelligent, it just assumes that you know what you are doing. If you give it a wildcard list of packages to chew on, it will "upgrade" every single one of those.

Learn to live with it, it's the Slackware way ;-)

Eric
 
Old 08-14-2009, 10:36 AM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by w1k0 View Post
Program upgradepkg interpreting wildcards in an intelligent way could be still used to downgrade the programs.
except ofcourse, it's not upgradepkg that's doing the wildcard expansion. It's the shell.

upgradepkg is a simple tool designed to update a single package. The fact that it can be given a list of them is just a convenience to the user. Having it check for duplicates is probably outside of its scope, though if it really bothers you, it shouldn't be that hard for you to write a wrapper script that does what you want.
 
Old 08-14-2009, 10:56 AM   #9
veeall
Member
 
Registered: May 2007
Location: Estonia
Distribution: Slackware64-current
Posts: 298

Rep: Reputation: 56
I propose because 3.0.6 is being considered higher number than 3.0.13 it downgrades firefox. Or am i mistaken?
 
Old 08-14-2009, 10:59 AM   #10
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by veeall View Post
I propose because 3.0.6 is being considered higher number than 3.0.13 it downgrades firefox. Or am i mistaken?
As I understand it, it'll just do them in the order listed and alpha-numerically 3.0.13 will come first and then get overwritten by 3.0.6.
 
Old 08-14-2009, 11:17 AM   #11
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Wouldn't you have been better off using slackpkg?
 
Old 08-14-2009, 11:39 AM   #12
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
Wouldn't you have been better off using slackpkg?
Not all of us enjoy fast downloads and generous download limits. I regularly update my desktop using slackpkg but have the downloads saved rather than deleted (DELALL=off in slackpkg.conf). Then I can copy the contents of /var/cache/packages to a usb key for updating my laptop. Plug the key, change to the directory holding the copied contents, su to root and then 'upgradepkg ./*/*/*.t?z'. This works well for me, but I do need to remember to be careful of multiple versions of packages and also to check for .new files with 'slackpkg new-config'.
 
Old 08-14-2009, 02:06 PM   #13
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Quote:
Originally Posted by veeall View Post
I propose because 3.0.6 is being considered higher number than 3.0.13 it downgrades firefox. Or am i mistaken?
Just like Alien BOB said before, upgradepkg doesnt care about versions.
If you point it to a file which has a different version than the one you have installed, it will "upgrade" it even if its in essense a downgrade.
It wouldnt matter even if the file was firefox-2.1.
So you are mistaking, yes.

Remember, this is Slackware. The package manager is the admin.

Last edited by sahko; 08-14-2009 at 02:10 PM.
 
Old 08-14-2009, 03:31 PM   #14
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Alien Bob View Post
Learn to live with it, it's the Slackware way ;-)
I'm learning to live with it for nine years. So far I always removed old packages from the directory including updates before I started upgradepkg. Today I was forced to use the other machine and I was in a rush so I just copied newer packages from USB flash drive to the directory with the updates and I started upgradepkg immediately. In result I observed that strange feature of that program. It isn't strange for those who know about it -- it was strange for me because I saw it for the first time.

Just the same as allend I always download new packages only once and then ``clone'' them on two other machines: my secondary and mine friend's primary. As a matter of fact I have ``fast downloads and generous download limits'' but I don't like to generate unwanted traffic. Perhaps I'm slightly old-fashioned.
 
  


Reply

Tags
feature



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: No XO Printer Support is a Feature Not a Bug LXer Syndicated Linux News 1 10-24-2008 01:29 PM
wget 1.8.2 - feature or bug? tek1024 Linux - Software 2 02-27-2007 07:39 AM
Is this a bug, or a new feature? zero_g Programming 2 09-20-2006 07:57 AM
bug or feature? Gunnyman Linspire/Freespire 5 03-06-2004 03:18 PM
DrakPerm feature or bug? Doergn Mandriva 0 09-20-2003 05:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration