for arch in $TARGET_ARCHS_ALL; do
local found_rpm="" rpm
for rpm in ${pathtorpms}/${arch}/*.rpm; do
- if rpm -q --provides -p "$rpm" | grep -q "kernel${prefix} = $wanted_kernel"; then
+ if rpm -q --provides -p "$rpm" 2>&3 | grep -q "kernel${prefix} = $wanted_kernel" 2>&3; then
+
found_rpm="$rpm"
ret=0
break
case "$match_type" in
provides)
# match is any valid ERE (i.e. given to egrep) match
- if rpm -q --provides -p "$file" | egrep -q "$match"; then
+ if rpm -q --provides -p "$file" 2>&3 | egrep -q "$match"; then
echo "$file"
popd >/dev/null
return 0
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/mptlinux.spec; then
+ ${TOPDIR}/SPECS/mptlinux.spec 2>&1; then
return 1
fi
if $DO_SRC; then
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/mptlinux.spec; then
+ ${TOPDIR}/SPECS/mptlinux.spec 2>&1; then
return 1
fi
fi
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/rdac.spec; then
+ ${TOPDIR}/SPECS/rdac.spec 2>&1; then
return 1
fi
if $DO_SRC; then
--define "_tmppath /var/tmp" \
--define "_topdir ${TOPDIR}" \
--define "kernel_obj $linux" \
- ${TOPDIR}/SPECS/rdac.spec; then
+ ${TOPDIR}/SPECS/rdac.spec 2>&1; then
return 1
fi
fi
# now build it
if ! $RPMBUILD $rpmbuildopt $targets \
--define "_topdir $TOPDIR" \
- $TOPDIR/SOURCES/kernel-$RPMSMPTYPE.spec >&2; then
+ $TOPDIR/SOURCES/kernel-$RPMSMPTYPE.spec 2>&1; then
fatal 1 "Failed to build kernel RPM"
fi
#fi
# for SLES, we also need to build the kernel-source rpm
if ! $RPMBUILD $rpmbuildopt $targets \
--define "_topdir $TOPDIR" \
- $TOPDIR/SOURCES/kernel-source.spec >&2; then
+ $TOPDIR/SOURCES/kernel-source.spec 2>&1; then
fatal 1 "Failed to build kernel source RPM"
fi
LINUXRELEASE=$(find_linux_release ${LINUXOBJ:-$LINUX})
if [ -z "$LINUXRELEASE" ]; then
echo "Failed to find linux release in ${LINUXOBJ:-$LINUX}"
- RC=255
+ return 255
fi
}
mkdir $RPMTOPDIR/BUILD/
rpm -ivh $KERNELDIR/$SRPM --define "_topdir $RPMTOPDIR" || \
{ rm -rf $RPMTOPDIR; fatal 1 "Error installing kernel SRPM."; }
- $RPMBUILD -bp --nodeps --target i686 $RPMTOPDIR/SPECS/$SPEC --define "_topdir $RPMTOPDIR"
+ $RPMBUILD -bp --nodeps --target i686 $RPMTOPDIR/SPECS/$SPEC --define "_topdir $RPMTOPDIR" 2>&1
pushd $RPMTOPDIR/BUILD/kernel-${lnxmaj}/linux-${lnxmaj} && {
make mrproper
cp configs/kernel-${lnxmaj}-i686-smp.config .config
$RPMBUILD $targets $rpmbuildopt lustre-kernel-2.4.spec \
--define "_tmppath $TMPDIR" \
- --define "_topdir $TOPDIR" || \
+ --define "_topdir $TOPDIR" 2>&1 || \
fatal 1 "Error building rpms for $BUILD_ARCHS."
if $DO_SRC; then
$RPMBUILD -bs lustre-kernel-2.4.spec \
--define "_tmppath $TMPDIR" \
- --define "_topdir $TOPDIR" || \
+ --define "_topdir $TOPDIR" 2>&1 || \
fatal 1 "Error building .src.rpm."
fi