Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#19234 closed defect (fixed)

dbus upgrade fails on macOS (during port upgrade gnucash)

Reported by: kadorken@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: gnucash machine-id Cc: russel.winder@…, cooljeanius (Eric Gallager)
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 (9)

comment:1 Changed 16 years ago by blb@…

Keywords: gnucash added; dbus removed
Owner: changed from macports-tickets@… to mcalhoun@…
Port: dbus added; gnucash removed

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)?

comment:2 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Status: newassigned

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.

comment:3 Changed 16 years ago by jmroot (Joshua Root)

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

comment:4 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: russel.winder@… added

Adding reporter of duplicate #19236.

comment:5 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

Fixed in r49389.

comment:6 Changed 16 years ago by jmroot (Joshua Root)

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

comment:7 in reply to:  6 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

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.

comment:8 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:9 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.