wok diff linux64/receipt @ rev 16600

get-skype: create /var/lib/dbus/machine-id, thanks yves04
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 07 14:16:51 2014 +0000 (2014-05-07)
parents eb689de65d7e
children 962f1c89c58a
line diff
     1.1 --- a/linux64/receipt	Wed Dec 18 08:40:48 2013 +0000
     1.2 +++ b/linux64/receipt	Wed May 07 14:16:51 2014 +0000
     1.3 @@ -2,7 +2,6 @@
     1.4  
     1.5  PACKAGE="linux64"
     1.6  VERSION="3.2.53"
     1.7 -KBASEVER="${VERSION:0:3}"
     1.8  CATEGORY="base-system"
     1.9  SHORT_DESC="The Linux 64 bits kernel and modules."
    1.10  MAINTAINER="devel@slitaz.org"
    1.11 @@ -10,7 +9,9 @@
    1.12  WEB_SITE="http://www.kernel.org/"
    1.13  WANTED="linux"
    1.14  PROVIDE="linux"
    1.15 -CONFIG_FILES="/lib/modules/$KBASEVER-slitaz/modules.dep"
    1.16 +
    1.17 +# We want it regenerated on each kernel/module install
    1.18 +#CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep"
    1.19  
    1.20  DEPENDS="depmod"
    1.21  
    1.22 @@ -20,12 +21,11 @@
    1.23      local path
    1.24      _pkg=$install/linux64
    1.25      cp -a $_pkg/boot $fs
    1.26 -    path=$fs/lib/modules/$KBASEVER-slitaz/kernel
    1.27 +    path=$fs/lib/modules/$VERSION-slitaz/kernel
    1.28      mkdir -p $path
    1.29 -    cp -a $_pkg/lib/modules/$KBASEVER-slitaz/mo* \
    1.30 -		$fs/lib/modules/$KBASEVER-slitaz
    1.31 -    [ "$KBASEVER" != "$VERSION" ] &&
    1.32 -	ln -s $KBASEVER-slitaz $fs/lib/modules/$VERSION-slitaz
    1.33 +    cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* \
    1.34 +		$fs/lib/modules/$VERSION-slitaz
    1.35 +
    1.36      # Get the base modules
    1.37      export src
    1.38      export _pkg
    1.39 @@ -35,11 +35,11 @@
    1.40      while read module; do
    1.41      	dir=$(dirname $module)
    1.42      	[ -d $path/$dir ] || mkdir -p $path/$dir
    1.43 -        cp -a $_pkg/lib/modules/$KBASEVER-slitaz/kernel/$module $path/$dir
    1.44 +        cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
    1.45      done < $WOK/$PACKAGE/source/tmp/modules.list
    1.46      # Remove unresolved links
    1.47 -    rm -f $fs/lib/modules/$KBASEVER-slitaz/build
    1.48 -    rm -f $fs/lib/modules/$KBASEVER-slitaz/source
    1.49 +    rm -f $fs/lib/modules/$VERSION-slitaz/build
    1.50 +    rm -f $fs/lib/modules/$VERSION-slitaz/source
    1.51      # Cook all packages with a kernel module
    1.52      for i in $(cd $WOK; grep -l 'cook linux$' */receipt)
    1.53      do
    1.54 @@ -47,8 +47,8 @@
    1.55      done
    1.56      # Fixed modules.dep to use right path
    1.57      # saves 100kb of space too
    1.58 -    sed -i "s|$_pkg||g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
    1.59 -    sed -i "s|99.98.$KBASEVER-slitaz|$KBASEVER-slitaz|g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
    1.60 +    sed -i "s|$_pkg||g" $fs/lib/modules/$VERSION-slitaz/modules.dep
    1.61 +    sed -i "s|99.98.$VERSION-slitaz|$VERSION-slitaz|g" $fs/lib/modules/$VERSION-slitaz/modules.dep
    1.62      # Check and echo any module in kernel .config that's not added to 
    1.63      # one of linux-* pkgs
    1.64  	$wanted_stuff/check_modules.sh 2>&1 | grep -v files.list
    1.65 @@ -58,11 +58,11 @@
    1.66  post_install()
    1.67  {
    1.68      echo "Processing post-install commands..."
    1.69 -    chroot "$1/" depmod -a $KBASEVER-slitaz
    1.70 +    chroot "$root/" depmod -a $VERSION-slitaz
    1.71      # GRUB stuff.
    1.72 -    if [ -f "$1/boot/grub/menu.lst" ]; then
    1.73 -    	root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
    1.74 -		grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
    1.75 +    if [ -f "$root/boot/grub/menu.lst" ]; then
    1.76 +    	root_dev=$(cat $root/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1)
    1.77 +		grub_dev=$(cat $root/boot/grub/menu.lst | grep "root (" | head -n 1)
    1.78  		# Add new kernel entry in case of upgrade for installed system.
    1.79  		if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
    1.80      		cat >> $1/boot/grub/menu.lst << EOT