Skip to content

Commit

Permalink
Merge pull request #255 from adrianschroeter/master
Browse files Browse the repository at this point in the history
create reproducible obscpio archives
  • Loading branch information
M0ses authored Sep 25, 2018
2 parents 51a17c5 + 621dc38 commit c9489aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion TarSCM/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 >/dev/null") == 0:
params.append('--reproducible')

proc = subprocess.Popen(
['cpio', '--create', '--format=newc'],
params,
shell = False,
stdin = subprocess.PIPE,
stdout = archivefile,
Expand Down
8 changes: 4 additions & 4 deletions TarSCM/scm/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit c9489aa

Please sign in to comment.