On 5/9/20 1:03 PM, Gary Mills wrote:
On Sat, May 09, 2020 at 03:03:57PM +0000, Andy Fiddaman wrote:
On Sat, 9 May 2020, Gary Mills wrote:
; That's the change that caused the problem. The first line becomes
; only a comment when the file is interpreted by python. Removing that
; option string would solve the problem in a simpler way. I wonder why
; it was ever put there? I see that it was added to all of the pkg
; scripts. I wonder why?
The associated commit message is:
29453498 pkg should ignore Python ENV and not import from site-packages
so presumably for a more consistent environment when running pkg tools.
So, that's it. Thanks for the information. I understand also that
the pkg tools are part of a separate consolidation, neither OI nor
illumos.
In OI, we have an example of the breakage caused by this change,
although it's only in the pkglint command. The pkglint man page says:
-f config_file
Configure the pkglint session using the config_file configuration
file.
and:
pkglint.ext.*
The plugin mechanism of pkglint allows for additional lint modules
to be added at runtime. Any key that starts with pkglint.ext. takes
a value that must be a fully-specified Python module. See the
"Developers" section for more information.
Is there any way in the pkglint rc file to specify the location of the
additional module? What is a fully-specified Python module anyway?
I'm not familiar with Python.
Upstream IPS fixed this by adding the -e flag to pkglint, so that consumers like
ON/illumos could just do:
PKGLINT= /usr/bin/pkglint -e $(ONBLD_TOOLS)/lib/python
https://github.com/oracle/solaris-ips/commit/b1d64c287c4346d2c5be5fe4cee278914ea86042
As a temporary workaround without that IPS comment, they could do something
like:
PKGLINT= PYTHONPATH=$(PYTHONPATH):$(ONBLD_TOOLS)/lib/python \
/usr/bin/64/python2.7 /usr/bin/pkglint
(Substitute python path as appropriate for the version of Python used in your
IPS builds.)
-alan-
_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev