3 ms·
Apt patterns allows matching on criteria besides strings such as searching for all packages with broken dependencies. It also allows combining different search
by tssva 7y ago
Apt patterns allows matching on criteria besides strings such as searching for all packages with broken dependencies. It also allows combining different search criteria in various manners which would be difficult or impossible using just a regex search. If you want to just match packages using a regex against package names that is still possible using the name apt pattern.
I would suggest reading the apt-pattern man page referenced before passing judgement.
- systemvoltage 7y ago> difficult or impossible using just a regex search I am sorry but this isn't true. I can prove it. Regex is used to parse the program itself that runs APT, this is called Lexical analysis[1]. GNU Bison and Flex [2] are lexical analyzers for example that compile a lot of code we write today. So whatever pattern matching code was written in C as part of the APT 2.0 package, that code itself is read and compiled by regex. So, it provably cannot be impossible to do a match using this new feature you're referring to that cannot be matched using plain old regex. Difficulty is subjective depending on who the target demographic is. All these things are actually moot - it doesn't cost you anything to keep Regex option to search for some package names, perhaps a bit of additional code to maintain. Also, other means of pattern matching can be added in addition to regex search feature. Why not both? [1] https://en.wikipedia.org/wiki/Lexical_analysis https://en.wikipedia.org/wiki/Lexical_analysis [2] https://aquamentus.com/flex_bison.html https://aquamentus.com/flex_bison.html
- saagarjha 7y agoYou're missing the point and being patronizing while doing it. Regex search can only match package names. APT's flags lets it match on other attributes as well, which a simple regex cannot interact with.