[Reproducible-commits] [notes] 04/05: bin/filter-packages: Be cleverer about where packages.yml is

Chris Lamb lamby at moszumanska.debian.org
Sat Feb 7 22:55:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository notes.

commit bcfac55df2c513179d143496c338016d452436a6
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Feb 7 22:54:09 2015 +0000

    bin/filter-packages: Be cleverer about where packages.yml is
---
 bin/filter-packages | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/filter-packages b/bin/filter-packages
index edae736..c3e4c53 100755
--- a/bin/filter-packages
+++ b/bin/filter-packages
@@ -4,6 +4,8 @@ import sys
 import yaml
 import optparse
 
+from os.path import join, dirname, abspath
+
 def main():
     parser = optparse.OptionParser(usage='%prog [options]')
     parser.add_option('--issues', dest='issues', default=None,
@@ -25,7 +27,9 @@ def main():
     if options.issues is not None:
         options.issues = set(options.issues.split(','))
 
-    with open('./packages.yml') as f:
+    filename = join(dirname(dirname(abspath(__file__))), 'packages.yml')
+
+    with open(filename) as f:
         packages = yaml.safe_load(f)
 
     for x, y in sorted(packages.iteritems()):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/notes.git



More information about the Reproducible-commits mailing list