Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for issue #83.

  • Loading branch information...
commit 12e1a51c625324a5a0672e23f185d0396220d1f7 1 parent a108cdb
cfb authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/Spine/Plugin/RPMPackageManager.pm
View
10 lib/Spine/Plugin/RPMPackageManager.pm
@@ -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
@@ -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');
Please sign in to comment.
Something went wrong with that request. Please try again.