Ticket #31571 (closed defect: fixed)
conflicts does not work if there is no dependencies
| Reported by: | hum@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts 2.1.0 |
| Component: | base | Version: | 2.0.3 |
| Keywords: | Cc: | ryandesign@…, dports@… | |
| Port: |
Description
The conflicts statement seems not to work if there is no dependencies in a Portfile. I will explain with an example.
darts and darts-clone ports conflict with each other. If darts-clone already exists, darts cannot be installed as expected. On the other hand, the installation procedure of darts-clone will start even if darts exists. One difference between the two ports is that darts-clone has no dependencies although darts has depends_lib.
Here is a log of the above example:
$ sudo port install darts-clone ---> Fetching archive for darts-clone ---> Attempting to fetch darts-clone-0.32g_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/darts-clone ---> Fetching darts-clone ---> Verifying checksum(s) for darts-clone ---> Extracting darts-clone ---> Configuring darts-clone ---> Building darts-clone ---> Staging darts-clone into destroot ---> Installing darts-clone @0.32g_0 ---> Activating darts-clone @0.32g_0 $ sudo port install darts ---> Computing dependencies for darts Error: Unable to execute port: Can't install darts because conflicting ports are installed: darts-clone To report a bug, see <http://guide.macports.org/#project.tickets> $ sudo port uninstall darts darts-clone ---> Deactivating darts-clone @0.32g_0 ---> Uninstalling darts-clone @0.32g_0 $ sudo port clean darts darts-clone ---> Cleaning darts ---> Cleaning darts-clone $ sudo port install darts ---> Computing dependencies for darts ---> Fetching archive for darts ---> Attempting to fetch darts-0.32_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/darts ---> Fetching darts ---> Verifying checksum(s) for darts ---> Extracting darts ---> Applying patches to darts ---> Configuring darts ---> Building darts ---> Staging darts into destroot ---> Installing darts @0.32_0 ---> Activating darts @0.32_0 $ sudo port install darts-clone ---> Fetching archive for darts-clone ---> Attempting to fetch darts-clone-0.32g_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/darts-clone ---> Fetching darts-clone ---> Verifying checksum(s) for darts-clone ---> Extracting darts-clone ---> Configuring darts-clone ---> Building darts-clone Error: Target org.macports.build returned: shell command failed (see log for details) Log for darts-clone is at: /opt/local/var/macports/logs/_opt_macports-trunk_dports_devel_darts-clone/darts-clone/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
Change History
comment:2 Changed 20 months ago by dports@…
- Cc dports@… added
I noticed this a couple months ago (I thought I filed a ticket about it, but I guess I just mentioned it on IRC)
The problem is that the check for conflicts is done in mportdepends (I forgot why -- was because we want to check if any dependencies have conflicts?) and that gets skipped if the port has no dependencies for the appropriate phase.
It ought to be a pretty easy fix...


You seem to be right. That is strange. See also libpixman and libpixman-devel. I'm pretty sure this used to work right before MacPorts 2; I'd think I would have noticed this before.