On Sep 19, 2008, at 12:02 PM, Alexey Tourbin wrote:
> On Fri, Sep 19, 2008 at 11:51:32AM -0400, Jeff Johnson wrote:
>>> $ find /usr/share/icons/hicolor -mindepth 2 -type d |sort -u |head
>>> /usr/share/icons/hicolor/128x128/actions
>>> /usr/share/icons/hicolor/128x128/animations
>>> /usr/share/icons/hicolor/128x128/apps
>>> /usr/share/icons/hicolor/128x128/categories
>>> /usr/share/icons/hicolor/128x128/devices
>>> /usr/share/icons/hicolor/128x128/emblems
>>> /usr/share/icons/hicolor/128x128/emotes
>>> /usr/share/icons/hicolor/128x128/filesystems
>>> /usr/share/icons/hicolor/128x128/intl
>>> /usr/share/icons/hicolor/128x128/mimetypes
>>> $ find /usr/share/icons/hicolor -mindepth 2 -type d |wc -l
>>> 156
>>> $
>>
>> So? Use a glob pattern against RPMTAG_DIRNAMES
>> elements to detect condition pkg-contains-directory.
>
> Do you mean something like -- ?
> %triggerin -- /usr/share/icons/hicolor/*/*/
> gtk-update-icon-cache /usr/share/icons/hicolor
>
Yes.
> Possible implementation is: retrieve all Triggername index keys
> with leading "/", and treat them as patterns. Then do O(N^2) nested
> loop: for each DIRNAME in a package, for each Triggername pattern,
> check for fnmatch(pattern, dirname).
No. I haven't said anything at all about loops or implementation.
And how is piping every file to an external script any better or faster?
For starters, there are many fewer directories, already uniqified, than
there are file paths in packages ...
73 de Jeff
Received on Fri Sep 19 18:08:56 2008