[Fedora-packaging] --excludedocs and packaging guidelines?

Hans de Goede j.w.r.degoede at hhs.nl
Tue Mar 11 20:20:51 UTC 2008

Ville Skyttä wrote:
> On Tuesday 11 March 2008, Warren Togami wrote:
>> Furthermore I wonder if there should be any rule or suggestion of how
>> install-info should be used within a %post scriptlet.  I see some
>> packages redirect the output of install-info to /dev/null, and
>> install-info's man page also describes a --quiet option.  Might we
>> recommend in guidelines the use of this to suppress the warning that
>> happens when a package is installed with --excludedocs?
> install-info's --quiet does not suppress errors resulting from files not 
> found.
> Redirecting stderr to /dev/null sounds a bit draconian to me; testing whether 
> the info file exists before invoking install-info would be somewhat better.
> But the somewhat annoying part of that is that currently we'd need to test if 
> the gzipped info file exists which is hardcoding assumptions about what 
> happens under the hood outside of the specfile's control into the specfile 
> (would break if the system rpm is configured to not compress info files at 
> all or use something else than gzip for compressing them) instead of just 
> invoking install-info (without the .gz suffix! install-info handles that 
> internally) on the target info file.
> So I suppose the recommended way would call for a macro, let's say
>   %install_info foo
> ...which would expand into something like (%1=foo):
>   for suf in .gz .bz2 "" ; do # + other suffixes auto-handled by install-info
>     if [ -f %{_infodir}/%1.info$suf ] ; then
>       /sbin/install-info %{_infodir}/$1.info %{_infodir}/dir || :
>       break
>     fi
>   done
> ...and a similar one that does install-info --delete for removing it.

If we start introducing macro's for common scriplets (which I'm in favor of) 
can we then please check how they are called in suse / mandrake and try to use 
the same names to make spec file sharing easier?



More information about the Fedora-packaging mailing list