autospec/patches/autospec-1.4.16-dont_pass_root_to_rpmbuild.patch
2011-04-26 21:39:44 +02:00

42 lines
2.0 KiB
Diff

diff -Nru autospec-1.4.16.orig//plugins/pck-update.in autospec-1.4.16/plugins/pck-update.in
--- autospec-1.4.16.orig//plugins/pck-update.in 2010-05-06 14:59:25.501216204 +0200
+++ autospec-1.4.16/plugins/pck-update.in 2010-05-06 15:01:13.467091646 +0200
@@ -2137,9 +2137,6 @@
--define=\"%_builddir $build_dir\" \
--define=\"%_tmppath $tmppath_dir\""
- [ "$rpm_rootdir" ] &&
- rpmbuild_opts="$rpmbuild_opts $rpm_root_opts"
-
# check if we are cross-compiling
[ "$BUILD_ARCH" != "$target_cpu" ] &&
rpmbuild_opts="--target $target_cpu $rpmbuild_opts"
@@ -2155,7 +2152,7 @@
# note: exit with error when build requirements are missing
notify.note "${NOTE}"$"testing out specfile""${NORM}..."
eval "rpmbuild --nobuild \
-$rpmbuild_opts $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1" ||
+$rpmbuild_opts $rpm_root_opts $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1" ||
notify.error $"rpmbuild exited with error code \`$?'"
notify.debug "define_list_name = (${define_list_name[*]})"
@@ -2199,15 +2196,15 @@
elif [ "$norpms" = 1 ]; then
notify.note "${NOTE}"$"building the srpm package""${NORM}..."
eval "\
-rpmbuild -bs $rpmbuild_opts $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1"
+rpmbuild -bs $rpmbuild_opts --nodeps $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1"
elif [ "$nosrpm" = 1 ]; then
notify.note "${NOTE}"$"building the rpm packages""${NORM}..."
eval "\
-rpmbuild -bb $rpmbuild_opts $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1"
+rpmbuild -bb $rpmbuild_opts --nodeps $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1"
else
notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..."
eval "\
-rpmbuild -ba $rpmbuild_opts $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1"
+rpmbuild -ba $rpmbuild_opts --nodeps $spec_dir/$SRPM_SPECFILE $rpmdefine_opts 2>&1"
fi
[ $? -eq 0 ] ||
notify.error $"rpmbuild exited with error code \`$?'"