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

Re: Severity of architecture-dependent bugs

[Shaun Jackman]
> A grave bug has been file against a package I maintain pointing out
> that the package does not work on AMD64 and in fact never has, even
> though it builds on AMD64. Since it turns out this package has never
> worked on AMD64, this bug is not a regression, but the status-quo.
> Should such a bug be grave, or merely important?

Leaving aside the point that amd64 isn't in Debian yet (it will be
quite soon, so let's just pretend it is now), I think the bug is
correctly RC.  If you don't think the package will ever work on amd64
(in the near term, anyway), you can fix the bug by disabling the build
on amd64.

If your package only builds a single binary package, it's best to just
exclude amd64 from the architecture line in debian/control:

  Architecture: alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc armeb hurd-i386 kfreebsd-i386 m32r ppc64 sh

If it builds multiple binaries and you just want to exclude amd64 from
some of them, a cleaner approach is what we use in subversion, in
debian/rules.  We need to build the 'libsvn-javahl' package only on
architectures which have a working version of kaffe:

  DISABLE_JAVAHL_ARCHS := arm armeb m68k mips mipsel kfreebsd-i386

  export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
  ifneq (,$(filter $(DEB_HOST_ARCH), $(DISABLE_JAVAHL_ARCHS)))

  ifeq ($(ENABLE_JAVAHL), yes)
    confflags += --enable-javahl ...
    export DH_OPTIONS := -Nlibsvn-javahl

Here we've set up ENABLE_JAVAHL as a way to conditionalise the rest of
debian/rules so as to build or not build the java package.  The
interesting part, though, is the last line, setting DH_OPTIONS.  That
variable tells debhelper not to build libsvn-javahl.  Thus we don't
need to list a dozen architectures in debian/control.

We do still need to duplicate the arch exclusion list in debian/control:

  Build-Depends: ... kaffe-dev [!arm !armeb !m68k !mips !mipsel !kfreebsd-i386]

but an exclusion list is much less cumbersome than an *inclusion* list,
and you can't use an exclusion list in the Architecture line, unlike
the Build-Depends line.


Attachment: signature.asc
Description: Digital signature

Reply to: