]> git.pld-linux.org Git - packages/sgml-common.git/commitdiff
allow libxml2-progs uninstallation to succeed auto/th/sgml-common-0.6.3-8
authorElan Ruusamäe <glen@delfi.ee>
Sat, 20 Oct 2012 13:08:16 +0000 (16:08 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 20 Oct 2012 13:08:16 +0000 (16:08 +0300)
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

index 0eabe5e4d8e3496fb9250b1b6d2fc100bae706cd..cf5e0c26cce9498379cfde3fd8b2af1ab0a0226b 100644 (file)
@@ -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
This page took 0.121539 seconds and 4 git commands to generate.