Opened 17 years ago

Closed 15 years ago

Last modified 15 years ago

#12989 closed defect (fixed)

Misleading message on activation conflicts

Reported by: yaseppochi (Stephen J. Turnbull) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.7.1
Component: base Version: 1.5.0
Keywords: Cc:
Port:

Description

This is absurd. The error message suggesting use of port -f should be changed to recommend "port -f activate" explicitly, and very probably should explicitly warn against "port -f upgrade".

chibi:MacPorts steve$ port upgrade {various stuff}
--->  Activating p5-pathtools 3.25_0
Error: Activating p5-pathtools 3.25_0 failed: Image error: /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs is being used by the active perl5.8 port.  Please deactivate this port first, or use the -f flag to force the activation.
chibi:MacPorts steve$ port -f upgrade p5-pathtools
--->  Activating p5-pathtools 3.25_0
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs.mp_1193376935.
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bundle already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bundle.mp_1193376935.
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/Cwd.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/Cwd.pm.mp_1193376935.
--->  Fetching perl5.8
--->  Verifying checksum(s) for perl5.8
--->  Extracting perl5.8
--->  Applying patches to perl5.8
--->  Configuring perl5.8
--->  Building perl5.8 with target all
--->  Staging perl5.8 into destroot
--->  Packaging tgz archive for perl5.8 5.8.8_0+darwin_8
--->  Unable to uninstall perl5.8 5.8.8_0+darwin_8, the following ports depend on it:
--->    p5-xml-parser
--->    gnome-icon-theme
--->    gnome-mime-data
--->    p5-xml-namespacesupport
--->    p5-xml-simple
--->    gnome-icon-theme
--->    gnome-icon-theme
--->    p5-xml-simple
--->    p5-xml-simple
--->    ghc
--->    openldap
--->    gnome-mime-data
--->    gnome-icon-theme
--->    ghc
--->    gnome-icon-theme
--->    gnome-icon-theme
--->    openldap
--->    ghc
--->    openldap
--->    p5-compress-raw-zlib
--->    p5-io-compress-base
--->    p5-io-compress-zlib
--->    p5-compress-zlib
--->    p5-html-tagset
--->    p5-html-parser
--->    p5-uri
--->    p5-libwww-perl
--->    subversion-perlbindings
--->    p5-svn-simple
--->    autoconf
--->    automake
--->    ghc
--->    subversion-perlbindings
--->    p5-compress-raw-zlib
--->    p5-scalar-list-utils
--->    p5-io-compress-base
--->    p5-io-compress-zlib
--->    p5-compress-zlib
--->    p5-error
--->    p5-term-readkey
--->    p5-locale-gettext
--->    help2man
--->    autoconf
--->    p5-scalar-list-utils
--->    p5-libwww-perl
--->    p5-libwww-perl
--->    p5-test-harness
--->    p5-test-simple
--->    p5-xml-sax
--->    p5-xml-simple
--->    p5-libwww-perl
--->    p5-xml-sax
--->    p5-xml-simple
--->    subversion-perlbindings
--->    p5-compress-raw-zlib
--->    p5-io-compress-zlib
--->    p5-compress-zlib
--->    p5-io-compress-base
--->    help2man
--->    p5-xml-parser
--->    gnome-mime-data
--->    gnome-icon-theme
--->    libbonobo
--->    p5-compress-zlib
--->    p5-test-harness
--->    p5-pathtools
--->    p5-getopt-long
--->    icon-naming-utils
--->    p5-xml-sax
--->    p5-test-simple
--->    libbonobo
--->    p5-uri
--->    libbonobo
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating perl5.8 5.8.8_0+darwin_8
--->  Uninstalling perl5.8 5.8.8_0+darwin_8
--->  Installing perl5.8 5.8.8_0+darwin_8
--->  Activating perl5.8 5.8.8_0+darwin_8
Warning: File /opt/local/bin/prove already exists.  Moving to: /opt/local/bin/prove.mp_1193377887.
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs.mp_1193377887.
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bundle already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bundle.mp_1193377887.
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/Cwd.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/Cwd.pm.mp_1193377887.
Warning: File /opt/local/lib/perl5/5.8.8/Getopt/Long.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Getopt/Long.pm.mp_1193377888.
Warning: File /opt/local/lib/perl5/5.8.8/newgetopt.pl already exists.  Moving to: /opt/local/lib/perl5/5.8.8/newgetopt.pl.mp_1193377888.
Warning: File /opt/local/lib/perl5/5.8.8/Test/Harness/Assert.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Test/Harness/Assert.pm.mp_1193377888.
Warning: File /opt/local/lib/perl5/5.8.8/Test/Harness/Iterator.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Test/Harness/Iterator.pm.mp_1193377888.
Warning: File /opt/local/lib/perl5/5.8.8/Test/Harness/Point.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Test/Harness/Point.pm.mp_1193377888.
Warning: File /opt/local/lib/perl5/5.8.8/Test/Harness/Straps.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Test/Harness/Straps.pm.mp_1193377888.
Warning: File /opt/local/lib/perl5/5.8.8/Test/Harness/TAP.pod already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Test/Harness/TAP.pod.mp_1193377888.
Warning: File /opt/local/lib/perl5/5.8.8/Test/Harness.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Test/Harness.pm.mp_1193377888.
Warning: File /opt/local/share/man/man1/prove.1.gz already exists.  Moving to: /opt/local/share/man/man1/prove.1.gz.mp_1193377888.
--->  Cleaning perl5.8
Portfile changed since last build; discarding previous state.
--->  Fetching p5-pathtools
--->  Verifying checksum(s) for p5-pathtools
--->  Extracting p5-pathtools
--->  Configuring p5-pathtools
--->  Building p5-pathtools with target all
--->  Staging p5-pathtools into destroot
You must install or activate this package with '-f' (force) as it needs to overwrite files installed by the perl5.8 port
--->  Packaging tgz archive for p5-pathtools 3.25_0
--->  Unable to uninstall p5-pathtools 3.25_0, the following ports depend on it:
--->    p5-getopt-long
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating p5-pathtools 3.25_0
--->  Uninstalling p5-pathtools 3.25_0
--->  Installing p5-pathtools 3.25_0
--->  Activating p5-pathtools 3.25_0
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs.mp_1193377929.
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bundle already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bundle.mp_1193377929.
Warning: File /opt/local/lib/perl5/5.8.8/darwin-2level/Cwd.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/darwin-2level/Cwd.pm.mp_1193377929.
--->  Cleaning p5-pathtools

