pkg.sh log-install: Log %attr(0777, ...) for links

Not logging any attribute for links, as it's now, breaks Debian's
parser. So, log %attr(0777, $owner, $mode). This fixes the parser on
the Debian side and hopefully leaves the RPM side intact.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-15 15:55:25 +00:00
commit dc94553732

View file

@ -871,8 +871,9 @@ cmd_log_install()
if [ "$c_mode_dir" = true ]; then
for file in $*; do
[ "$c_no_log_dirs" = 0 ] || continue
attr=" %attr($c_mode,$c_owner,$c_group)"
[ -L "$file" ] && attr=""
mode=$c_mode
[ -L "$file" ] && mode="0777"
attr=" %attr($mode,$c_owner,$c_group)"
echo "%dir$attr $file" >> $c_logfile
done
else
@ -892,8 +893,8 @@ cmd_log_install()
mode=0644
fi
fi
[ -L "$c_target" ] && mode="0777"
attr="%attr($mode,$c_owner,$c_group)"
[ -L "$c_target" ] && attr=""
if [ -z "$dir" -o "$c_no_log_dirs" != 0 ]; then
echo "$dir$attr $cfgfile$c_target" | sed "s/^$c_ignore_prefix//" >> $c_logfile
fi
@ -915,8 +916,8 @@ cmd_log_install()
mode=0644
fi
fi
[ -L "$file" ] && mode="0777"
attr="%attr($mode,$c_owner,$c_group)"
[ -L "$file" ] && attr=""
echo "$dir$attr $cfgfile$installed_file" |
sed "s/^$c_ignore_prefix//" >> $c_logfile
done