pkg-auto: Allow emerging multiple packages for reports

This commit is contained in:
Krzesimir Nowak 2025-01-15 17:22:45 +01:00
parent 310a8716f4
commit 9fe7006812

View File

@ -11,11 +11,10 @@ source "$(dirname "${BASH_SOURCE[0]}")/util.sh"
# Params: # Params:
# #
# 1 - root filesystem with the portage config # 1 - root filesystem with the portage config
# 2 - metapackage to get the deps from # @ - packages and metapackages to get the deps from
function emerge_pretend() { function emerge_pretend() {
local root package local root
root=${1}; shift root=${1}; shift
package=${1}; shift
# Probably a bunch of those flags are not necessary, but I'm not # Probably a bunch of those flags are not necessary, but I'm not
# touching it - they seem to be working. :) # touching it - they seem to be working. :)
@ -50,7 +49,7 @@ function emerge_pretend() {
) )
local rv local rv
rv=0 rv=0
emerge "${emerge_opts[@]}" "${package}" || rv=${?} emerge "${emerge_opts[@]}" "${@}" || rv=${?}
if [[ ${rv} -ne 0 ]]; then if [[ ${rv} -ne 0 ]]; then
echo "WARNING: emerge exited with status ${rv}" >&2 echo "WARNING: emerge exited with status ${rv}" >&2
fi fi