0.11 (2022-02-26)¶
New script functions¶
A series of new helper script functions are now available for projects.
The releng_require_version
helper function has been added to allow
releng-tool projects to specify the minimum version of releng-tool needed
to run a project. For example, to indicate that at least v0.11 is required,
the following can be used:
releng_require_version('0.11')
If the version requirement is not met, the releng-tool process will stop, indicating that the host environment's releng-tool package requires an update.
At this time, using this option now may not yield ideal output for releng-tool versions prior to v0.11, as the function is not available in these version. A workaround that could be used is the following:
try:
releng_require_version('0.11')
except NameError:
releng_exit('requires releng-tool v0.11 or greater')
The releng_cat
and releng_ls
helper functions have been introduced to help
developers examine/debug their releng-tool package states. The releng_cat
helper function can be used to dump the contents of a file to the standard
output stream (similar to the cat
command):
releng_cat('config.log')
The releng_ls
helper function can be used to dump the file listing for
a directory to the standard output stream (similar to the ls
command):
releng_ls(IMAGES_DIR)
Improved support for extracting zip files¶
The initial zip-file extraction for releng-tool would cycle through defined directory and file entries in an archive, ensuring directories were created before writing extracted files into project's output directory. It has been observed that with some archive files, the parsing of an archive may not always identify directory entries. This can result in the extraction phase failing for packages, where it attempts to extract a file to a directory which has not been created.
To be flexible with various zip archive types, this release adjusts the extraction for zip files to always attempt to build directory paths, even if a directory entry is not specified.
Introducing the --force
argument¶
For developers testing changes in their releng-tool project, or changes with one or more packages defined in their project, a developer will most likely try to reconfigure/rebuild packages to verify these changes. Since releng-tool does not repeat completed stages, developers will utilize certain packages actions to re-perform stages. For example, a developer can rebuild a package using:
releng-tool libfoo-rebuild
While the various libfoo-re*
actions can help a developer re-perform a stage,
sometimes a developer may wish to force a repeat trigger of all stages in
their project. By specifying the --force
argument on the command line, each
package's configuration, build and install stages will be performed again in
the same manner as if a user invoked libfoo-reconfigure
on each package:
releng-tool --force
A reminder to developers that rebuilds can be complex and may not always yield the same results as a clean build.
With the --force
argument providing an easy way to perform
configuration/build/install stages again, the argument can also be used for
overriding some fetched content. If a user invokes releng-tool with the
fetch
argument, all cachable version control content will be fetched again:
releng-tool fetch
However, this does not apply to content which is stored into the download
(dl/
) folder. If a user wanted to force the re-downloading of
a package's site without performing a distclean
or manually deleting a
package's file, using the fetch
action along with the --force
argument
can be used instead. For example, to re-download a package's file:
releng-tool libfoo-fetch --force
Or re-download all package files:
releng-tool fetch --force