Skip to content

Commit

Permalink
Merge pull request #182 from bmwiedemann/cpiotimestamp
Browse files Browse the repository at this point in the history
also override timestamps of files in obscpio
  • Loading branch information
M0ses authored Sep 20, 2017
2 parents 0abf73a + 46ae2cd commit 3eed1f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TarSCM/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ def create_archive(self, scm_object, **kwargs):
if not METADATA_PATTERN.match(name):
cpiolist.append(name)

tstamp = self.helpers.get_timestamp(scm_object, args, topdir)
for name in sorted(cpiolist):
os.utime(name, (tstamp, tstamp))
proc.stdin.write(name)
proc.stdin.write("\n")
proc.stdin.close()
Expand All @@ -101,7 +103,6 @@ def create_archive(self, scm_object, **kwargs):
metafile = open(os.path.join(args.outdir, basename + '.obsinfo'), "w")
metafile.write("name: " + basename + "\n")
metafile.write("version: " + version + "\n")
tstamp = self.helpers.get_timestamp(scm_object, args, topdir)
metafile.write("mtime: " + str(tstamp) + "\n")

if commit:
Expand Down

0 comments on commit 3eed1f2

Please sign in to comment.