Skip to content

Commit bb36063

Browse files
committed
check array length to avoid removing empty list of packages
1 parent bdb85e6 commit bb36063

File tree

1 file changed

+3
-1
lines changed
  • ncm-spma/src/main/perl/spma

1 file changed

+3
-1
lines changed

ncm-spma/src/main/perl/spma/yum.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,9 @@ sub update_pkgs
907907
$to_rm = $self->packages_to_remove($wanted);
908908
defined($to_rm) or return 0;
909909
$self->spare_dependencies($to_rm, $to_install, $error_is_warn);
910-
$tx = $self->schedule(REMOVE, $to_rm);
910+
if (scalar(@$to_rm) > 0) {
911+
$tx = $self->schedule(REMOVE, $to_rm);
912+
}
911913
}
912914

913915
$tx .= $self->schedule(INSTALL, $to_install);

0 commit comments

Comments
 (0)