From ef86f4f0c7659ab87f2d964f3fc08f62bb89e7c9 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Fri, 17 Jan 2014 14:47:17 +0100 Subject: [PATCH] extract_storage: dist of ANDBD must be not dev_feature* but pre-staging A yet another bug on building a kernel image from a feature branch. So far profitbricks-linux-image-storage has been built successfully. However, its subtask building profitbricks-andbd-modules-storage has always failed. Its reason was apt sources list having enabled only dev-repository, where ANDBD modules are normally not built at all. This could result in an error case, where installation process of ANDBD module package tries to find a bogus kernel version, such as 2.6.32. Even though there would exist any feature branch of ANDBD that matches exactly with the name of feature branch of linux-storage, we could not have any way to determine at all, whether the two feature branches should match with each other. There's no point of using $TARGET_NAME for configuring distribution of the ANDBD module package. Therefore the solution is to always add a pre-staging repository to apt sources list. Then linux-storage from a feature branch can be installed with andbd-modules from the pre-staging (develop) branch. (Tested only under my local pbuilder environment) --- extract_storage_kernel+modules.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extract_storage_kernel+modules.sh b/extract_storage_kernel+modules.sh index ee6c4bd..bfa0b03 100755 --- a/extract_storage_kernel+modules.sh +++ b/extract_storage_kernel+modules.sh @@ -55,9 +55,16 @@ case $DISTRIBUTION in [ -n "$PB_SUITE" ] && export TARGET_NAME=$PB_SUITE || export TARGET_NAME="experimental" LAST_DEVELOP_BUILD_NO=$(get_last_target_build_no develop) BUILD_NUMBER="$LAST_DEVELOP_BUILD_NO.$(printf %03d $BUILD_NUMBER)" + + # kernel images must be installed from a branch-specific distribution + # under dev-repository. However, ANDBD modules must be installed from + # the pre-staging distribution, because ANDBD modules must have not + # been built into packages under a particular distribution. FEATURE_APTCMD=" echo \"deb http://alexandria.pb.local/dev-repository $TARGET_NAME main contrib non-free\" \ - > /etc/apt/sources.list.d/profitbricks-linux-image-storage-$TARGET_NAME.list + > /etc/apt/sources.list.d/profitbricks-linux-image-storage-$TARGET_NAME.list ; \ + echo \"deb http://alexandria.pb.local/profitbricks-repository pre-staging main contrib non-free\" \ + > /etc/apt/sources.list.d/profitbricks-linux-image-storage-develop.list " FEATURE_VERSCMD=" export FEATURE_VERSION=\`apt-cache showpkg profitbricks-linux-image-storage -a \ -- 2.39.5