1
0

Have the comment for the files section inside the files section

and not directly before it because then this comment actually
  belongs for RPM to the section before the files section and
  when this is "postun -p /sbin/ldconfig", the comment becomes
  in some cases (e.g. in the build system for SLE11 and SLE11_SP1)
  added as argument to the /sbin/ldconfig call which lets it fail
  with an "/sbin/ldconfig: relative path ... used to build cache"
  which lets package build fail during "removing all built rpms".
  Therefore traditional bash scriptlets for post/postun
  with an "exit 0" line at the end would be more fail safe.

OBS-URL: https://build.opensuse.org/package/show/Printing/epson-inkjet-printer-escpr?expand=0&rev=3
This commit is contained in:
Johannes Meixner 2011-10-04 09:29:09 +00:00 committed by Git OBS Bridge
parent bf12abe053
commit fba1afd80d
2 changed files with 16 additions and 4 deletions

View File

@ -4,6 +4,16 @@ Tue Oct 4 09:55:34 CEST 2011 - jsmeix@suse.de
- Using "-p /sbin/ldconfig" option in post/postun
see the "Shared_libraries" section in
http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
Have the comment for the files section inside the files section
and not directly before it because then this comment actually
belongs for RPM to the section before the files section and
when this is "postun -p /sbin/ldconfig", the comment becomes
in some cases (e.g. in the build system for SLE11 and SLE11_SP1)
added as argument to the /sbin/ldconfig call which lets it fail
with an "/sbin/ldconfig: relative path ... used to build cache"
which lets package build fail during "removing all built rpms".
Therefore traditional bash scriptlets for post/postun
with an "exit 0" line at the end would be more fail safe.
-------------------------------------------------------------------
Tue Sep 27 11:32:17 CEST 2011 - jsmeix@suse.de

View File

@ -112,20 +112,22 @@ done
set -x
popd
# The post section:
%post -p /sbin/ldconfig
# The postun section:
%postun -p /sbin/ldconfig
# The files sections list all mandatory files explicitely one by one.
# In particular all executables are listed explicitely.
%files
# The files sections list all mandatory files explicitly one by one.
# In particular all executables are listed explicitly.
# This avoids that the configure magic might silently
# not build and install an executable when whatever condition
# for configure's automated tests is not fulfilled in the build system.
# When all mandatory files are explicitely listed,
# When all mandatory files are explicitly listed,
# the build fails intentionally if a mandatory file was not built
# which ensures that already existing correctly built binary RPMs
# are not overwritten by broken RPMs where mandatory files are missing.
%files
%defattr(-,root,root)
%{_libdir}/libescpr.*
%dir /usr/lib/cups