Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #8221 (new enhancement)

Opened 3 years ago

Last modified 3 months ago

RFE: port upgrade should consider variants when computing dependencies

Reported by: opendarwin-2006@… Owned by: gwhitney@…
Priority: Normal Milestone: MacPorts base bugs
Component: base Version:
Keywords: Cc: ryandesign@…, jmr@…
Port:

Description

apr-util usually depends on db4, but if you install apr-util with the +no_bdb variant, this deletes the db4 dependency. This is how I installed my apr-util 1.2.2, and this is how I want it. I do not want db4 on my system.

Attempting to upgrade apr-util to 1.2.6 wants to install db4, however. It seems that port upgrade doesn't use the variants that were specified in the last install when computing the needed dependencies.

I brought this up on the mailing list:

http://opendarwin.org/pipermail/darwinports/2006-April/033312.html

Daniel J. Luke suggested I provide the output of port -d -v upgrade apr-util so here it is:

$ sudo port -d -v upgrade apr-util Password: DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/apr-util DEBUG: epoch: in tree: 0 installed: 0 DEBUG: apr-util 1.2.6_0 exists in the ports tree DEBUG: apr-util 1.2.2_1 is installed DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/apr DEBUG: epoch: in tree: 0 installed: 0 DEBUG: apr 1.2.6_0 exists in the ports tree DEBUG: apr 1.2.6_0 is installed DEBUG: No need to upgrade! apr 1.2.6_0 >= apr 1.2.6_0 DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/textproc/expat DEBUG: epoch: in tree: 0 installed: 0 DEBUG: expat 2.0.0_1 exists in the ports tree DEBUG: expat 2.0.0_1 is installed DEBUG: No need to upgrade! expat 2.0.0_1 >= expat 2.0.0_1 DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/textproc/libiconv DEBUG: epoch: in tree: 0 installed: 0 DEBUG: libiconv 1.10_1 exists in the ports tree DEBUG: libiconv 1.10_1 is installed DEBUG: No need to upgrade! libiconv 1.10_1 >= libiconv 1.10_1 DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/databases/db4 DEBUG: db4 is *not* installed by DarwinPorts DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/databases/db4 DEBUG: Searching for dependency: db4 DEBUG: Didn't find receipt, going to depspec regex for: db4 DEBUG: Requested variant powerpc is not provided by port db4. DEBUG: Requested variant darwin is not provided by port db4. DEBUG: Requested variant macosx is not provided by port db4. DEBUG: Executing variant darwin_8 provides darwin_8 DEBUG: Skipping completed com.apple.main (db4) DEBUG: Skipping completed com.apple.unarchive (db4) ---> Fetching db4 DEBUG: Executing com.apple.fetch (db4) ---> db-4.3.29.tar.gz doesn't seem to exist in /opt/local/var/db/dports/distfiles/db4/4.3.29 ---> Attempting to fetch db-4.3.29.tar.gz from http://downloads.sleepycat.com/

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

1 5803k 1 98k 0 0 31625 0 0:03:07 0:00:03 0:03:04 61949C

He also suggested I upgrade with -n (skipping the dependencies) which was a successful workaround.

Attachments

upd.patch (11.0 kB) - added by gwhitneycom1@… 17 months ago.
Proposed patch against r25313 to resolve this issue
upgrade-variants-man.diff (0.7 kB) - added by jmr@… 5 months ago.
updated man page section of the patch
upgrade-variants.diff (10.5 kB) - added by jmr@… 5 months ago.
updated patch against current base

Change History

  Changed 3 years ago by dluke@…

  • severity changed from normal to enhancement
  • summary changed from port upgrade should consider variants when computing dependencies to RFE: port upgrade should consider variants when computing dependencies

Changed 17 months ago by gwhitneycom1@…

Proposed patch against r25313 to resolve this issue

  Changed 17 months ago by gwhitney@…

As promised toward the end of my recent note http://lists.macosforge.org/pipermail/macports-dev/2007-May/001673.html to macports-dev, here is a patch which adds this functionality. In addition, there are three places (rather than the usual two) where variant specifications can come from in an upgrade: the command line, the installed version of the port, and variants.conf. This patch also rationalizes the precedence of those sources to be in the order listed, with command line taking highest precedence as always.

Hope this helps.

  Changed 16 months ago by ryandesign@…

  • cc ryandesign@…, gwhitney@… added
  • owner changed from macports-tickets@… to gwhitney@…
  • component changed from ports to base

follow-up: ↓ 5   Changed 14 months ago by nox@…

  • priority changed from Expected to Normal
  • version 1.2 deleted
  • milestone set to MacPorts base bugs

This is not anymore relevant, is it?

in reply to: ↑ 4   Changed 5 months ago by jmr@…

  • cc jmr@… added; gwhitney@… removed

Replying to nox@macports.org:

This is not anymore relevant, is it?

The patch doesn't seem to have ever been applied. Was this fixed in some other way?

Changed 5 months ago by jmr@…

updated man page section of the patch

Changed 5 months ago by jmr@…

updated patch against current base

  Changed 3 months ago by ralph@…

This bug is still relevant. See for example #15662.

Note: See TracTickets for help on using tickets.