Make the pickled config (config.defines.dump) reproducible

This commit is contained in:
Ben Hutchings 2017-01-07 18:25:56 +00:00
parent 3cfb537922
commit 9747655f89
3 changed files with 6 additions and 2 deletions

1
debian/changelog vendored
View File

@ -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: Update base URLs
* 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

View File

@ -1,3 +1,4 @@
import collections
import os
import os.path
import pickle
@ -43,7 +44,8 @@ class SchemaItemList(object):
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):
temp = []

3
debian/rules vendored
View File

@ -105,7 +105,8 @@ else
endif
debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES)
$<
# Hash randomisation makes the pickled config unreproducible
PYTHONHASHSEED=0 $<
md5sum $^ > debian/control.md5sum
@echo
@echo This target is made to fail intentionally, to make sure