Portage version 2.1.2_pre2 call dohtml without argument '-r' on a directory and it will fail silently when it tries to install the directory. IMO, skipping the directory is better behavior. try 'dohtml doc-html/*' and dohtml will install only the files before the first subdirectory, ordered alphabetically. it'd be more intuitive for dohtml to install all the files, skipping directories. optimally dohtml could filter all files and directories into different arrays, processing files first, then directories. then dohtml could install all files, and return false when given directories without the '-r' argument. authors would have the intuitive behavior and be able to debug using lines like 'dohtml doc-html/* || die "directories need -r"'.
this line in main:/usr/lib/portage/dohtml causes the problem: success = success and install(basename, dirname, options) as soon as install fails once the 'for x in args' loop never installs again. the python keyword 'and' prevents `install' execution after `success' is false. `install' returns false on a directory without options.recurse, causing the problem originally described.
Created attachment 105973 [details, diff] dohtml.patch Changes: added QA Notice for directories without recursion fixed main driver loop ('success &= install' instead of 'success = success & install') misc. cleanups
Created attachment 106027 [details, diff] dohtml.patch same as last with indentation fixed
Instead of using the output module for the ewarn, I suppose we should spawn something like `bash -c 'source ${PORTAGE_BIN_PATH}/isolated-function.sh; ewarn "QA Notice:..."'` so that it works correctly with the elog framework. Note that soon we'll have a QA elog level for bug #160075.
Created attachment 106478 [details, diff] dohtml.patch Changes: use new eqawarn function from isolated-functions.sh (tested with svn isolated-functions.sh)
Thanks. In svn r5642 I've fixed it so that it continues to install files even after some fail. I'll wait until after the final release of 2.1.2 (coming soon) for the QA warning since I'm not sure how many packages it will affect and people will get upset if it produces any warnings that they see as invalid or unnecessary.
cool beans. please (re)consider the latest proposed patch. it includes many cleanups: whitespace, expressions, and comments. the main loop fix applied in svn r5642 is excessively verbose compared to the patch's fix. again, the misuse of keyword 'and' vs. operator '&' caused the original problem. simply substituting '&' for 'and' fixes the error; using '&=' simplifies the statement further.
Is this bug still even remotely relevant with current portage versions?
Fixed in r9476 and released in sys-apps/portage-2.2_pre5. This bug should be RESOLVED FIXED and block bug #210077.
This is supposed to be fixed in portage-2.2_pre5 or earlier.