projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
513bf64
)
silence many spurious warnings from part_pkg options
author
Mark Wells
<mark@freeside.biz>
Fri, 19 Jun 2015 00:15:50 +0000
(17:15 -0700)
committer
Mark Wells
<mark@freeside.biz>
Fri, 19 Jun 2015 00:18:36 +0000
(17:18 -0700)
FS/FS/part_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg.pm
b/FS/FS/part_pkg.pm
index
4407ec6
..
0e9ee05
100644
(file)
--- a/
FS/FS/part_pkg.pm
+++ b/
FS/FS/part_pkg.pm
@@
-1392,6
+1392,11
@@
sub option {
my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
split("\n", $self->get('plandata') );
return $plandata{$opt} if exists $plandata{$opt};
+
+ # check whether the option is defined in plan info (if so, don't warn)
+ if (exists $plans{ $self->plan }->{fields}->{$opt}) {
+ return '';
+ }
cluck "WARNING: (pkgpart ". $self->pkgpart. ") Package def option $opt ".
"not found in options or plandata!\n"
unless $ornull;