Salut,

> The use case I have in mind here is:
>   I have two machines: a laptop, and a server. I don't run apt very often
>   on the server, but I still care about the packages installed there. So,
>   I'd like to monitor those packages using how-can-i-help on my laptop.
> It would be more convenient if the list of packages was provided as a
> file (.config/how-can-i-help/packages by default, maybe?).

As how-can-i-help is primarily intended to be run as apt-get hook, (is
it?) our config file should probably live in /var/lib/how-can-i-help.
Obviously that place is not user writable. I think it would be odd for
the user to manage both its own additional-packages-configuration-file
and a global one.

Maybe `how-can-i-help -p somepackage,anotherniceone` could add these
packages to /var/lib/how-can-i-help/packages when missing and when the
application is run as priviledgied user. 

At first I found it quite confusing the change of behavior depending on
the privileges, and the need to always output: "Not running as root,
implies --all (lists all opportunities)..." and "Show all opportunities,
not just new ones: how-can-i-help --all". Maybe consider some simplier
messages: "All opportunities" and "New opportunities".

Best regards,
Christophe


The not-so-useful per user implementation:
 
diff --git a/bin/how-can-i-help b/bin/how-can-i-help
index 7e34119..524009e 100755
--- a/bin/how-can-i-help
+++ b/bin/how-can-i-help
@@ -27,6 +27,7 @@ require 'optparse'
 HELPITEMS_URL = 'http://udd.debian.org/how-can-i-help.json.gz'
 DATADIR = '/var/lib/how-can-i-help'
 SEEN_LOCAL = "#{DATADIR}/seen.json"
+PACKAGES = "#{Dir.home}/.config/how-can-i-help/packages"
 
 include Debian
 
@@ -95,6 +96,15 @@ str.split(/\n/).each do |l|
   end
 end
 
+# add user defined packages
+if File.file?(PACKAGES)
+  File.open(PACKAGES, 'r') do |f|
+    while (package = f.gets)
+      packages << package.rstrip
+    end
+  end
+end
+
 helpitems_filtered = []
 helpitems.each do |hi|
   next if (not $all) and seen.include?(hi['hash'])


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to