]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
makeroot.sh: allow duplicate entries even with -f <filelist>
authoremaste <emaste@FreeBSD.org>
Wed, 30 May 2018 13:51:00 +0000 (13:51 +0000)
committeremaste <emaste@FreeBSD.org>
Wed, 30 May 2018 13:51:00 +0000 (13:51 +0000)
commit85e5468fdc43e8ad1622f1a6eb8abc32781f3b28
tree7668ae0ea7286a893f4a28a52f9324370244e31f
parentc2e419ed9640dc15e205a9fd32a0a4bb204be281
makeroot.sh: allow duplicate entries even with -f <filelist>

makefs disallows duplicate entries unless the -D option is specified.

Previously makeroot.sh enabled -D unless a filelist was provided via
the -f options.  The filelist logic creates an mtree manifest from the
METALOG and the provided filelist by passing them through `sort -u`,
so duplicates were not expected.  However, duplicates can still occur
when a directory appears in multiple packages -- for example,

./etc/pam.d type=dir uname=root gname=wheel mode=0755
./etc/pam.d type=dir mode=0755 tags=package=runtime
./etc/pam.d type=dir mode=0755 tags=package=at
./etc/pam.d type=dir mode=0755 tags=package=ftp
./etc/pam.d type=dir mode=0755 tags=package=telnet

For the purposes of makefs these directory entries are identical, but
are of course not identical for sort -u.

For now just leave the allow duplicates -D flag enabled.

PR: 228606
Sponsored by: The FreeBSD Foundation
tools/tools/makeroot/makeroot.sh