Re: [gentoo-portage-dev] [PATCH] bin/doins.py: implement install -p option (bug 642632)

2017-12-29 Thread Zac Medico
On 12/29/2017 02:13 PM, Mike Gilbert wrote:
> On Fri, Dec 29, 2017 at 3:35 PM, Zac Medico  wrote:
>> +   if self._parsed_options.preserve_timestamps:
>> +   if sys.version_info >= (3, 3):
>> +   os.utime(dest, 
>> ns=(sstat.st_mtime_ns, sstat.st_mtime_ns))
>> +   else:
>> +   os.utime(dest, (sstat.st_mtime, 
>> sstat.st_mtime))
> 
> It looks like you are copying mtime into both mtime and atime on the
> new file. Is that a mistake?
> 

Yeah, that's fixed in v2.
-- 
Thanks,
Zac



Re: [gentoo-portage-dev] [PATCH] bin/doins.py: implement install -p option (bug 642632)

2017-12-29 Thread Mike Gilbert
On Fri, Dec 29, 2017 at 3:35 PM, Zac Medico  wrote:
> +   if self._parsed_options.preserve_timestamps:
> +   if sys.version_info >= (3, 3):
> +   os.utime(dest, ns=(sstat.st_mtime_ns, 
> sstat.st_mtime_ns))
> +   else:
> +   os.utime(dest, (sstat.st_mtime, 
> sstat.st_mtime))

It looks like you are copying mtime into both mtime and atime on the
new file. Is that a mistake?