SPECS (AC-branch): poldek.spec - remove non-pld configs from /etc/...

glen glen at pld-linux.org
Tue Aug 9 14:54:09 CEST 2005


Author: glen                         Date: Tue Aug  9 12:54:09 2005 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- remove non-pld configs from /etc/poldek
- propagate use_sudo from old config to new one

---- Files affected:
SPECS:
   poldek.spec (1.197.2.22 -> 1.197.2.23) 

---- Diffs:

================================================================
Index: SPECS/poldek.spec
diff -u SPECS/poldek.spec:1.197.2.22 SPECS/poldek.spec:1.197.2.23
--- SPECS/poldek.spec:1.197.2.22	Sat Jul 30 16:05:59 2005
+++ SPECS/poldek.spec	Tue Aug  9 14:54:02 2005
@@ -12,7 +12,7 @@
 Summary(pl):	Pomocnicze narzędzie do zarządzania pakietami RPM
 Name:		poldek
 Version:	0.19.0
-Release:	1.%{snap}.0
+Release:	1.%{snap}.4
 License:	GPL v2
 Group:		Applications/System
 Source0:	http://team.pld.org.pl/~mis/poldek/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
@@ -170,6 +170,13 @@
 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
 sed "s|%%ARCH%%|%{_ftp_arch}|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-source.conf
 
+# get rid of non-pld sources
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,fedora}-source.conf
+# include them in %doc
+rm -rf configs
+cp -a conf configs
+rm -f configs/Makefile*
+
 %find_lang %{name}
 
 %clean
@@ -224,12 +231,15 @@
 	}' < /etc/poldek.conf.rpmsave >> /etc/poldek/source.conf
 	echo "Converted old custom sources (non-ac dist ones) from /etc/poldek.conf.rpmsave to new poldek format in /etc/poldek/source.conf"
 
-#	mv -f /etc/poldek.conf.rpmsave /etc/poldek.conf.converted.rpmsave
+	# propagate use_sudo to new config. only works for untouched poldek.conf and that's intentional.
+	if grep -q '^use_sudo.*=.*yes' /etc/poldek.conf.rpmsave; then
+		sed -i -e '/^#use sudo = no/s/^.*/use sudo = yes/' /etc/poldek/poldek.conf
+	fi
 fi
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc README* NEWS TODO conf/*.conf
+%doc README* NEWS TODO configs/
 %dir %{_sysconfdir}/%{name}
 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}/*.conf
 %attr(755,root,root) %{_bindir}/*
@@ -259,6 +269,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.197.2.23  2005/08/09 12:54:02  glen
+- remove non-pld configs from /etc/poldek
+- propagate use_sudo from old config to new one
+
 Revision 1.197.2.22  2005/07/30 14:05:59  glen
 - fix older triggers not having /etc/poldek.conf
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/poldek.spec?r1=1.197.2.22&r2=1.197.2.23&f=u




More information about the pld-cvs-commit mailing list