New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #19234 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

dbus upgrade fails on macOS (during port upgrade gnucash)

Reported by: kadorken@… Owned by: mcalhoun@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: gnucash machine-id Cc: russel.winder@…
Port: dbus

Description

after doing 'sudo port selfupdate' to 1.7.1, I proceeded to try 'sudo port upgrade gnucash' to 2.2.9. I previously had gnucash 2.2.8 installed (quartz version) on MACOS 10.5.6

When the installation got to dbus, the activation of dbus failed, possibly due to an earlier installation ? See the log excerpt that follows:

--->  Building gtk2
--->  Staging gtk2 into destroot
--->  Deactivating gtk2 @2.14.7_1+no_x11+quartz
--->  Installing gtk2 @2.14.7_2+no_x11+quartz
--->  Activating gtk2 @2.14.7_2+no_x11+quartz
--->  Cleaning gtk2
--->  Fetching dbus
--->  Verifying checksum(s) for dbus
--->  Extracting dbus
--->  Applying patches to dbus
--->  Configuring dbus
--->  Building dbus
--->  Staging dbus into destroot
--->  Deactivating dbus @1.2.12_4
--->  Installing dbus @1.2.12_5
--->  Activating dbus @1.2.12_5
Error: Target org.macports.activate returned: Image error: /opt/local/var/lib/dbus/machine-id already exists and does not belong to a registered port.  Unable to activate port dbus.
--->  Activating dbus @1.2.12_5
Error: Target org.macports.activate returned: Image error: /opt/local/var/lib/dbus/machine-id already exists and does not belong to a registered port.  Unable to activate port dbus.
Error: The following dependencies failed to build: dbus
Error: Unable to upgrade port: 1

The port upgrade of gnucash proceeded to plug along, with period errors on other dependencies related to dbus not being properly installed.

Change History

  Changed 10 months ago by blb@…

  • keywords gnucash added; dbus removed
  • owner changed from macports-tickets@… to mcalhoun@…
  • port changed from gnucash to dbus

Since that file is created by dbus during runtime, perhaps it can be deleted in a post-destroot phase (I have a copy of that file as well, and it wasn't installed by the port itself)?

  Changed 10 months ago by mcalhoun@…

  • status changed from new to assigned

This file is created by calling dbus-uuidgen.
Prior to r49300, machine-id was created during post-activate and left in ${prefix}/var/lib/dbus/.
I thought it was better to create machine-id during post-destroot so it would be removed if
ever the user wanted to uninstall dbus.
I forgot that upgrading would be a problem.

The solution is to simply remove the old file in ${prefix}/var/lib/dbus/.
Everything should then proceed.

I will try to add some code to give a better error message.

  Changed 10 months ago by jmr@…

Why not add a pre-activate to delete that file from $prefix?

  Changed 10 months ago by mcalhoun@…

  • cc russel.winder@… added

Adding reporter of duplicate #19236.

  Changed 10 months ago by mcalhoun@…

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r49389.

follow-up: ↓ 7   Changed 10 months ago by jmr@…

Hadn't you better check that the file exists first, so new installs don't fail?

in reply to: ↑ 6   Changed 10 months ago by mcalhoun@…

Replying to jmr@…:

Hadn't you better check that the file exists first, so new installs don't fail?

Thank you for catching this.
The fix is fixed in r49391.

  Changed 10 months ago by anonymous

  • milestone Port Bugs deleted

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.