aboutsummaryrefslogtreecommitdiffstats
path: root/debian/lib/python
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2019-10-23 21:01:15 +0100
committerBen Hutchings <ben@decadent.org.uk>2019-10-23 21:47:25 +0100
commiteb2f83b9727eb20774599e0a153e8e0a0e5517a7 (patch)
tree4ccb9cc9e945a333bc448f0ff259de1daa49cd27 /debian/lib/python
parentf056dd541c76fe859166b931ca1a7252f3e3ff0c (diff)
downloadkernel_replicant_linux-eb2f83b9727eb20774599e0a153e8e0a0e5517a7.tar.gz
kernel_replicant_linux-eb2f83b9727eb20774599e0a153e8e0a0e5517a7.tar.bz2
kernel_replicant_linux-eb2f83b9727eb20774599e0a153e8e0a0e5517a7.zip
Copy template file permissions to output files
Some debhelper config files should be executable, because either: 1. debhelper should execute them (with dh-exec) instead of reading them directly. Currently we change the permissions after substitution. 2. They are included in signed-template binary packages, and lintian will complain about them being non-executable scripts. Currently we override these warnings. Replace the special case code by copying the file permissions bits from the template to the output file in substitute_debhelper_config().
Diffstat (limited to 'debian/lib/python')
-rw-r--r--debian/lib/python/debian_linux/gencontrol.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py
index f34929da0eef..388fc33f6a86 100644
--- a/debian/lib/python/debian_linux/gencontrol.py
+++ b/debian/lib/python/debian_linux/gencontrol.py
@@ -1,4 +1,5 @@
import codecs
+import os
import re
from collections import OrderedDict
@@ -365,6 +366,8 @@ class Gencontrol(object):
target = '%s/%s.%s' % (output_dir, package_name, id)
with open(target, 'w') as f:
f.write(self.substitute(template, vars))
+ os.chmod(f.fileno(),
+ self.templates.get_mode(name) & 0o777)
def merge_build_depends(self, packages):
# Merge Build-Depends pseudo-fields from binary packages into the