aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AdminPanel')
-rw-r--r--lib/AdminPanel/Rpmdragora/formatting.pm4
-rw-r--r--lib/AdminPanel/Rpmdragora/pkg.pm2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/AdminPanel/Rpmdragora/formatting.pm b/lib/AdminPanel/Rpmdragora/formatting.pm
index 751cf77..feeca73 100644
--- a/lib/AdminPanel/Rpmdragora/formatting.pm
+++ b/lib/AdminPanel/Rpmdragora/formatting.pm
@@ -30,6 +30,7 @@ use POSIX qw(strftime);
use AdminPanel::Shared::Locales;
use AdminPanel::rpmdragora;
use MDK::Common::Various; # included for internal_error subroutine
+use urpm::msg;
use Exporter;
@@ -86,7 +87,8 @@ sub rpm_description {
my ($description) = @_;
ensure_utf8($description);
- my ($t, $tmp);
+ my $t = "";
+ my $tmp = "";
foreach (split "\n", $description) {
s/^\s*//;
if (/^$/ || /^\s*(-|\*|\+|o)\s/) {
diff --git a/lib/AdminPanel/Rpmdragora/pkg.pm b/lib/AdminPanel/Rpmdragora/pkg.pm
index 4c52ceb..ff86c17 100644
--- a/lib/AdminPanel/Rpmdragora/pkg.pm
+++ b/lib/AdminPanel/Rpmdragora/pkg.pm
@@ -158,7 +158,7 @@ sub extract_header {
}
#- even if non-root, search for a header in the global cachedir
- if (-s $local_source) {
+ if ($local_source && -s $local_source) {
$p->update_header($local_source) or do {
warn "Warning, could not extract header for $name from $medium!";
goto header_non_available;