Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-05-2006, 10:29 AM
|
#1
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641
Rep:
|
Identifying "non-native" Slackware-packages in /var/log/packages
I would like every once in a while to get a list of all software installed on my system that is not a native part of Slackware (ie which packages came from Pat, and which came from various other slackbuilds?)
Anyone got a good command and/or script to do this?
-Y1
|
|
|
07-05-2006, 11:44 AM
|
#2
|
Member
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279
Rep:
|
What you should do is maintain a ChangeLog just as Patrick does, so you know what you installed, when you installed it and where it came from.
Dennisk
|
|
|
07-05-2006, 11:52 AM
|
#3
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641
Original Poster
Rep:
|
Quote:
Originally Posted by dennisk
What you should do is maintain a ChangeLog just as Patrick does, so you know what you installed, when you installed it and where it came from.
|
Good call, except when a system is inherited and I'm trying to figure out what's done before, which is why I'm trying to make such a script
-Y1
|
|
|
07-05-2006, 12:27 PM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,352
|
Have "ls" display the contents of /var/log/packages sorted by date. That won't tell you everything but it will give you a lot of hints.
|
|
|
07-05-2006, 01:21 PM
|
#5
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641
Original Poster
Rep:
|
I'm almost there - hopefully this should be a significant step towards a functional solution:
Code:
ls -1 /var/log/packages >/tmp/installed_packages
cd /root/slackware
ls -1 */*.tgz | sed -e 's/.*\///' >/tmp/original_packages
diff /tmp/installed_packages /tmp/original_packages
Remaining problem:In addition to strip the preceeding directory name, I also need sed in the same turn to strip the trailing .tgz in order to make sure I compare apples to apples.
Any sed-gurus here who know how to edit my sed statement to make this happen?
-Y1
Last edited by Yalla-One; 07-05-2006 at 01:22 PM.
|
|
|
07-05-2006, 02:15 PM
|
#6
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Rep:
|
There is an option in slackpkg to remove all software which doesn't belong to a standard install, although that doesn't seem to be what you're looking for.
|
|
|
07-05-2006, 02:32 PM
|
#7
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641
Original Poster
Rep:
|
Here's the solution - a bit crude, but does exactly what I needed..
Code:
#!/bin/sh
OUT_INSTALLED=/tmp/slack-installed
OUT_ORIGINAL=/tmp/slack-original
INSTALLDIR=/root/slackware
VARLOG=/var/log/packages
if [ -f $OUT_INSTALLED ]; then
rm -f $OUT_INSTALLED
fi
if [ -f $OUT_ORIGINAL ]; then
rm -f $OUT_ORIGINAL
fi
cd $INSTALLDIR
ls -1 */*.tgz | sed -e 's/.*\///' -e 's/.tgz//' |sort > $OUT_ORIGINAL
cd $VARLOG
ls -1 | sort > $OUT_INSTALLED
cd /tmp
diff $OUT_ORIGINAL $OUT_INSTALLED
|
|
|
07-06-2006, 05:59 AM
|
#8
|
Member
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346
Rep: 
|
Or if your lucky, usually the non-native packages have a name abbreviaton at the end (like all pkgs from linuxpackages.net). Or sometimes the lack of info (description) can be a starting point.
|
|
|
07-06-2006, 06:57 AM
|
#9
|
LQ Newbie
Registered: Dec 2005
Distribution: Slackware 10.2
Posts: 4
Rep:
|
Quote:
Originally Posted by simcox1
There is an option in slackpkg to remove all software which doesn't belong to a standard install, although that doesn't seem to be what you're looking for.
|
"slackpkg clean-system" shows all installed non standard packages (apart from the packages listed in /etc/slackpkg/blacklist) before it asks to remove them.
Code:
root@slackbox:~# slackpkg clean-system
Looking for packages to remove. Please, wait...
amarok-1.3.9-i486-1
bonnie++-1.03a-i386-1
digikam-0.8.1-i486-1asz
freemind-0.8.0-noarch-1sdd
...
Total of package(s): 24
Do you wish to remove selected packages (Y/n)? n
|
|
|
All times are GMT -5. The time now is 11:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|