Re: Rules regarding whitespace inside .spec files

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

 



On 01/13/2016 08:24 AM, Luya Tshimbalanga wrote:

> In general, leading whitespace is only allowed when making conditional
> statement or using backslash like these following examples:
> 
> --- Example #1 ---
> %if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
>     --vendor="fedora"                      \
> %endif
>     --dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
>     %{name}.desktop
> 
> --- Example #2 ---
> for f in scribus/plugins/scriptplugin/{samples,scripts}/*.py
> do
>     sed '1{/#!\/usr\/bin\/env\|#!\/usr\/bin\/python/d}' $f > $f.new
>     touch -r $f $f.new
>     mv $f.new $f
> done
> ----------

But these are part of scriptlets, so whitespace is passed to the shell,
which then ignores it (except where it is significant, like the line
ending before the “do”).  I don't think it has to do with backslashes or
conditional/control flow statements.

Florian
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux