Whamcloud - gitweb
b=21102
authorbrian <brian>
Fri, 6 Nov 2009 17:50:43 +0000 (17:50 +0000)
committerbrian <brian>
Fri, 6 Nov 2009 17:50:43 +0000 (17:50 +0000)
i=yangsheng
i=wangyb

Make the reuse cache hash value for a release kernel different than for a
non-release kernel.  This is because the name of the kernel is embedded in
the package and non-release kernels have a datestring included in them which
is really not suitable for release kernels.

build/lbuild

index d09899a..45f936c 100755 (executable)
@@ -1115,7 +1115,11 @@ build_kernel_with_srpm() {
     # get an md5sum of the kernel patch + config for reuse check
     # XXX really, there needs to be a signature and a CONFIG_FILE per arch
     #     in BUILD_ARCHS
-    local REUSE_SIGNATURE=$({ echo $BUILD_GEN; cat $CONFIG_FILE $TARGET_FILE $FULL_PATCH; } | md5sum | cut -d" " -f1)
+    local release_str
+    if $RELEASE; then
+        local release_str="RELEASE=$RELEASE\n"
+    fi
+    local REUSE_SIGNATURE=$({ echo -en $release_str; echo $BUILD_GEN; cat $CONFIG_FILE $TARGET_FILE $FULL_PATCH; } | md5sum | cut -d" " -f1)
 
     # see if we can link to the reuse pool
     # XXX - hrm.  i'm not convinced this doesn't belong in the reuse "library"