Opened 4 years ago

Closed 4 years ago

#62461 closed defect (fixed)

When a port is activated as a dependency of another port, the wrong version is used

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.6.99
Keywords: Cc: jmroot (Joshua Root)
Port:

Description

If I deactivate a port X and one of its dependencies, and then reactivate X, it should also reactivate the dependency. But there appears to be a bug:

$ port deps paracode
Full Name: paracode @2.8_1
Runtime Dependencies: python39
$ sudo port -f deact python39 paracode
--->  Deactivating paracode @2.8_1
--->  Cleaning paracode
--->  Unable to deactivate python39 @3.9.2_1+universal, the following ports depend on it:
[snip]
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Deactivating python39 @3.9.2_1+universal
--->  Cleaning python39
$ sudo port act paracode
--->  Computing dependencies for paracode
--->  Dependencies to be installed: python39
Error: Failed to activate python39: Registry error: python39 @2.8_1 is not installed.
Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_macports-ports-ryandesign-fork_lang_python39/python39/main.log for details.
Warning: Failed to execute portfile from registry for paracode @2.8_1
--->  Activating paracode @2.8_1

Of course there is no python39 @2.8_1. There's paracode @2.8_1 and python39 @3.9.2_1+universal. Somehow it has tried and failed to activate python39 with paracode's version.

Let's try that again with other ports:

$ port deps exec-wrapper
Full Name: exec-wrapper @1.0.1_4
Extract Dependencies: lbzip2
Runtime Dependencies: coreutils
$ sudo port -f deact exec-wrapper coreutils
--->  Deactivating exec-wrapper @1.0.1_4
--->  Cleaning exec-wrapper
--->  Unable to deactivate coreutils @8.32_0+universal, the following ports depend on it:
[snip]
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Deactivating coreutils @8.32_0+universal
--->  Cleaning coreutils
$ sudo port act exec-wrapper
--->  Computing dependencies for exec-wrapper
--->  Dependencies to be installed: coreutils
--->  Fetching archive for coreutils
--->  Attempting to fetch coreutils-8.32_0.darwin_17.x86_64.tbz2 from https://packages.macports.org/coreutils
--->  Attempting to fetch coreutils-8.32_0.darwin_17.x86_64.tbz2.rmd160 from https://packages.macports.org/coreutils
--->  Installing coreutils @8.32_0
Error: Failed to activate coreutils: Registry error: coreutils @1.0.1_4 is not installed.
Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_macports-ports-ryandesign-fork_sysutils_coreutils/coreutils/main.log for details.
Warning: Failed to execute portfile from registry for exec-wrapper @1.0.1_4
--->  Activating exec-wrapper @1.0.1_4

Similar situation.

Change History (2)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmroot added

Looks like this got fixed in [d2d987eb4d8daa9192fe621c013dcbb2d2450499/macports-base] (thanks, Josh):

$ sudo port -f deact python39 paracode
--->  Deactivating paracode @2.8_1
--->  Cleaning paracode
--->  Unable to deactivate python39 @3.9.2_1+universal, the following ports depend on it:
[snip]
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Deactivating python39 @3.9.2_1+universal
--->  Cleaning python39
$ sudo port act paracode
--->  Computing dependencies for paracode
--->  Dependencies to be installed: python39
Portfile changed since last build; discarding previous state.
--->  Fetching archive for python39
--->  Attempting to fetch python39-3.9.2_1.darwin_17.x86_64.tbz2 from https://packages.macports.org/python39
--->  Attempting to fetch python39-3.9.2_1.darwin_17.x86_64.tbz2.rmd160 from https://packages.macports.org/python39
--->  Installing python39 @3.9.2_1
--->  Activating python39 @3.9.2_1
--->  Cleaning python39
--->  Activating paracode @2.8_1
--->  Cleaning paracode
--->  Some of the ports you installed have notes:
  python39 has the following notes:
    To make this the default Python or Python 3 (i.e., the version run by the 'python' or 'python3' commands), run one or both of:

        sudo port select --set python python39
        sudo port select --set python3 python39

However it is still odd that it picked the non-universal python39 to download rather than using the universal one I already had installed, especially since +universal is in my variants.conf.

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 4 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.