375 Commits
Author SHA1 Message Date
Tudor Marcu 7bd8f98bf6 Release v4.1.2
This release adds an os-packages file to list all package/srpms in
the build, which can be useful for determining more information on
packages and their corresponding SRPM name.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
v4.1.2
2018-03-15 16:22:45 +00:00
Matthew Johnson d587622b9d Add os-packages file to list all package/srpms in build
This file is intended to be used by validation tooling to identify
orphaned packages and verify there are no file collisions in the build.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-14 15:01:45 -07:00
Tudor Marcu 03214045f0 Release v4.1.1
This release fixes the following bugs:
- Resolve /lib to /usr/lib instead of /usr/lib64
- Install DirectPackages to full chroot instead of AllPackages
	- DirectPackage is the fully resolved list for the bundle(s)
- Skip continued lines in dnf install output causing missing lines in parsing
- Clear cache before DNF install to full chroot causing dnf tracebacks

Smaller fixes such as adding trailing newline to mixbundles, parsing
versions numbers on init, normalizing bundle name output, and updating
all (currently possible) yum references to dnf were also added.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
v4.1.1
2018-03-13 18:35:30 +00:00
Kevin C. Wells ff98fe9c62 Add trailing newline to mixbundles
Previously mixer wrote the mix bundle list as a newline-separated list,
rather than as a newline-delimited list. This made things like "wc -l"
report one fewer than expected, as the final line contained no newline.

This trailing newline does not affect the existing parsing code.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-13 11:31:54 -07:00
Matthew Johnson 9ec58d9fc5 Clear cache before DNF install to full chroot
Keeping the cache around has resulted in interesting errors with invalid
bytes being read from the cache and resulting in DNF tracebacks. As a
fix for this tell DNF not to keepcache and manually clear the cache
before doing the full install. This seems to either be a bug with DNF
itself or maybe with the way Clear Linux is doing its packaging (though
this is just a guess).

The error seen is a UnicodeDecodeError from the DNF source code. It is
trying to decode a non-UTF-8 byte as UTF-8:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 238, in do_transaction
    super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 781, in do_transaction
    self._run_transaction(cb=cb)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 925, in _run_transaction
    self._verify_transaction(cb.verify_tsi_package)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 1018, in _verify_transaction
    self.history.sync_alldb(po)
  File "/usr/lib/python3.6/site-packages/dnf/yum/history.py", line 1399, in sync_alldb
    self._save_rpmdb(ipkg) and
  File "/usr/lib/python3.6/site-packages/dnf/yum/history.py", line 1360, in _save_rpmdb
    val = getattr(ipkg, attr, None)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-13 11:31:17 -07:00
Matthew Johnson 0c422c1391 Skip continued lines in dnf install output
DNF likes to set line-width to a default 80 characters when not running
in a TTY (this was confirmed in the source code) and perform a
complicated 'smart wrap' on the fields after any fields that overflow
their column. This results in wrapped lines that do not have the
information we are looking for. Fortunately these lines are prefixed by
more than one space (' ') character. Since package names are always at
the beginning of the line and only prefixed by one space character, if
there is more than one space we can skip the line when parsing.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-12 16:09:19 -07:00
Matthew Johnson 0df4d73195 Install DirectPackages to full chroot
Do not just install the AllPackages list to the full chroot, since this
is just the list of all included packages. The DirectPackages need to be
installed instead since this is the fully resolved list for each bundle.
AllPackages do not need to be installed because all bundles are being
installed to the same place.

Do a check on the length of the DirectPackages list before actually
trying to install them so we don't try to 'dnf install ' (no package
specified) for bundles that don't specify their own packages and only
include other bundles.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-12 16:09:19 -07:00
Kevin C. Wells f228559fe1 Parse version numbers on init
Recently, code was added to ReadVersions to parse the mixversion
and upstreamversion string values as uint32 values. This patch
adds the same logic to init (the only command that does not
result in a call to ReadVersions), so that the parsed versions
will be consistently available.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-12 13:01:31 -07:00
Matthew Johnson 66392a1e64 Convert chroot/yum references to bundles/dnf
Recent changes deprecated the use of individual bundle chroots when
building bundle contents and moved away from using yum to using dnf.
Because of this much of our variable and file names and comments were
inconsistent with the implementation.

