Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56730 closed defect (fixed)

port reclaim fails with circular dependencies

Reported by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone: MacPorts 2.5.3
Component: base Version:
Keywords: Cc: danchr (Dan Villiom Podlaski Christiansen), majoc-at-astro (majoc-at-astro), dsedivec
Port:

Description (last modified by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez))

Recently, port reclaim added the ability to removed unrequested port.
The procedure loops over every port and decides if it or one of its dependents is requested.
To facilitate this procedure, the ports are put in sorted order.
This works fine if the procedure sort_portlist_by_dependendents works as advertised.
If there is a circular dependency, then this is not possible.

Some circular dependencies are requested by the user.
For example:

  • install librsvg
  • install adwaita-icon-theme (depends on librsvg)
  • install librsvg +viewer (depends on adwaita-icon-theme)

This results in Error: reclaim failed: can't read "isrequested(librsvg)": no such element in array if somehow these ports were unsetrequested.

This issue was recently discussed on the mailing list.

Change History (8)

comment:1 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Description: modified (diff)

comment:2 Changed 6 years ago by jmroot (Joshua Root)

Cc: danchr added

comment:3 Changed 6 years ago by majoc-at-astro (majoc-at-astro)

Cc: majoc-at-astro added

comment:4 Changed 6 years ago by majoc-at-astro (majoc-at-astro)

I haven't tested it yet, but it appears there would be similar problems with a circular dependency involving valgrind:

port install openmpi-gcc7
port install valgrind +gcc7 +openmpi
port upgrade --enforce-variants openmpi-gcc7 +fortran +valgrind +threads

This I know does cause problems during port uninstall all.

comment:5 Changed 6 years ago by dsedivec

Cc: dsedivec added

comment:6 Changed 6 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.5.3

comment:7 Changed 6 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In f4affbaedcd06329f4b85262267cce1a017fd183/macports-base (master):

Fix reclaim handling of circular deps

Fixes: #56730

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

In e0a9ced63ae2ce31d55f44cfe57202de2857c4a2/macports-base (release-2.5):

Fix reclaim handling of circular deps

Fixes: #56730
(cherry picked from commit f4affbaedcd06329f4b85262267cce1a017fd183)

Note: See TracTickets for help on using tickets.