[arch-commits] Commit in linux/trunk (PKGBUILD linux.install)
Tobias Powalowski
tpowa at archlinux.org
Sat Jul 23 15:37:54 UTC 2011
Date: Saturday, July 23, 2011 @ 11:37:54
Author: tpowa
Revision: 132368
add-provides-conflicts-and-fix-initramfs-symlinks
Modified:
linux/trunk/PKGBUILD
linux/trunk/linux.install
---------------+
PKGBUILD | 12 ++++++++----
linux.install | 11 +++++++++--
2 files changed, 17 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-07-23 15:01:28 UTC (rev 132367)
+++ PKGBUILD 2011-07-23 15:37:54 UTC (rev 132368)
@@ -75,6 +75,8 @@
groups=('base')
backup=(etc/mkinitcpio.d/${pkgname}.preset)
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.16' 'mkinitcpio>=0.7')
+ provides=('kernel26')
+ conflicts=('kernel26')
replaces=('kernel26')
install=${pkgname}.install
optdepends=('crda: to set the correct wireless channels of your country')
@@ -103,10 +105,8 @@
# remove build and source links
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
- # add compat symlinks
- ln -sf /boot/initramfs-${pkgname}.img ${pkgdir}/boot/kernel26.img
- ln -sf /boot/vmlinuz-${pkgname} ${pkgdir}/boot/vmlinuz26
- ln -sf /boot/initramfs-${pkgname}-fallback.img ${pkgdir}/boot/kernel26-fallback.img
+ # add compat symlink for the kernel image
+ ln -sf vmlinuz-${pkgname} ${pkgdir}/boot/vmlinuz26
# remove the firmware
rm -rf ${pkgdir}/lib/firmware
# gzip -9 all modules to safe 100MB of space
@@ -115,6 +115,8 @@
package_linux-headers() {
pkgdesc="Header files and scripts for building modules for linux kernel"
+ provides=('kernel26-headers')
+ conflicts=('kernel26-headers')
replaces=('kernel26-headers')
mkdir -p ${pkgdir}/lib/modules/${_kernver}
cd ${pkgdir}/lib/modules/${_kernver}
@@ -225,6 +227,8 @@
package_linux-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
+ provides=('kernel26-docs')
+ conflicts=('kernel26-docs')
replaces=('kernel26-docs')
cd ${srcdir}/linux-$_basekernel
mkdir -p $pkgdir/usr/src/linux-$_kernver
Modified: linux.install
===================================================================
--- linux.install 2011-07-23 15:01:28 UTC (rev 132367)
+++ linux.install 2011-07-23 15:37:54 UTC (rev 132368)
@@ -10,6 +10,12 @@
/sbin/depmod ${KERNEL_VERSION}
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
/sbin/mkinitcpio -p linux${KERNEL_NAME}
+
+ # add compat symlinks for the initramfs images
+ ln -sf initramfs-linux${KERNEL_NAME}.img \
+ ${pkgdir}/boot/kernel26${KERNEL_NAME}.img
+ ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
+ ${pkgdir}/boot/kernel26${KERNEL_NAME}-fallback.img
}
post_upgrade() {
@@ -47,6 +53,7 @@
}
post_remove() {
- rm -f /boot/initramfs-linux${KERNEL_NAME}.img
- rm -f /boot/initramfs-linux${KERNEL_NAME}-fallback.img
+ # also remove the compat symlinks
+ rm -f /boot/{initramfs-linux,kernel26}${KERNEL_NAME}.img
+ rm -f /boot/{initramfs-linux,kernel26}${KERNEL_NAME}-fallback.img
}
More information about the arch-commits
mailing list