]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - debian/scripts/module-inclusion
4 # Build a new directory of modules based on an inclusion list.
5 # The includsion list format must be a bash regular expression.
7 # usage: $0 ROOT INCLUSION_LIST
9 # debian/build/build-virtual-ALL debian/build/build-virtual \
10 # debian.master/control.d/virtual.inclusion-list \
13 if [ "$1" = "--master" ]; then
23 tmp
="/tmp/module-inclusion.$$"
26 # Prep a destination directory.
31 # Copy over the framework into the master package.
32 if [ "$master" -eq 1 ]; then
33 (cd ${ROOT}; find .
! -name "*.ko" -type f
)
36 # Copy over modules by name or pattern.
40 # 'find' blurts a warning if it cannot find any ko files.
44 (cd ${ROOT}; ${i#!} || true
)
47 (cd ${ROOT}; eval find "${i}" -name "*.ko" || true
)
56 # Copy over the listed modules.
59 # If this is already moved over, all is good.
60 if [ -f "${NROOT}/$i" ]; then
63 # If present in the source, moved it over.
64 elif [ -f "${ROOT}/$i" ]; then
65 mkdir
-p "${NROOT}/`dirname $i`"
66 mv "${ROOT}/$i" "${NROOT}/$i"
68 # Otherwise, it is missing.
70 echo "Warning: Could not find ${ROOT}/$i" 1>&2
74 # Copy over any dependancies, note if those are missing
75 # we know they are in a pre-requisite package as they must
76 # have existed at depmap generation time, and can only have
77 # moved into a package.
82 [ "$n" = "20" ] && break || true
84 echo "NOTE: pass $n: dependency scan" 1>&2
88 grep "^$i " "$DEPMAP" | \
91 if [ -f "${ROOT}/$d" ]; then
92 echo "NOTE: pass $n: ${i} pulls in ${d}" 1>&2
94 mkdir
-p "${NROOT}/`dirname $d`"
95 mv "${ROOT}/$d" "${NROOT}/$d"
98 done <"$tmp" >"$tmp.new"
99 mv -f "$tmp.new" "$tmp"