From 946bb16c84d56974800953d524df341eed286d5c Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Sat, 12 Mar 2011 12:45:36 +0100 Subject: [PATCH] aufs: fixed pkg_linux_post.conf to only try to unpack aufs kernel sources if it found a matching source file --- filesystem/aufs/pkg_linux_post.conf | 34 ++++++++++++++++------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/filesystem/aufs/pkg_linux_post.conf b/filesystem/aufs/pkg_linux_post.conf index ad8aad555..1a37a8897 100644 --- a/filesystem/aufs/pkg_linux_post.conf +++ b/filesystem/aufs/pkg_linux_post.conf @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../aufs/pkg_linux_post.conf -# Copyright (C) 2010 The OpenSDE Project +# Copyright (C) 2010 - 2011 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -16,19 +16,23 @@ pkg_aufs_ver="$( pkgdesc ver aufs )" pkg_aufs_source_file=`match_source_file -p aufs${pkg_aufs_ver}-standalone-linux aufs` -# extracting Aufs sources into a tempdir -pkg_aufs_tempdir=$( mktemp -d ) -tar -C $pkg_aufs_tempdir -xf $pkg_aufs_source_file +# extracting Aufs sources into a tempdir if we found a matching source file +if [ ! -z "$pkg_aufs_source_file" ]; then + pkg_aufs_tempdir=$( mktemp -d ) + tar -C $pkg_aufs_tempdir -xf $pkg_aufs_source_file -# patching the kernel sources -echo_status "Including Aufs2 support (aufs package enabled)" -var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs2-standalone/aufs2-kbuild.patch" -var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs2-standalone/aufs2-base.patch" -var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs2-standalone/aufs2-standalone.patch" + # patching the kernel sources + echo_status "Including Aufs2 support (aufs package enabled)" + var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs2-standalone/aufs2-kbuild.patch" + var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs2-standalone/aufs2-base.patch" + var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs2-standalone/aufs2-standalone.patch" -# copying sources into kernel source tree -pkg_aufs_copy_source_files() { - cp -rv $pkg_aufs_tempdir/aufs2-standalone/{Documentation,fs} . - cp -rv $pkg_aufs_tempdir/aufs2-standalone/include/linux/aufs_type.h include/linux/ -} -hook_add preconf 5 "pkg_aufs_copy_source_files" + # copying sources into kernel source tree + pkg_aufs_copy_source_files() { + cp -rv $pkg_aufs_tempdir/aufs2-standalone/{Documentation,fs} . + cp -rv $pkg_aufs_tempdir/aufs2-standalone/include/linux/aufs_type.h include/linux/ + } + hook_add preconf 5 "pkg_aufs_copy_source_files" +else + echo_warning "No matching source file found for Aufs2 support" +fi