From 6049930109d26253e7038a6da12ea044537868e9 Mon Sep 17 00:00:00 2001 From: Alexey Khoroshilov Date: Fri, 16 Apr 2010 23:29:56 -0700 Subject: [PATCH] Fix if conditions in sanity checks: if a field was not found it is defined, but it is empty --- Alien/Package/Rpm.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Alien/Package/Rpm.pm b/Alien/Package/Rpm.pm index e432aa0..c03b01c 100644 --- a/Alien/Package/Rpm.pm +++ b/Alien/Package/Rpm.pm @@ -111,7 +111,7 @@ sub scan { } # Sanity check and sanitize fields. - unless (defined $this->summary) { + if (! $this->summary) { # Older rpms will have no summary, but will have a # description. We'll take the 1st line out of the # description, and use it for the summary. @@ -122,14 +122,14 @@ sub scan { $this->summary('Converted RPM package'); } } - unless (defined $this->copyright) { + if (! $this->copyright) { $this->copyright('unknown'); } - unless (defined $this->description) { + if (! $this->description) { $this->description($this->summary); } - if (! defined $this->release || ! defined $this->version || - ! defined $this->name) { + if (! $this->release || ! $this->version || + ! $this->name) { die "Error querying rpm file"; }