packages: kernel/kernel.spec - fix alt_kernel "simplification"

baggins baggins at pld-linux.org
Thu Oct 27 23:35:34 CEST 2011


Author: baggins                      Date: Thu Oct 27 21:35:34 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix alt_kernel "simplification"

---- Files affected:
packages/kernel:
   kernel.spec (1.992 -> 1.993) 

---- Diffs:

================================================================
Index: packages/kernel/kernel.spec
diff -u packages/kernel/kernel.spec:1.992 packages/kernel/kernel.spec:1.993
--- packages/kernel/kernel.spec:1.992	Tue Oct 25 17:37:01 2011
+++ packages/kernel/kernel.spec	Thu Oct 27 23:35:29 2011
@@ -127,7 +127,7 @@
 Summary(et.UTF-8):	Linuxi kernel (ehk operatsioonisüsteemi tuum)
 Summary(fr.UTF-8):	Le Kernel-Linux (La partie centrale du systeme)
 Summary(pl.UTF-8):	Jądro Linuksa
-Name:		kernel%{_alt_kernel}
+Name:		kernel%{?alt_kernel:_%{alt_kernel}}
 Version:	%{basever}%{postver}
 Release:	%{rel}
 Epoch:		3
@@ -319,12 +319,12 @@
 Suggests:	keyutils
 Provides:	%{name}(netfilter) = 20070806
 Provides:	%{name}(vermagic) = %{kernel_release}
-Obsoletes:	kernel%{_alt_kernel}-isdn-mISDN
-Obsoletes:	kernel%{_alt_kernel}-char-lirc-ene0100
-Obsoletes:	kernel%{_alt_kernel}-char-lirc-it87
-Obsoletes:	kernel%{_alt_kernel}-char-lirc-ite8709
-Obsoletes:	kernel%{_alt_kernel}-char-lirc-mceusb
-Obsoletes:	kernel%{_alt_kernel}-char-lirc-streamzap
+Obsoletes:	kernel%{?alt_kernel:_%{alt_kernel}}-isdn-mISDN
+Obsoletes:	kernel%{?alt_kernel:_%{alt_kernel}}-char-lirc-ene0100
+Obsoletes:	kernel%{?alt_kernel:_%{alt_kernel}}-char-lirc-it87
+Obsoletes:	kernel%{?alt_kernel:_%{alt_kernel}}-char-lirc-ite8709
+Obsoletes:	kernel%{?alt_kernel:_%{alt_kernel}}-char-lirc-mceusb
+Obsoletes:	kernel%{?alt_kernel:_%{alt_kernel}}-char-lirc-streamzap
 Obsoletes:	kernel-firmware
 Obsoletes:	kernel-misc-acer_acpi
 Obsoletes:	kernel-misc-fuse
@@ -391,7 +391,7 @@
 %define		objdir		%{topdir}/%{targetobj}
 %define		targetobj	%{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
 
-%define		_kernelsrcdir	/usr/src/linux%{_alt_kernel}-%{version}
+%define		_kernelsrcdir	/usr/src/linux%{?alt_kernel:_%{alt_kernel}}-%{version}
 
 %if "%{_target_base_arch}" != "%{_arch}"
 	%define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
@@ -1148,18 +1148,18 @@
 %post
 %ifarch ia64
 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
-%{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
+%{?alt_kernel:mv -f /boot/efi/vmlinuz_%{alt_kernel}{,.old} 2> /dev/null}
 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
-%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
+%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz_%{alt_kernel}}
 %endif
 mv -f /boot/vmlinuz{,.old} 2> /dev/null
-%{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
+%{?alt_kernel:mv -f /boot/vmlinuz_%{alt_kernel}{,.old} 2> /dev/null}
 mv -f /boot/System.map{,.old} 2> /dev/null
-%{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
+%{?alt_kernel:mv -f /boot/System_%{alt_kernel}.map{,.old} 2> /dev/null}
 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
-%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
+%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz_%{alt_kernel}}
 ln -sf System.map-%{kernel_release} /boot/System.map
-%{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
+%{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map_%{alt_kernel}}
 
 %depmod %{kernel_release}
 
@@ -1167,9 +1167,9 @@
 # generate initrd after all dependant modules are installed
 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
-%{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
+%{?alt_kernel:mv -f %{initrd_dir}/initrd_%{alt_kernel}{,.old} 2> /dev/null}
 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
-%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
+%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd_%{alt_kernel}}
 
 # update boot loaders when old package files are gone from filesystem
 if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
@@ -1215,13 +1215,13 @@
 %depmod %{kernel_release}
 
 %post headers
-ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
+ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{?alt_kernel:_%{alt_kernel}}
 
 %postun headers
 if [ "$1" = "0" ]; then
-	if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
-		if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
-			rm -f %{_prefix}/src/linux%{_alt_kernel}
+	if [ -L %{_prefix}/src/linux%{?alt_kernel:_%{alt_kernel}} ]; then
+		if [ "$(readlink %{_prefix}/src/linux%{?alt_kernel:_%{alt_kernel}})" = "linux%{?alt_kernel:_%{alt_kernel}}-%{version}" ]; then
+			rm -f %{_prefix}/src/linux%{?alt_kernel:_%{alt_kernel}}
 		fi
 	fi
 fi
@@ -1529,6 +1529,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.993  2011/10/27 21:35:29  baggins
+- fix alt_kernel "simplification"
+
 Revision 1.992  2011/10/25 15:37:01  glen
 - cosmetics
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.992&r2=1.993&f=u



More information about the pld-cvs-commit mailing list