On Mon, Apr 15, 2013 at 02:10:00PM +0200, Robert Spencer wrote: >On 20/03/2013 15:46, Steve McIntyre wrote: >>> >>>Alternatively if it's just the .disk/udeb_include and >>>.disk/udeb_exclude files you don't want duplicates in, then we can >>>filter them out while maintaining the order (I'm assuming the order >>>is important). >> >>Filtering is fine, ordering doesn't matter at all AFAICS. > >Okay, I hope the attached patch file is acceptable. It's for >debian-cd 3.1.12. > >>The issue >>that worries me more is the fact that different arches have different >>lists that should go here, maybe with bad consequences if they're >>wrong. Maybe I should be tweaking things in d-i too to add per-arch >>control. > >I think that would probably be best.
Yeah. I'll add that to the TODO list for d-i once wheezy is done. For now, let's go with something like what we have here. >--- tools/start_new_disc~ 2013-04-01 01:26:54.000000000 +0000 >+++ tools/start_new_disc 2013-04-15 11:13:35.000000000 +0000 >@@ -170,12 +170,20 @@ > > echo " Adding udeb/base includes/excludes" > >+ # Check if the following has been set by CONF.sh >+ if [ -z "$UDEB_INCLUDE" ]; then >+ NO_UDEB_INCLUDE=1 >+ fi >+ if [ -z "$UDEB_EXCLUDE" ]; then >+ NO_UDEB_EXCLUDE=1 >+ fi >+ > for ARCH in $ARCHES > do > if [ $ARCH != source ] ; then > # Netinst/businesscard CD have different > # udeb_include and udeb_exclude files >- if [ -z "$UDEB_INCLUDE" ] ; then >+ if [ -n "$NO_UDEB_INCLUDE" ] ; then > case "$INSTALLER_CD"x in > "1"x) > > UDEB_INCLUDE=$DI_DATA_DIR/"$ARCH"_businesscard_udeb_include;; >@@ -186,7 +194,7 @@ > esac > fi > >- if [ -z "$UDEB_EXCLUDE" ] ; then >+ if [ -n "$NO_UDEB_EXCLUDE" ] ; then > case "$INSTALLER_CD"x in > "1"x) > > UDEB_EXCLUDE=$DI_DATA_DIR/"$ARCH"_businesscard_udeb_exclude;; >@@ -200,14 +208,30 @@ > # 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" >+ if [ -e "$CDDIR/.disk/udeb_include" ]; then >+ if ! diff -q "$UDEB_INCLUDE" >"$CDDIR/.disk/udeb_include"; then >+ mv "$CDDIR"/.disk/udeb_include{,~} >+ cat "$UDEB_INCLUDE" "$CDDIR/.disk/udeb_include~" >| sort | uniq > "$CDDIR/.disk/udeb_include" >+ rm "$CDDIR/.disk/udeb_include~" >+ fi >+ else >+ cp "$UDEB_INCLUDE" "$CDDIR/.disk/udeb_include" >+ fi > else > echo "WARNING: Unable to read UDEB_INCLUDE file > $UDEB_INCLUDE" > fi > fi Just a minor style thing here - I'm sure this code works, but I'd rather build a list of all the files we need, then merge them into place at the end. I think it's slightly cleaner that way. I'll do that now. ... Thanks for all the patches, though; they're much appreciated! :-) -- Steve McIntyre, Cambridge, UK. st...@einval.com Getting a SCSI chain working is perfectly simple if you remember that there must be exactly three terminations: one on one end of the cable, one on the far end, and the goat, terminated over the SCSI chain with a silver-handled knife whilst burning *black* candles. --- Anthony DeBoer -- To UNSUBSCRIBE, email to debian-cd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130419152108.gc22...@einval.com