mkosi: Handle directories in debian/not-installed correctly (#35832)
If a directory is specified without a glob pattern, we have to exclude all files in that directory, so add a recursive glob to every directory and enable the bash globstar feature when globbing to '**/*' matches all files and directories beneath the given directory.
This commit is contained in:
@@ -111,8 +111,9 @@ if ! build; then
|
||||
if [[ -f debian/not-installed ]]; then
|
||||
pushd debian/tmp
|
||||
grep --invert-match "^#" ../not-installed |
|
||||
xargs -I {} bash -O nullglob -c "printf '%s\n' {}" |
|
||||
sed "/^$/d" |
|
||||
xargs -I {} sh -c "test -d '{}' && echo '{}/**/*' || echo '{}'" |
|
||||
xargs -I {} bash -O nullglob -O globstar -c "printf '%s\n' {}" |
|
||||
sed --expression "/^$/d" --expression "s#//*#/#g" |
|
||||
xargs -I {} sh -c "test -f '{}' && echo '{}' || true" >>/tmp/packaged-files
|
||||
popd
|
||||
fi
|
||||
@@ -127,6 +128,8 @@ if ! build; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "::warning title=UNPACKAGED-FILES::The following files were not picked up by the package, please update the packaging recipe to include: $(tr '\n' ' ' </tmp/unpackaged-files)"
|
||||
|
||||
# Otherwise, we append the unpackaged files to the filelist for the systemd package and retry the build.
|
||||
cat /tmp/unpackaged-files >>debian/systemd.install
|
||||
build
|
||||
|
||||
Reference in New Issue
Block a user