[OmniOS-discuss] pkg verify failing on pyc files

Peter Tribble peter.tribble at gmail.com
Thu Oct 8 17:56:51 UTC 2015


On Thu, Oct 8, 2015 at 4:12 PM, Dan McDonald <danmcd at omniti.com> wrote:

>
> > On Oct 8, 2015, at 10:35 AM, Peter Tribble <peter.tribble at gmail.com>
> wrote:
> >
> > It looks like something is deciding to recompile the pyc files, which
> ends up
> > changing them.
> >
> > Is there any way to stop this, to keep pkg verify clean?
>
> You'll notice several workarounds in omnios-build.  For example from
> python26-coverage:
>
>         # Prevents pkgdepend from freaking out.
>         <transform file path=usr/bin/coverage -> set
> pkg.depend.bypass-generate .* >
>         <transform file path=usr/bin/coverage-2.6 -> set
> pkg.depend.bypass-generate .* >
>         <transform file path=usr/bin/coverage2 -> set
> pkg.depend.bypass-generate .* >
>
> Here's Tim Foster's blog entry about it:
>
>
> https://timsfoster.wordpress.com/2011/02/24/pkgdepend-improvements/
>
> You may need to bypass-generate a few things.


This is all coming from omnios so it wouldn't be me who would be making
changes...

I'm a little more confused than I was, though. The .pyc files encode the
python version
and the metadata of the source file (in particular, its timestamp) in the
.pyc file.

That's all correct. The packages appear to have been published using
pkgsend -T so
that the timestamps on the .py files are preserved, and they match the
timestamps
encoded into the packaged .pyc files..

Which makes me wonder even more why it's found it necessary to recompile
the files, it's not the normal python version or source timestamp mismatch.

The only thing I notice is that the original (packaged) .pyc file has
site-packages
encoded in it, whereas the recompiled version has the vendor-packages path
(which is where the files are installed to). As far as I can tell that's
the only
difference in the contents of the .pyc files.

Curious...

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20151008/bdb48472/attachment-0001.html>


More information about the OmniOS-discuss mailing list