OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 15-Feb-2005 15:31:31
Branch: HEAD Handle: 2005021514313000
Modified files:
openpkg-tools/cmd bf-mk.pl
Log:
add command line option to slave allowing to erase packages from
OpenPKG instance
Summary:
Revision Changes Path
1.21 +23 -14 openpkg-tools/cmd/bf-mk.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/bf-mk.pl
============================================================================
$ cvs diff -u -r1.20 -r1.21 bf-mk.pl
--- openpkg-tools/cmd/bf-mk.pl 11 Feb 2005 20:23:23 -0000 1.20
+++ openpkg-tools/cmd/bf-mk.pl 15 Feb 2005 14:31:30 -0000 1.21
@@ -471,10 +471,27 @@
%{driver.shtool} mkdir -f -m 775 $target || die "cannot create directory
\"$target\""
}
-cmd_oneshot ()
+cmd_erase ()
{
- createslavestructure
+ # erase packages from SLAVE OpenPKG instance
+ %{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}: erase
packages from SLAVE OpenPKG instance%b"
+ source="%{shared.prefix}/src/master"
+ target="%{shared.prefix}/src/$HOST-$ARCH-$OS"
+ %{driver.cp} $source/Makefile* $target/
+ ( cd $target && %{driver.make} \
+ LOG="%{shared.prefix}/log/$HOST-$ARCH-$OS" \
+ SRC="%{shared.prefix}/src/$HOST-$ARCH-$OS" \
+ DST="%{shared.prefix}/dst/$HOST-$ARCH-$OS" \
+ TMP="%{slaves.ltmp}/$HOST-$ARCH-$OS" \
+ EXEC_BFDB="%{slaves.bfdb}" \
+ EXEC_ROOT="%{driver.sudo}" \
+ EXEC_HOST="$HOST" \
+ erase \
+ )
+}
+cmd_oneshot ()
+{
# prepare SRPMs for SLAVE
%{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}:
prepare SRPMs for SLAVE%b"
source="%{shared.prefix}/src/master"
@@ -509,18 +526,7 @@
fi
done
- # erase packages from SLAVE OpenPKG instance
- %{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}: erase
packages from SLAVE OpenPKG instance%b"
- ( cd $target && %{driver.make} \
- LOG="%{shared.prefix}/log/$HOST-$ARCH-$OS" \
- SRC="%{shared.prefix}/src/$HOST-$ARCH-$OS" \
- DST="%{shared.prefix}/dst/$HOST-$ARCH-$OS" \
- TMP="%{slaves.ltmp}/$HOST-$ARCH-$OS" \
- EXEC_BFDB="%{slaves.bfdb}" \
- EXEC_ROOT="%{driver.sudo}" \
- EXEC_HOST="$HOST" \
- erase \
- )
+ cmd_erase
# SLAVE building packages
%{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}: SLAVE
building packages%b"
@@ -587,6 +593,7 @@
echo " -H|help print out this usage page"
echo " -A|amend amend slave packages"
echo " -s|support set support grade"
+ echo " -e|erase erase packages from OpenPKG instance"
echo "Notes on slave mode"
echo " with -[1l] the application executes the SLAVE role"
echo "To reconfigure settings, change bf.conf on the MASTER"
@@ -634,6 +641,7 @@
cmd=""
if [ ".$1" = ".-s" -o ".$1" = ".--support" ]; then shift; cmd="support"; fi
+if [ ".$1" = ".-e" -o ".$1" = ".--erase" ]; then shift; cmd="erase"; fi
if [ ".$1" = ".-1" -o ".$1" = ".--oneshot" ]; then shift; cmd="oneshot"; fi
if [ ".$1" = ".-l" -o ".$1" = ".--loop" ]; then shift; cmd="loop"; fi
if [ ".$1" = ".-A" -o ".$1" = ".--amend" ]; then shift; cmd="amend"; fi
@@ -641,6 +649,7 @@
if [ ".$cmd" = .help ]; then usage; fi
if [ ".$cmd" = . ]; then usage "ERROR"; fi
+createslavestructure
cmd_$cmd "$@"
exit 1
EOT
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]