SPECS (LINUX_2_6): kernel.spec - hardlink over copy speedup from k...

glen glen at pld-linux.org
Thu Dec 14 13:21:53 CET 2006


Author: glen                         Date: Thu Dec 14 12:21:53 2006 GMT
Module: SPECS                         Tag: LINUX_2_6
---- Log message:
- hardlink over copy speedup from kernel.spec

---- Files affected:
SPECS:
   kernel.spec (1.441.2.1675 -> 1.441.2.1676) 

---- Diffs:

================================================================
Index: SPECS/kernel.spec
diff -u SPECS/kernel.spec:1.441.2.1675 SPECS/kernel.spec:1.441.2.1676
--- SPECS/kernel.spec:1.441.2.1675	Thu Dec 14 00:36:30 2006
+++ SPECS/kernel.spec	Thu Dec 14 13:21:47 2006
@@ -1348,10 +1348,16 @@
 install -d $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{version}-%{release}{,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$l $KERNEL_BUILD_DIR/build-done/kernel-*/* $RPM_BUILD_ROOT
 %endif
 
 for i in "" smp ; do
@@ -1365,7 +1371,7 @@
 
 ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
 
-find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a "{}" "$RPM_BUILD_ROOT/usr/src/linux-%{version}/" ";"
+find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT/usr/src/linux-%{version}/" ";"
 
 cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
 
@@ -1871,6 +1877,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.441.2.1676  2006/12/14 12:21:47  glen
+- hardlink over copy speedup from kernel.spec
+
 Revision 1.441.2.1675  2006/12/13 23:36:30  mguevara
 - todo update
 
================================================================

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



More information about the pld-cvs-commit mailing list