Opened 15 years ago

Closed 15 years ago

#19521 closed defect (invalid)

python2.6-2.6.2 wrong port upgraded (gperf)

Reported by: paulymer@… Owned by: blb@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: upgrade Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: python26

Description (last modified by blb@…)

I am trying to upgrade my python installation. First I tried:

$ sudo port install python2.6

but I unknowingly had a python2.6 installed already. So I tried:

  $ sudo port upgrade python26
Password:
--->  Fetching gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from http://distfiles.macports.org/gperf
--->  Verifying checksum(s) for gperf
--->  Extracting gperf
--->  Configuring gperf
--->  Building gperf
--->  Staging gperf into destroot
--->  Deactivating gperf @3.0.3_0
--->  Installing gperf @3.0.4_0
--->  Activating gperf @3.0.4_0
--->  Cleaning gperf
--->  Fetching openssl
--->  Attempting to fetch openssl-0.9.8k.tar.gz from http://distfiles.macports.org/openssl
--->  Verifying checksum(s) for openssl
--->  Extracting openssl
--->  Applying patches to openssl
--->  Configuring openssl
--->  Building openssl
--->  Staging openssl into destroot
--->  Deactivating openssl @0.9.8j_0
--->  Installing openssl @0.9.8k_0
--->  Activating openssl @0.9.8k_0
--->  Cleaning openssl
--->  Fetching xorg-xproto
--- snip ---

As can be seen, gperf was installed instead of python2.6 upgraded...

Change History (8)

comment:1 Changed 15 years ago by blb@…

Cc: mcalhoun@… added
Description: modified (diff)
Keywords: python2.6 removed
Owner: changed from macports-tickets@… to blb@…
Port: python26 added; python2.6 removed

python26 has several dependencies, one of which is gettext which then pulls in libiconv and that needs gperf, hence installing it. After your snip, did it eventually get to installing the python26 port?

comment:2 Changed 15 years ago by paulymer@…

I see, that makes sense. I checked the output and python26 was never installed. Here is the full list of ports that were installed(upgraded); I removed extra lines for each port:

---> Fetching gperf ---> Fetching openssl ---> Fetching xorg-xproto ---> Fetching xorg-xtrans ---> Fetching xorg-xextproto ---> Fetching xorg-libX11 ---> Fetching freetype ---> Fetching fontconfig ---> Fetching Xft2 ---> Fetching xorg-libXext ---> Fetching readline ---> Fetching sqlite3 ---> Fetching db46 ---> Attempting to fetch patch.4.6.21.1 from http://distfiles.macports.org/db4/4.6.21_5 ---> Attempting to fetch patch.4.6.21.2 from http://distfiles.macports.org/db4/4.6.21_5 ---> Attempting to fetch patch.4.6.21.3 from http://distfiles.macports.org/db4/4.6.21_5 ---> Attempting to fetch db-4.6.21.tar.gz from http://distfiles.macports.org/db4/4.6.21_5 ---> Fetching bzip2 $

I checked a few things:

$ port outdated --- snip --- python26 2.6.1_0 < 2.6.2_2 --- snip ---

and, I ran "$ sudo port upgrade python26" again, but nothing happened. Then, I tried to clean the port with "$ sudo port clean --all python26" as shown in the user manual; seemed to be okay. Poking around further, I tried to uninstall python26 port, so that I could reinstall fresh; here is the result:

$ sudo port uninstall python26 ---> The following versions of python26 are currently installed: ---> python26 @2.6.1_0 (active) ---> python26 @2.6.2_2 Error: port uninstall failed: Registry error: Please specify the full version as recorded in the port registry.

So, it appears that the port has been upgraded to the latest version, but that change hasn't been reflected in the port registry? If this is the case, how do I update the registry? Thanks.

comment:3 Changed 15 years ago by raimue (Rainer Müller)

Please remember WikiFormatting.

To activate the other version, use:

sudo port deactivate python26
sudo port activate python26 @2.6.2_2

comment:4 Changed 15 years ago by blb@…

Seems like what happened was the initial install was successful with 2.6.2_2 but since you already had a version installed, failed to activate. Any further run of upgrade would then not worry since the latest is installed (though inactive); not sure why it went through all the dependencies again, unless you used -f.

As Rainer says you can activate the current version, and if that succeeds remove the older with

sudo port uninstall python @2.6.1_0

comment:5 in reply to:  4 ; Changed 15 years ago by jmroot (Joshua Root)

Replying to blb@…:

not sure why it went through all the dependencies again, unless you used -f.

That's expected behaviour. Dependencies are upgraded before the version of the installed port is checked against the current version.

comment:6 in reply to:  5 Changed 15 years ago by blb@…

Replying to jmr@…:

That's expected behaviour. Dependencies are upgraded before the version of the installed port is checked against the current version.

Oops, that's right, I use -n so often I forgot that by default 'upgrade port' will upgrade all dependencies of that port first...

comment:7 in reply to:  4 Changed 15 years ago by paulymer@…

Replying to blb@…:

Seems like what happened was the initial install was successful with 2.6.2_2 but since you already had a version installed, failed to activate. Any further run of upgrade would then not worry since the latest is installed (though inactive); not sure why it went through all the dependencies again, unless you used -f.

I ran the suggested commands to deactivate and activate, which were all successful. So everything is good now. The thing that threw me off is that the dependencies were not updated on the initial "install" command when @2.6.2_2 was installed but not activated.

comment:8 Changed 15 years ago by blb@…

Resolution: invalid
Status: newclosed

Yeah, if you use install and port sees a dependency already installed, it doesn't upgrade; if you use upgrade it will upgrade already-installed ports. Should we have a new ticket to do upgrades of dependencies on installs of new ports?

Note: See TracTickets for help on using tickets.