#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)
Change History (3)
Changed 16 years ago by blb@…
Attachment: | conflicts.diff added |
---|
comment:1 Changed 15 years ago by jmroot (Joshua Root)
Cc: | jmr@… added |
---|---|
Milestone: | MacPorts Future → MacPorts 1.8.0 |
Resolution: | → fixed |
Status: | new → closed |
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.
diff (in trunk/base)