[Bug 983529] New: Document use or remove if possible: Variable $YAST_IS_RUNNING
http://bugzilla.suse.com/show_bug.cgi?id=983529 Bug ID: 983529 Summary: Document use or remove if possible: Variable $YAST_IS_RUNNING Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 Assignee: yast2-maintainers@suse.de Reporter: trenn@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- '$YAST_IS_RUNNING" != "instsys" is used in some rpm .spec %post sections It is also used in: /usr/lib/rpm/suse_macros I would like to know when and why it is used because I need to add: %regenerate_initrd_post in some packages %post section. And especially there it is often embedded into: if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" %regenerate_initrd_post ... But this seem to be old and I wonder what for or whether it is needed at all anymore. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=983529
http://bugzilla.suse.com/show_bug.cgi?id=983529#c1
--- Comment #1 from Thomas Renninger
http://bugzilla.suse.com/show_bug.cgi?id=983529
http://bugzilla.suse.com/show_bug.cgi?id=983529#c2
Josef Reidinger
http://bugzilla.suse.com/show_bug.cgi?id=983529
http://bugzilla.suse.com/show_bug.cgi?id=983529#c3
Thomas Renninger
http://bugzilla.suse.com/show_bug.cgi?id=983529
Thomas Renninger
http://bugzilla.suse.com/show_bug.cgi?id=983529
http://bugzilla.suse.com/show_bug.cgi?id=983529#c4
Ancor Gonzalez Sosa
http://bugzilla.suse.com/show_bug.cgi?id=983529
http://bugzilla.suse.com/show_bug.cgi?id=983529#c5
Josef Reidinger
A lot of packages who need regeneration of initrd on install or update have or had such a code snippet in their %post section:
if [ "${YAST_IS_RUNNING}" != "instsys" ]; then if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" %if %{defined regenerate_initrd_post} else %regenerate_initrd_post
Could you check whether this is still needed, please.
Yes, it is still very useful as it speed up installation. As I described above, yast2-bootloader will recreate initrd after rpm was installed. And since initrd creation is expensive and often done more then once in post install scripts, then such check speed up installation.
I like to get totally rid of this and only have: %regenerate_initrd_post to handle initrd re-creation. Either by simply removing the "${YAST_IS_RUNNING} and -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend" code or by moving it into the %regenerate_initrd_post macro.
Using macro for that task make sense for me.
Still documenting ${YAST_IS_RUNNING} would be a good idea. There are not many users, but some. I would recommend to put it here: /usr/lib/rpm/suse_macros This is where I would have found it...
OK, I think it make sense to document it in our wiki or on our yast project page and then put to /usr/lib/rpm/suse_macros just link as there are more users of them ENV variable. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=983529
http://bugzilla.suse.com/show_bug.cgi?id=983529#c6
Christopher Hofmann
participants (1)
-
bugzilla_noreply@novell.com