3 ms·
> On 18.04, if apt fails to match an exact package name, it expands the name as a regular expression. In this context, the + character means "one or more of the
by p-e-w 4y ago
> On 18.04, if apt fails to match an exact package name, it expands the name as a regular expression. In this context, the + character means "one or more of the preceding character" so g++-10 matches clang-10 (it's just coincidental that they're both compilers).
What a clusterfuck. Fortunately this insane behavior was disabled in later versions. To "fall back" to using patterns automatically just because an exact match couldn't be found is a massive footgun.
If a package manager can't find the package I asked it to install, I expect it to fail with an error message telling me so (and possibly a list of similar names that do exist) – not randomly try to interpret what it thinks I want and then act on that guess.
- hulitu 4y ago> To "fall back" to using patterns automatically just because an exact match couldn't be found is a massive footgun We make malware [1]. How do you expect we install it when this feature is disabled ? /s [1] just joking, but see npm for what can happen.