Skip to content

Commit

Permalink
[backend] tweak orderpackids for packages without an id
Browse files Browse the repository at this point in the history
- containers get released with a long date string instead of the
  maintenance id, so we need a bigger number for packages that
  don't have the id
- we also need to check the project kind so that the comparison
  is done similar to the id case
  • Loading branch information
mlschroe committed Feb 6, 2019
1 parent 6a95917 commit 91f93ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/BSSched/ProjPacks.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,11 @@ sub orderpackids {
push @s, [ "$_$mbflavor", "$1$mbflavor", $2 - 1000000];
}
} else {
push @s, [ "$_$mbflavor", "$_$mbflavor", 99999999 ];
if ($kind eq 'maintenance_release') {
push @s, [ "$_$mbflavor", '', 99999999999999 ];
} else {
push @s, [ "$_$mbflavor", "$_$mbflavor", 99999999999999 ];
}
}
}
@packids = map {$_->[0]} sort { $a->[1] cmp $b->[1] || $b->[2] <=> $a->[2] || $a->[0] cmp $b->[0] } @s;
Expand Down

0 comments on commit 91f93ac

Please sign in to comment.