I have noticed that in a lot of posts that one of the questions that keeps
coming up is what is or is not installed in RPM software.
The question of are dependencies being broken or are the development
packages or kernel sources installed.
Yes, you can check that via yast or gnome rpm manager but that assumes
that you can get there or know it exists. Secondly capture of the list for
keeping track or posting becomes a problem.
To help make the task easier I have provided a simple shell script
----Cut from here ---
#Script to Get Inventory of RPM Installed packages on Linux
#Author: Martin Rasch February 25th., 2005
#I Had a need to List What Software was available via the Console.
#Since the System Monitor is Bad can not do operations via KDE or Gnome.
#This has been like repairing via the Recovery Console on Windows 2000 or XP.
#!/bin/bash
#Clear the screen
clear
echo "Linux RPM Inventory for System at $(hostname) using $(uname -r)"
echo "This program will create a sorted file that lists what packages are installed"
echo "Please wait this may take some time ..."
#Query all packages
echo "Getting the list via RPM Manager"
rpm -qa > packages
echo "Sorting the list"
sort packages > installed
echo "Total number of Packages $(wc -l installed)" >>installed
#Add line numbers to list
echo "Adding Numbers to List"
cat -n installed >temp
mv temp installed
echo "List Created $(date)" >> installed
echo "For System $(hostname) using $(uname -r)" >> installed
echo "The Inventory is located in file installed"
echo "Done."
#normal exit
exit 0
-- Cut to here --
While in a terminal console:
The script can be created with this command
touch inventoy.sh
Cut and or paste or hand enter the material between the cut and paste
points.
Then give the script permissions correct for acting as program
chmod 711 inventory.sh
To run the script enter at prompt.
./inventory.sh
The list of installed RPM packages will be in a file installed.
if you want to use this a tracking list enter the following
mv installed installed_thisdate.txt
chmod 777 installed_thisdate.txt
You then can archive an on going list of software installed
and have the ability to check against patches or dependencies.
Hope this helps to make life easier for POSTS and general operations.
Martin