OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 08-Jan-2005 10:09:55
Branch: HEAD Handle: 2005010809095500
Modified files:
openpkg-tools/cmd build.pl
Log:
- don't allow a package list if -A or -a is specified.
- don't conflict with options of already installed packages
(still a bit questionable) but require an update instead.
- Make -E filter the packages selected by -A/-a (and any
wildcard pattern you specify in the package list, -A is
the same as '*').
Submitted by: Michael van Elst
Summary:
Revision Changes Path
1.9 +17 -15 openpkg-tools/cmd/build.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/build.pl
============================================================================
$ cvs diff -u -r1.8 -r1.9 build.pl
--- openpkg-tools/cmd/build.pl 24 Sep 2004 06:41:26 -0000 1.8
+++ openpkg-tools/cmd/build.pl 8 Jan 2005 09:09:55 -0000 1.9
@@ -114,7 +114,8 @@
}
die "openpkg:build:USAGE: $0 [-R rpm] [-r repository] [-f index.rdf]
[-uUzZiqsSXMLWKebBg] [-P priv-cmd] [-N non-priv-cmd] [-p platform] [-Dwith ...]
[-Ename ...] [-Hname ...] ( [-aA] | patternlist )\n"
- unless $#ARGV >= 0 || ($#ARGV == -1 && ($opt_a || $opt_A));
+ unless ($#ARGV >= 0 && !($opt_a || $opt_A)) ||
+ ($#ARGV == -1 && ($opt_a || $opt_A));
##########################################################################
@@ -1596,8 +1597,7 @@
$conflict = 1;
}
- $relmap = $env->{built}->{$pro->{prefix}} ||
- $env->{installed}->{$pro->{prefix}};
+ $relmap = $env->{built}->{$pro->{prefix}};
@t = get_targets($relmap, sub { 1; });
foreach $t (@t) {
$with = $t->{OPTIONS};
@@ -1904,18 +1904,17 @@
if (defined $pattern) {
@todo = map {
my($p) = $_;
- my($s);
+ my($s,$w);
$s = $1 if $p =~ s/(,[^\s,]+)$//;
if ($p =~ s/\*+$//) {
$p = '^'.quotemeta($p).'';
+ $w = 1;
} else {
$p = '^'.quotemeta($p).'$';
}
- map {
- "$_$s"
- } grep {
- /$p/
- } keys %{$env->{repository}}
+ map { "$_$s" }
+ grep { /$p/ && !($w && exists $env->{exclude}->{$_}) }
+ keys %{$env->{repository}}
} split(/\s+/,$pattern);
} else {
#
@@ -1925,7 +1924,9 @@
@todo = grep {
my($n) = $_;
(ref $env->{installed}->{$n}) &&
- grep { $_ ne '-' } keys %{$env->{installed}->{$n}}
+ !exists $env->{exclude}->{$n} &&
+ grep { $_ ne '-' }
+ keys %{$env->{installed}->{$n}}
} keys %{$env->{repository}};
}
@@ -2720,8 +2721,9 @@
=item B<-E> I<name>
Ignore a package with the specified I<name>. This can be used to avoid
-upgrading to a broken package in the repository. There can be multiple
-B<-E> options.
+upgrading to a broken package in the repository. If you use a
+wildcard pattern or the B<-a> or B<-A> options then I<name> will not
+be selected. There can be multiple B<-E> options.
=item B<-H> I<name>
@@ -2730,13 +2732,13 @@
=item B<-a>
-Select all installed packages. Do not specify a pattern list together
+Select all installed packages. You cannot specify a pattern list together
with the B<-a> option.
=item B<-A>
-Select all packages in the repository. Do not specify a pattern list together
-with the B<-A> option.
+Select all packages in the repository. You cannot specify a pattern list
+together with the B<-A> option.
=back
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]