[Frugalware-git] pacman-tools: repoman: add new global option: -f/--force

Miklos Vajna vmiklos at frugalware.org
Thu Jan 7 22:03:25 CET 2010


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=41d25e87bd123dadefd2c888d732d618a86b060a

commit 41d25e87bd123dadefd2c888d732d618a86b060a
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Thu Jan 7 21:15:29 2010 +0100

repoman: add new global option: -f/--force

diff --git a/repoman b/repoman
index d151b1b..b27e37b 100755
--- a/repoman
+++ b/repoman
@@ -794,7 +794,8 @@ upgrade()
if [ -z "$dryrun" ]; then
for i in $targets
do
-			if ! $0 merge $i; then
+			echo ":: Merging $i..."
+			if ! $0 -f merge $i; then
echo "Failed to merge $i."
echo "Try merging the package manually then run 'repoman upgrade' again to merge the"
echo "rest of the targets."
@@ -816,6 +817,7 @@ merge()
repo="${repos[@]}"
target=$1
fi
+	if [ -z "$force" ]; then
# install essential packages if necessary
echo -n "checking for essential packages... "
. /etc/makepkg.conf
@@ -832,6 +834,7 @@ merge()
else
echo "done"
fi
+	fi
found=0
for i in ${repo[@]}
do
@@ -846,6 +849,7 @@ merge()
found=1
cd $dir
makepkg $makepkg_opts
+			exit $?
fi
done
[ "$found" = 0 ] && die "package '$target' not found"
@@ -914,6 +918,9 @@ while [ "$1" != "" ]; do
-d|--dry-run)
dryrun=1
;;
+		-f|--force)
+			force=1
+		;;
-*)
echo "Unknown option: $1"
usage
diff --git a/repoman.txt b/repoman.txt
index f09d901..ef656fb 100644
--- a/repoman.txt
+++ b/repoman.txt
@@ -395,6 +395,11 @@ $ repoman fpmmerge flac113
-d|--dry-run::
Don't do anything, just print what would happen.

+-f|--force::
+	Enable 'I know what I am doing' mode. Currently it lets 'repoman
+	merge' not to check if essential packages (like a C compiler) are
+	installed.
+
-h|--help::
This manpage.


More information about the Frugalware-git mailing list