From owner-freebsd-ports@freebsd.org Sat Dec 16 11:45:46 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E5AEA4A8A for ; Sat, 16 Dec 2017 11:45:46 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout01.t-online.de (mailout01.t-online.de [194.25.134.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D0581979 for ; Sat, 16 Dec 2017 11:45:46 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd10.aul.t-online.de (fwd10.aul.t-online.de [172.20.26.152]) by mailout01.t-online.de (Postfix) with SMTP id 51E8D425A10C; Sat, 16 Dec 2017 12:45:37 +0100 (CET) Received: from Stefans-MBP-2.fritz.box (G542K6ZDQhVrK4JwVJCubbu7e4hXhTeNQtEL4iLgmRYxSAbpot6VR1RNlQ9kv3eZgp@[84.154.97.124]) by fwd10.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1eQAuI-3PYvvk0; Sat, 16 Dec 2017 12:45:30 +0100 Subject: Re: new portmaster fails to build devel/py-libzfs@py36 because of failing cython To: Jim Trigg , freebsd-ports@freebsd.org References: <875c07bd-b718-d74b-5302-d41af7476a14@gmail.com> <842cfe0c-9d96-0261-c380-59bfed89beff@FreeBSD.org> <63cc46cc-8d1b-8a9a-4690-28e1f1adbef5@freebsd.org> <592fd292-a3a8-17cb-8743-1a62c80d2b6a@huiekin.org> From: Stefan Esser Message-ID: Date: Sat, 16 Dec 2017 12:45:29 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <592fd292-a3a8-17cb-8743-1a62c80d2b6a@huiekin.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ID: G542K6ZDQhVrK4JwVJCubbu7e4hXhTeNQtEL4iLgmRYxSAbpot6VR1RNlQ9kv3eZgp X-TOI-MSGID: 1c12892b-ba0b-4d1f-bdd0-532e2c81da2f X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 11:45:46 -0000 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@py36 from ports >>>> ===>>> Dependency check complete for lang/cython@py36 >>>> >>>> ===>>> devel/py-libzfs@py36 1/10 >> lang/cython@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@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