LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-11-2013, 10:40 AM   #1
rubankumars
Member
 
Registered: Oct 2010
Distribution: Slackware 14.1,debian 7
Posts: 114

Rep: Reputation: 11
Slackpkg equivalent of "purge" in aptitude


want to know how slackpkg handles config files.are they removed with simple remove option or require any parameters?
Equivalent of purge in slackpkg or any pkg mgmt tool in slackware?
 
Old 02-11-2013, 11:02 AM   #2
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,676

Rep: Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237
For a short overview see here.

For an in-depth explanation see there.

To know more if you have Slackware installed: man <command>

Also, all commands are shell scripts, so you can look into them to see how they work.

Main commands are: installpkg, removepkg, upgradepkg, pkgtool, explodepkg, makepkg, slackpkg.

Last edited by Didier Spaier; 02-11-2013 at 03:43 PM.
 
1 members found this post helpful.
Old 02-11-2013, 03:14 PM   #3
maciuszek
Member
 
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 98

Rep: Reputation: 31
Upon invoking removepkg (which slackpkg does) you'll see warnings if certain items in the packing list are not removed. You can then just remove them yourself after.. redirect output to a file if your doing mass removes.

Since you're new, don't assume slackpkg to be 'omg holds my hand for everything'; its not comparable to apt.. it's just a simple front for pkgtools.

I personally don't even have it installed and just manually check changelogs (follwing stable), gftp the patches dir and `upgradepkg <dwl location>/*`.. then back up. I think its a good idea to have all source and tarballs backedup(especially if you dont have a complete install like me).

Although, it's probably smart to have slackpkg though, especially for it's template functionally.

/* Side note: of course, this also applies to any other packages you have installed 'unoffical' (slackbuilds.org, your own, ...).

If your curious how people ( well me ), manage their packages i can post my random `bash`ing for you to get an understanding */

Have fun with slack!

Last edited by maciuszek; 02-11-2013 at 03:17 PM.
 
Old 02-11-2013, 03:40 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Now, to answer the actual question: There is no equivalent for the purge option in slackpkg, you have to remove config files yourself.
This is caused by the package managing system's way of handling config files and, IIRC, is not intended to change in the future.
 
1 members found this post helpful.
Old 02-11-2013, 03:47 PM   #5
maciuszek
Member
 
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 98

Rep: Reputation: 31
By the way, don't get the wrong idea about slackware.

All maintance is manually, of course there is `slackpkg` and `sbopkg` .. but that's only for their respected repos. if you would like to use software from any other location(ie: gnome -> dropline, mate, ...) these will not suffice:
{
slackpkg only supports 1 mirror and you wont find too many(if any) unofficial repos that have Changelogs and w.e other files slackpkg reads, in the style of mirrors mirroring ftp.slackware.com.
,
sbopkg deals with slackbuild tarballs in the style established by slackbuilds.org.
}

The point i wanted to get across now(and above mentioning i don't use slackpkg) is that in the end what these fronts give is very minimal, implying you should not expect to much and you can do everything with just pkgtools and bash(without too much more effort).
 
Old 02-11-2013, 04:02 PM   #6
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,676

Rep: Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237
Quote:
Originally Posted by TobiSGD View Post
Now, to answer the actual question: There is no equivalent for the purge option in slackpkg, you have to remove config files yourself.
I do not know about purge, but in my understanding, removepkg will remove all files, including directories and symlinks, that installpkg did install (including configuration files), unless one of following conditions be true:
- have changed since installation,
- (directories) include new files/are not empty,
- are found in another package,
- are not found.

Last edited by Didier Spaier; 02-11-2013 at 04:48 PM. Reason: '/are not empty' added.
 
1 members found this post helpful.
Old 02-11-2013, 04:20 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Quote:
Originally Posted by Didier Spaier View Post
I do not know about purge, but in my understanding, removepkg will remove all files, including directories and symlinks, that installpkg did install (including configuration files), unless one of following conditions be true:
- have changed since installation,
- (directories) include new files,
- are found in another package,
- are not found.
You are right with that, but installpkg does not install the actual config files, it only installs the .new files. Those are removed/renamed later.
So at least the first condition is true, if the config files are also grouped up in directories the second condition is also true.

For example have a look at the content of /var/log/packages/slackpkg* :
Code:
tobi ~ ☺ $ cat /var/log/packages/slackpkg* |grep etc
etc/
etc/slackpkg/
etc/slackpkg/blacklist.new
etc/slackpkg/slackpkg.conf.new
etc/slackpkg/templates/
 
1 members found this post helpful.
Old 02-11-2013, 04:46 PM   #8
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,676

Rep: Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237Reputation: 1237
I didn't think about that, probably because I didn't have that broader picture in mind. Thanks, Tobi.
 
Old 02-12-2013, 04:58 AM   #9
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026
Wouldn't be too hard to do manually with something like:
Code:
cd $ROOT
sed -n -e '/FILE LIST:/,$ {/\.new$/s/\.new$// p} ' "var/log/packages/$PACKAGE" | xargs -r rm -f
removepkg $PACKAGE
Note: this doesn't take account of the fact that a file can be in multiple packages in slackware so it could do with tightening further.

Whether it'd be worth adding a --purge option to removepkg to do something similar or not I don't know, The odd unused config file doesn't do any harm, and it's easy enough to do something like the above yourself if you're really anal about leaving them about.
 
1 members found this post helpful.
Old 02-12-2013, 11:17 AM   #10
maciuszek
Member
 
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 98

Rep: Reputation: 31
rubankumars,
Start marking threads as solved
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
debian deb packaging: how to detect "--purge"-switch t0bias Debian 1 06-28-2010 06:24 AM
[SOLVED] How to recover from "slackpkg remove" followed by "installpkg"? catkin Slackware 5 04-29-2010 11:54 AM
Set the status of "purge" packages - dpkg --get-selections kushalkoolwal Debian 7 01-09-2009 12:48 PM
Is there an "apt-get" equivalent of "yum list available"? geeeeky.girl Linux - General 3 07-20-2008 09:40 PM
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 08:27 AM


All times are GMT -5. The time now is 11:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration