Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supress 'apk info' noise when testing docs #44369

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pipelines/test/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ pipeline:
# Get our doc package name, which is usually a sub package
doc_pkg=$(basename ${{targets.contextdir}})
# We seem to have a lot of "empty" doc packages...
if [ $(apk info -L "$doc_pkg" | wc -l) -le 3 ]; then
if [ $(apk info -qL "$doc_pkg" | wc -l) -le 3 ]; then
echo "See:"
apk info -L "$doc_pkg"
apk info -qL "$doc_pkg"
echo "This package [$doc_pkg] is completely empty (i.e. installs no files)."
echo "Please check the package build for proper docs installation, and either:"
echo " (a) fix the docs subpackage build to actually include documentation (check the split/manpages and split/infodir pipelines), or"
Expand All @@ -27,7 +27,7 @@ pipeline:
cd /
doc_files=false
# Test man pages
for doc_file in $(apk info -L "$doc_pkg" | grep "^usr/share/man/"); do
for doc_file in $(apk info -qL "$doc_pkg" | grep "^usr/share/man/"); do
if [ -f /"$doc_file" ]; then
# Ensure that man can read and render
# NOTE: man will dutifully, print any text file, not just troff manpages (e.g. html or plain text too)
Expand All @@ -37,14 +37,14 @@ pipeline:
fi
done
# Test info pages
for doc_file in $(apk info -L "$doc_pkg" | grep "^usr/share/info/"); do
for doc_file in $(apk info -qL "$doc_pkg" | grep "^usr/share/info/"); do
if [ -f /"$doc_file" ]; then
# Ensure that info can read at least one file that looks like an info page
[ $(info -f /"$doc_file" -o - | wc -l) -gt 0 ] && doc_files=true
fi
done
# Test any other text files
for doc_file in $(apk info -L "$doc_pkg" | grep "^usr/share/"); do
for doc_file in $(apk info -qL "$doc_pkg" | grep "^usr/share/"); do
if [ -f /"$doc_file" ]; then
# Check that we have readable files installed in /usr/share
# There are too many types to test explicitly (text, html, pdf, images, etc.)
Expand All @@ -54,7 +54,7 @@ pipeline:
done
if [ $doc_files = "false" ]; then
echo "See:"
apk info -L "$doc_pkg"
apk info -qL "$doc_pkg"
echo "This package [$doc_pkg] installs files, but no usable documentation"
echo "Please check the package build for proper docs installation, and either:"
echo " (a) fix the docs subpackage build to actually include docs (check the split/manpages and split/infodir pipelines), or"
Expand Down
2 changes: 1 addition & 1 deletion pipelines/test/pkgconf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipeline:
# Find all pc files installed by this dev_pkg
cd /
pc_files=false
for pc_file in $(apk info -L "$dev_pkg" 2>/dev/null | grep "\.pc$"); do
for pc_file in $(apk info -qL "$dev_pkg" | grep "\.pc$"); do
pc_files=true
# Ensure this is a pkgconf .pc file
if grep -q "^Name:" $pc_file; then
Expand Down
Loading