global: every package after a virtual package set were skipped

The code used "unset" on a variable that was afterwards used in a condition similar to the code below:

if $foo; then echo true; else echo false; fi

The result is "true". There are several facets to this issue and several ways to fix it:

  • the variable is not quoted,
  • the script doesn't use "set -u"
  • throughout the script we've used a mix of style for variables (sometimes :/true vs. false, sometimes not-empty vs. empty) due to constraints of shell scripting.

This commit fixes the issue mentioned on the first line of the commit message. A subsequent commit will add "set -u" and another one will prepare the code for people to use shellcheck without being flooded.

Merge request reports

Loading