port uninstall --follow-dependents python35 removed part of py27- and py36- packages

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

port uninstall --follow-dependents python35 removed part of py27- and py36- packages

Alexey Luchko
Hi,

I've decided to switch python from 3.5 to 3.6 and after a time, run a command

$ sudo port uninstall --no-exec --follow-dependents python35

To my surprise were removed not only py35- packages and explicit python35 dependents like httpie, but also a number of py27- and py36- packages. All the output follows

$ sudo port uninstall --no-exec --follow-dependents python35
Password:
--->  Deactivating py35-ipython @6.0.0_0
--->  Uninstalling py35-ipython @6.0.0_0
--->  Deactivating py35-appnope @0.1.0_0
--->  Uninstalling py35-appnope @0.1.0_0
--->  Deactivating py35-gnureadline @6.3.3_1
--->  Uninstalling py35-gnureadline @6.3.3_1
--->  Deactivating py35-pexpect @4.2.1_0
--->  Uninstalling py35-pexpect @4.2.1_0
--->  Deactivating py35-ptyprocess @0.5.1_0
--->  Uninstalling py35-ptyprocess @0.5.1_0
--->  Deactivating py35-simplegeneric @0.8.1_0
--->  Uninstalling py35-simplegeneric @0.8.1_0
--->  Deactivating py35-prompt_toolkit @1.0.9_0
--->  Uninstalling py35-prompt_toolkit @1.0.9_0
--->  Deactivating py35-pip @9.0.1_0
--->  Uninstalling py35-pip @9.0.1_0
--->  Deactivating py35-pyflakes @1.5.0_0
--->  Uninstalling py35-pyflakes @1.5.0_0
--->  Deactivating httpie @0.9.4_0
--->  Uninstalling httpie @0.9.4_0
--->  Deactivating py35-pygments @2.2.0_0
--->  Uninstalling py35-pygments @2.2.0_0
--->  Deactivating py35-setuptools @34.3.3_0
--->  Uninstalling py35-setuptools @34.3.3_0
--->  Deactivating py35-packaging @16.8_0
--->  Uninstalling py35-packaging @16.8_0
--->  Deactivating py27-pip @9.0.1_0
--->  Uninstalling py27-pip @9.0.1_0
--->  Deactivating py27-virtualenv @15.1.0_0
--->  Uninstalling py27-virtualenv @15.1.0_0
--->  Deactivating py27-pyflakes @1.5.0_0
--->  Uninstalling py27-pyflakes @1.5.0_0
--->  Deactivating py27-ipython @5.3.0_0
--->  Uninstalling py27-ipython @5.3.0_0
--->  Deactivating py27-prompt_toolkit @1.0.9_0
--->  Uninstalling py27-prompt_toolkit @1.0.9_0
--->  Deactivating py27-pygments @2.2.0_0
--->  Uninstalling py27-pygments @2.2.0_0
--->  Deactivating py27-setuptools @34.3.3_0
--->  Uninstalling py27-setuptools @34.3.3_0
--->  Deactivating py35-six @1.10.0_0
--->  Uninstalling py35-six @1.10.0_0
--->  Deactivating py35-pickleshare @0.7.4_0
--->  Uninstalling py35-pickleshare @0.7.4_0
--->  Deactivating py27-pexpect @4.2.1_0
--->  Uninstalling py27-pexpect @4.2.1_0
--->  Deactivating py35-wcwidth @0.1.7_0
--->  Uninstalling py35-wcwidth @0.1.7_0
--->  Deactivating py35-traitlets @4.3.2_0
--->  Uninstalling py35-traitlets @4.3.2_0
--->  Deactivating py35-decorator @4.0.11_0
--->  Uninstalling py35-decorator @4.0.11_0
--->  Deactivating py35-yaml @3.12_0
--->  Uninstalling py35-yaml @3.12_0
--->  Deactivating py27-packaging @16.8_0
--->  Uninstalling py27-packaging @16.8_0
--->  Deactivating py36-ipython @6.0.0_0
--->  Uninstalling py36-ipython @6.0.0_0
--->  Deactivating py36-prompt_toolkit @1.0.9_0
--->  Uninstalling py36-prompt_toolkit @1.0.9_0
--->  Deactivating py36-pygments @2.2.0_0
--->  Uninstalling py36-pygments @2.2.0_0
--->  Deactivating py35-appdirs @1.4.3_0
--->  Uninstalling py35-appdirs @1.4.3_0
--->  Deactivating py35-parsing @2.2.0_0
--->  Uninstalling py35-parsing @2.2.0_0
--->  Deactivating py35-ipython_genutils @0.2.0_0
--->  Uninstalling py35-ipython_genutils @0.2.0_0
--->  Deactivating py35-certifi @2017.04.17_0
--->  Uninstalling py35-certifi @2017.04.17_0
--->  Deactivating py35-jedi @0.10.2_2
--->  Uninstalling py35-jedi @0.10.2_2
--->  Deactivating py35-requests @2.14.1_0
--->  Uninstalling py35-requests @2.14.1_0
--->  Deactivating python35 @3.5.3_1
--->  Uninstalling python35 @3.5.3_1
$

Naturally, py27-packaging for example has no dependency on python35:
$ port info py27-packaging
py27-packaging @16.8 (python)

Description:          Core utilities for Python packages
Homepage:             https://pypi.python.org/pypi/packaging/

Library Dependencies: python27, py27-parsing, py27-six
Platforms:            darwin
License:              {BSD Apache-2}
Maintainers:          none


Version info:
$ port version
Version: 2.4.1
$ uname -a
Darwin me.local 15.6.0 Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64


Regards
Alex

Reply | Threaded
Open this post in threaded view
|

Re: port uninstall --follow-dependents python35 removed part of py27- and py36- packages

Joshua Root-8
Alexey Luchko wrote:
> I've decided to switch python from 3.5 to 3.6 and after a time, run a
> command
>
> $ sudo port uninstall --no-exec --follow-dependents python35
>
> To my surprise were removed not only py35- packages and explicit python35
> dependents like httpie, but also a number of py27- and py36- packages.
<...>
> Naturally, py27-packaging for example has no dependency on python35:
> $ port info py27-packaging
> py27-packaging @16.8 (python)
>
> Description:          Core utilities for Python packages
> Homepage:             https://pypi.python.org/pypi/packaging/
>
> Library Dependencies: python27, py27-parsing, py27-six

What matters here is not the dependencies specified in the current
version of the port, but those that were recorded in the registry at
installation time. I can see how this is a surprising result, but the
uninstall code involved is pretty straightforward and literally just
loops through the ports that the registry says are dependents of the one
being uninstalled.

To get to the bottom of what happened, you would need to look at 'port
rdependents python35' -- but unfortunately you'd have to do that before
the uninstall happened. (Since uninstall --follow-dependents is a fairly
big hammer it's worth getting into the habit of looking at the
rdependents beforehand anyway.)

So there are 3 possibilities: either the uninstall code is doing the
wrong thing, or the dependents reported by the registry are wrong, or
there really was some strange chain of dependencies such that this was
technically correct. If you can come up with a reproducible test case
that demonstrates that there is a bug, please do file a ticket.

- Josh