Opened 14 years ago

Closed 9 years ago

#25721 closed defect (fixed)

peekabot: inconvenient upgrade from 0.7.1 to 0.7.2

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: staffan@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port: peekabot

Description

I encountered some inconveniences while updating peekabot from 0.7.1 to 0.7.2.

The first problem is that peekabot used to use xercesc but now uses xercesc3, but those two ports cannot be installed at the same time because they conflict with one another (because they install files of the same names) so the user must manually deactivate the one before activating the other.

$ port installed peekabot
The following ports are currently installed:
  peekabot @0.7.1_0 (active)
$ port outdated peekabot
The following installed ports are outdated:
peekabot                       0.7.1_0 < 0.7.2_0 
$ port upgrade peekabot
--->  Computing dependencies for peekabot-serverError: Unable to exec port: Can't install xercesc3 because conflicting ports are installed: xercesc
To report a bug, see <http://guide.macports.org/#project.tickets>
$ port dependents xercesc
peekabot depends on xercesc
$ port deactivate xercesc
--->  Deactivating xercesc
$ port upgrade peekabot
--->  Computing dependencies for peekabot-server
--->  Dependencies to be installed: xercesc3
--->  Activating xercesc3 @3.1.1_0
--->  Cleaning xercesc3

This is not really peekabot's problem except that it is unfortunate that this dependency had to be changed while the xercesc ports were incompatible with one another. Resolving that incompatibility is a matter for xercesc's maintainers and a separate ticket.

The second issue is solely peekabot's, though. peekabot 0.7.1 contained both the client and server, while peekabot 0.7.2 contains nothing and instead declares dependencies on new ports peekabot-client and peekabot-server which taken together install the same files the previous monolithic peekabot installed. And therein lies the problem: MacPorts will build, install and try to activate the port's new dependencies while the old port is still active, resulting in a conflict.

--->  Fetching peekabot-server
--->  Attempting to fetch peekabot-0.7.2.tar.bz2 from http://downloads.sourceforge.net/peekabot
--->  Verifying checksum(s) for peekabot-server
--->  Extracting peekabot-server
--->  Applying patches to peekabot-server
--->  Configuring peekabot-server
--->  Building peekabot-server
--->  Staging peekabot-server into destroot
--->  Installing peekabot-server @0.7.2_0
--->  Activating peekabot-server @0.7.2_0
Error: Target org.macports.activate returned: Image error: /mp/bin/obj2pbmf is being used by the active peekabot port.  Please deactivate this port first, or use 'port -f activate peekabot-server' to force the activation.
Log for peekabot-server is at: /mp/var/macports/logs/_Volumes_data_macports_ports_science_peekabot-server/main.log
Error: Problem while installing peekabot-server
To report a bug, see <http://guide.macports.org/#project.tickets>

Again the user will have to manually intervene to set things right.

$ port deactivate peekabot
--->  Deactivating peekabot
$ port upgrade peekabot
--->  Computing dependencies for peekabot-client
--->  Fetching peekabot-client
--->  Verifying checksum(s) for peekabot-client
--->  Extracting peekabot-client
--->  Applying patches to peekabot-client
--->  Configuring peekabot-client
--->  Building peekabot-client
--->  Staging peekabot-client into destroot
--->  Installing peekabot-client @0.7.2_0
--->  Activating peekabot-client @0.7.2_0
--->  Cleaning peekabot-client
--->  Computing dependencies for peekabot
--->  Dependencies to be installed: peekabot-server
--->  Activating peekabot-server @0.7.2_0
--->  Cleaning peekabot-server
--->  Fetching peekabot
--->  Verifying checksum(s) for peekabot
--->  Extracting peekabot
--->  Configuring peekabot
--->  Building peekabot
--->  Staging peekabot into destroot
--->  Computing dependencies for peekabot
--->  Installing peekabot @0.7.2_0
--->  Activating peekabot @0.7.2_0
--->  Cleaning peekabot

If you had made the peekabot port "replaced_by peekabot-client" or "replaced_by peekabot-server" MacPorts would have deactivated the old peekabot port before attempting to activate the new port, since "replaced_by" indicates to MacPorts the likelihood that the new port will contain the same files as the old port. But you said in #25309 that you did not wish to replace the old peekabot by either the new client or server port since you could not be sure whether the user wanted the client or the server, and that it was reasonable for the user to want to install either the client or the server without installing the other.

There is a mechanism proposed in the new libpng12 portfile attached to #23125 (look at the "pre-activate" block at the end of libpng-1.4.1-libpng12.diff) which could be added to the new peekabot-client and peekabot-server ports to ensure an old existing monolithic peekabot port is deactivated in time. The method is a bit messy but it is the only remaining solution that occurs to me now. I will see if I can make you a patch.

Change History (3)

comment:1 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:2 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

It appears this has been fixed from ticket 25309 - it is currently 0.8.4

comment:3 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.