new portmaster fails to build devel/py-libzfs at py36 because of failing cython

Stefan Esser se at freebsd.org
Sat Dec 16 11:45:46 UTC 2017


Am 16.12.17 um 07:02 schrieb Jim Trigg:
> On 12/15/2017 08:25 AM, Stefan Esser wrote:
>> Am 15.12.17 um 11:21 schrieb Kubilay Kocak:
>>> On 15/12/2017 8:50 pm, Johan Hendriks wrote:
>>>> Hello all.
>>>
>>> Hi Johan
>>>
>>>> First of all thank you for the update of portmaster, much appreciated.
>>>>
>>>> When i am updating my ports, portmaster fails with the following error.
>>>>
>>>> ====> Compressing man pages (compress-man)
>>>> ===>>> Starting check for runtime dependencies
>>>> ===>>> Gathering dependency list for lang/cython at py36 from ports
>>>> ===>>> Dependency check complete for lang/cython at py36
>>>>
>>>> ===>>> devel/py-libzfs at py36 1/10 >> lang/cython at py36 (1/1)
>>>>
>>>> ===>  Installing for py36-cython-0.26
>>>> ===>  Checking if py36-cython already installed
>>>> ===>   Registering installation for py36-cython-0.26 as automatic
>>>> Installing py36-cython-0.26...
>>>> pkg-static: py36-cython-0.26 conflicts with cython3-0.26 (installs files
> 
>> Well, actually portmaster is expected to deal with that conversion of the
>> cython3 port.
>>
>> I have tested the upgrade of individual ports and of all ports that are
>> either back-level or where the ORIGIN changed (as in the case of this
>> particular port).
>>
>> Hmmm, now I see what's the problem: The package name seems to have been
>> changed during the conversion to a flavored port (from "cython3-0.26.tbz"
>> to "py36-cython-0.26.tar.bz"). This is not typical of ports that use
>> flavors now, in general they generate packages under the same name as the
>> non-flavored port did.
>>
>> I have to see, whether I can easily detect this case - the current logic
>> that distinguishes between fresh installs and re-installs does not see
>> that the old version needs to be deleted before installing the new one.
>>
>> For now the advice to manually delete the cython3 port is right and will
>> let you install the new version.
> 
> Would using -o work? portmaster -o lang/cython at py36 cython3

No, sadly not. The -o option is implicitly passed to an intermediate recursive
call of portmaster, but then another child is launched for the actual build,
which does not receive that option. And if it was passed, then the logic would
probably lead to another recursive invocation (leading to endless recursion).

I could try passing the old origin in an environment variable to the child
process, which is used if other means to detect the previous origin fail. That
should not break the control flow and decision to actually build the port in
the child process.

I do not fully understand, why portmaster calls itself in such a way (with
ever less options passed, while ever more context is in the environment), and
I can only guess, that this is a relict from pre-PKG_NG times, when portmaster
had to perform many more actions in the script instead of relying on pkg DB
state.

I plan to change this completely, but this will make it very hard to work on
existing PRs and GitHub issues, since any patches provided with those will not
cleanly apply anymore.

Regards, STefan


More information about the freebsd-ports mailing list