Fwd: [packages/sgml-common] allow libxml2-progs uninstallation to succeed

Elan Ruusamäe glen at pld-linux.org
Sat Oct 20 15:13:40 CEST 2012


now that we're linked to upstream again with our rpm package,
can discuss old and known bugs,

what's wrong there, what's the proper fix? (if this commit already isn't it)

that package spec can be viewed online at:
http://git.pld-linux.org/gitweb.cgi?p=packages/sgml-common.git;a=tree;h=c19688260eaba5001c47459d30614c1471b97d6a;hb=c19688260eaba5001c47459d30614c1471b97d6a

-------- Original Message --------
Subject: 	[packages/sgml-common] allow libxml2-progs uninstallation to 
succeed
Date: 	Sat, 20 Oct 2012 15:10:57 +0200
From: 	glen <glen at pld-linux.org>
Reply-To: 	pld-devel-en at lists.pld-linux.org, 
pld-devel-pl at lists.pld-linux.org
To: 	pld-cvs-commit at lists.pld-linux.org



commit c19688260eaba5001c47459d30614c1471b97d6a
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Oct 20 16:08:16 2012 +0300

     allow libxml2-progs uninstallation to succeed
     
     currently libxml2-progs and sgml-common are put to transaction, but at
     the time %preun of sgml-common runs, /usr/bin/xmlcatalog from
     libxml2-progs is already removed, leaving sgml-common installed with
     broken deps:
     
     mark libxml2-progs-2.9.0-1.i686
     Processing dependencies...
     libxml2-progs-2.9.0-1.i686 marks sgml-common-0.6.3-7.noarch (req
     /usr/bin/xmlcatalog)
     There are 2 packages to remove (1 marked by dependencies):
     R libxml2-progs-2.9.0-1.i686
     D sgml-common-0.6.3-7.noarch
     This operation will free 267.1KB of disk space.
     Proceed? [N/y] y
     Running rpm --erase --root / --noorder...
     install-catalog: can not modify
     "/etc/sgml/sgml-iso-entities-8879.1986.cat".
     install-catalog: can not modify
     "/etc/sgml/xml-iso-entities-8879.1986.cat".
     /root/tmp/rpm-tmp.68860[6]: /usr/bin/xmlcatalog: not found
     error: %preun(sgml-common-0.6.3-7.noarch) scriptlet failed, exit status
     127
     
     package libxml2-progs is not installed
     ..5.....  c /etc/sgml/sgml.conf
     Unsatisfied dependencies for sgml-common-0.6.3-7.noarch:
             Requires: /usr/bin/xmlcatalog
             Requires: libxml2-progs

  sgml-common.spec | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/sgml-common.spec b/sgml-common.spec
index 0eabe5e..cf5e0c2 100644
--- a/sgml-common.spec
+++ b/sgml-common.spec
@@ -2,9 +2,9 @@ Summary:	Common SGML catalog and DTD files
  Summary(pl.UTF-8):	Opisane w normie ISO 8879/1986 katalogi i DTD SGML-owe
  Name:		sgml-common
  Version:	0.6.3
-Release:	7
+Release:	8
+#Copyright:	(C) International Organization for Standardization 1986
  License:	distributable
-##Copyright:	(C) International Organization for Standardization 1986
  URL:		http://www.iso.ch/cate/3524030.html
  Group:		Applications/Publishing/SGML
  Source0:	ftp://ftp.kde.org/pub/kde/devel/docbook/SOURCES/%{name}-%{version}.tgz
@@ -47,7 +47,6 @@ instalator nowych DTD.
  
  %install
  rm -rf $RPM_BUILD_ROOT
-
  %{__make} install \
  	DESTDIR=$RPM_BUILD_ROOT
  
@@ -56,7 +55,8 @@ rm -rf $RPM_BUILD_ROOT
  install -d $RPM_BUILD_ROOT%{_datadir}/sgml/{docbook,html}
  
  xmlcatalog --noout --create $RPM_BUILD_ROOT%{xml_catalog}
-grep PUBLIC $RPM_BUILD_ROOT%{_datadir}/sgml/xml-iso-entities-8879.1986/catalog|sed 's/^/xmlcatalog --noout --add /;s/PUBLIC/public/;s=$= '$RPM_BUILD_ROOT'%{xml_catalog}=' |sh
+grep PUBLIC $RPM_BUILD_ROOT%{_datadir}/sgml/xml-iso-entities-8879.1986/catalog | \
+	sed 's/^/xmlcatalog --noout --add /;s/PUBLIC/public/;s=$= '$RPM_BUILD_ROOT'%{xml_catalog}=' | sh
  
  rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
  
@@ -83,7 +83,7 @@ fi
  if [ "$1" = "0" ] ; then
  	/usr/bin/install-catalog --remove /etc/sgml/sgml-iso-entities-8879.1986.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null
  	/usr/bin/install-catalog --remove /etc/sgml/xml-iso-entities-8879.1986.cat /usr/share/sgml/xml-iso-entities-8879.1986/catalog > /dev/null
-	/usr/bin/xmlcatalog --noout --del %{xml_catalog} /etc/xml/catalog
+	[ ! -x /usr/bin/xmlcatalog ] || /usr/bin/xmlcatalog --noout --del %{xml_catalog} /etc/xml/catalog
  fi
  
  %files
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sgml-common.git/commitdiff/c19688260eaba5001c47459d30614c1471b97d6a

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit at lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit






More information about the pld-devel-en mailing list