diff options
author | Raphaël Hertzog <raphael@offensive-security.com> | 2021-01-12 14:48:27 +0100 |
---|---|---|
committer | Raphaël Hertzog <raphael@offensive-security.com> | 2021-01-12 14:48:27 +0100 |
commit | f13273368a16df271e4317d413d9da564f541dea (patch) | |
tree | 95b543ad753f5aaffe17d2b15a470273771e56f1 | |
parent | 831da55c0114c4dbb4f81b33c0b03addeacece4b (diff) | |
download | vyos-live-build-f13273368a16df271e4317d413d9da564f541dea.tar.gz vyos-live-build-f13273368a16df271e4317d413d9da564f541dea.zip |
Don't fail if one of the package lists expands to an empty list
When a package lists contains only packages protected by a test
that doesn't match for the current run, then Expand_package_list
outputs nothing and the following "grep -v" fails because it
has not filtered anything. Avoid this by protecting the "grep -v"
call with "|| true".
-rwxr-xr-x | scripts/build/chroot_package-lists | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists index 8f6a3fe56..19964bf4d 100755 --- a/scripts/build/chroot_package-lists +++ b/scripts/build/chroot_package-lists @@ -71,7 +71,7 @@ do then # Generating package list Expand_packagelist "$(basename ${LIST})" "config/package-lists" \ - | grep -v '^#' >> chroot/root/packages.chroot + | grep -v '^#' >> chroot/root/packages.chroot || true fi done |