This includes a change to make 'mixer build chroots' an alias to 'mixer
build bundles' and updates to the bat tests to call the new 'mixer build
bundles' command. This is not a breaking change since 'mixer build
chroots' behaves the way it always has (except internally with the
recent changes mentioned).

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-12 09:57:17 -07:00
Kevin C. Wells c59eb134a3 Normalize bundle name output
Previously, the names of bundles were output differently from one
command to another. Some would insert the bundle name as-is, some would
surround it with single quotes, and some would use double quotes.

This patch normalizes all output (that I could find in builder.conf) to
use the same output format: all now use the %q formatter, which renders
them with double quotes.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-12 09:21:44 -07:00
Matthew Johnson 1755ea28fd Resolve /lib to /usr/lib instead of /usr/lib64
Fix a typo that resolved /lib paths to /usr/lib64.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-09 16:27:52 -08:00
Kevin C. Wells 7408f4e75a Release v4.1.0
This release includes a significant change to the way chroots are built.
Rather than building individual chroots for each bundle, a single full
chroot is generated, and JSON metadata files are created for each bundle.
This allows us to scale much more easily on machines with limited disk
space. Because chroots are now decoupled from manifest creation, this
also makes it possible in the future to move to bundle builds on
distributed machines.

Additionally, a change was made to allow developers to add extra files
to a bundle in addition to those included by the bundle packages.

A change was included that fails when the manifest cannot be parsed.

Minor bug fixes are also included.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
v4.1.0
2018-03-09 19:57:58 +00:00
Matthew Johnson 783ef71e61 Do not shadow declared err variable
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-09 11:54:08 -08:00
Matthew Johnson e6526ff6ef Add support for adding extra files to a bundle
Allow a user to add extra files to a bundle by adding a file per line to
<imageDir>/<version>/<bundleName>-extra-files. Each file must be an
absolute path. At this point the user must manually create the file in
the full chroot as well.

The workflow for a user adding additional files to a bundle would be
this:

- mixer build chroots
- echo /path/to/bar >> update/image/my-bundle-extra-files
- mkdir -p update/image/full/path/to
- cp /local/path/to/bar update/image/full/path/to/bar
- mixer build update

This can definitely be improved in the future but this is a first step
that allows additional content on top of what dnf installs.

In the rare case that a post-install action for dnf install adds a file,
this file would already exist in the full chroot and would not need to
be copied in. The user would only need to append the path to that file
to the <bundle>-extra-files file to make sure it is included in that
bundle's manifests.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-09 11:54:08 -08:00
Matthew Johnson 6fa8754a30 Add format flag to update in validate-swupd.sh
This is necessary for actually performing the update against the correct
format. Without it the server version will be detected as -1.

While I'm here, fix the quoting for this line.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-09 11:36:27 -08:00
Matthew Johnson cced6a0180 Use filepath.Join for recordFromFile hash calculation
This caused an issue in testing where the passed file.Name did not
include a leading /. This was technically a testing bug but let's be
consistent about joining our paths anyways.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-09 11:36:27 -08:00
Matthew Johnson 9edb1d9d73 Overhaul tests to use new bundle creation method
This overhaul leaves several tests using the old method of using chroots
to generate the update to verify we aren't totally deprecating the old
method.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-09 11:36:27 -08:00
Matthew Johnson 341891f55f Build bundle information using dnf commands
Deprecate use of chroot-building for each individual bundle. This allows
us to scale much easier on machines with limited disk space. Because
chroots are decoupled from manifest creation this also makes it possible
in the future to move to doing bundle builds on distributed machines and
allows our bundle numbers to scale. The bundle file list is stored in a
JSON file that is read later by the manifest creation step.

This leaves a fallback in swupd/fullchroot.go to allow users to add
content to a chroot in order to extend a typical build.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-09 11:36:27 -08:00
Matthew Johnson c9ab1b5008 Fail when parsing invalid old manifests
Fail when the old manifest exists but is invalid and cannot be parsed.
This is a clear failure case because the old manifest does exist at that
path and therefore the user expects it to be used.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-08 16:39:51 -08:00
Matthew Johnson 94e7f8a474 Allow 'm' flag in rename flag position
The 'm' flag is used as a special flag by mixer-integration on the
client side to indicate a manifest record in the Manifest.MoM was
created by a local mix. Allow this flag and just set the rename flag to
renameUnset.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-08 16:39:51 -08:00
Tudor Marcu 604e33249c Fix erroneous test
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2018-03-09 00:36:10 +00:00
Tudor Marcu 2fc6761727 Updates for new mixer
Touch mixbundles so it does not get autopopulated by init, and use
os-core in the builder.conf so we do not have to include os-core-update.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2018-03-08 16:32:01 -08:00
Matthew Johnson 3b61e82eab bat: write to buildconf as privileged user
The builder.conf is created and owned by root, so it must be appended to
as root.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-08 16:25:53 -08:00
Kevin C. Wells f888e6d09d Release v4.0.3
This release fixes:

- Travis: add workaround to failing clrtrust
- build-deltas: Do not fail on missing previous versions
- Update 'mixer bundle add' to skip existing bundles

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
v4.0.3
2018-03-07 16:34:34 -08:00
Matthew Johnson b93a6efa02 Add newline to error printf
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-07 15:55:21 -08:00
Kevin C. Wells 864505b503 Update 'mixer bundle add' to skip existing bundles
Previously, repeated calls to 'mixer bundle add <bundle>' would yield
the same "Adding bundle <bundle> from <source>" output. Because the
Mix Bundle List is treated as a set, and duplicate bundles are removed,
these redundant additions do not change the resultant list, and are
effectively no-ops.

This patch:
a) Explictly skips the bundles if they already exist.
b) Reports this case to the user

As a result, functionality is equivalent, but the no-op behavior is
more explicit and output is more clear.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-07 11:42:37 -08:00
Matthew Johnson b75733a1e4 Travis: add workaround to failing clrtrust
In the current clearlinux:latest docker image clrtrust generate is
broken due to /var/lock not existing. To workaround this so our CI isn't
constantly failing mkdir -p this directory. This will not break future
fixes to clrtrust, but the maintainer will alert us when this workaround
can be removed.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-07 11:39:34 -08:00
Matthew Johnson cf7a3a03f6 build-deltas: Do not fail on missing previous versions.
A version can be missing if the minversion is newer than the previous
version being checked. This is not an error, but should be printed as a
warning to the user in case this is not expected.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-03-07 11:39:34 -08:00
Tudor Marcu 7a36abfa0e Release v4.0.2
This release changes basic bundle validation to support previously
non-passing bundles in upstream so mixes with previous versions are not
so strictly filtered. Hardlinking only happens if --keep-chroots is
passed to avoid race conditions and wasting time hardlinking when it
does not need to happen. Issues with bundle list were fixed, offline
mode was added for mixer to skip caching upstream bundle definitions, a
default value for local-bundle directory was added, and other updates to
variables to match the new naming schemes 4.0.* introduced.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
v4.0.2
2018-03-02 01:00:34 -08:00
Kevin C. Wells 009751357e Mixer bundle basic validation change
Previously, "basic" bundle validation included checking that the
bundle filename (currently used as the "bundle name") matched the
"Title" field in the bundle header (currently not used), and that
the "Title" field itself was valid. This was a step toward future
usage, where mixer will use the header "Title" itself.

This caused mixer to be incompatible with previous versions of CLR,
for which these filename-to-title missmatches were allowed and thus
present.

This patch moves this checking exclusively to "--strict" validation,
and removes bundle content validation from "basic" altogether. Basic
validation now only checks that the bundle filename is valid and that
the bundle contents syntax can be parsed.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-02 00:51:48 -08:00
Tudor Marcu 28f1a71e23 builder.go: Hardlink only with --keep-chroots
Due to using nosync, hardlinking could start before all of the individual
bundle chroots are actually removed. However, we do not need to hardlink if
--keep-chroots is not passed, because the full chroot implicitly will not
have any duplicate files. In this case, just delete the individual bundle
chroots and don't hardlink.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2018-03-01 17:46:23 -08:00
Kevin C. Wells 3b37f2b4da Fix Mix Bundle List file bug
Fixes a bug in the location for where the Mix Bundle List
(stored in the 'mixbundles' file) is read/write during 'mixer
bundle add' and 'mixer bundle remove' commands.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-01 10:39:51 -08:00
Kevin C. Wells 25d3b0bdf6 Add an "offline" mode for mixer
This patch adds a persistent "--offline" flag to the top-level mixer
command, which means every command can pass this flag to make mixer
work offline.

