rpm-ostree/tests/ex-container-tests/test-bash.sh
Colin Walters 1240d8df2d unpacker,core: Honor nodocs flag
More work for unified core; this was one of the biggest parts of the `ostree
diff` when comparing a unified core treecompose of Fedora Atomic Host versus
the libdnf path.

This is also the first case where we're teaching the pkgcache to redownload
based on state.

Closes: #1105
Approved by: jlebon
2017-11-16 15:13:37 +00:00

33 lines
734 B
Bash
Executable File

#!/usr/bin/bash
set -xeuo pipefail
cd ${test_tmpdir}
dn=$(cd $(dirname $0) && pwd)
. ${dn}/../common/libtest-core.sh
cat >bash.conf <<EOF
[tree]
ref=bash
packages=coreutils;bash;
repos=fedora;
EOF
rpm-ostree ex container assemble bash.conf
ostree --repo=repo fsck -q
ostree --repo=repo ls bash /usr/etc/shadow > shadowls.txt
assert_file_has_content shadowls.txt '^-00400 .*/usr/etc/shadow'
ostree --repo=repo ls bash /usr/share/doc/bash/README >/dev/null
cat >bash-nodocs.conf <<EOF
[tree]
ref=bash-nodocs
packages=coreutils;bash;
repos=fedora;
documentation=false;
EOF
rpm-ostree ex container assemble bash-nodocs.conf
ostree --repo=repo ls bash-nodocs /usr/share/doc/bash >docs.txt
assert_not_file_has_content docs.txt README