[firmware-free] 14/19: check_upstream.py: Report possibly undistributable files that are not excluded

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun May 22 22:54:44 UTC 2016


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

benh pushed a commit to branch master
in repository firmware-free.

commit 4ac7bf6a907c6515d2db67b400fdec2c7c2b85c8
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Oct 18 03:41:37 2015 +0100

    check_upstream.py: Report possibly undistributable files that are not excluded
    
    [bwh: Cherry-picked from firmware-nonfree commit
     6ba0ce53f284371c609d6497451562a4e69dfa26]
---
 debian/bin/check_upstream.py | 13 +++++++++----
 debian/changelog             |  2 ++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/debian/bin/check_upstream.py b/debian/bin/check_upstream.py
index 5652536..f2af369 100755
--- a/debian/bin/check_upstream.py
+++ b/debian/bin/check_upstream.py
@@ -54,13 +54,18 @@ def main(source_dir='.'):
     exclusions = config['upstream',]['exclude']
 
     for section in FirmwareWhence(open(os.path.join(source_dir, 'WHENCE'))):
-        if check_section(section) == DistState.free:
-            for file_info in section.files.values():
+        dist_state = check_section(section)
+        for file_info in section.files.values():
+            if dist_state == DistState.free:
                 if not any(fnmatch.fnmatch(file_info.binary, exclusion)
                            for exclusion in exclusions):
                     update_file(source_dir, over_dirs, file_info.binary)
                     for source in file_info.source:
                         update_file(source_dir, over_dirs, source)
+            elif dist_state == DistState.undistributable:
+                if os.path.isfile(file_info.binary):
+                    print('W: %s appears to be undistributable' %
+                          file_info.binary)
 
 def update_file(source_dir, over_dirs, filename):
     source_file = os.path.join(source_dir, filename)
@@ -69,10 +74,10 @@ def update_file(source_dir, over_dirs, filename):
                           glob.glob(os.path.join(over_dir, filename + '-*'))):
             if os.path.isfile(over_file):
                 if not filecmp.cmp(source_file, over_file, True):
-                    print('%s: changed' % filename)
+                    print('I: %s: changed' % filename)
                 return
     if not os.path.isfile(filename):
-        print('%s: could be added' % filename)
+        print('I: %s: could be added' % filename)
         return
 
 if __name__ == '__main__':
diff --git a/debian/changelog b/debian/changelog
index 2dc417c..134e22b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ firmware-free (20130117-1) UNRELEASED; urgency=medium
     the appropriate package
   * debian/bin: Use Python 3 (as assumed by linux-support-4.2.0-1)
   * Update to linux-support 4.5.0-2
+  * check_upstream.py: Report possibly undistributable files that are not
+    excluded
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sun, 16 Aug 2015 18:43:29 +0200
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/firmware-free.git



More information about the Kernel-svn-changes mailing list