From 165f17d226cfa9f2545cb9598bd22b74e21532c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 25 Sep 2018 14:59:00 +0200 Subject: [PATCH 1/2] fix flake warning --- TarSCM/scm/hg.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TarSCM/scm/hg.py b/TarSCM/scm/hg.py index 576c48a9..30aedeef 100644 --- a/TarSCM/scm/hg.py +++ b/TarSCM/scm/hg.py @@ -26,14 +26,14 @@ def _get_scm_cmd(self): re.M | re.I) if regexp_proxy.group(1) is not None: - print ('using proxy host: ' + regexp_proxy.group(1)) + print('using proxy host: ' + regexp_proxy.group(1)) f.write('host=' + regexp_proxy.group(1)) if regexp_proxy.group(2) is not None: - print ('using proxy port: ' + regexp_proxy.group(2)) + print('using proxy port: ' + regexp_proxy.group(2)) f.write('port=' + regexp_proxy.group(2)) if self.noproxy is not None: - print ('using proxy exceptions: ' + - self.noproxy) + print('using proxy exceptions: ' + + self.noproxy) f.write('no=' + self.noproxy) f.close() From 621dc38dfea8b77798d5bb0d29e5a9d2f5a929be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 25 Sep 2018 09:36:07 +0200 Subject: [PATCH 2/2] create reproducible obscpio archives To avoid build triggers when upstream has not changed that way --- TarSCM/archive.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/TarSCM/archive.py b/TarSCM/archive.py index e5ad3456..b971ea45 100644 --- a/TarSCM/archive.py +++ b/TarSCM/archive.py @@ -60,8 +60,15 @@ def create_archive(self, scm_object, **kwargs): archivefilename = os.path.join(args.outdir, dstname + '.' + extension) archivefile = open(archivefilename, "w") + + # detect reproducible support + params = ['cpio', '--create', '--format=newc'] + if os.system("cpio --create --format=newc" + + "--reproducible /dev/null") == 0: + params.append('--reproducible') + proc = subprocess.Popen( - ['cpio', '--create', '--format=newc'], + params, shell = False, stdin = subprocess.PIPE, stdout = archivefile,