[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Fedora-packaging] installation of info files



Christian Iseli 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

Attachment: pgp4nHF53gmPD.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]