don't try to modify a constant value

This commit is contained in:
Joey Hess
2008-03-12 11:10:09 -04:00
parent 17bcd710f7
commit 3c8631f8fd
2 changed files with 6 additions and 5 deletions

View File

@@ -83,14 +83,15 @@ sub scan {
SUMMARY DESCRIPTION COPYRIGHT PREFIXES},
keys(%fieldtrans)) {
my $value=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} $file");
my $key;
if (exists $fieldtrans{$field}) {
$field=$fieldtrans{$field};
$key=$fieldtrans{$field};
}
else {
$field=lc($field);
$key=lc($field);
}
$value='' if $value eq '(none)';
$this->$field($value);
$this->$key($value);
}
# Get the conffiles list.