LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Blogs > GlennsPref
User Name
Password

Notices


Rate this Entry

How to save your rpm's for future reuse in Mandriva. p9 of 10

Posted 05-12-2010 at 12:22 AM by GlennsPref

Code:
	The next task is to update the external rpm repo data-bases....

Code:
#! /bin/zsh 
#echo "/home/glenn/bin/backup-rpms" 
echo "/home/glenn/build/rpms/update-rpm-database" 
echo  "Called from, ~/bin/backup-rpms" 
echo 
echo 
echo 
echo 
echo "updating urpmi rpm database....." 
echo 
echo 
echo 
#echo "urpmi.update local repos" 
#sudo urpmi.update local 
#echo "uncomment lines to run update all, skipped for now, GW" 
echo "urpmi.update all" 
sudo urpmi.update -a 
#echo "smart update" 
#sudo smart update 
echo 
echo "Backup-rpms" 
#echo "local repositories are up to date .. GamesBox.GlennsPref.net........Have a nice day!" 
echo "urpmi is up to date .. GamesBox.GlennsPref.net........Have a nice day!" 
date && whoami
smart update is no longer required, as it reads the URPM data-bases The last things to run is a clean up, and checking for missing packages and a catalogue of installed rpms for the system.
Code:
sudo rpm -qa | sort | less > /home/glenn/build/note-rpm-installed-list-`date +%Y-%m-%d-%H`.txt 
echo "run rpm -Va | grep miss & send to /home/glenn/build/anote-rpm-Va-grep-miss-list-`date +%Y-%m-%d-%H`.txt" 
sudo rpm -Va | grep miss > /home/glenn/build/anote-rpm-Va-grep-miss-list-`date +%Y-%m-%d-%H`.txt 
echo "clean rpm cache" 
sudo smart clean 
sudo rm -rf /var/cache/urpmi/rpms/*rpm
rpm -Va | grep miss, takes a while to finish, but can be well worth the wait, before rebooting and having a crash or cli only system because of a missing dep or lib. The output is redirected to a file and the file name is created with the date and hour it was written.
Posted in Uncategorized
Views 1540 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:27 PM.

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