Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301360 - app-portage/portage-utils: add a qcheck option for ignoring changed .la files
Summary: app-portage/portage-utils: add a qcheck option for ignoring changed .la files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-18 12:02 UTC by Darren Smith
Modified: 2010-06-08 05:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Adds --skip <arg> option to ignore files matching regular expression (portage-utils-0.3.1-qcheck.patch,4.52 KB, patch)
2010-01-23 20:30 UTC, Darren Smith
Details | Diff
Adds --skip <arg> option to ignore files matching regular expression (portage-utils-0.3.1-qcheck.patch,4.51 KB, patch)
2010-01-25 22:49 UTC, Darren Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Smith 2010-01-18 12:02:47 UTC
The common fix for broken .la files is to run lafilefixer --justfixit. This modifies the .la files and qcheck rightfully informs us. However, I'd like an option to ignore these fixed .la files.

Reproducible: Always
Comment 1 solar (RETIRED) gentoo-dev 2010-01-18 22:01:34 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.
Comment 2 SpanKY gentoo-dev 2010-01-18 22:03:13 UTC
what Ned said
Comment 3 Darren Smith 2010-01-18 23:52:48 UTC
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.
Comment 4 solar (RETIRED) gentoo-dev 2010-01-18 23:55:45 UTC
You may want to use the qcheck --update <pkg> option after you have verified a given pkg vdb entry can be updated.
Comment 5 SpanKY gentoo-dev 2010-01-19 00:30:23 UTC
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.
Comment 6 Darren Smith 2010-01-23 20:29:06 UTC
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.
Comment 7 Darren Smith 2010-01-23 20:30:53 UTC
Created attachment 217267 [details, diff]
Adds --skip <arg> option to ignore files matching regular expression
Comment 8 SpanKY gentoo-dev 2010-01-24 21:41:30 UTC
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
Comment 9 Darren Smith 2010-01-25 22:49:14 UTC
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.
Comment 10 SpanKY gentoo-dev 2010-01-25 23:53:14 UTC
unless Ned has any feedback, i'm OK with this
Comment 11 solar (RETIRED) gentoo-dev 2010-01-25 23:59:33 UTC
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;
Comment 12 Darren Smith 2010-01-26 08:33:01 UTC
(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.
Comment 13 SpanKY gentoo-dev 2010-06-08 05:24:58 UTC
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