Skip to content

Commit

Permalink
Fix for issue #83.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfb committed Oct 23, 2009
1 parent a108cdb commit 12e1a51
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/Spine/Plugin/RPMPackageManager.pm
Expand Up @@ -323,6 +323,9 @@ sub clean_packages
my $rval = 0;
my $rpm_bin = $c->getval('rpm_bin');
my $rpm_opts = $c->getval('rpm_opts') || qq('');
# RPM is stupid and thinks extra spaces are package names.
$rpm_opts =~ s/^\s+//;
$rpm_opts =~ s/\s+$//;

# apt understands package.arch but RPM does not. The Spine RPM module
# uses the "name" tag from the installed RPM and compares that to the
Expand Down Expand Up @@ -351,7 +354,12 @@ sub clean_packages

unless ($c->getval('c_dryrun'))
{
my $result = `$rpm_bin -e $rpm_opts $remv 2>&1`;
# RPM is stupid and thinks extra spaces are package names.
my $result = `$rpm_bin -e $rpm_opts $remv 2>&1`;
if ( $rpm_opts =~ m/''/ )
{
$result = `$rpm_bin -e $remv 2>&1`;
}
if ($? > 0)
{
$c->error("package removal failed \[$result\]", 'err');
Expand Down

0 comments on commit 12e1a51

Please sign in to comment.