For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
|
|
|
# list_set_files setname
|
|
|
|
#
|
|
|
|
# Produce a packing list for setname. Each record is a line
|
|
|
|
# consisting of a path and a System Package name, separated by
|
|
|
|
# whitespace. E.g.,
|
|
|
|
#
|
|
|
|
# ./bin/cp base-util-root
|
|
|
|
#
|
|
|
|
# Environment
|
|
|
|
#
|
2003-10-30 02:04:27 +03:00
|
|
|
# lintlibs
|
|
|
|
# lkm
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# machine
|
|
|
|
# machine_arch
|
|
|
|
# machine_cpu
|
2003-10-30 02:04:27 +03:00
|
|
|
# setd
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# shlib
|
|
|
|
# stlib
|
|
|
|
# toolchain_missing
|
2003-08-04 09:53:20 +04:00
|
|
|
# use_tools_toolchain
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
|
|
|
list_set_files () {
|
|
|
|
for setname; do
|
|
|
|
list_set_lists $setname
|
|
|
|
done | xargs cat | grep -v '^#'
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# list_set_lists setname
|
|
|
|
#
|
|
|
|
# Print to stdout a list of files, one filename per line, which
|
|
|
|
# concatenate to create the packing list for setname. E.g.,
|
|
|
|
#
|
|
|
|
# .../lists/base/mi
|
|
|
|
# .../lists/base/rescue.mi
|
|
|
|
# .../lists/base/md.i386
|
|
|
|
# .
|
|
|
|
# .
|
|
|
|
# .
|
|
|
|
#
|
|
|
|
# In each file, a record consists of a path and a System Package name,
|
|
|
|
# separated by whitespace. E.g.,
|
|
|
|
#
|
2003-10-30 02:05:55 +03:00
|
|
|
# # $NetBSD: sets.subr,v 1.4 2003/10/29 23:05:55 dyoung Exp $
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# . base-sys-root
|
|
|
|
# ./altroot base-sys-root
|
|
|
|
# ./bin base-sys-root
|
|
|
|
# ./bin/[ base-util-root
|
|
|
|
# ./bin/cat base-util-root
|
|
|
|
# .
|
|
|
|
# .
|
|
|
|
# .
|
|
|
|
#
|
|
|
|
# A # in the first column marks a comment.
|
|
|
|
#
|
|
|
|
# Environment
|
|
|
|
#
|
2003-10-30 02:05:55 +03:00
|
|
|
# lintlibs
|
|
|
|
# lkm
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# machine
|
|
|
|
# machine_arch
|
|
|
|
# machine_cpu
|
2003-10-30 02:05:55 +03:00
|
|
|
# setd
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
# shlib
|
|
|
|
# stlib
|
|
|
|
# toolchain_missing
|
2003-08-04 09:53:20 +04:00
|
|
|
# use_tools_toolchain
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
#
|
|
|
|
list_set_lists () {
|
|
|
|
setname=$1
|
|
|
|
|
|
|
|
echo $setd/lists/$setname/mi
|
|
|
|
if [ "$machine" != "$machine_arch" ]; then
|
|
|
|
# Prefer an ad.${machine_arch} over an ad.${machine_cpu},
|
|
|
|
# since the arch-specific one will be more specific than
|
|
|
|
# the cpu-specific one.
|
|
|
|
if [ -f $setd/lists/$setname/ad.${machine_arch} ]; then
|
|
|
|
echo $setd/lists/$setname/ad.${machine_arch}
|
|
|
|
elif [ -f $setd/lists/$setname/ad.${machine_cpu} ]; then
|
|
|
|
echo $setd/lists/$setname/ad.${machine_cpu}
|
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" -a \
|
|
|
|
-f $setd/lists/$setname/ad.${machine_cpu}.shl ]; then
|
|
|
|
echo $setd/lists/$setname/ad.${machine_cpu}.shl
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/md.${machine}.${machine_arch} ]; then
|
|
|
|
echo $setd/lists/$setname/md.${machine}.${machine_arch}
|
|
|
|
elif [ -f $setd/lists/$setname/md.${machine} ]; then
|
|
|
|
echo $setd/lists/$setname/md.${machine}
|
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/stl.mi ]; then
|
|
|
|
echo $setd/lists/$setname/stl.mi
|
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/stl.${stlib} ]; then
|
|
|
|
echo $setd/lists/$setname/stl.${stlib}
|
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" ]; then
|
|
|
|
if [ -f $setd/lists/$setname/shl.mi ]; then
|
|
|
|
echo $setd/lists/$setname/shl.mi
|
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/shl.${shlib} ]; then
|
|
|
|
echo $setd/lists/$setname/shl.${shlib}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$lkm" != "no" ]; then
|
|
|
|
if [ -f $setd/lists/$setname/lkm.mi ]; then
|
|
|
|
echo $setd/lists/$setname/lkm.mi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$lintlibs" != no ]; then
|
|
|
|
if [ -f $setd/lists/$setname/lint.mi ]; then
|
|
|
|
echo $setd/lists/$setname/lint.mi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$toolchain_missing" != "yes" ]; then
|
2003-08-04 09:53:20 +04:00
|
|
|
if [ "$use_tools_toolchain" != "yes" ]; then
|
|
|
|
if [ -f $setd/lists/$setname/gcc.mi ]; then
|
|
|
|
echo $setd/lists/$setname/gcc.mi
|
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" ]; then
|
|
|
|
if [ -f $setd/lists/$setname/gcc.shl ]; then
|
|
|
|
echo $setd/lists/$setname/gcc.shl
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -f $setd/lists/$setname/tc.mi ]; then
|
|
|
|
echo $setd/lists/$setname/tc.mi
|
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" ]; then
|
|
|
|
if [ -f $setd/lists/$setname/tc.shl ]; then
|
|
|
|
echo $setd/lists/$setname/tc.shl
|
|
|
|
fi
|
For System Packages, two new utilities, a subroutine library, and
a new list:
sets.subr -- The set-listing code that is common to makeplist,
makeflist, and regpkg has moved here.
syspkgdeps -- Compute naive dependencies for system packages based
on directory containment. I.e., if package A contains
path /p/q, and package B contains path /p, then B is
considered a dependency of A. As Jim Wise remarks,
this is not quite right: system-package dependencies
should indicate a functional dependency. Nevertheless,
these naive dependencies protect us from orphaning
files when pkg_delete'ing system packages.
culldeps -- Helper for syspkgdeps. Removes redundant dependencies
from a dependencies table. Essentially does the opposite
of a transitive closure on a dependencies table: if
the table contains A depends-on B, B depends-on C, and
A depends-on C, then A depends-on C is removed because
it can be derived from the prior two dependencies.
deps -- Dependencies computed by syspkgdeps.
2003-06-23 13:02:31 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $setd/lists/$setname/rescue.mi ]; then
|
|
|
|
echo $setd/lists/$setname/rescue.mi
|
|
|
|
fi
|
|
|
|
if [ -f $setd/lists/$setname/rescue.${machine} ]; then
|
|
|
|
echo $setd/lists/$setname/rescue.${machine}
|
|
|
|
fi
|
|
|
|
if [ "$machine" != "$machine_arch" ]; then
|
|
|
|
# Prefer a rescue.ad.${machine_arch} over a
|
|
|
|
# rescue.ad.${machine_cpu}, since the arch-
|
|
|
|
# specific one will be more specific than the
|
|
|
|
# cpu-specific one.
|
|
|
|
if [ -f $setd/lists/$setname/rescue.ad.${machine_arch} ]; then
|
|
|
|
echo $setd/lists/$setname/rescue.ad.${machine_arch}
|
|
|
|
elif [ -f $setd/lists/$setname/rescue.ad.${machine_cpu} ]; then
|
|
|
|
echo $setd/lists/$setname/rescue.ad.${machine_cpu}
|
|
|
|
fi
|
|
|
|
if [ "$shlib" != "no" -a -f \
|
|
|
|
$setd/lists/$setname/rescue.ad.${machine_cpu}.shl ]; then
|
|
|
|
echo $setd/lists/$setname/rescue.ad.${machine_cpu}.shl
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|