When mixer works offline, it skips caching upstream bundle definition
files. This has the implication that every bundle in the user's mix
must be available in local-bundles.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-01 10:39:00 -08:00
Kevin C. Wells df872a380b Fix mixer-completion lint check
Apparently linting was failing on the mixer-completion/
cmd/completion.go file on the master branch? This fixes it.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-01 10:34:53 -08:00
Kevin C. Wells b392839537 Add a default value for LOCAL_BUNDLE_DIR
LOCAL_BUNDLE_DIR is a new builder.conf field introduced in mixer 4.0.
It is included in the auto-generated conf from mixer init, and it is
referenced in the updated documentation.

Previously, however, it was marked as a "required" flag in the
ReadBuilderConf function. This meant that existing users, who did not
already have this value, were given an error message saying it was
missing, but no useful information about how to fix this.

This patch provides default fall-back value of the user's PWD +
"/local-bundles" if the field is missing. If this happens, a warning
message is output, informing the user to update their conf.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-03-01 10:34:53 -08:00
Tudor Marcu d30d3949ab mixer: update RPMDIR and REPODIR variables
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2018-02-28 15:07:13 -08:00
Tudor Marcu 516c24d10c Release v4.0.1
This release fixes the mixer-completion to install to a given optional prefix
so it can be built in different environments.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
v4.0.1
2018-02-26 20:50:27 +00:00
Kevin C. Wells 10c6c9c578 Add completion file path override
Adds a '--path' override, allowing you to specify the full path
to where the destination file will be written.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-02-26 12:38:32 -08:00
Tudor Marcu ca27a1c2a1 Release v4.0.0
This release introduces a major version update with several new features
and package additions.

The original C swupd-server https://github.com/clearlinux/swupd-server and
bundle-chroot-builder https://github.com/clearlinux/bundle-chroot-builder
are now integrated into mixer itself under the swupd/ and builder/ packages,
and used as libraries instead of standalone binaries. The rewrite closely ties
the swupd-server and chroot-builder functionality directly into mixer, while
providing the benefits of the Go language. The new functionality lives side
by side with the original implementation for the time being, until further
testing is completed to guarantee consistent, stable behaviour. However,
the new features may (and should) be used by providing --new-swupd and
--new-chroots with the appropriate mixer subcommands. They will become the
default as the old standalone build programs are deprecated.

The second major update is a new CLI written using the Cobra framework.
Existing commands are only subtly different:
old			new
----			----
mixer build-chroots	mixer build chroots
mixer build-update	mixer build update
mixer init-mix		mixer init

-flags			--flags

In short, the command hierarchy is changed such that things like 'build'
are top level commands, and the things they build are exposed under them,
rather than making many hyphenated commands. Flags are implemented as
regular short and long options, where long options use two hyphens
instead of one.
New commands have been added to make bundle lifecycle management easier,
and to ensure bundles are manipulated correctly without manually copying
things in specific folders. See all new commands by typing "mixer" *enter*.

Miscellaneous fixes to things such as init creating the builder.conf and
doing more upfront work for the user have also been implemented. The
goal of these updates is to streamline the operation of mixer and
improve usability.

Many tests were added for the code base; unit tests for the new
swupd and chroot libraries, BAT tests to cover the interface and
functionality of the Mixer itself, and extensive linting were added to
catch regressions and enforce cleaner code.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
v4.0.0
2018-02-26 18:23:12 +00:00
Matthew Johnson f1db2c5836 Add --min-version to swupd validation script
The min version of these validation builds should be the FROM version to
mirror actual build process.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-02-22 14:56:54 -08:00
Matthew Johnson 36328f4f8a Add a timer to delta pack creation
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-02-22 14:56:43 -08:00
Kevin C. Wells 531455578b Add mixer bash and zsh completion
This patch introduces a new 'mixer-completion' executable that generates bash
and zsh completion files for mixer. The executable is built via 'make', but not
installed via 'make install'. Instead, 'make install' runs the executable,
which writes the bash and zsh completion files to /etc/bash_completion.d/ and
/usr/share/zsh/site-functions/, respectively.

