command from a post-patch phase repeated during uninstall??

René J.V. Bertin rjvbertin at gmail.com
Fri Dec 18 08:03:04 PST 2015


Hello,

I have the following block in one of my KF5 framework subports which provides icon files from an installed theme in a way compatible for use with a macro from port:kde-extra-cmake-modules.

        post-patch {
            # create the destination directory that will host icon file links:
            xinstall -m 755 -d ${build.dir}/src/kdebugdialog/icons
            # call kf5.link_icons to populate that directory with icon links with appropriate names:
            # ${prefix}/share/icons/oxygen/128x128/actions/tools-report-bug.png will become 128-tools-report-bug.png etc.
            kf5.link_icons ${prefix}/share/icons/oxygen actions tools-report-bug.png ${build.dir}/src/kdebugdialog/icons
        }

where
proc kf5.link_icons {iconDir category iconName destination} {
    foreach icon [glob -nocomplain ${iconDir}/*/${category}/${iconName}] {
        set ifile [strsed ${icon} "s|${iconDir}/||"]
        set ifile [strsed ${ifile} "s|x\[0-9\]*/${category}/|-|"]
        ui_msg "ln -s ${icon} ${destination}/${ifile}"
        ln -s ${icon} ${destination}/${ifile}
    }
}

I was under the impression that this code would only be run during the post-patch phase. I already thought I'd seen these symlink commands appear at other times, but now I'm certain:

%>  port installed "kf5*" | fgrep 5.16.0 | xargs sudo port -nvk uninstall
ln -s /opt/local/share/icons/oxygen/128x128/actions/tools-report-bug.png /opt/local/var/macports/build/_opt_local_var_macports_registry_portfiles_kf5-kdelibs4support-devel-5.16.0.5.2.0.145_0_b9553b0488dab3c84abf91ddd2f7eec0c8e801520517c1b7238f0c10803996b2-89569/kf5-kdelibs4support-devel/work/build/src/kdebugdialog/icons/128-tools-report-bug.png
ln -s /opt/local/share/icons/oxygen/16x16/actions/tools-report-bug.png /opt/local/var/macports/build/_opt_local_var_macports_registry_portfiles_kf5-kdelibs4support-devel-5.16.0.5.2.0.145_0_b9553b0488dab3c84abf91ddd2f7eec0c8e801520517c1b7238f0c10803996b2-89569/kf5-kdelibs4support-devel/work/build/src/kdebugdialog/icons/16-tools-report-bug.png
ln -s /opt/local/share/icons/oxygen/22x22/actions/tools-report-bug.png /opt/local/var/macports/build/_opt_local_var_macports_registry_portfiles_kf5-kdelibs4support-devel-5.16.0.5.2.0.145_0_b9553b0488dab3c84abf91ddd2f7eec0c8e801520517c1b7238f0c10803996b2-89569/kf5-kdelibs4support-devel/work/build/src/kdebugdialog/icons/22-tools-report-bug.png
ln -s /opt/local/share/icons/oxygen/32x32/actions/tools-report-bug.png /opt/local/var/macports/build/_opt_local_var_macports_registry_portfiles_kf5-kdelibs4support-devel-5.16.0.5.2.0.145_0_b9553b0488dab3c84abf91ddd2f7eec0c8e801520517c1b7238f0c10803996b2-89569/kf5-kdelibs4support-devel/work/build/src/kdebugdialog/icons/32-tools-report-bug.png
ln -s /opt/local/share/icons/oxygen/48x48/actions/tools-report-bug.png /opt/local/var/macports/build/_opt_local_var_macports_registry_portfiles_kf5-kdelibs4support-devel-5.16.0.5.2.0.145_0_b9553b0488dab3c84abf91ddd2f7eec0c8e801520517c1b7238f0c10803996b2-89569/kf5-kdelibs4support-devel/work/build/src/kdebugdialog/icons/48-tools-report-bug.png
ln -s /opt/local/share/icons/oxygen/64x64/actions/tools-report-bug.png /opt/local/var/macports/build/_opt_local_var_macports_registry_portfiles_kf5-kdelibs4support-devel-5.16.0.5.2.0.145_0_b9553b0488dab3c84abf91ddd2f7eec0c8e801520517c1b7238f0c10803996b2-89569/kf5-kdelibs4support-devel/work/build/src/kdebugdialog/icons/64-tools-report-bug.png
--->  Uninstalling kf5-kdelibs4support-devel @5.16.0.5.2.0.145_0+docs+kde4compat+qspXDG+qt5kde
--->  Cleaning kf5-kdelibs4support-devel
...

I presume this is a result of the ui_msg statement in the kf5.link_icons procedure, given that the /opt/local/var/macports/build/_opt_local_var_macports_registry_portfiles* directory doesn't exist (and I'm not seeing error messages to that extent).
But why does it happen?

Thanks,
René


More information about the macports-dev mailing list