Accepting request 578354 from home:bmwiedemann:reproducible
Add python-sorted_tar.patch (boo#1081750) OBS-URL: https://build.opensuse.org/request/show/578354 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=225
This commit is contained in:
committed by
Git OBS Bridge
parent
82f2fe190c
commit
461b84379a
21
python-sorted_tar.patch
Normal file
21
python-sorted_tar.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
commit 6936e36efcc0a75c7d5e67b949c9749d61fa5ead
|
||||
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||
Date: Sun Jun 18 03:50:25 2017 +0200
|
||||
|
||||
tarfile: sort directory listing
|
||||
|
||||
to generate tar files in a more reproducible way
|
||||
|
||||
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
|
||||
index adf91d5382..36f6ed7167 100644
|
||||
--- a/Lib/tarfile.py
|
||||
+++ b/Lib/tarfile.py
|
||||
@@ -2027,7 +2027,7 @@ class TarFile(object):
|
||||
elif tarinfo.isdir():
|
||||
self.addfile(tarinfo)
|
||||
if recursive:
|
||||
- for f in os.listdir(name):
|
||||
+ for f in sorted(os.listdir(name)):
|
||||
self.add(os.path.join(name, f), os.path.join(arcname, f),
|
||||
recursive, exclude, filter)
|
||||
|
||||
Reference in New Issue
Block a user