questions regarding selfupdate issue

René J.V. Bertin rjvbertin at
Fri Nov 14 05:35:49 PST 2014

On Thursday November 13 2014 18:06:41 Ryan Schmidt wrote:
> On Nov 13, 2014, at 5:12 PM, René J.V. Bertin wrote:
> > I see I didn't write down my full thought :-/ What I meant to say was that I suspected that the gsed I had installed was part of another port, recently split up. It'd be a feat to handle that kind of thing automatically (I guess :)).
> > 
> > Question is, if I did install gsed at some point (which would be very likely), how come I can't find a trace of its Portfile? 
> > 
> > Unless...
> > I keep getting that error that I've already signalled but that I cannot reproduce nor predict nor even "debug" because it "self heals": some kind of transient failure uninstalling a port with alerts about missing files from MacPort's infrastructure. Usually the port does get uninstalled though, without collateral damage as far as I can tell. I wonder if this is related and if so, what on earth is going on.
> > AFAIT I can rule out issues with my harddrive...
> The gsed port has existed for 12 years.
> Do you see the gsed portfile now? Are you able to install and uninstall it without error now?

Good one:

1.54_portia_2751# sudo port -v uninstall gsed
Warning: Failed to open Portfile from registry for gsed @4.2.2_0
Warning: Failed to open Portfile from registry for gsed @4.2.2_0
--->  Deactivating gsed @4.2.2_0
--->  Uninstalling gsed @4.2.2_0
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)"
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 $

PortSystem      1.0

name            gsed
set my_name     sed
version         4.2.2
categories      textproc
platforms       darwin
license         GPL-3+
installs_libs   no
maintainers     nomaintainer
description     GNU version of the stream editor, sed

long_description \
    Sed (streams editor) isn't really a true text editor or text \
    processor. Instead, it is used to filter text, i.e., it takes text \
    input and performs some operation (or set of operations) on it and \
    outputs the modified text. Sed is typically used for extracting part \
    of a file using pattern matching or substituting multiple occurrences \
    of a string within a file.

homepage        http:/${my_name}/
master_sites    gnu:${my_name}
distname        ${my_name}-${version}

checksums       rmd160  c59e8bf071dbef14bad1cc0e50f00f79a73947e8 \
                sha256  fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff

depends_lib     port:gettext \

configure.args  --infodir=${prefix}/share/info \
                --mandir=${prefix}/share/man \

use_parallel_build  yes

post-destroot {
    foreach i [glob -tails -directory ${destroot}${prefix}/share/info *.info*] {
        move ${destroot}${prefix}/share/info/${i} ${destroot}${prefix}/share/info/g${i}

    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS BUGS COPYING ChangeLog NEWS README THANKS \

    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin/man/man1
    foreach manpage [glob -tails -directory ${destroot}${prefix}/share/man/man1 g*] {
        ln -s ${prefix}/share/man/man1/${manpage}.gz ${destroot}${prefix}/libexec/gnubin/man/man1/[string range $manpage 1 end].gz
}        yes     check

platform darwin 8 {
    # Bad things happen running 64-bit gsed on Tiger. Fine on Leopard.
    # See https:/
    supported_archs i386 ppc
": file name too long
Exit 1
    54    14:33   sudo port -v uninstall gsed
1.55_portia_2751# port installed gsed
None of the specified ports are installed.

More information about the macports-users mailing list