Summary: | app-portage/portage-utils: improve qfile behavior with symlinks | ||
---|---|---|---|
Product: | Portage Development | Reporter: | TGL <tom.gl> |
Component: | Tools | 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: |
qfile-0.1.15-path_checking_enhancements.patch
qfile-0.1.15-path_checking_enhancements.patch qfile-path_checking_enhancements.patch qfile-path_checking_enhancements.patch qfile-path_checking_enhancements.patch |
Description
TGL
2006-04-14 18:29:08 UTC
Created attachment 84676 [details, diff]
qfile-0.1.15-path_checking_enhancements.patch
Created attachment 84734 [details, diff]
qfile-0.1.15-path_checking_enhancements.patch
Removed a few useless strdup/strcpy.
Created attachment 86743 [details, diff]
qfile-path_checking_enhancements.patch
rediffed for 0.1.17
Oh sorry man I/we overlooked this. SpanKY: review this patch please. Created attachment 88898 [details, diff]
qfile-path_checking_enhancements.patch
Rediffed for 0.1.18. Also changed some buffer sizes from PATH_MAX to _Q_PATH_MAX.
SpanKY: ping? Sorry if it sounds like bugspaming (ok, it is...), but i would really appreciate if you could review this patch. I'm even more convinced it is useful now that i have seen someone on gentoo-user-fr@ who was about to delete his /usr/X11R6/lib64 because qfile was showing it orphan... http://article.gmane.org/gmane.linux.gentoo.user.french/3770/ (In reply to comment #6) > SpanKY: ping? > > Sorry if it sounds like bugspaming (ok, it is...), but i would really > appreciate if you could review this patch. I'm even more convinced it is > useful now that i have seen someone on gentoo-user-fr@ who was about to delete > his /usr/X11R6/lib64 because qfile was showing it orphan... > http://article.gmane.org/gmane.linux.gentoo.user.french/3770/ > I know spanky has been very busy as of late.. I know you have submitted other good bug fixes. So I'll make a deal with you.. If you let me add you to the portage-utils@gentoo alias I'll add the patch with minor review and cut a new release with it in it. If any bugs show up you get to fix them.. Deal?? (In reply to comment #7) > If you let me add you to the portage-utils@gentoo alias I'll add the patch > with minor review and cut a new release with it in it. If any bugs show > up you get to fix them.. > Deal?? Ok, deal, i'll do my best to help with bugs which enter my mailbox. Thanks. Oh, and btw, before you do a new release, could you have a look on bug #139772 too? Don't worry, the patch there is really short :) Thanks for the patch, it found that /usr/X11R6/qt/3/bin/lrelease belongs to qt while the current version did not. I've looked at the code and found two memory leaks. See Lines 227 and 230: if (chdir(portroot)) errp("could not chdir(%s) for ROOT", portroot); if (chdir(portvdb) != 0 || (dir = opendir(".")) == NULL) return EXIT_FAILURE; (In reply to comment #9) > I've looked at the code and found two memory leaks. See Lines 227 and 230: > > if (chdir(portroot)) > errp("could not chdir(%s) for ROOT", portroot); > > if (chdir(portvdb) != 0 || (dir = opendir(".")) == NULL) > return EXIT_FAILURE; > Good catch, thanks. Moving them before the arrays allocation will do the trick (this part doesn't rely on the cwd, since $PWD is used to get absolute paths). I will attach an updated patch. Created attachment 91296 [details, diff]
qfile-path_checking_enhancements.patch
Ok this patch adds on average about 7s to a 'time qfile /bin/*' on my local box (144 things). I've checked it into CVS anyway and will request that you submit any optimizations you come up with over time. I've created the bugzilla entry portage-utils and will reassign the pkg and bugs to it. portage-utils-0.1.19 released |