If the same file exists in multiple locations, take the version from the

first.

The LIVE_BUILD location will only be added if LIVE_BUILD is set.
This commit is contained in:
Roland Clobus 2023-01-08 17:27:35 +01:00 committed by Luca Boccassi
parent 8dd3579278
commit 7e7544c446
2 changed files with 17 additions and 7 deletions

View File

@ -130,10 +130,15 @@ case "${LB_DEBIAN_INSTALLER}" in
;; ;;
esac esac
#FIXME review the netboot case # If the same file exists in multiple locations, take the version from the first
for LOCATION in /usr/share/live/build/data/debian-cd "${LIVE_BUILD}/data/debian-cd" LOCATIONS="/usr/share/live/build/data/debian-cd"
if [ -n "${LIVE_BUILD}" ]
then
LOCATIONS="${LIVE_BUILD}/data/debian-cd ${LOCATIONS}"
fi
for LOCATION in ${LOCATIONS}
do do
if [ -e "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}" ] if [ -e "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}" ] && [ ! -e binary/.disk/udeb_include ]
then then
case "${LB_DEBIAN_INSTALLER}" in case "${LB_DEBIAN_INSTALLER}" in
cdrom) cdrom)
@ -146,6 +151,7 @@ do
cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_businesscard_udeb_include" binary/.disk/udeb_include cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_businesscard_udeb_include" binary/.disk/udeb_include
;; ;;
none|netboot) none|netboot)
#FIXME review the netboot case
;; ;;
esac esac
fi fi

View File

@ -685,15 +685,19 @@ EOF
Echo_debug "Generating exclude list" Echo_debug "Generating exclude list"
# Excluding udebs # Excluding udebs
for LOCATION in /usr/share/live/build/data/debian-cd "${LIVE_BUILD}/data/debian-cd" # If the same file exists in multiple locations, take the version from the first
LOCATIONS="/usr/share/live/build/data/debian-cd"
if [ -n "${LIVE_BUILD}" ]
then
LOCATIONS="${LIVE_BUILD}/data/debian-cd ${LOCATIONS}"
fi
for LOCATION in ${LOCATIONS}
do do
if [ -e "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}" ] if [ -e "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}" ] && [ ! -e exclude ]
then then
grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/udeb_exclude" > exclude || true grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/udeb_exclude" > exclude || true
grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs" >> exclude || true grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs" >> exclude || true
grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs-${LB_ARCHITECTURE}" >> exclude || true grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs-${LB_ARCHITECTURE}" >> exclude || true
continue
fi fi
done done