[firmware-free] 06/19: Allow files in linux-firmware to be excluded from consideration
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Sun May 22 22:54:40 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 99ffadef3423ab0a09ff671818e225859308d2ce
Author: Ben Hutchings <benh at debian.org>
Date: Wed Mar 9 05:18:25 2011 +0000
Allow files in linux-firmware to be excluded from consideration
[bwh: Cherry-picked from firmware-nonfree commit
452b0e6dde078acf1581c8a97b2572aa2bcfdb78. The new condition has to be
handled a differently in our version of check_upstream.py.]
---
debian/bin/check_upstream.py | 11 +++++++++--
defines | 3 +++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/debian/bin/check_upstream.py b/debian/bin/check_upstream.py
index 3661d60..dcaceb7 100755
--- a/debian/bin/check_upstream.py
+++ b/debian/bin/check_upstream.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import errno, filecmp, glob, os.path, re, sys
+import errno, filecmp, fnmatch, glob, os.path, re, sys
rules_defs = dict((match.group(1), match.group(2))
for line in file('debian/rules.defs')
for match in [re.match(r'(\w+)\s*:=\s*(.*)\n', line)])
@@ -10,9 +10,13 @@ from debian_linux.firmware import FirmwareWhence
from debian_linux.config import ConfigParser, SchemaItemList
def main(source_dir):
- config = ConfigParser({'base': {'packages': SchemaItemList()}})
+ config = ConfigParser({
+ 'base': {'packages': SchemaItemList()},
+ 'upstream': {'exclude': SchemaItemList()},
+ })
config.read('defines')
dest_dirs = config['base',]['packages']
+ exclusions = config['upstream',]['exclude']
for section in FirmwareWhence(open(os.path.join(source_dir, 'WHENCE'))):
if re.search(r'^BSD\b'
@@ -31,6 +35,9 @@ def main(source_dir):
# Suitable for main if source is available or binary is
# preferred form for modification
for file_info in section.files.values():
+ if any(fnmatch.fnmatch(file_info.binary, exclusion)
+ for exclusion in exclusions):
+ continue
sources = set()
if file_info.source or file_info.binary.endswith('.cis'):
update_file(source_dir, dest_dirs, file_info.binary)
diff --git a/defines b/defines
index f3531f9..a46641e 100644
--- a/defines
+++ b/defines
@@ -1,3 +1,6 @@
[base]
packages:
linux-free
+
+[upstream]
+exclude:
--
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