questions regarding selfupdate issue

Clemens Lang cal at macports.org
Fri Nov 14 15:43:43 PST 2014


Hi,

> DATABASE ERROR:
> Error code: 1452
> DB error:  "Cannot add or update a child row: a foreign key constraint fails
> (`akonadi`.`collectionpimitemrelation`, CONSTRAINT
> `collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
> `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
> Error text: "Cannot add or update a child row: a foreign key constraint fails
> (`akonadi`.`collectionpimitemrelation`, CONSTRAINT
> `collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES
> `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to
> execute statement"
> Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id) VALUES
> (:0, :1)"

Where do these messages come from? MacPorts never runs these queries, and these
tables should not be present in the MacPorts registry database.

> Error: port uninstall failed: error deleting
> "/opt/local/var/macports/registry/portfiles/gsed-4.2.2_0/# -*- coding: utf-8;
> mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
> vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
> # $Id: Portfile 100788 2012-12-24 17:54:37Z g5pw at macports.org $
> […]

The conversion from Portfiles stored in the registry directly to Portfiles stored
in the filesystem but referenced for the registry has apparently not been run
correctly on your system. MacPorts should have done that automatically when it
changed the database schema (and the corresponding handling code) accordingly.

I'm not sure what that hasn't happened for you. Did you at some point jump between
MacPorts versions, restore the database from a backup or something related?

-- 
Clemens Lang


More information about the macports-users mailing list