Jeff schrieb:
On Fri, Sep 11, 2009 at 05:05:07PM +0200, Marc - A. Dahlhaus [ Administration | 
Westermann GmbH ] wrote:
Add all info pages that got installed or updated in the last 24h:

find /usr/share/info -type f -ctime -1 \
 -exec install-info '{}' /usr/share/info/dir 2>/dev/null

I have no opinion to offer on the hooks/trigger proposals in general,
but as for the info page idea, arbitrary times are sloppy in this case
when what you really want is "newer than /usr/share/info/dir".  That will
provide the proper list to the infodir command. As for removing info
pages, that one can be done by either parsing the installed files list
of a package and pulling out the names of the info pages, or just
running infodir on the whole /usr/share/info directory after removal of
said pages. The first is cleaner conceptually, but harder to implement
correctly without making assumptions.

Good point, i forgot the remove case all together.

The infodir trigger would be:

rm /usr/share/info/dir
find /usr/share/info -type f -iname *.info* \
 -exec install-info '{}' /usr/share/info/dir 2>/dev/null

As there is no distinct add or remove of pages possible if the trigger runs after the transaction has finished. During transaction addition and removal of info-pages could have happened. So we would need to build the index new every time. Not very clean but works fast enough even an an old P3 750mhz here.

As for the concept of pulling out redundant code from install
scriptlets, is anyone suggesting the same thing for PKGBUILDs? For one,
the compression of man/info pages is something that should either be
done globally or not done globally. If implemented as a hook, then
PKGBUILDs won't have to do it manually for those packages that install
non-compressed files.

Take a look at man makepkg.conf and search for zipman. What makepkg doesn't do is to extract compressed files in the !zipman case.


Marc

Reply via email to