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 07-01-2012, 01:56 PM   #1
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 363

Rep: Reputation: 85
Simple question about pkgtools


Hi,

The following is a description of the updatepkg application taken directly from the Intro to Slackware page at Linux.com:

https://www.linux.com/learn/tutorials/261878-intro-to-slackware-package-management/

Quote:
upgradepkg - upgradepkg upgrades a Slackware package from an older version to a newer one.  It does this by INSTALLING the new package onto the system, and then REMOVING any files from the old package that aren't in the new package (taken from the man pages)
I am just a bit confused by this and I hope someone can help me understand what happens. Why would the application remove files from the old package that aren't in the new package? Wouldn't that just leave everyone with two copies of every file that ARE in the new package--one from the old version and one from the new?

And how is it that files that the upgrade does NOT contain are safe to remove?

Forgive me if these are newbie questions, but I want to understand.

Thank you.
 
Old 07-01-2012, 02:08 PM   #2
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
Quote:
Why would the application remove files from the old package that aren't in the new package?
Because the new package don't needs them.
Quote:
Wouldn't that just leave everyone with two copies of every file that ARE in the new package--one from the old version and one from the new?
No the new files replace the old files.
Quote:
And how is it that files that the upgrade does NOT contain are safe to remove?
Because a package is a whole unit. upgradepkg is a convenient way of running removepkg and installpkg.
 
1 members found this post helpful.
Old 07-01-2012, 03:30 PM   #3
s1aw0
LQ Newbie
 
Registered: Jun 2012
Posts: 19

Rep: Reputation: Disabled
BloomingNutria, the quote is actually taken from upgradepkg itself. To see it, just run upgradepkg w/o any argument. And upgradepkg is a clearly written bash shell script, so that you can study how it works and even modify it.
 
Old 07-01-2012, 03:45 PM   #4
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 363

Original Poster
Rep: Reputation: 85
@whizje: Oh, I see, thank you!

@s1aw0: I will give it a look.

Thanks!
 
  


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
Simple Question - needing a simple answer plz linuxnoob_sowhut Linux - Distributions 1 12-01-2010 03:54 AM
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 02:03 PM
pkgtools Nightmare HELP!!!!!!!!!! waterox Slackware 4 09-12-2005 12:46 PM
Installing Programs - A simple question from my simple mind jmp875 Linux - Newbie 6 02-18-2004 09:03 PM
simple question seeking simple answer enzo250gto Linux - Newbie 1 10-27-2001 04:08 AM

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

All times are GMT -5. The time now is 04: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