Summary: | app-portage/portage-utils: add a qcheck option for ignoring changed .la files | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Darren Smith <nerevar> |
Component: | Current packages | Assignee: | Portage Utils Team <portage-utils> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Adds --skip <arg> option to ignore files matching regular expression
Adds --skip <arg> option to ignore files matching regular expression |
Description
Darren Smith
2010-01-18 12:02:47 UTC
Darren, Sorry I'm not going to code this. "| grep -v \.la$" is easy enough. However you may have a legit reason for not wanting to use grep -v SpanKY, I don't think I'm in favor of me adding this option. If you opt to add anything to exclude. Please do it in a generic way so that it's not limited to "*.la" only. If not interested then Close the bug or mark it as %s please. what Ned said The reason for not wanting to use grep -v is that it can't suppress all the output for a given package. I use this command in a nightly cronjob and don't want to go through pages of output. I'll code up something in a language I know to handle checking. Unfortunately, that's not python. You may want to use the qcheck --update <pkg> option after you have verified a given pkg vdb entry can be updated. Darren: qcheck isnt written in python, it's in C. i dont have a problem with a new option to ignore things based on shell globs or regexps. I didn't realize the portage-utils were written in C. That I can handle. Here is my patch. It's been tested with valgrind and works well for me. One functional change is with the -B option. It no longer ignores files in /etc. You need to specify that directly with the -s option now. Let me know if you need me to adjust the patch in any way. Created attachment 217267 [details, diff]
Adds --skip <arg> option to ignore files matching regular expression
we use "a_argument" instead of "required_argument" to cheat in the long opts decl keep the list sorted by short option (alphabetical) new funcs should go above the main func, and you can mark it static dont declare types inline in the for loop, and use size_t use err() to abort when the regex is invalid use xmalloc() rather than malloc() so you dont need to do pointer checking otherwise, patch generally looks fine to me Created attachment 217424 [details, diff]
Adds --skip <arg> option to ignore files matching regular expression
I've incorporated all of the requested changes. Let me know if you need anything else added/changed.
unless Ned has any feedback, i'm OK with this My only concern is the behavior change in -B to become -s /etc I've always wanted users to have a dependable set of cmdline options that don't change from release to release. But I can live with it. Minor nitpick: - if (regex_head == NULL) { - return; - } + if (regex_head == NULL) + return; (In reply to comment #11) > My only concern is the behavior change in -B to become -s /etc > I've always wanted users to have a dependable set of cmdline options that don't > change from release to release. But I can live with it. Normally I would agree and I assure you I didn't make that change lightly. In the end, I guess it came down to me thinking there could be a reason someone would want to use -B w/o having it filter ^/etc. thanks, ive added your support to current cvs. i tend to agree with Darren about forcing people to explicitly filter /etc if they want that. http://sources.gentoo.org/gentoo-projects/portage-utils/qcheck.c?r1=1.43&r2=1.44 |