]> git.pld-linux.org Git - packages/nss_db.git/commitdiff
- remove db from nss config on package removal, like nss_myhostname not my fantasy
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 9 Feb 2012 22:59:17 +0000 (22:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nss_db.spec -> 1.48

nss_db.spec

index 1bdb6dc5066b5691e2909a5c2f31eef6cd39ab96..5377ba7229624803db1484928d7de73185be4a8b 100644 (file)
@@ -47,7 +47,7 @@ BuildRequires:        libstdc++-devel
 BuildRequires: libtool
 Requires:      glibc >= 6:2.3
 Requires:      make
-Requires(post):        /sbin/ldconfig
+Requires:      sed >= 4.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # glibc private symbols
@@ -172,6 +172,15 @@ ln -sf create-db $RPM_BUILD_ROOT%{_bindir}/update-db
 rm -rf $RPM_BUILD_ROOT
 
 %post  -p /sbin/ldconfig
+
+%preun
+if [ "$1" -eq 0 -a -f %{_sysconfdir}/nsswitch.conf ] ; then
+       %{__sed} -i -e '
+               /^\(passwd\|group\|ethers\|protocols\|rpc\|services\|shadow\|netgroup\|hosts\):/ !b
+               s/[[:blank:]]\+db\>//
+       ' %{_sysconfdir}/nsswitch.conf
+fi
+
 %postun -p /sbin/ldconfig
 
 %files -f %{name}.lang
This page took 0.08531 seconds and 4 git commands to generate.