Change History (12)

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

Cc: stephen@… added
Milestone: MacPorts base bugs

comment:2 Changed 16 years ago by danielluke (Daniel J. Luke)

As a side note, the error message doesn't say to -f upgrade ... it says

"You must install or activate this package with '-f' (force) as it needs to overwrite files installed by the perl5.8 port"

comment:3 Changed 16 years ago by jmpp@…

Component: portsbase

comment:4 Changed 15 years ago by tobypeterson

Milestone: MacPorts base bugsMacPorts Future

Milestone MacPorts base bugs deleted

comment:5 Changed 15 years ago by jmroot (Joshua Root)

Cc: stephen@… removed

Any reason this shouldn't be duped to #12710?

comment:6 in reply to:  2 Changed 15 years ago by yaseppochi (Stephen J. Turnbull)

Replying to dluke@…:

As a side note, the error message doesn't say to -f upgrade ... it says

"You must install or activate this package with '-f' (force) as it needs to overwrite files installed by the perl5.8 port"

No. That message is issued from a different place. The one that caused me to use -f upgrade is at the very top of the report, and it says "Please deactivate this port first, or use the -f flag to force the activation." From the user's point of view, the error may have interrupted a sequence of dependencies, and they want to use -f upgrade to do the whole batch. But this has the rather annoying consequence that many packages that don't need to be upgraded at all get uninstalled and reinstalled!

comment:7 in reply to:  5 Changed 15 years ago by yaseppochi (Stephen J. Turnbull)

Replying to jmr@…:

Any reason this shouldn't be duped to #12710?

It's a different issue from my point of view. I do not understand why the perl port needs to be uninstalled and reinstalled, then the p5-pathtools that at long last got activated itself has to be uninstalled and reinstalled. Note that I now have (at least) FOUR copies of /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bs!

comment:8 Changed 15 years ago by jmroot (Joshua Root)

I guess I don't understand the issue then. It seems like the problem is simply that p5-pathtools can't be installed without force-activation, which is what #12710 is about. Rebuilding things regardless of whether they are outdated is the intended behaviour of force upgrade.

I agree that being told simply to "use -f" when you initially ran an upgrade command is misleading. I've improved the message in r47848.

comment:9 Changed 15 years ago by yaseppochi (Stephen J. Turnbull)

When I say "port -f upgrade p5-pathtools" I expect p5-pathtools to be rebuilt. However, if I put -f in an upgrade command, I cannot predict how much will be rebuilt unless I'm wiling to trace the whole dependency graph. For example, IIRC if p5-pathtools depends on p5-foo, and both depend on perlt, you can expect perl to be rebuilt twice. OTOH, if you do -f -n then outdated prerequisites won't get rebuilt either.

It's also an unsightly waste of space in cases like this where copies of files get replicated ad infinitum.

comment:10 in reply to:  9 Changed 15 years ago by jmroot (Joshua Root)

Replying to stephen@…:

When I say "port -f upgrade p5-pathtools" I expect p5-pathtools to be rebuilt. However, if I put -f in an upgrade command, I cannot predict how much will be rebuilt unless I'm wiling to trace the whole dependency graph.

There's a dry-run mode in trunk.

For example, IIRC if p5-pathtools depends on p5-foo, and both depend on perlt, you can expect perl to be rebuilt twice.

Actually, perl will only be rebuilt once.

OTOH, if you do -f -n then outdated prerequisites won't get rebuilt either.

If things are genuinely outdated then you don't have to use -f. Of course you do have to manually intervene and use -f on some of the activations, but that's #12710.

It's also an unsightly waste of space in cases like this where copies of files get replicated ad infinitum.

Again, the ports shouldn't conflict. #12710.

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

Resolution: fixed
Status: newclosed
Summary: port -f upgrade considered harmfulMisleading message on activation conflicts

The misleading message was improved in r47848, everything else is covered by #12710.

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

Milestone: MacPorts FutureMacPorts 1.7.1

Merged to release_1_7 in r47864.

Note: See TracTickets for help on using tickets.