Opened 7 years ago

Closed 7 months ago

#54645 closed defect (duplicate)

Uninstall one Python version removes packages from other Python versions

Reported by: cdeil (Christoph Deil) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.4.1
Keywords: Cc:
Port:

Description

I think there might be a bug in Macports (or misunderstanding how it works). I had multiple Python versions installed and

sudo port uninstall --follow-dependents python34

didn't remove python34 and all Python 3.4 packages like I want, it started uninstalling Python 2.7, 3.5 and 3.6 packages. I asked about this here https://stackoverflow.com/questions/45721014/macports-uninstall-only-one-python-version

Following the advice of https://stackoverflow.com/a/45722973/498873 I tried the -y option to do a dry run first. This does list exactly what I wanted to uninstall, but then removing the -y Macports started to uninstall packages I didn't want to uninstall from other Python versions. The comments after that answer contain more details, and specifically this example of the bahaviour I get: https://gist.github.com/cdeil/dc6dd1029964542c6365c2fdde21e776

Bug or feature?

Change History (5)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: jwa@… removed
Component: portsbase
Port: python removed

What version of base are you running?

$ port version

comment:2 Changed 7 years ago by cdeil (Christoph Deil)

$ port version
Version: 2.4.1

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Version: 2.4.1

comment:4 Changed 7 months ago by jmroot (Joshua Root)

The issue may have been that this loop assumes that the identifiers refer to the same registry entries across the uninstall operation which potentially deletes and opens multiple entries: https://github.com/macports/macports-base/blob/v2.4.1/src/registry2.0/portuninstall.tcl#L203

That assumption should actually hold after [fc212a0b550ed961d07c261c715ca83580deac56/macports-base], so this may have been fixed incidentally.

comment:5 Changed 7 months ago by jmroot (Joshua Root)

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