OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-tools Date: 12-Oct-2006 17:55:39 Branch: HEAD Handle: 2006101216553800 Modified files: openpkg-tools/cmd build.pl Log: Support OpenPKG intance prefix in addition to OpenPKG instance RPM command in INI-style ~/.openpkg/build file and make instance prefix the officially way of configuration. Summary: Revision Changes Path 1.38 +15 -5 openpkg-tools/cmd/build.pl ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-tools/cmd/build.pl ============================================================================ $ cvs diff -u -r1.37 -r1.38 build.pl --- openpkg-tools/cmd/build.pl 31 Aug 2006 18:38:03 -0000 1.37 +++ openpkg-tools/cmd/build.pl 12 Oct 2006 15:55:38 -0000 1.38 @@ -124,7 +124,10 @@ # override command line options with configuration script options # now that the effectively used OpenPKG RPM command is known -foreach my $env (sort { $a cmp $b } grep { $config->{"rpm"} =~ /^\Q$_\E/ } keys %env) { +foreach my $env (sort { $a cmp $b } grep { + $config->{"rpm"} =~ m/^\Q$_\E/ # compatibility + or $config->{"prefix"} =~ m/^\Q$_\E/ # regular +} keys %env) { while (my ($opt, $val) = each(%{$env{$env}})) { eval "\$opt_$opt = '$val' unless defined \$opt_$opt;"; } @@ -2900,15 +2903,22 @@ B<openpkg build> reads the configuration file F<$HOME/.openpkg/build>. The file lists default options, one option per line and section tags -of the form C<[>I<rpm>C<]>. Options following such a tag are only -evaluated if the selected RPM command matches I<rpm> so that you can +of the form C<[>I<prefix>C<]>. Options following such a tag are only +evaluated for the particular B<OpenPKG> instance so that you can define default options for multiple B<OpenPKG> instances. Example: - [/openpkg/bin/openpkg rpm] + # global options -X - -P sudo + + [/openpkg/current] + # options for CURRENT instance only + -r ftp://ftp.openpkg.org/current/ + + [/openpkg/stable] + # options for 2-STABLE instance only + -r ftp://ftp.openpkg.org/stable/2/ =head1 EXAMPLES @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org