Hello, http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets reads ----------------------------------------------------------------------- ... rpm in its default configuration does not at the moment execute shell scriptlets with the -e argument ... ----------------------------------------------------------------------- Therefore this test scriptlet should work: ----------------------------------------------------------------------- %pre # Test if RPM executes shell scriptlets without the -e argument # (i.e. do not exit if a command exits with a non-zero status). # Without the -e argument it would not exit at the next command... cat doesnotexist 1>/dev/null 2>/tmp/testRPMpre.stderr # ...and therefore it would run this command: echo "RPM pre scriptlet runs without -e" 1>/tmp/testRPMpre.stdout ----------------------------------------------------------------------- But a package with such a scriptlet fails during build with: ----------------------------------------------------------------------- running 06-check-installtest ... testing for pre/postinstall scripts that are not idempotent preinstall script of <package>.rpm failed ----------------------------------------------------------------------- The reason is that the post-build-checks RPM in the build system contains a usr/lib/build/checks/06-check-installtest script which runs each RPM scriptlet with explicit -e argument setting via ----------------------------------------------------------------------- SCRIPT_ARG=-e ... chroot $BUILD_ROOT sh $SCRIPT_ARG /.build_patchrpmcheck_scr ... ----------------------------------------------------------------------- where /.build_patchrpmcheck_scr is a copy of the RPM scriptlet. With "#!BuildIgnore: post-build-checks" I enforced to skip all post build checks to get the package built. And now - surprise! - surprise! - I can install the built package without an error using plain "rpm" which shows that rpm does not use the -e argument - at least not the rpm on my workstation. I wonder why then the post build checks use the -e argument? I would expect that the post build checks emulate what rpm does (i.e. what happens on the user's system who installs it) and not exaggerate.
From my point of view using the -e argument for the post build checks does not provide better RPM scriplets.
It only enforces packagers to add dumb "|| true" to all statements: ----------------------------------------------------------------------- %pre do_crap || true do_more_crap || true mess_up_everything || true ----------------------------------------------------------------------- Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org