Re: Script in GUI (Was: openSUSE as a router, how to? Solved!)
- From: Vahis <waxborg@xxxxxxxxxxxxxxxxx>
- Date: Fri, 27 Jun 2008 03:02:45 GMT
On 2008-06-26, houghi <houghi@xxxxxxxxxxxxxxxxxx> wrote:
Vahis wrote:
P.S. It should have a button to do this though:
#!/bin/sh
sqlite3 /var/cache/zypp/zypp.db vacuum
rpm --rebuilddb # takes long
for fn in /var/cache/zypp/zypp.db \
/var/lib/rpm/Packages \
/var/lib/rpm/Filemd5s \
/var/lib/rpm/Dirnames \
/var/lib/rpm/Basenames
do
cp $fn $fn.new || exit 1
rm $fn
mv $fn.new $fn
done
You can have that as a button. First see to it that the script can run
as the urser that clicks it. Probably some use of sudo and edit sudoers.
I know it can be a button.
Next you can use kdialog or zenity to turn it into a 'GUI'
I just don't see what the script should be doing.
It could be in YaST > Software > Vacuum Software Database.
The `exit 1` I would probably re-write to an errormessage that pops up
with kdialog/zenity so you know something went wrong.
Software management slows down in a long seasoned system in 10.3.
This script "greases the wheels"
rpm --rebuilddb is obvious.
It then copies the files with a new name and removes the old ones.
Then it renames the new files to old ones.
This "defrags" them and keeps software management running quickly as
new.
I haven't scrutinized what is done in 11.0 there everything is faster
anyway.
Vahis
--
Training new things here:
http://waxborg.servepics.com
"The only thing more expensive than training is the lack of it"
Henry Ford
.
- Follow-Ups:
- References:
- Prev by Date: Re: trouble mounting USB partitioned drive
- Next by Date: Re: openSUSE as a router, how to?
- Previous by thread: Script in GUI (Was: openSUSE as a router, how to? Solved!)
- Next by thread: Re: Script in GUI (Was: openSUSE as a router, how to? Solved!)
- Index(es):