In most cases, the command 'make cce' is all that is needed to add a
changes entry, so put it at the top of the documentation. The smaller
steps are useful when updating multiple packages at once, which is less
often the case.
Make the possible values for CTYPE stand out, instead of hiding them in
the body text.
The show-all code is mostly line noise, therefore it is all the more
important to provide at least a few hints to a potential reader, by
using descriptive variable names for the iteration variables:
g => grp
c => cat
v => var
w => width
x => word
I had been confused by the printf commands since some of them used '\n'
and some used '\\\n', which seemed as if there were some quoting issue
that would make it necessary to double the backslashes.
This assumption was wrong though. The printf commands for the
single-valued variables use the normal '\n', while the lines for the
multi-valued variables end with a real backslash in the output, to
mimick the continuation lines in makefiles.
As a hint that the '\\\n' means backslash + newline, add single quotes
between the two characters.
The previous code relied on the exact implementation of Var_Parse in
bmake, and that it does not issue any error messages in case of $$ in
variable modifiers.
In variable modifiers, a $ is escaped using \$, not $$, as documented in
the manual page.
At the time when I wrote the previous version with the _SHOW_ALL.d4 and
_SHOW_ALL.d8 hacks, I did not know about the backslash escaping rule,
and I just added dollar signs until everything seemed to work. I
couldn't explain why it worked though, which is not surprising since the
code was using an undocumented implementation flaw of bmake.
The buildlink3 variable names are quite long. So long that using the
default column width of 24 characters, most of the variable values are
not aligned. In this case, it makes sense to shift them all to the right
a bit.
The .for loops are expanded by bmake as soon as they are parsed. Since
there are many variable groups, and since each of these groups has
several variables, this takes quite a bit of time.
The time for running "bmake clean" in pkgtools/pkglint went down from 1.0
second to 0.7 seconds. This may not seem much, but when multiplied with
23088 times 9, this little change may speed up a full bulk build by 62000
seconds, which is about 18 hours.
The side-effect is that the show-all-* targets can only be run from the
command line, not as a dependency of other targets. This restriction will
probably go unnoticed.
Before, variables containing dollar characters displayed so wrong that it
was hard to explain.
To fix the problem, I typed almost random characters into the code until
the output was exactly as expected. I still do not understand:
* why the list variables need 8 dollars to survive the @x@ loop,
* why the code only works if the dollars come from an external variable
instead of being written inline,
* why the backslash in the :C modifier needs to be doubled.
Anyway, the output of "bmake show-all-extract" now contains the shell
variable $${extract_file}, just as it should. The dollars are now doubled
in the output and thereby match the source code from the Makefile
exactly.
An upcoming check in pkglint will require that if a file has a _VARGROUPS
section, it must contain the full truth, mentioning every variable that
is used or defined in the file.
Some variables may be so internal though that they are not interesting in
any scenario for understanding what goes on in the file. These variables
can be explicitly ignored. They will not be listed by "bmake show-all" and
pkglint will not complain about them.
Up to now, there was a central list of variable name patterns that
defined whether a variable was printed as a sorted list, as a list or as
a single value.
Now each variable group decides on its own which of the variables are
printed in which way, using the usual glob patterns. This is more
flexible since different files sometimes differ in their naming
conventions.
Two variable groups are added: license (for everything related to
LICENSE) and go (for lang/go).
In Makefiles, the variable values are aligned vertically. This format is
now also used in the show-all target, which makes it easier readable.
Some more variables have been marked as multi-value, and single-valued
variables ending in space are clearly marked. Without the latter, the
regression test would have a line with significant trailing whitespace.
The *_ENV and *_ARG values are typically very long, and reading them in
a single line is unnecessarily difficult. Therefore, each of their
values is listed on a separate line, for example:
fetch:
usr DIST_PATH (undefined)
pkg MASTER_SITES = \
http://ftp.gnome.org/pub/GNOME/sources/glib/2.56/ \
ftp://ftp.gnome.org/pub/GNOME/sources/glib/2.56/ \
ftp://ftp.cse.buffalo.edu/pub/Gnome/sources/glib/2.56/ \
https://download.gnome.org/sources/glib/2.56/ \
# end of MASTER_SITES
pkg DIST_SUBDIR (undefined)
While it would be useful, the current implementation has not been
updated even to use 'cvs add' instead of 'cvs import' (policy change
in 2012). Use the import-package.sh script currently residing in wip/
instead.
discussion on tech-pkg.
BROKEN_ON_PLATFORM and NOT_FOR_PLATFORM are the same, except that
(now) BROKEN_ON_PLATFORM sets PKG_FAIL_REASON and NOT_FOR_PLATFORM
sets PKG_SKIP_REASON. BROKEN_EXCEPT_FOR_PLATFORM and ONLY_FOR_PLATFORM
correspond in the same way.
The idea is that going forward we will distinguish unbuildable
packages that theoretically ought to be fixed (these are BROKEN) from
packages where it doesn't make sense to build (these are NOT_FOR)...
examples of the former include most non-64-bit-clean packges; examples
of the latter include OS-specific language bindings.
A general review of the uses of NOT_FOR_PLATFORM and ONLY_FOR_PLATFORM
(converting many of them to BROKEN...) is coming up.
Similarly, a general review of the uses of PKG_FAIL_REASON and
PKG_SKIP_REASON is coming up.
For this to become useful, pbulk needs to be taught to report failing
and skipped packages differently - the idea is that failing packages
should be reported up front and skipped packages don't need to be. This
has not been done yet, but one set of things at a time...
For Windows Vista or later, executable files including special keywords
(install, update, patch, and so on) in its name are expected as requireing
privileged permissions by default (UAC).
If not, it must be specified with manifest file, or it will be failed to
execute as "Permission denied".
location in pkgsrc, it is after all the natural place for testing new
imports. Don't try to remove a file named after the import message, it
won't exist.
XXX Needs more work for the second case to remove the files before
XXX running cvs up
the target now automatically also removes any TODO entries for the
package that was updated.
Script improved based on version by dholland; further suggestions
by gdt and joerg.