[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#703995: apt-setup: preseeding apt-setup/multiarch breaks dpkg

Control: severity -1 important
Control: tag -1 pending

Raphaël Hertzog <hertzog@debian.org> (26/03/2013):
> I wanted to try out preseeding apt-setup/multiarch to i386 but
> before doing it, I reviewed apt-setup's handling of this option and
> I discovered that it actually creates the configuration file used by
> the early Ubuntu implementation of multiarch (which relied on the
> --foreign-architecture command line option instead of the single
> dpkg --add-architecture call).  This means that it actually breaks
> dpkg since the current version of dpkg doesn't underestand the
> --foreign-architecture command-line option.
> IMO it would be nice to have this fixed in wheezy but it's not
> required either.

Yeah, generating non-working/crufty things, even if that's only doable
through preseeding, looks unnice (especially with such a tiny patch to
fix it). Adjusting severity accordingly.

> Here's an untested patch:
> --- a/generators/01setup
> +++ b/generators/01setup
> @@ -17,8 +17,7 @@ fi
>  db_get apt-setup/multiarch
>  if [ "$RET" ]; then
> -       mkdir -p $ROOT/etc/dpkg/dpkg.cfg.d
>         for arch in $RET; do
> -               echo "foreign-architecture $arch"
> -       done >$ROOT/etc/dpkg/dpkg.cfg.d/multiarch
> +               chroot $ROOT dpkg --add-architecture $arch
> +       done
>  fi

I just tested it, and that looks like it does the job. Tests:
  apt-setup/multiarch="i386 armel"

Failed with this one, but due to *:powerpc package dependencies:
  apt-setup/multiarch="i386 powerpc"

Uploading in a moment, should be in rc2.



Attachment: signature.asc
Description: Digital signature

Reply to: