Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 173753 - app-portage/portage-utils-0.1.25 - qcheck - Add toggles for individual checks/updates [PATCH]
Summary: app-portage/portage-utils-0.1.25 - qcheck - Add toggles for individual checks...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-04-08 10:42 UTC by Gordon Malm (RETIRED)
Modified: 2007-06-21 14:29 UTC (History)
0 users

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


Attachments
portage-utils-0.1.25-add_qcheck_func.patch (portage-utils-0.1.25-add_qcheck_func.patch,7.21 KB, patch)
2007-04-08 10:45 UTC, Gordon Malm (RETIRED)
Details | Diff
portage-utils-0.1.25-update_qcheck_man.patch (portage-utils-0.1.25-update_qcheck_man.patch,979 bytes, patch)
2007-04-08 11:13 UTC, Gordon Malm (RETIRED)
Details | Diff
portage-utils-0.1.25-add_qcheck_func-r2.patch (portage-utils-0.1.25-add_qcheck_func-r2.patch,7.20 KB, patch)
2007-04-08 17:44 UTC, Gordon Malm (RETIRED)
Details | Diff
/home/wyvern/portage-utils/portage-utils-cvs-qcheck-bugfixes.patch (portage-utils-cvs-qcheck-bugfixes.patch,1.15 KB, patch)
2007-04-08 23:14 UTC, Gordon Malm (RETIRED)
Details | Diff
portage-utils-cvs-qcheck-bugfixes-r2.patch (portage-utils-cvs-qcheck-bugfixes-r2.patch,1.15 KB, patch)
2007-04-09 00:18 UTC, Gordon Malm (RETIRED)
Details | Diff
portage-utils-cvs-qcheck-bugfixes-r3.patch (portage-utils-cvs-qcheck-bugfixes-r3.patch,1.28 KB, patch)
2007-04-09 03:20 UTC, Gordon Malm (RETIRED)
Details | Diff
qcheck-cvs-r1.35-fix-small-bugs.patch (qcheck-cvs-r1.35-fix-small-bugs.patch,1.24 KB, patch)
2007-05-12 03:50 UTC, Gordon Malm (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Malm (RETIRED) gentoo-dev 2007-04-08 10:42:39 UTC
I discovered this fantastic little tool not too long ago and it has really helped me with some sys admin work.  Thank you very much!  I did find myself wishing for a little finer control of what it checks/updates though so I extended it a wee bit.

Please review and consider this patch against portage-utils-0.1.25 for inclusion in a future release.

Claimed additional functionality:
-A || --noafk = Don't report or make changes to the db-CONTENTS for missing files
-H || --nohash = Don't report or make changes to the db-CONTENTS for unknown or mismatched checksums
-T || --nomtime = Don't report or make changes to the db-CONTENTS for differing mtimes

I'm a sys admin, who does scripting and glue where needed.  I do not consider myself a C programmer, nor have I been accused of such. =P  But I am looking to improve in this area so comments, criticism, suggestions, etc. most are welcome.  Thanks all!

Reproducible: Always
Comment 1 Gordon Malm (RETIRED) gentoo-dev 2007-04-08 10:45:10 UTC
Created attachment 115714 [details, diff]
portage-utils-0.1.25-add_qcheck_func.patch

Adds toggles for individual checks/updates
Comment 2 Gordon Malm (RETIRED) gentoo-dev 2007-04-08 11:13:33 UTC
Created attachment 115716 [details, diff]
portage-utils-0.1.25-update_qcheck_man.patch

Update the man page!
Comment 3 Gordon Malm (RETIRED) gentoo-dev 2007-04-08 17:44:59 UTC
Created attachment 115736 [details, diff]
portage-utils-0.1.25-add_qcheck_func-r2.patch

Changes for portage-utils-0.1.25-add_qcheck_func-r2.patch:
-Remove unnecessary {} braces at for if() statement at line 177
Comment 4 SpanKY gentoo-dev 2007-04-08 19:56:23 UTC
thanks, added to cvs !
Comment 5 Gordon Malm (RETIRED) gentoo-dev 2007-04-08 23:14:36 UTC
Created attachment 115762 [details, diff]
/home/wyvern/portage-utils/portage-utils-cvs-qcheck-bugfixes.patch

I'll try here before e-mailing or opening a new bug.

This is a patch against portage-utils/qcheck.c in cvs.  It fixes two bugs.

1. num_files_ignored does not get reset between checking multiple packages.
2. If an unreadable file is encountered when --update is specified without --verbose:
-Nothing is printed to the user. This is not consistent with the behavior of other checks, nor when --update is not specified.
-Counter num_files_unknown does not get incremented
-free(hashed_file); is never called

Thank you all!
Comment 6 Gordon Malm (RETIRED) gentoo-dev 2007-04-09 00:18:02 UTC
Created attachment 115766 [details, diff]
portage-utils-cvs-qcheck-bugfixes-r2.patch

Same as patch in the last post but against new qcheck.c revision 1.33 in CVS
Comment 7 Gordon Malm (RETIRED) gentoo-dev 2007-04-09 03:20:14 UTC
Created attachment 115770 [details, diff]
portage-utils-cvs-qcheck-bugfixes-r3.patch

Ok, very sorry to bother again but another patch for qcheck.c, still against CVS 1.33.

Still fixes #1 and #2-b,c.  But thinking about it more, I believe #2-a is actually the desired behavior.  We don't want to print that we're "Updating" this item when we're not.  Only --verbose should make the "PERM:" message be printed when updating.  Right?

Anyway, whichever behavior you think is best, #2-a is not a real issue to me.
Comment 8 solar (RETIRED) gentoo-dev 2007-04-09 16:36:36 UTC
Reopening bug for SpankY to review and merge as desired.
Comment 9 Gordon Malm (RETIRED) gentoo-dev 2007-04-21 04:12:03 UTC
Sorry for the bother, I know this is probably low prio, just wanted to mention the remaining bugs in this appears to have made it into latest portage-utils snapshot?
Comment 10 solar (RETIRED) gentoo-dev 2007-05-12 03:32:20 UTC
(In reply to comment #9)
> ..... just wanted to mention
> the remaining bugs in this appears to have made it into latest portage-utils
> snapshot?

Can you post a new patch please

Comment 11 Gordon Malm (RETIRED) gentoo-dev 2007-05-12 03:50:30 UTC
Created attachment 118962 [details, diff]
qcheck-cvs-r1.35-fix-small-bugs.patch

Patch against qcheck.c CVS revision 1.35 (current).  Same as in Comment #7 as I believe this to probably be the "most correct/desired" behavior.
Comment 12 solar (RETIRED) gentoo-dev 2007-05-12 14:44:54 UTC
 cvs ci -m "- small bug fix for qcheck bug 173753" qcheck.c 
...
/var/cvsroot/gentoo-projects/portage-utils/qcheck.c,v  <--  qcheck.c
new revision: 1.36; previous revision: 1.35
Comment 13 solar (RETIRED) gentoo-dev 2007-06-21 14:29:23 UTC
This was released a while ago. thanks for the patches.