diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-10-09 13:12:26 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-10-09 13:12:26 +0000 |
commit | 5bd2378f17544a0a21d70e4535477d3d12db39a2 (patch) | |
tree | 1d90187805085c50f2d8c5865e919915aafe2a2a /kernel | |
parent | 09f730085204eb8fae7082c1640d114c2013867c (diff) | |
download | drakx-5bd2378f17544a0a21d70e4535477d3d12db39a2.tar drakx-5bd2378f17544a0a21d70e4535477d3d12db39a2.tar.gz drakx-5bd2378f17544a0a21d70e4535477d3d12db39a2.tar.bz2 drakx-5bd2378f17544a0a21d70e4535477d3d12db39a2.tar.xz drakx-5bd2378f17544a0a21d70e4535477d3d12db39a2.zip |
- Gracefully create all.kernels directory if first time build
- Temptative fix to determine version-release from kernel versioning. Assume
kernels have and will have X.Y.Z versioning.
- Always gunzip modules, otherwise mar -l dies if archive doesn't contain
anything. Which occured with modules were not gunzip'ed first.
Diffstat (limited to 'kernel')
-rwxr-xr-x | kernel/update_kernel | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel index 9cea09e7d..5d815783d 100755 --- a/kernel/update_kernel +++ b/kernel/update_kernel @@ -4,8 +4,13 @@ ALL_KERNELS="all.kernels" # move stuff to this new "kernel" directory if [ ! -d all.kernels ]; then - mv ../all.kernels . - rm -rf ../all.modules + if [ -d ../all.kernels ]; then + mv ../all.kernels . + rm -rf ../all.modules + else + # make sure "all.kernels" directory exists + mkdir all.kernels + fi fi function create_marfile() { @@ -38,7 +43,7 @@ function create_modules() { [ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main) -rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-(.*)\.(.*)/$1-${2}BOOT/') +rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-((\.?[0-9]+){3})\.(.*)/$1-${3}BOOT/') if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then [ -n "$main" ] && rm -rf $ALL_KERNELS/$main cd $ALL_KERNELS @@ -91,6 +96,7 @@ for i in $ALL_KERNELS/*; do create_modules ../../$i $kern else echo "$kern ($main)" + find ../../$i -type f -name "*.o.gz" | xargs gunzip create_modules ../../$i $kern 2>/dev/null fi ) || exit 1 |