case "$1" in
"err_no_spec_in_cmdl" )
+ remove_build_requires;
echo "ERROR: spec file name not specified.";
exit 2 ;;
"err_no_spec_in_repo" )
+ remove_build_requires;
echo "Error: spec file not stored in CVS repo.";
exit 3 ;;
"err_no_source_in_repo" )
+ remove_build_requires;
echo "Error: some source, patch or icon files not stored in CVS repo. ($2)";
exit 4 ;;
"err_build_fail" )
+ remove_build_requires;
echo "Error: package build failed. (${2:-no more info})";
exit 5 ;;
esac
done
}
+remove_build_requires()
+{
+ if [ "$INSTALLED_PACKAGES" != "" ]; then
+ case "$REMOVE_BUILD_REQUIRES" in
+ "force")
+ poldek --noask -e $INSTALLED_PACKAGES
+ ;;
+ "nice")
+ poldek --ask -e $INSTALLED_PACKAGES
+ ;;
+ *)
+ echo You may want to manually remove following BuildRequires fetched:
+ echo $INSTALLED_PACKAGES
+ ;;
+ esac
+ fi
+}
+
display_bconds()
{
if [ "$AVAIL_BCONDS_WITH" != "" ] || [ "$AVAIL_BCONDS_WITHOUT" != "" ]; then
poldek --sn ${POLDEK_SOURCE} --mkidx="${POLDEK_INDEX_DIR}/packages.dir.gz"
poldek --sn ${POLDEK_SOURCE} --up
fi
- case "$REMOVE_BUILD_REQUIRES" in
- "force")
- poldek --noask -e $INSTALLED_PACKAGES
- ;;
- "nice")
- poldek --ask -e $INSTALLED_PACKAGES
- ;;
- *)
- echo You may want to manually remove following BuildRequires fetched:
- echo $INSTALLED_PACKAGES
- ;;
- esac
+ remove_build_requires;
else
Exit_error err_no_spec_in_cmdl;
fi