This patch uses Cobra's built-in bash/zsh completion generation functionality.
Some Cobra applications choose to have this completion-file generation as a
permanent command off the root command (e.g., 'kubectl completion bash'). This
patch makes this a stand-alone executable to avoid cluttering the main 'mixer'
tool with this functionality. Many Cobra applications also leave creating/
installing these completion files up to the user as a manual, secondary step.
This patch completes these tasks at mixer install time.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-02-21 16:00:00 -08:00
Kevin C. Wells 1e980e0174 Add 'mixer bundle validate' command
New command checks bundle definition files for validity. Only local bundle files are
checked; upstream bundles are trusted as valid. Valid bundles yield no output.
Any invalid bundles will yield a non-zero return code.

Basic validation includes checking syntax and structure, that the bundle has
a valid name, and that the header 'Title' matches the bundle filename. Commands
like 'mixer bundle edit' run basic validation automatically.

An optional '--strict' flag allows you to additionally check that the other
bundle header flags are parsable and non-empty.

Passing '--all-local' will run validation on all bundles in local-bundles.

This patch also adds tests to check that bundle header parsing is working
and that different types of validation errors are indeed being caught.

Basic validation is added throughout the various 'mixer bundle' commands.

Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
2018-02-21 15:59:04 -08:00
Matthew Johnson 9cee9848c2 validate-swupd.sh: decrease number of workers
Make the worker defaults lower for more sane systems with a comment
instructing users to increase these numbers on beefier systems.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-02-21 15:58:53 -08:00
Matthew Johnson 0eb5b9bc05 Add script used to validate new swupd code
This script creates builds from $1 to $2 if they exist upstream and
performs an os-install, bundle-add, bundle-remove, verify, and update on
each.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-02-21 15:58:53 -08:00
Matthew Johnson 3b6b5f30c2 swupd: Do not track ContentSize for subtracted files
When files are subtracted from the manifest also subtract the size of
the file from manifest.Header.ContentSize. This makes the ContentSize
field only reflect the size of the files listed in the current manifest
and not subtracted files. One can then calculate the complete installed
size of that bundle by adding the ContentSize of all the includes
because there will be no overlap from subtracted files.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-02-21 14:17:29 -08:00
Caio Marcelo de Oliveira Filho 0ee338938e mixer: add 'versions' and 'versions update' command
Replace the workflow of manually updating the two files to get a new
version. The 'mixer versions' prints the relevant versions and 'mixer
versions update' provides a way to update those versions.

When updating the command does check the upstream format and do not
cross format bumps. So it helps preventing people generating wrong
content. The commands will provide a point to do more checks in the
future, like if there is a problem with the local bundles after an
update.

Also make the download function previously used to get latest file
reusable for other purposes, and returning error for non-OK status
codes.

To keep commands consistent both 'versions update' and 'init' will
accept --clear-version or --upstream-version (they are equivalent).

Updates #145.
Updates #59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-02-21 11:53:56 -08:00
Caio Marcelo de Oliveira Filho 8d52b70f82 builder: parse mix and upstream versions upfront
Fail early if we can't parse those at ReadVersions time. Also remove
code in the individual functions that were doing these.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-02-21 11:53:56 -08:00
Matthew Johnson 814da8b2cf Keep yum cache around when building mixes
This helps when doing more than one mix back-to-back or when packages
are installed in more than one bundle.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-02-20 15:46:23 -08:00
Matthew Johnson 5602ac1270 Perform Lstat instead of Stat on rename files
We want information about the link, not the linked file, when doing a
stat on files in the update. The File.Info field holds FileInfo about
the file, not the linked file.

Doing a 'Stat' instead of an 'Lstat' caused an issue where a link was
changed in an update but the target file was not found in the full
chroot due to the link expecting the target to be in / (outside the full
chroot). If the target does not exist on the build system the 'Stat'
will cause a panic because the target file can not be found.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-02-18 19:24:28 -08:00