SPECS (LINUX_2_6_18): kernel-vanilla.spec - hardlink over copy spe...

shadzik shadzik at pld-linux.org
Wed Dec 20 02:39:07 CET 2006


Author: shadzik                      Date: Wed Dec 20 01:39:07 2006 GMT
Module: SPECS                         Tag: LINUX_2_6_18
---- Log message:
- hardlink over copy speedup

---- Files affected:
SPECS:
   kernel-vanilla.spec (1.14.2.14 -> 1.14.2.15) 

---- Diffs:

================================================================
Index: SPECS/kernel-vanilla.spec
diff -u SPECS/kernel-vanilla.spec:1.14.2.14 SPECS/kernel-vanilla.spec:1.14.2.15
--- SPECS/kernel-vanilla.spec:1.14.2.14	Wed Dec 20 00:23:04 2006
+++ SPECS/kernel-vanilla.spec	Wed Dec 20 02:39:01 2006
@@ -760,13 +760,19 @@
 install -d $RPM_BUILD_ROOT%{_prefix}/src/linux-%{ver}
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{ver_rel}{,smp}
 
+# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
+if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
+	l=l
+	rm -f $RPM_BUILD_ROOT/COPYING
+fi
+
 KERNEL_BUILD_DIR=`pwd`
 
 %if %{with up} || %{with smp}
-cp -a $KERNEL_BUILD_DIR/build-done/kernel-*/* $RPM_BUILD_ROOT
+cp -a$1 $KERNEL_BUILD_DIR/build-done/kernel-*/* $RPM_BUILD_ROOT
 %endif
 
-for i in "" smp ; do
+for i in "" smp; do
 	if [ -e  $RPM_BUILD_ROOT/lib/modules/%{ver_rel}$i ] ; then
 		rm -f $RPM_BUILD_ROOT/lib/modules/%{ver_rel}$i/build
 		ln -sf %{_prefix}/src/linux-%{ver} \
@@ -777,7 +783,7 @@
 
 ln -sf linux-%{ver} $RPM_BUILD_ROOT%{_prefix}/src/linux-%{alt_kernel}
 
-find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a "{}" "$RPM_BUILD_ROOT/usr/src/linux-%{ver}/" ";"
+find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$1 "{}" "$RPM_BUILD_ROOT/usr/src/linux-%{ver}/" ";"
 
 cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{ver}
 
@@ -1262,6 +1268,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14.2.15  2006/12/20 01:39:01  shadzik
+- hardlink over copy speedup
+
 Revision 1.14.2.14  2006/12/19 23:23:04  shadzik
 - md5 for patch .6
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel-vanilla.spec?r1=1.14.2.14&r2=1.14.2.15&f=u



More information about the pld-cvs-commit mailing list