[arch-dev-public] Hooks rebuild #1

Andrew Gregory andrew.gregory.8 at gmail.com
Thu Apr 28 18:47:01 UTC 2016


On 04/28/16 at 09:52am, Anatol Pomozov wrote:
> Hi
> 
> On Thu, Apr 28, 2016 at 9:38 AM, Doug Newgard <scimmia at archlinux.info> wrote:
> > On Thu, 28 Apr 2016 09:29:49 -0700
> > Anatol Pomozov <anatol.pomozov at gmail.com> wrote:
> >> Dependencies like gtk-update-icon-cache/desktop-file-utils should be
> >> installed by those who *needs* the tool functionality. Not by the
> >> packages that *provide* icons/desktop files.
> >>
> >> It this case desktop environment should depend on desktop-file-utils
> >> that maintains the cache up-to-date. And if a user has no UI (headless
> >> setup) then no point in updating this cache.
> >
> > While I agree completely, Allan brought up the case of installing the tool
> > after the fact, which won't necessarily trigger the hook. In the example you
> > gave, the desktop mime cache wouldn't be created until you install something
> > else with a .desktop file.
> 
> I think it makes sense to enhance the hook system to make sure hook is
> run when it is installed. But if it cannot be done then "update cache"
> should be run in post_install() of desktop-file-utils similar to what
> gtk-update-icon-cache package does [1].

Hooks already run during the transaction that installs them if
something in the transaction triggers them.  Running them on
installation even when they're *not* triggered, makes no sense.  If
the process requires the list of new/updated/removed files, the
post_install script needs to scan the filesystem and build the initial
cache; the hook can then manage updates to it.  If the list of files
is not needed you can either build the initial cache from the
post_install script or just have the hook trigger itself.

> > More things would need the desktop mime cache, though, such as xdg-utils. This
> > would pull it in on many more systems.
> 
> I agree that xdg-utils uses desktop mime cache and it should depend on
> desktop-file-utils.
> 
> 
> [1] https://projects.archlinux.org/svntogit/packages.git/tree/trunk/gtk-update-icon-cache.install?h=packages/gtk3


More information about the arch-dev-public mailing list