packages: ppp/ppp.spec - dir to symlink conflict resolving on upgrade

glen glen at pld-linux.org
Mon Apr 2 11:49:21 CEST 2012


Author: glen                         Date: Mon Apr  2 09:49:21 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- dir to symlink conflict resolving on upgrade

---- Files affected:
packages/ppp:
   ppp.spec (1.153 -> 1.154) 

---- Diffs:

================================================================
Index: packages/ppp/ppp.spec
diff -u packages/ppp/ppp.spec:1.153 packages/ppp/ppp.spec:1.154
--- packages/ppp/ppp.spec:1.153	Mon Apr  2 10:47:41 2012
+++ packages/ppp/ppp.spec	Mon Apr  2 11:49:15 2012
@@ -18,7 +18,7 @@
 Summary(zh_CN.UTF-8):	PPP 配置和管理软件包.
 Name:		ppp
 Version:	2.4.5
-Release:	6
+Release:	7
 Epoch:		3
 License:	distributable
 Group:		Networking/Daemons
@@ -188,6 +188,15 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pretrans
+# %{version} used to be directory
+if [ -d %{_libdir}/pppd/%{version} -a ! -L %{_libdir}/pppd/%{version} ]; then
+	set -e
+	rm -f %{_libdir}/pppd/plugins
+	mv %{_libdir}/pppd/{%{version},plugins}
+	ln -sn plugins %{_libdir}/pppd/%{version}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc README.linux debian/README.debian scripts
@@ -254,6 +263,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.154  2012/04/02 09:49:15  glen
+- dir to symlink conflict resolving on upgrade
+
 Revision 1.153  2012/04/02 08:47:41  glen
 - use %{_libdir}/pppd/plugins dir, add todo about versioned dir drop
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/ppp/ppp.spec?r1=1.153&r2=1.154



More information about the pld-cvs-commit mailing list