Whilst pondering a thought-experiment related to installing Ubuntu packages (more on that in another post), I was
looking to understand the output of the apt-cache depends
command. However, while doing a quick Google search, I found
that the top two results were wrong - one subtly (though sort-of right), the other blatently wrong. So, I did a little
digging to figure it out for myself.
Before we get to the right answer, let's start with those top two results. The first search result says:
As you guessed the | indicates "or". The control line normally shows foo | bar, but apt-cache depends appears to reformat it by showing each alternative on its own line and prefixing the first with the |. In other words, the pipe flags the preferred option and the next line is the alternative.
(emphasis mine)
This is actually pretty close, but not quite true, as we'll soon see.