Instead of giving up on directory subtraction entirely, try to
subtract directories that are in an included manifest *and* do not
have a non-directory file somewhere in their path.
For example:
bundle1:
/dir/file
bundle2: includes bundle1
/dir
In this case /dir would be subtracted from bundle2.
Also add a special case for subtracting directories if they are in
os-core as this reduces a lot of unused content from a bundle's
manifest.
Signed-off-by: William Douglas <william.douglas@intel.com>
Add package level bundles "pundles" first class support in mixer. This
involves tagging pundles with "pundle" in the bundle definition file's
"MAINTAINER" field.
This support requires changes to bundle constraints, primarily that
cycles are now allowed in bundle includes. As part of this, directory
subtraction will no longer be done for includes as the true directory
owner isn't something that can be decided on in a cycle.
Validation also needed a slight adjustment for pundles to reflect
their minimal bundle definition files.
Signed-off-by: William Douglas <william.douglas@intel.com>
Improve the usability of log messages by indicating which manifest is
invalid when printing errors.
Signed-off-by: William Douglas <william.douglas@intel.com>
Both '.' and '+' are valid names for bundles for swupd-client. In
order to use package names, mixer-tools also needs to allow these
characters.
Signed-off-by: William Douglas <william.douglas@intel.com>
Systems using certain modifiers are currently not used as frequently
so in order to reduce pack size and improve update times skip those
modifiers from being considered for packs.
Currently the SSE version is skipped when either AVX2 or AVX512
versions exist and APX is always skipped.
This change does not apply to 0 packs as it would break installer
offline support.
Signed-off-by: William Douglas <william.douglas@intel.com>
These were unintentionally left out and while unlikely to be used
should be included for correctness.
Signed-off-by: William Douglas <william.douglas@intel.com>
Move to go version to 1.21 (1.22 is still early and 1.21 has a long
chain of stable releases).
Also update dependencies to latest their versions.
Signed-off-by: William Douglas <william.douglas@intel.com>
Don't download the linter unless a special CI env setting is set. Also
use a different cache to avoid permissions issues with the rootfs in
CI.
Signed-off-by: William Douglas <william.douglas@intel.com>
Add cases for optimization prefixes being changed and directories with
optimizations being skipped.
Signed-off-by: William Douglas <william.douglas@intel.com>
When considering delta peer matches, skip any directory with an
optimization prefix for consideration. The the directories are not
intended to be different between optimization versions.
Signed-off-by: William Douglas <william.douglas@intel.com>
The optimized prefix doesn't set Misc flags until the last moment
during manifest writing so ignore the flags when testing for peers
when a prefix is in place.
Also improve some comments and test cases.
Signed-off-by: William Douglas <william.douglas@intel.com>
As other mixer processes might use the manifests after they are
written, reset the path to include the prefix once the manifest write
is complete.
Signed-off-by: William Douglas <william.douglas@intel.com>
If the modifiers of a file indicate it came from a chroot path, reset
the filename to use the chroot path when reading the file information
from a manifest.
Also ensure the only case files are marked as deleted is when it is
the SSE file. Other optimized files marked as deleted will be skipped
from being output in the manifest (and if the delete is new, the other
files with the same post processed path will be marked as new in the
version being built to ensure the deleted file is replaced).
Signed-off-by: William Douglas <william.douglas@intel.com>
The codebase uses sortFilesVersionName prior to writing out manifests
and that should be used in setupModifiers as well.
Signed-off-by: William Douglas <william.douglas@intel.com>
This change allows for a chroot with specific versioned content with
matching optimization levels to be added and accounted for. The paths
will be stripped of a version prefix (currently /V3 or /V4) and the
file's Modifier will be setup accordingly. The modifier will then be
updated to reflect the optimization level of the file and the total
optimization of any file with the same path.
With this change the previous Modifier setting has been revamped and
the old 'C', 'b' and 's' fields will be ignored. The 'b' posed a
slight problem that needed to be accounted for with how ghosted files
are detected and this has been done through looking only at the files
path.
Signed-off-by: William Douglas <william.douglas@intel.com>
Sometimes (like hex coded license files) there's value in not only ignoring digits
for detecting renames, but also ignoring a-f to deal with hex mismatches