`<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 8, 2015 at 8:37 PM, Lauri Tirkkonen <span dir="ltr"><<a href="mailto:lotheac@iki.fi" target="_blank">lotheac@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Oct 08 2015 18:56:51 +0100, Peter Tribble wrote:<br>
> That's all correct. The packages appear to have been published using<br>
> pkgsend -T so<br>
> that the timestamps on the .py files are preserved, and they match the<br>
> timestamps<br>
> encoded into the packaged .pyc files..<br>
><br>
> Which makes me wonder even more why it's found it necessary to recompile<br>
> the files, it's not the normal python version or source timestamp mismatch.<br>
<br>
</span>I think I found a clue for this. I checked an old box I've upgraded<br>
through multiple releases </blockquote><div><br></div><div>That seems to be the key point. I'm seeing it on upgraded boxes.<br></div><div>Just checked a fresh install, that's clean.<br><br></div><div>Going back, in earlier omnios releases the .py files didn't have fixed timestamps.<br></div><div>Some of them (pybonjour.py for example) should be dated 2008. As a result, the<br>older releases pretty much always rebuilt the pyc files.<br><br></div><div>The upgrade process correctly sets the timestamp on the .py files. That bit appears<br>to work. Presumably, it also should put the correct .pyc file from the repo, but that<br></div><div>doesn't seem to work correctly. I suspect some sort of race between python<br></div><div>explicitly writing the .pyc file from the repo and python recompiling the .pyc file<br></div><div>because the one it had becomes invalid as soon as the timestamp on the .py<br></div><div>file gets updated.<br><br></div><div>In any event, I suspect that if you run pkg fix after the upgrade, then because<br></div><div>everything now matches up, it'll be good in the future. At least, I've done that<br></div><div>on one system and it hasn't deviated since.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">and sure enough, .pyc files had been<br>
regenerated after install for, among other things, the simplejson-26<br>
package. I checked the timestamps for one such .py/.pyc pair:<br>
<br>
-rw-r--r-- 1 root bin 1036 Jul 22 2014 /usr/lib/python2.6/vendor-packages/simplejson/compat.py<br>
-rw-r--r-- 1 root root 2040 Apr 3 2015 /usr/lib/python2.6/vendor-packages/simplejson/compat.pyc<br>
<br>
But this is strange - surely the package is newer than July 2014 on this<br>
151014 box?<br>
<br>
% pkg list -Hv simplejson-26<br>
pkg://omnios/library/python-2/simplejson-26@3.6.5-0.151014:20150402T184431Z i--<br>
<br>
Yes, yes it is, and it *was* built using pkgsend -T '*.py'. However,<br>
the commit in omnios-build introducing that was authored on Mar 25 2015<br>
(8cc8f3ef45d9c7d8ccdfda608d00599cd3890597). My theory is that if the<br>
file content does not change, even if pkgsend -T is used to preserve the<br>
timestamps, the file is not touched on update; would that help explain<br>
what you're seeing?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Lauri Tirkkonen | lotheac @ IRCnet<br>
_______________________________________________<br>
OmniOS-discuss mailing list<br>
<a href="mailto:OmniOS-discuss@lists.omniti.com">OmniOS-discuss@lists.omniti.com</a><br>
<a href="http://lists.omniti.com/mailman/listinfo/omnios-discuss" rel="noreferrer" target="_blank">http://lists.omniti.com/mailman/listinfo/omnios-discuss</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">-Peter Tribble<br><a href="http://www.petertribble.co.uk/" target="_blank">http://www.petertribble.co.uk/</a> - <a href="http://ptribble.blogspot.com/" target="_blank">http://ptribble.blogspot.com/</a></div>
</div></div>
`