[Fedora-packaging] installation of info files

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Thu Jul 13 22:22:05 UTC 2006


Christian.Iseli at licr.org writes:

>> I do not see much sense in the test-for-existence check;
>> when a packager uses
>> | %__install_info_post          g() { %__install_info "$@" || :; }; g
>> | ...
>> | %__install_info_post %_infodir/zsh.info
>> he knows that 'zsh.info' exists there (else, package would be broken). 
>
> Hrm, not sure here, but what about --excludedocs ?

Not really a problem; the command has a '|| :' making the scriptlet
succeed. When you would want to handle missing files (--excludedocs or
--excludepaths), you would have to handle read-only %netsharedpath
mounts too (which would make install-info fail).


My (real) original macro was

| %define __isDirectoryShared	f() { rpm --eval '%%{_netsharedpath}' | awk -v y="$1" '{ split($1, x, ":"); for (i in x) if (index(y,x[i])==1) exit 0; exit 1; }'; }; fi
| %define __install_info	( %__isDirectoryShared %_infodir ) || /sbin/install-info --info-dir=%_infodir

but it is not really worth the effort because e.g. 'rpm' might be
missing in chroot environments and rpm maintainer refuses to add
functionality allowing to detect whether path is covered by
%netsharedpath resp. missing due to --exclude*.

Perhaps a '2>/dev/null' should be added.



Enrico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20060714/10f3b54f/attachment.sig>


More information about the Fedora-packaging mailing list