LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-05-2006, 11:29 AM   #1
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Rep: Reputation: 35
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
 
Old 07-05-2006, 12:44 PM   #2
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
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
 
Old 07-05-2006, 12:52 PM   #3
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Original Poster
Rep: Reputation: 35
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
 
Old 07-05-2006, 01:27 PM   #4
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,906

Rep: Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544Reputation: 1544
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.
 
Old 07-05-2006, 02:21 PM   #5
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Original Poster
Rep: Reputation: 35
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 02:22 PM.
 
Old 07-05-2006, 03:15 PM   #6
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
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.
 
Old 07-05-2006, 03:32 PM   #7
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Original Poster
Rep: Reputation: 35
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
 
Old 07-06-2006, 06:59 AM   #8
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
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.
 
Old 07-06-2006, 07:57 AM   #9
notlob
LQ Newbie
 
Registered: Dec 2005
Distribution: Slackware 10.2
Posts: 4

Rep: Reputation: 0
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
 
  


Reply

Tags
package, sed


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
[Slackware 10.2] "Upgrading" packages gtk+, glib, atk, pango stevesk Linux - Newbie 9 07-02-2006 07:09 PM
Where to download rpm packages of "gocr" and "kooka" satimis Linux - Software 6 02-24-2006 12:35 AM
/var/log/packages gone! PurpleMotion Slackware 1 10-02-2004 04:04 PM
how to install the "packages that have been held back" when doing "apt-get upgrade&qu zero79 Debian 5 06-27-2004 09:19 PM
Where can I find the "make" & "cc" packages?? sayeed_ather Mandriva 2 04-28-2004 03:02 AM


All times are GMT -5. The time now is 11:45 PM.

Main Menu
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