Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#18794 closed enhancement (fixed)

Add conflicts option for Portfiles

Reported by: blb@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.8.0
Component: base Version: 1.7.0
Keywords: Cc: jmroot (Joshua Root)
Port:

Description

Attached is a patch (rooted in trunk/base) to add a conflicts option to Portfiles, to allow ports to indicate that they conflict with another port (or ports).

The basic idea is like dependencies:

conflicts   port:portname

to both allow ease of use through familiarity and in case we want to add other options besides port: in the future.

I'm not sure how best to handle what port should do when this occurs. With the current, patch, port simply exits with an error:

Error: Unable to execute port: Can't install dvdrtools because conflicting ports are installed: cdrtools

(I updated dvdrtools to have "conflicts port:cdrtools" for testing). This only occurs if the conflicting port is active (for image mode) or simply installed (for direct).

I also thought about maybe showing a message that "this port will fail to install/activate because conflicting port xyz is installed/active".

Attachments (1)

conflicts.diff (3.5 KB) - added by blb@… 16 years ago.
diff (in trunk/base)

Download all attachments as: .zip

Change History (3)

Changed 16 years ago by blb@…

Attachment: conflicts.diff added

diff (in trunk/base)

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

Cc: jmr@… added
Milestone: MacPorts FutureMacPorts 1.8.0
Resolution: fixed
Status: newclosed

Committed a modified version in r51525. Most importantly, the check is done in mportdepends, so for port install, the conflict is detected before anything gets installed. Upgrade (as usual) presents its own special challenge, since it installs one port at a time.

comment:2 Changed 15 years ago by blb@…

The option was added in r51510.

Note: See TracTickets for help on using tickets.