OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael van Elst
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-re Date: 13-Nov-2002 10:38:16
Branch: HEAD Handle: 2002111309381600
Modified files:
openpkg-re openpkg-build
Log:
warn about options that are not supported by goal
Summary:
Revision Changes Path
1.8 +25 -2 openpkg-re/openpkg-build
____________________________________________________________________________
Index: openpkg-re/openpkg-build
============================================================
$ cvs diff -u -r1.7 -r1.8 openpkg-build
--- openpkg-re/openpkg-build 13 Nov 2002 08:39:32 -0000 1.7
+++ openpkg-re/openpkg-build 13 Nov 2002 09:38:16 -0000 1.8
@@ -531,7 +531,7 @@
while (($k,$v) = each %$with) {
if (exists $iwith->{$k}) {
- return 0 if $iwith->{$k} ne $with->{$k}
+ return 0 if $iwith->{$k} ne $with->{$k};
}
}
@@ -539,6 +539,26 @@
}
#
+# report options that are not used for
+#
+sub warn_about_options ($$) {
+ my($target, $with) = @_;
+ my($iwith);
+ my($k,$v);
+
+ unless ($target->{OPTIONS}) {
+ $target->{OPTIONS} = get_with($target->{'name'});
+ }
+ $iwith = $target->{OPTIONS};
+
+ while (($k,$v) = each %$with) {
+ if (!exists $iwith->{$k}) {
+ print "# ATTENTION: $target->{name} ignores option '$k'\n";
+ }
+ }
+}
+
+#
# locate target for a dependency
#
sub dep2target ($$) {
@@ -681,7 +701,10 @@
$r = $env->{repository}->{$name};
@vers = get_versions($r, sub { 1; });
next unless @vers;
- push(@goals, chose_source($name, $r, @vers));
+ $t = chose_source($name, $r, @vers);
+ die "FATAL: no known source found for '$name'\n" unless $t;
+ warn_about_options($t, $env->{with});
+ push(@goals, $t);
}
return unless @goals;
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]