When we build modules in lbuild for sles10 kernels, we point to the
contents of the kernel-source RPM. That does not contain the
Module.symvers file though and thus we get a nice big warning that
the modules built (i.e. ldiskfs) will not contain versions.
This is because we need to unpack the /usr/src/linux-*obj/Module.symvers
file from the kernel-$flavour or kernel-syms RPM into the location pointed to
by --with-linux-obj.
Fix a bug in unpack_linux_devel_rpm-$DISTRO where we were not checking
for the success of the function.
i=mjmac
i=wangyb
# call a distro specific hook, if available
if type -p unpack_linux_devel_rpm-$DISTRO; then
- unpack_linux_devel_rpm-$DISTRO "$kernelrpm"
+ if ! unpack_linux_devel_rpm-$DISTRO "$kernelrpm"; then
+ return 255
+ fi
fi
popd &>/dev/null
fi
done
}
+
+unpack_linux_devel_rpm-sles10() {
+ local callers_rpm="$1"
+
+ # get the Module.symvers out of the kenrel-flavor RPM
+ local kernelrpm=${callers_rpm/-source-/-$RPMSMPTYPE-}
+
+ if ! rpm2cpio < "$kernelrpm" | cpio -id ./usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$TARGET_ARCH/$RPMSMPTYPE/Module.symvers > /dev/null 2>&1; then
+ return 255
+ fi
+
+ return 0
+
+}