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
Created attachment 115714 [details, diff] portage-utils-0.1.25-add_qcheck_func.patch Adds toggles for individual checks/updates
Created attachment 115716 [details, diff] portage-utils-0.1.25-update_qcheck_man.patch Update the man page!
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
thanks, added to cvs !
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!
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
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.
Reopening bug for SpankY to review and merge as desired.
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?
(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
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.
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
This was released a while ago. thanks for the patches.