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 16:25:48
Branch: HEAD Handle: 2005021515254800
Modified files:
openpkg-tools/cmd bf-mk.pl src2make.pl
Log:
add command line option to slave allowing to list available package
targets and fix src2make to provide proper list targets
Summary:
Revision Changes Path
1.22 +21 -0 openpkg-tools/cmd/bf-mk.pl
1.10 +9 -1 openpkg-tools/cmd/src2make.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/bf-mk.pl
============================================================================
$ cvs diff -u -r1.21 -r1.22 bf-mk.pl
--- openpkg-tools/cmd/bf-mk.pl 15 Feb 2005 14:31:30 -0000 1.21
+++ openpkg-tools/cmd/bf-mk.pl 15 Feb 2005 15:25:48 -0000 1.22
@@ -471,6 +471,25 @@
%{driver.shtool} mkdir -f -m 775 $target || die "cannot create directory
\"$target\""
}
+cmd_list ()
+{
+ # list package targets available to SLAVE
+ %{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}: list
package targets available to SLAVE%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" \
+ list \
+ )
+}
+
cmd_erase ()
{
# erase packages from SLAVE OpenPKG instance
@@ -594,6 +613,7 @@
echo " -A|amend amend slave packages"
echo " -s|support set support grade"
echo " -e|erase erase packages from OpenPKG instance"
+ echo " -L|list list package targets available"
echo "Notes on slave mode"
echo " with -[1l] the application executes the SLAVE role"
echo "To reconfigure settings, change bf.conf on the MASTER"
@@ -642,6 +662,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" = ".-L" -o ".$1" = ".--list" ]; then shift; cmd="list"; 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
@@ .
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/src2make.pl
============================================================================
$ cvs diff -u -r1.9 -r1.10 src2make.pl
--- openpkg-tools/cmd/src2make.pl 4 Feb 2005 14:11:25 -0000 1.9
+++ openpkg-tools/cmd/src2make.pl 15 Feb 2005 15:25:48 -0000 1.10
@@ -656,7 +656,15 @@
$MF .= sprintf("%-30s %s\n", "list-$name-$V:",
"list-$name-".$PMV->{$name});
push(@MFTL, "list-$name-$V");
}
-#$MF .= "\n";
+$MF .= "\n";
+
+$MF .= "# list (print) individual-version-release\n";
+foreach my $name (sort(keys(%{$PMV}))) {
+ my $V = $PMV->{$name};
+ $MF .= sprintf("[EMAIL PROTECTED] %s\n", "list-$name-$V:", "$name-$V");
+ push(@MFTL, "list-$name-$V");
+}
+$MF .= "\n";
# "<name> [<op> <vers>]"
# (<name>, <vers>)
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]