pkg.sh: Fix chown and chmod lines in generated postinst #157

Merged
Jan Lindemann merged 1 commit from jan/fix/20261027-pkg-sh-fix-chown-and-chmod-lines-in-generated-postinst into master 2026-10-27 07:12:52 +01:00 AGit

View file

@ -1088,7 +1088,11 @@ cmd_milk_install_log()
file=`echo /$file | sed 's/inst-root\///; s%^//*%/%'`
#echo file is now \"$file\" >&2
#echo grep \"$prefix/*$file$\" $in >&2
line=`grep $file$ $in`
# match the end of the log line against
# the file path literally; the line may
# carry a prefix before the path, and a
# regex grep lets dots match other lines
line=`awk -v f="$file" '{ if (substr($0, length($0) - length(f) + 1) == f) print }' $in | head -n 1`
perm=`milk_install_log_spec_attr 1 "$line"`
owner=`milk_install_log_spec_attr 2 "$line"`
group=`milk_install_log_spec_attr 3 "$line"`