LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-15-2007, 01:39 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Updating Slackware More Efficiently


For the past few releases, when Slackware current is a couple of months old I start testing. With the previous release I provided some nominal feedback to Pat and would like to continue that practice with each release.

I run two scripts to perform the updating in an alternate set of partitions and then I boot to and test the new installation. By the time current becomes the next release I am reasonably comfortable with all the changes between releases.

However, I do not maintain a full installation of Slackware. Because I do not want a full installation, in the past I performed an upgradepkg --install-new and then performed a removepkg of the unwanted packages. That works okay, but is not efficient.

I would like to update Slackware, install all new packages that seem relevant to my needs but not install packages I don't want. Using upgradepkg --install-new installs all packages I don't want as well as the truly new packages added since the previous release. That is, the install-new option cannot distinguish between a truly new package and packages that were removed.

If I was installing fresh every time, I could create my own tag files to ignore those packages I do not want installed. But to my understanding tag files serve no purpose with the upgradepkg and installpkg tools.

So I am l looking for ideas to improve the way I update Slackware.

One possible method is to create my own tag files and perform a "fresh" install (without reformatting the partitions). I haven't studied the setup scripts to learn whether such an approach would succeed.

Another option would be to perform an upgradepkg without using the install-new option and then performing a installpkg for the truly new packages I want to add. This latter idea seems palatable but I need to learn a way to diff the previous release and current directories to create a list of truly new files. (I keep a copy of the previous release and the current branch on my hard drive.)

I realize the CHANGES_AND_ HINTS.TXT document lists new packages added since the previous release, but I would rather use a programmatic method to create that list. A simple diff of the two directories (diff --qr | grep "Only in" does not succeed because the file versions often are different in the file names. I would appreciate some ideas how to diff or create a such list.

Thanks again.
 
Old 12-15-2007, 03:16 PM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Try slackpkg from the extra directory it has an install-new option.
 
Old 12-15-2007, 06:14 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
slackpkg might be an option, especially with the blacklist option. I will investigate further.

In the mean time, I'd appreciate some help from anybody with programmatically comparing the 12.0 and current directories to create a list of new packages added since 12.0. Thanks.
 
Old 12-15-2007, 06:57 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
If you're running your own mirror, you could diff the output of ls -R or find on the 2 hierarchies to see what's been added:
Code:
cd /home/ftp/pub/Linux/Slackware
diff -us <(cd slackware-12.0 && find -type f -name '*tgz') <(cd current && find -type f -name '*tgz')
It's a little messy because it also show changed packages, not just new ones.
 
Old 12-16-2007, 11:31 PM   #5
lstamm
Member
 
Registered: Aug 2007
Location: McBride, BC, Canada
Distribution: Slackware, OpenBSD, Edubuntu
Posts: 53

Rep: Reputation: 18
Each Slackware release has a MANIFEST.bz2 file which lists all packages in the distribution, and all the files within the packages. So running this command on the bunzipped MANIFEST file will result in a file "packages" that lists all the package names, sans version numbers.

grep Package: MANIFEST{12.0,current} |cut -d"/" -f3|cut -d"-" -f1 > packages-{12.0,current}

Run this command on MANIFEST from both 12.0 and -current, and diff the two files. That will tell you what the package differences are.

Similarly,

ls -1 /var/log/packages | cut -d"-" -f1 > installed

will give you a file "installed" that lists all your currently installed packages, sans version numbers.

Parsing this file, and deleting the packages that are only in 12.0, and feeding the results to slackpackage, or upgradepkg, will allow you to just upgrade the installed packages. You will have to make your own decisions about whether to install any newly added packages in -current. There is no way to programmatically decide which you will need. Any big changes, like the change from 11.0 to 12.0, will require more manual intervention to upgrade, but this approach will work well at this time.
 
Old 12-16-2007, 11:49 PM   #6
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Use blacklists. I think all package managers (slackpkg, slapt-get, swaret and others) have those. Still you would be installing new packages which could be depending on the removed ones.
 
Old 12-17-2007, 10:35 AM   #7
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
Quote:
Originally Posted by lstamm View Post
ls -1 /var/log/packages | cut -d"-" -f1 > installed
Good idea in theory, but not quite good enough -- some packages have a "-" in the actual app name.
Have a look at how /sbin/installpkg handles determining the package name -- something along these lines:
Code:
ls xorg-sgml-doctools-1.2-noarch-1 | rev | cut -d - -f 1 | rev
<-- BUILD
Code:
ls xorg-sgml-doctools-1.2-noarch-1 | rev | cut -d - -f 2 | rev
<-- ARCH
Code:
ls xorg-sgml-doctools-1.2-noarch-1 | rev | cut -d - -f 3 | rev
<-- VERSION
Code:
ls xorg-sgml-doctools-1.2-noarch-1 | rev | cut -d - -f 4- | rev
<-- NAME

That should give you an idea of how to proceed...
 
Old 12-17-2007, 01:01 PM   #8
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by rworkman View Post
Quote:
Originally Posted by lstamm View Post
ls -1 /var/log/packages | cut -d"-" -f1 > installed
Good idea in theory, but not quite good enough -- some packages have a "-" in the actual app name.
I don't think any packages should have a "-" followed by a digit as the package name, so
Code:
ls -1 /var/log/packages | sed -e 's/-[0-9].*//' > installed
should work, no?

Brian
 
Old 12-17-2007, 01:15 PM   #9
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
Hmm, I can't think of any - the closest that comes to mind is slang2 (but yeah, doesn't match the pattern, so your sed line would work). That is probably a bit more efficient than what I posted, but I'm not sure it's an issue for the intended use case. Whatever works
 
Old 12-17-2007, 03:11 PM   #10
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
I wouldn't be human if I didn't take this opportunity to promote my own tool to manage a slackware-current system. The best one, in my humble opinion (which may be a bit biased) .

http://slackroll.sourceforge.net/
 
Old 12-21-2007, 07:07 PM   #11
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Thanks for the responses. I will try some of the suggestions.

I pretty much know what I want installed. The script I wrote mentioned in the original post automates my update testing. The Changes and Hints file provides a list of new files. I simply wanted a programmatic way of determining the new files in case the Changes and Hints is incorrect.
 
Old 12-21-2007, 08:49 PM   #12
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
Quote:
Originally Posted by Woodsman View Post
... in case the Changes and Hints is incorrect.
If it's incorrect, fuss at me so I can fix it.
 
Old 12-22-2007, 07:18 PM   #13
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
If it's incorrect, fuss at me so I can fix it.
I was somewhat writing tongue in cheek, but I can do that --- after I learn to programmatically diff my stable and current mirrors on my local hard drive. :lol:

I wish I had more time to provide meaningful feedback with Slackware, especially during Current development. Currently I only have time on weekends (which explains the delays between my posts) and even that time is limited. Today I made another pass at installing Current, but have no progress testing. Too many other things to do.
 
  


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
Updating Slackware 11 lgtrean Slackware 10 06-17-2007 12:18 PM
Using filesystem efficiently ce124 Linux - Newbie 3 12-29-2006 09:38 PM
How to use slapt-get efficiently? MX_Unforgiven Slackware 3 03-04-2006 02:38 PM
Updating from Slackware 10 to 10.1 RestInPieces Linux - Software 6 03-23-2005 07:20 AM
Updating Slackware? JCdude2525 Linux - Software 2 08-15-2004 04:08 PM

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

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