Review your favorite Linux distribution.
Go Back > Blogs > GlennsPref
User Name


Rate this Entry

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

Posted 05-12-2010 at 01:10 AM by GlennsPref

That is all it did.

	Of course to simplify the editing of this script, it calls other scripts that do most of the work,
 and it's still a “work in progress”(wip). It has some text to put up on the screen to give some
 feedback to the user of what stage the process is up to, and although some of them are duplicated in
 the other scrips, it works quite well (IMHO).
#! /bin/zsh 
#echo "/home/glenn/bin/backup-rpms" 
echo  "/home/glenn/bin/backup-rpms" 
sudo sh /home/glenn/build/rpms/organise-rpms 
echo "call organise-rpms....." 
echo "Backup-rpms" 
#echo "generating new for local archives........" 
sudo sh /home/glenn/build/rpms/gen-hdlist2 
echo "Backup-rpms" 
echo "rebuilding local rpm and file databases... this might take a while ........" 
sudo rpm --rebuilddb && sudo updatedb 
echo "Backup-rpms" 
echo "local database up to date ........" 
sudo sh /home/glenn/build/rpms/update-rpm-database 
echo "run rpm -qa | sort | less > /home/glenn/build/note-rpm-installed-list-`date +%Y-%m-%d-%H`.txt, maybe upto 15kb text."/n 
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 
echo "" 
echo "all repositories are now up to date, any errors? see above!" 
date && whoami
The first thing it does is call organise-rpms from ~/build/rpms...
sudo sh /home/glenn/build/rpms/organise-rpms
This script finds rpms where they maybe stored by me, and the programs DrakRPM and Smart. (I really like Smart, it is a synaptic-like package manager although it has been changed over the years, and is now much more useful, but harder to hack, like saving the rpms (Grief)).
Posted in Uncategorized
Views 539 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 12:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration