mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
Fix if conditions in sanity checks: if a field was not found it is defined, but it is empty
This commit is contained in:
committed by
Joey Hess
parent
f581595af6
commit
6049930109
@@ -111,7 +111,7 @@ sub scan {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Sanity check and sanitize fields.
|
# Sanity check and sanitize fields.
|
||||||
unless (defined $this->summary) {
|
if (! $this->summary) {
|
||||||
# Older rpms will have no summary, but will have a
|
# Older rpms will have no summary, but will have a
|
||||||
# description. We'll take the 1st line out of the
|
# description. We'll take the 1st line out of the
|
||||||
# description, and use it for the summary.
|
# description, and use it for the summary.
|
||||||
@@ -122,14 +122,14 @@ sub scan {
|
|||||||
$this->summary('Converted RPM package');
|
$this->summary('Converted RPM package');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unless (defined $this->copyright) {
|
if (! $this->copyright) {
|
||||||
$this->copyright('unknown');
|
$this->copyright('unknown');
|
||||||
}
|
}
|
||||||
unless (defined $this->description) {
|
if (! $this->description) {
|
||||||
$this->description($this->summary);
|
$this->description($this->summary);
|
||||||
}
|
}
|
||||||
if (! defined $this->release || ! defined $this->version ||
|
if (! $this->release || ! $this->version ||
|
||||||
! defined $this->name) {
|
! $this->name) {
|
||||||
die "Error querying rpm file";
|
die "Error querying rpm file";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user