Welcome, Guest. Please login or register.
April 18, 2014, 23:26:30 PM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

  Show Posts
Pages: [1]
1  Assistance / Software / Re: The Most Slowest Linux Apps on: May 10, 2008, 07:58:26 AM
...The thread is about why Firefox and OpenOffice cant be tweaked to be faster in Pardus. Maybe this will be better in Pardus 2008, but I doubt it, since it is a known Firefox, OpenOffice issue.

OpenOffice - this is mostly a JRE issue. The faster Java runs, the faster OpenOffice runs. Good news is that the JRE is consistantly slow on all platforms  Tongue
2  General / Tips and tricks / Re: Basic commands for PiSi on: May 10, 2008, 07:03:46 AM
I spent the evening cooking up this little script. I'm glad that there's already a thread for PiSi tricks, becuase a full thread for my script is completely overblown.

This came about when I uninstalled VLC, but there were about 8 other packages still lingering on the system that had been downloaded as dependencies. PiSi has no way of finding and removing uneeded/unused packages that were only installed to satify a dependency. I really liked that feature in Apt , so I wrote a ruby script to run through all of the installed packages, and see if the file you just uninstalled was a reverse dependency.

Code:
ruby script.rb
( just copy the text to a blank text document and name it *.rb)

It will prompt for a file name. I used "vlc" since that was the package I had just uninstalled, but you should use whatever you just uinstalled.

As you can see there's no error handling, but it's a simple script, so a crash shouldn't wreck your record uptime sesson Tongue. Also, it's setup to just search for reverse dependencies of REMOVED packages, so don't try to use this as a general lookup tool.

A final word, this script goes through a bunch of text, and peforms many, many PiSi commands. It takes about 3-5 minutes for it to search thought all of the information and return the results. Good script to run during a commerical/bathroom/taco break.


Code:
#![/bin/ruby]

puts "Target package:"
target = gets.chomp!
puts "Okay, so lets look for files that were installed with "+target+"  \n but are no longer needed...\n This will take awhile"
installed = `pisi li`
found = Array.new
installed.each do |x|
package= x.slice!(0..x.index(' - ')).strip!
if `pisi info #{package} | grep #{target}`.length > 0
depend = `pisi info #{package} | grep 'Reverse Dependencies' `
depend = depend.split("\n")
if depend[0].length < 24
puts package
end
end
end

puts "We're done here, you can use pisi remove <package> to remove the files"
Pages: [1]


Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!