Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 May 2020 21:22:22 +0200
From:      Matthias Andree <matthias.andree@gmx.de>
To:        Guido Falsi <madpilot@Freebsd.org>, gnome <gnome@FreeBSD.org>
Cc:        freebsd-ports@freebsd.org, portmgr <portmgr@FreeBSD.org>
Subject:   Mk/Uses/gnome.mk INSTALLS_ICONS broken (was: Error testing port in poudriere caused by pkg not running deinstall scripts)
Message-ID:  <c6284ffc-80ab-73e0-0b4b-edf8de289854@gmx.de>
In-Reply-To: <344878e8-e885-744a-df10-9af61017cbd7@FreeBSD.org>
References:  <344878e8-e885-744a-df10-9af61017cbd7@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 01.05.20 um 19:49 schrieb Guido Falsi:
> hi,
>
> While testing an update to xfce ports I have got this error in poudrier=
e:
>
> =3D>> Checking for extra files and directories
> =3D>> Error: Files or directories removed:
> share/icons/hicolor/icon-theme.cache
>
> And could not find any cause for it.
>
> This file should be managed by the INSTALLS_ICONS port variable, which
> adds post-install and post-deinstall commands.
>
> My suspect is the post-deinstall command is not being run properly for
> some reason causing this error.
>
> Could this be correct? How can I verify this?
>
I've filed https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246102 for=

this:

You're hunting the wrong fault, and poudriere reports a genuine bug
(which is not in your package).

Read again: the complaint is that the port deinstallation REMOVES (not:
LEAVES BEHIND) the prior icon-theme.cache.

I've debugged this, the INSTALLS_ICONS from Mk/Uses/gnome.mk adds a
@rmtry (i. e. delete, but don't complain if missing) for the cache file,
and topmost in the PLIST, so the deinstallation of ANY package using
that macro will first update and then nuke the cache file. Proof below.

Conclusion: Mk/Uses/gnome.mk is broken (in particular the
gnome-post-icons: target). Here's how:

# pkg -ddd delete xfce4-taskmanager # (was version 1.2.3):

> [...]
> DBG(1)[59116]> Deleting file:
> 'usr/local/share/locale/zh_TW/LC_MESSAGES/xfce4-taskmanager.mo'
> DBG(1)[59116]> Adding to deletion
> usr/local/share/locale/zh_TW/LC_MESSAGES/
> [1/1] Deleting files for xfce4-taskmanager-1.2.3... done
> DBG(3)[59116]> Scripts: executing
> --- BEGIN ---
> set -- xfce4-taskmanager-1.2.3
> /usr/local/bin/gtk-update-icon-cache -q -f
> /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true
>
> Scripts: --- END ---
> DBG(3)[59119]> Scripts: executing lua
> --- BEGIN ---
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 file =3D pkg.prefixed_path("=
share/icons/hicolor/icon-theme.cache")
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -- ignore the return value a=
nd the error
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret, err =3D os.remove(file)=

> Scripts: --- END ---

and after that, /usr/local/share/icons/hicolor/icon-theme.cache is missin=
g.

Meaning that the deinstallation of ANY (but the last installed) package
that uses INSTALLS_ICONS deletes the icon-theme.cache files in all
directories where they had placed icons.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c6284ffc-80ab-73e0-0b4b-edf8de289854>