[packages/libidn2] Use lua in %post scripts to break dependency loop
glen
glen at pld-linux.org
Tue Feb 19 15:23:25 CET 2019
On 2/19/19 2:16 PM, jajcus wrote:
> -%post
> -/sbin/ldconfig
> -[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
> +%post -p <lua>
> +os.execute("/sbin/ldconfig >/dev/null 2>&1")
> +os.execute("/usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1")
>
> -%postun
> -/sbin/ldconfig
> -[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
> +%postun -p <lua>
> +os.execute("/sbin/ldconfig >/dev/null 2>&1")
> +os.execute("/usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1")
>
the behaviour is not identical:
1. previous code did not hide ldconfig errors
2. previous code skipped invocation if /usr/sbin/fix-info-dir was missing
as you hopefully tested this, then os.execute does not trigger failure,
but would be nice to see ldconfig errors, if any.
--
glen
More information about the pld-devel-en
mailing list