[ \"\$flavor\" == \"$RPMSMPTYPE\" ] || continue" \
-e 's/^\([ ][ ]*-i %_builddir\/kernel-\)\(source-2.6.27.21\/\$patch; then\)/\1lustre-\2/' \
-e '/^%build/,/^%changelog/s/\(kernel-\)\(source\.files\)/\1lustre-\2/g' \
+ -e '/--no-backup-if-mismatch/,/fi/s/kernel-source-/kernel-lustre-source-/g' \
-e "s/^\(%package -n kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(%description -n kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(%files -n kernel-\)\(.*\)/\1lustre-\2/" \
}
unpack_linux_devel_rpm-sles11() {
+ local callers_rpm="$1"
+
+ local rpmdir="${callers_rpm%/*}"
+
local kernelrpm
- if ! kernelrpm=$(find_rpm "$TOPDIR/RPMS/$arch/" provides "^kernel-lustre-default-base ="); then
- fatal 1 "Could not find the kernel-lustre-default-base in $TOPDIR/RPMS/$arch/"
+ # this is a hack that should go away when the modified lustre kernel
+ # Provides kernel-default-base vvvvvvvvv
+ if ! kernelrpm=$(find_rpm "$rpmdir" provides "^kernel-(lustre-)?default-base ="); then
+ fatal 1 "Could not find the kernel-default-base in $rpmdir/"
fi
- if ! rpm2cpio < "$TOPDIR/RPMS/$arch/$kernelrpm" | cpio -id > /dev/null 2>&1; then
+ if ! rpm2cpio < "$rpmdir/$kernelrpm" | cpio -id > /dev/null 2>&1; then
fatal 1 "Unpack error for $kernelrpm"
fi