Make the pickled config (config.defines.dump) reproducible
This commit is contained in:
parent
3cfb537922
commit
9747655f89
|
@ -3,6 +3,7 @@ linux (4.9.1-1~exp2) UNRELEASED; urgency=medium
|
||||||
* abiupdate.py: Use current config instead of downloading previous config
|
* abiupdate.py: Use current config instead of downloading previous config
|
||||||
* abiupdate.py: Update base URLs
|
* abiupdate.py: Update base URLs
|
||||||
* abiupdate.py: Add support for incoming.ports.debian.org
|
* abiupdate.py: Add support for incoming.ports.debian.org
|
||||||
|
* Make the pickled config (config.defines.dump) reproducible
|
||||||
|
|
||||||
-- Ben Hutchings <ben@decadent.org.uk> Sat, 07 Jan 2017 17:41:34 +0000
|
-- Ben Hutchings <ben@decadent.org.uk> Sat, 07 Jan 2017 17:41:34 +0000
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import collections
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import pickle
|
import pickle
|
||||||
|
@ -43,7 +44,8 @@ class SchemaItemList(object):
|
||||||
return [j.strip() for j in re.split(self.type, i)]
|
return [j.strip() for j in re.split(self.type, i)]
|
||||||
|
|
||||||
|
|
||||||
class ConfigCore(dict):
|
# Using OrderedDict instead of dict makes the pickled config reproducible
|
||||||
|
class ConfigCore(collections.OrderedDict):
|
||||||
def get_merge(self, section, arch, featureset, flavour, key, default=None):
|
def get_merge(self, section, arch, featureset, flavour, key, default=None):
|
||||||
temp = []
|
temp = []
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,8 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES)
|
debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES)
|
||||||
$<
|
# Hash randomisation makes the pickled config unreproducible
|
||||||
|
PYTHONHASHSEED=0 $<
|
||||||
md5sum $^ > debian/control.md5sum
|
md5sum $^ > debian/control.md5sum
|
||||||
@echo
|
@echo
|
||||||
@echo This target is made to fail intentionally, to make sure
|
@echo This target is made to fail intentionally, to make sure
|
||||||
|
|
Loading…
Reference in New Issue