aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-11-24 17:54:37 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-11-24 17:54:37 +0000
commite5ab6446a8333b386f4b864f2841e979c7624b3c (patch)
tree7747f93424144c1def9150022f506bab5507bac0
parent4473da308dcc3e6d69420eda86d07fb7b23b18e6 (diff)
downloadpaludis-e5ab6446a8333b386f4b864f2841e979c7624b3c.tar.gz
paludis-e5ab6446a8333b386f4b864f2841e979c7624b3c.tar.xz
(ruby) Fix find_unmanaged_files.rb.
-rwxr-xr-x[-rw-r--r--]ruby/demos/find_unmanaged_files.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ruby/demos/find_unmanaged_files.rb b/ruby/demos/find_unmanaged_files.rb
index 048bf8a..f97d9b0 100644..100755
--- a/ruby/demos/find_unmanaged_files.rb
+++ b/ruby/demos/find_unmanaged_files.rb
@@ -13,6 +13,7 @@ def get_contents(repo, files, root)
repo.category_names do |cat|
repo.package_names(cat) do |pkg|
repo.package_ids(pkg) do |pid|
+ next unless pid.supports_action(SupportsInstalledActionTest.new)
next if pid.contents_key.nil?
contents = pid.contents_key.value
contents.each do |entry|
@@ -102,7 +103,7 @@ in_fs = []
Find.find(*files) {|file| in_fs << file}
db.repositories do |repo|
- next if repo.installed_interface.nil?
+ next unless repo.some_ids_might_support_action(SupportsInstalledActionTest.new)
in_fs-= get_contents(repo, files, root)
end