Tweak handling of {udeb,base}_{include,exclude} files so multi-arch

builds should work better. Closes: #703436
This commit is contained in:
Steve McIntyre 2013-04-19 16:07:58 +00:00
parent 497a82d798
commit b24595ba88
2 changed files with 35 additions and 31 deletions

4
debian/changelog vendored
View File

@ -8,6 +8,10 @@ debian-cd (3.1.13) UNRELEASED; urgency=low
* Allow for override of distro name etc. in grub.cfg for EFI boot too.
Closes: #705610
[ Steve McIntyre ]
* Tweak handling of {udeb,base}_{include,exclude} files so multi-arch
builds should work better. Closes: #703436
-- Raphaël Hertzog <hertzog@debian.org> Fri, 12 Apr 2013 10:32:56 +0200
debian-cd (3.1.12) unstable; urgency=low

View File

@ -77,6 +77,27 @@ else
export VOLID="$VOLID_BASE M-A $DISKNUM"
fi
merge_include_exclude () {
OUT="$1"
TYPE="$2"
LIST="$3"
WRITE=0 # Don't create empty files
# Check to see if any file specified actually exist
for FILE in $LIST ; do
if [ -r "$FILE" ] ; then
WRITE=1
else
echo "WARNING: Unable to read $TYPE file $FILE"
fi
done
# If we have any files, merge and write them out
if [ "$WRITE" = 1 ] ; then
sort -u $LIST > "$OUT"
fi
}
mkdir -p $CDDIR
echo " Adding the required directories"
@ -198,40 +219,19 @@ if [ $DISKNUM = 1 ] ; then
esac
fi
# Sort out the udeb include and exclude files
if [ -n "$UDEB_INCLUDE" ] ; then
if [ -r "$UDEB_INCLUDE" ] ; then
cat "$UDEB_INCLUDE" >> "$CDDIR/.disk/udeb_include"
else
echo "WARNING: Unable to read UDEB_INCLUDE file $UDEB_INCLUDE"
fi
fi
if [ -n "$UDEB_EXCLUDE" ] ; then
if [ -r "$UDEB_EXCLUDE" ] ; then
cat "$UDEB_EXCLUDE" >> "$CDDIR/.disk/udeb_exclude"
else
echo "WARNING: Unable to read UDEB_EXCLUDE file $UDEB_EXCLUDE"
fi
fi
# Ditto the base include and exclude
if [ -n "$BASE_INCLUDE" ] ; then
if [ -r "$BASE_INCLUDE" ] ; then
cat "$BASE_INCLUDE" >> "$CDDIR/.disk/base_include"
else
echo "WARNING: Unable to read BASE_INCLUDE file $BASE_INCLUDE"
fi
fi
if [ -n "$BASE_EXCLUDE" ] ; then
if [ -r "$BASE_EXCLUDE" ] ; then
cat "$BASE_EXCLUDE" >> "$CDDIR/.disk/base_exclude"
else
echo "WARNING: Unable to read BASE_EXCLUDE file $BASE_EXCLUDE"
fi
fi
UDEB_INCLUDES="$UDEB_INCLUDES $UDEB_INCLUDE"
UDEB_EXCLUDES="$UDEB_EXCLUDES $UDEB_EXCLUDE"
BASE_INCLUDES="$BASE_INCLUDES $BASE_INCLUDE"
BASE_EXCLUDES="$BASE_EXCLUDES $BASE_EXCLUDE"
fi
done
# Sort and merge the the include and exclude files as necessary
merge_include_exclude "$CDDIR/.disk/udeb_include" UDEB_INCLUDE "$UDEB_INCLUDES"
merge_include_exclude "$CDDIR/.disk/udeb_exclude" UDEB_EXCLUDE "$UDEB_EXCLUDES"
merge_include_exclude "$CDDIR/.disk/base_include" BASE_INCLUDE "$BASE_INCLUDES"
merge_include_exclude "$CDDIR/.disk/base_exclude" BASE_EXCLUDE "$BASE_EXCLUDES"
if [ "$OMIT_DOC_TOOLS" != "1" ]; then
echo " Adding docs to CD1"
$BASEDIR/tools/add_files $CDDIR $MIRROR doc