LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-04-2007, 09:31 PM   #1
arcanex
Member
 
Registered: Mar 2007
Posts: 41

Rep: Reputation: 15
upgradepkg -- what is it used for?


I've never been clear on what exactly upgradepkg does that the other pkgtool scripts doesn't do.

What I've always done is simply remove the old package then install the new package-- which, from its man page, is almost exactly what upgradepkg would've done.

Does upgradepkg does anything else that's so special?
 
Old 04-04-2007, 10:35 PM   #2
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 919

Rep: Reputation: 32
Quote:
Originally Posted by arcanex
Does upgradepkg does anything else that's so special?
No, just as you described. That's it.
 
Old 04-04-2007, 10:45 PM   #3
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
No, not exactly as he described it.
installpkg(8) installs the contents of a package.
removepkg(8) removes the contents of a package.
upgradepkg(8) first renames the original package (the one that will be removed), then installs the new package, then removes the original package. It won't remove files that are contained in any other package, so the new package that was just installed will be left alone - the only files that will actually be removed are ones that are not contained in the new package. One benefit of this is that you can actually see what changed in the package structure - this has saved my butt on more than a few occasions, because I could see immediately that there was something wrong with my package.
Long story short, it might seem like semantics, but using upgradepkg(8), you always have a copy of the package contents on your system, whereas with the original poster's method, you don't. I'll leave it as an exercise for the reader as to why this is important...
 
Old 04-06-2007, 02:46 AM   #4
KleB
Member
 
Registered: Jan 2006
Location: Slovenia
Distribution: Slackware, Gentoo
Posts: 97

Rep: Reputation: 15
upgrdepkg is also great for automating installing procedure a bit - if you have many packages, you can upgradepkg *.tgz and only the ones you already have an older version installed will be upgraded. And the --install-new option enables you exactly what it says. So, besides what has already been told it's also more practical than removing/installing by hand.
 
  


Reply



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
'upgradepkg' params during 10.2 -> 11.0 HaroldWho Slackware 3 11-27-2006 01:10 PM
Trying to upgradepkg mdadm ilhbutshm Slackware 1 09-17-2006 08:33 AM
How to use rsync and upgradepkg... halo14 Slackware 5 01-04-2005 07:41 PM
Does upgradepkg keep filepermissions? Worstje Slackware 4 06-19-2004 09:07 AM
upgradepkg problem strudli Linux - Software 0 09-10-2003 02:05 AM

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

All times are GMT -5. The time now is 05:14 AM.

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