[firmware-nonfree] 10/24: check_upstream.py: Reimplement check for unpackaged firmware
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Sun Oct 18 13:49:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository firmware-nonfree.
commit 1030a0b2f909690c4884ad7c85950ba3c8913a13
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Sun Oct 18 06:01:34 2015 +0100
check_upstream.py: Reimplement check for unpackaged firmware
Now that we use an upstream tarball, checking for the presence of a
file isn't enough - we need to compare with the configuration.
---
debian/bin/check_upstream.py | 15 +++++++++++----
debian/changelog | 1 +
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/debian/bin/check_upstream.py b/debian/bin/check_upstream.py
index cf7cb8f..76c4b82 100755
--- a/debian/bin/check_upstream.py
+++ b/debian/bin/check_upstream.py
@@ -52,6 +52,10 @@ def main(source_dir='.'):
over_dirs = ['debian/config/' + package for
package in config['base',]['packages']]
exclusions = config['upstream',]['exclude']
+ packaged_files = {}
+ for package in config['base',]['packages']:
+ for filename in config['base', package]['files']:
+ packaged_files[filename] = package
for section in FirmwareWhence(open(os.path.join(source_dir, 'WHENCE'))):
dist_state = check_section(section)
@@ -59,7 +63,13 @@ def main(source_dir='.'):
if dist_state == DistState.non_free:
if not any(fnmatch.fnmatch(file_info.binary, exclusion)
for exclusion in exclusions):
- update_file(source_dir, over_dirs, file_info.binary)
+ if file_info.binary in packaged_files:
+ update_file(source_dir, over_dirs, file_info.binary)
+ elif os.path.isfile(filename):
+ print('I: %s is not included in any binary package' %
+ file_info.binary)
+ else:
+ print('I: %s: could be added' % file_info.binary)
elif dist_state == DistState.undistributable:
if os.path.isfile(file_info.binary):
print('W: %s appears to be undistributable' %
@@ -74,9 +84,6 @@ def update_file(source_dir, over_dirs, filename):
if not filecmp.cmp(source_file, over_file, True):
print('I: %s: changed' % filename)
return
- if not os.path.isfile(filename):
- print('I: %s: could be added' % filename)
- return
if __name__ == '__main__':
main(*sys.argv[1:])
diff --git a/debian/changelog b/debian/changelog
index 9f15858..faf7327 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ firmware-nonfree (20151018-1) UNRELEASED; urgency=medium
* check_upstream.py: Report possibly undistributable files that are not
excluded
* check_upstream.py: Recognise GPLv3 and GPL dual-licenced files
+ * check_upstream.py: Reimplement check for unpackaged firmware
[ maximilian attems ]
* iwlwifi: Update Intel Wireless 3160, 7260, 7265 and 7265D firmware version
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/firmware-nonfree.git
More information about the Kernel-svn-changes
mailing list