[packages/libidn2] Use lua in %post scripts to break dependency loop

jajcus jajcus at pld-linux.org
Tue Feb 19 13:16:51 CET 2019


commit f4326ba5b51606cadceef812835037b081fb2c72
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Tue Feb 19 13:15:13 2019 +0100

    Use lua in %post scripts to break dependency loop
    
    libidn2 -> /bin/sh -> glibc -> libidn2 dependency loop would cause
    unpredictable and unreliable package install order when building a fresh
    system.
    
    Release: 2

 libidn2.spec | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libidn2.spec b/libidn2.spec
index 0bcd1d1..e9fd8fe 100644
--- a/libidn2.spec
+++ b/libidn2.spec
@@ -3,7 +3,7 @@ Summary:	Free software implementation of IDNA2008
 Summary(pl.UTF-8):	Wolnodostępna implementacja IDNA2008
 Name:		libidn2
 Version:	2.1.1
-Release:	1
+Release:	2
 License:	LGPL v3+ or GPL v2+ (library), GPL v3+ (utilities)
 Group:		Libraries
 Source0:	http://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.lz
@@ -93,13 +93,13 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%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")
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libidn2.git/commitdiff/f4326ba5b51606cadceef812835037b081fb2c72



More information about the pld-cvs-commit mailing list