threads = []
list.each do |pkg|
threads << Thread.new do
info = get_info pkg
next if ($Options[:filter] and (info['Name'].include? filter or info['Description'].include? filter))
count += 1
puts search_style(info, (info.ood == 'true' ? :red : nil))
end
end
threads.each {|t| t.join}
$ arson -Dkf midori-git
Downloading package to /home/illarion/packages
Found package midori-git! Downloading it now...
Error: No results found
Why Error? Everything downloaded.
]]>$arson -Dk vlc-embed
Downloading package to <skipped>
Found package vlc-embed! Downloading it now...
/usr/bin/arson:260:in `aur_download': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/bin/arson:260:in `map'
from /usr/bin/arson:260:in `aur_download'
from /usr/lib/ruby/1.8/fileutils.rb:121:in `chdir'
from /usr/lib/ruby/1.8/fileutils.rb:121:in `chdir'
from /usr/bin/arson:207:in `aur_download'
from /usr/bin/arson:200:in `each'
from /usr/bin/arson:200:in `aur_download'
from /usr/bin/arson:197:in `each'
from /usr/bin/arson:197:in `aur_download'
from /usr/bin/arson:482
`pacman -Qm`.each_line do |line|
name, version = line.chomp.split
aur = json_open(Aur_Info % name)['results']
if aur.kind_of?(Hash) and aur['Version'] != version
found_toggle = true
instver = VersionNumber.new(version)
aurver = VersionNumber.new(aur['Version'])
puts "#{colorful(name,:bold)} has an update available: #{colorful(version,:red)} -> #{colorful(aur['Version'],:green)}" if aurver > instver
end
end
for repo in $Options[:foreign]
puts "Searching #{repo} for updates in AUR..."
Dir["#{repo}/*"].each do |pkg|
desc = File.read("#{pkg}/desc")
cache = {:v => desc[/^%VERSION%\n(.*)/, 1], :n => desc[/^%NAME%\n(.*)/, 1]}
aur = json_open(Aur_Info % cache[:n])
if aur['type'] == 'error'
next
end
found_toggle = true
instver = VersionNumber.new(cache[:v])
aurver = VersionNumber.new(aur['Results']['Version'])
puts "#{colorful(name,:bold)} has an update available: #{colorful(version,:red)} -> #{colorful(aur['Version'],:green)}" if aurver > instver
end
But i get again the following error with 'arson -U --foreign giorgio:
Searching /var/lib/pacman/sync/giorgio for updates in AUR...
/usr/bin/arson:394:in `pacman_check_aur_updates': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/bin/arson:385:in `each'
from /usr/bin/arson:385:in `pacman_check_aur_updates'
from /usr/bin/arson:383:in `each'
from /usr/bin/arson:383:in `pacman_check_aur_updates'
from /usr/bin/arson:486
Searching /var/lib/pacman/sync/giorgio for updates in AUR...
/usr/bin/arson:394:in `pacman_check_aur_updates': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/bin/arson:385:in `each'
from /usr/bin/arson:385:in `pacman_check_aur_updates'
from /usr/bin/arson:383:in `each'
from /usr/bin/arson:383:in `pacman_check_aur_updates'
from /usr/bin/arson:486
*** arson 2008-12-24 00:21:33.000000000 +0900
--- arsonbuggy 2008-12-24 00:31:41.000000000 +0900
***************
*** 402,408 ****
end
found_toggle = true
instver = VersionNumber.new(cache[:v])
! aurver = VersionNumber.new(aur['Version'])
puts "#{colorful(name,:bold)} has an update available: #{colorful(version,:red)} -> #{colorful(aur['Version'],:green)}" if aurver > instver
end
--- 402,408 ----
end
found_toggle = true
instver = VersionNumber.new(cache[:v])
! aurver = VersionNumber.new(aur['results']['Version'])
puts "#{colorful(name,:bold)} has an update available: #{colorful(version,:red)} -> #{colorful(aur['Version'],:green)}" if aurver > instver
end
I'm new to patching, so I'm not sure if I made that right... in case it doesn't work, you just have to edit the line in the check_aur_updates function. There's one block that starts with pacman -Qm and another that starts with 'for repo in $Options'. aurver is missing the 'results' key just before 'Version'.
]]>arson --foreign giorgio -U
I get the following:
Searching /var/lib/pacman/sync/giorgio for updates in AUR...
/usr/lib/ruby/gems/1.8/gems/facets-2.5.0/lib/more/facets/version.rb:64:in `<=>': undefined method `<=>' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/facets-2.5.0/lib/more/facets/version.rb:63:in `times'
from /usr/lib/ruby/gems/1.8/gems/facets-2.5.0/lib/more/facets/version.rb:63:in `<=>'
from /usr/bin/arson:395:in `>'
from /usr/bin/arson:395:in `pacman_check_aur_updates'
from /usr/bin/arson:385:in `each'
from /usr/bin/arson:385:in `pacman_check_aur_updates'
from /usr/bin/arson:383:in `each'
from /usr/bin/arson:383:in `pacman_check_aur_updates'
from /usr/bin/arson:486
'giorgio' is a local repo which actually includes, besides my personal packages, all the packages I build from AUR, so I would be interested to know if there are upgrades for them. 'giorgio' is listed in pacman.conf and all the stuff in /var/lib/pacman/sync/giorgio/ seems to be there. Any tip?
]]>Open the PKGBUILD in a text editor and move delete the old md5sums.
Then run makepkg -g >> PKGBUILD
Then makepkg and install.
]]>arson v0.8.7 (21July2008)
- I got the development bug, sigh... :)
- Fixed Search: Arson incorrectly displayed the total search result count.
Before, it included results from community (which is still in AUR DB...) and
now it doesn't! This also happens to increase search speed (marginally...)
- Updated error message for 'existing dir' to actually mean something more
instead of being so idioticly general. /me hates himself for stupid error
message
- Return of TODO list! I'm just not using RTM...wow I hate the fact that it
doesn't have nestable todos!
- Shifted the existence check to be the first. No more querying AUR to check
if a package exists THEN checking if we already downloaded it!
- Added a catch for ambiguous options. Primary example: -s vs -S, they are
mostly different, but OptionParser gets confused when I haven't actually
specified the differenced them. Baby.
- Switched search to a progressive search. It was relatively easy. Silly me.
- Count is now at the end of the results.
- Rewrite of search. MUCH faster now, would be even faster with the AUR
patches.
- Color changes for search result notifiers.
- Recursive downloads! Arson checks for dependencies that don't exist within
the pacman cache and checks AUR. It's silent if it can't find it in AUR as
well. If it's in AUR, arson downloads it.
- Generates a list of repositories from /etc/pacman.conf (== Pacman_Conf).
Used with the recursive downloads, soon to be more.
- Removed --filter, now it completeley follows AUR's search engine. If a
keyword pair doesn't work as expected, test in AUR itself before complaining
to me!
- Added long output to Info!
- Misc changes