dpkg: the alternatives mechanism should be more robust

Bug #14936 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
gcc-4.0 (Debian)
Fix Released
Unknown
gcc-4.0 (Ubuntu)
Fix Released
High
Matthias Klose

Bug Description

Automatically imported from Debian bug report #302995 http://bugs.debian.org/302995

Revision history for this message
In , Santiago Vila Doncel (sanvila-unex) wrote : Re: Bug#302995: gettext: ftbfs on sparc

reassign 302995 dpkg
retitle 302995 dpkg: the alternatives mechanism should be more robust
thanks

On Sun, 3 Apr 2005, Blars Blarson wrote:

> Package: gettext
> Version: 0.14.3-1
> Severity: serious
> Tags: sid
> Justification: fails to build from source
>
> gettext failed to build from source on the sparc buildd, however it
> built fine on my sparc pbuilder. The buildd log lacks some things
> that are in the pbuilder log "config.status: creating
> intl-java/Makefile" "config.status: creating intl-csharp/Makefile"
> and of course the sections that use those makefiles.
>
> buildd error:
>
> find debian/gettext-base/usr/share/locale | grep gettext-tools | xargs rm
> install -d debian/gettext-base/usr/share/gettext
> cp -p debian/tmp/usr/share/gettext/libintl.jar \
> debian/gettext-base/usr/share/gettext
> cp: cannot stat `debian/tmp/usr/share/gettext/libintl.jar': No such file or directory
> make[1]: *** [gettext-base] Error 1

You should not blame gettext for bugs in other packages.

A diff between the build logs for 0.14.2-1 and 0.14.3-1 for sparc
yields the following meaningful difference:

-checking for jar... jar
+checking for jar... no

So there was no /usr/bin/jar in the sparc autobuilder after installing
the fastjar package, but /usr/bin/jar is handled via the alternatives
mechanism. Seems like a dpkg bug to me.

Revision history for this message
In , Scott James Remnant (Canonical) (canonical-scott) wrote :

severity 302995 normal
tags 302995 - sid
thanks

On Mon, 2005-04-04 at 02:13 +0200, Santiago Vila wrote:

> On Sun, 3 Apr 2005, Blars Blarson wrote:
>
> > gettext failed to build from source on the sparc buildd, however it
> > built fine on my sparc pbuilder. The buildd log lacks some things
> > that are in the pbuilder log "config.status: creating
> > intl-java/Makefile" "config.status: creating intl-csharp/Makefile"
> > and of course the sections that use those makefiles.
> >
> A diff between the build logs for 0.14.2-1 and 0.14.3-1 for sparc
> yields the following meaningful difference:
>
> -checking for jar... jar
> +checking for jar... no
>
> So there was no /usr/bin/jar in the sparc autobuilder after installing
> the fastjar package, but /usr/bin/jar is handled via the alternatives
> mechanism. Seems like a dpkg bug to me.
>
What makes you think this is a dpkg bug?

Please provide a stat of /usr/bin/jar, /etc/alternatives/jar and output
of "update-alternatives --display jar".

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #302995 http://bugs.debian.org/302995

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sun, 03 Apr 2005 15:52:32 -0700
From: Blars Blarson <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: gettext: ftbfs [sparc] `debian/tmp/usr/share/gettext/libintl.jar': No such file or directory

Package: gettext
Version: 0.14.3-1
Severity: serious
Tags: sid
Justification: fails to build from source

gettext failed to build from source on the sparc buildd, however it
built fine on my sparc pbuilder. The buildd log lacks some things
that are in the pbuilder log "config.status: creating
intl-java/Makefile" "config.status: creating intl-csharp/Makefile"
and of course the sections that use those makefiles.

buildd error:

find debian/gettext-base/usr/share/locale | grep gettext-tools | xargs rm
install -d debian/gettext-base/usr/share/gettext
cp -p debian/tmp/usr/share/gettext/libintl.jar \
 debian/gettext-base/usr/share/gettext
cp: cannot stat `debian/tmp/usr/share/gettext/libintl.jar': No such file or directory
make[1]: *** [gettext-base] Error 1

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 4 Apr 2005 02:13:27 +0200 (CEST)
From: Santiago Vila <email address hidden>
To: Blars Blarson <email address hidden>, <email address hidden>,
 <email address hidden>, <email address hidden>
Subject: Re: Bug#302995: gettext: ftbfs on sparc

reassign 302995 dpkg
retitle 302995 dpkg: the alternatives mechanism should be more robust
thanks

On Sun, 3 Apr 2005, Blars Blarson wrote:

> Package: gettext
> Version: 0.14.3-1
> Severity: serious
> Tags: sid
> Justification: fails to build from source
>
> gettext failed to build from source on the sparc buildd, however it
> built fine on my sparc pbuilder. The buildd log lacks some things
> that are in the pbuilder log "config.status: creating
> intl-java/Makefile" "config.status: creating intl-csharp/Makefile"
> and of course the sections that use those makefiles.
>
> buildd error:
>
> find debian/gettext-base/usr/share/locale | grep gettext-tools | xargs rm
> install -d debian/gettext-base/usr/share/gettext
> cp -p debian/tmp/usr/share/gettext/libintl.jar \
> debian/gettext-base/usr/share/gettext
> cp: cannot stat `debian/tmp/usr/share/gettext/libintl.jar': No such file or directory
> make[1]: *** [gettext-base] Error 1

You should not blame gettext for bugs in other packages.

A diff between the build logs for 0.14.2-1 and 0.14.3-1 for sparc
yields the following meaningful difference:

-checking for jar... jar
+checking for jar... no

So there was no /usr/bin/jar in the sparc autobuilder after installing
the fastjar package, but /usr/bin/jar is handled via the alternatives
mechanism. Seems like a dpkg bug to me.

Revision history for this message
In , Santiago Vila Doncel (sanvila-unex) wrote :

retitle 302995 fastjar: postinst does not check for errors
reassign 302995 fastjar
severity 302995 serious
thanks

I hope it works now. See http://bugs.debian.org/302995

Revision history for this message
In , Santiago Vila Doncel (sanvila-unex) wrote :

retitle 302995 fastjar: postinst does not check for errors
reassign 302995 fastjar
severity 302995 serious
thanks

On Mon, 4 Apr 2005, Scott James Remnant wrote:

> On Mon, 2005-04-04 at 02:13 +0200, Santiago Vila wrote:
>
> > On Sun, 3 Apr 2005, Blars Blarson wrote:
> >
> > > gettext failed to build from source on the sparc buildd, however it
> > > built fine on my sparc pbuilder. The buildd log lacks some things
> > > that are in the pbuilder log "config.status: creating
> > > intl-java/Makefile" "config.status: creating intl-csharp/Makefile"
> > > and of course the sections that use those makefiles.
> >
> > A diff between the build logs for 0.14.2-1 and 0.14.3-1 for sparc
> > yields the following meaningful difference:
> >
> > -checking for jar... jar
> > +checking for jar... no
> >
> > So there was no /usr/bin/jar in the sparc autobuilder after installing
> > the fastjar package, but /usr/bin/jar is handled via the alternatives
> > mechanism. Seems like a dpkg bug to me.
>
> What makes you think this is a dpkg bug?

Mainly, the fact that I have seen other packages fail to build because
of the alternatives handling (see for example, the two failed builds
for mips for original-awk_2004-12-22-1).

In this particular case, however, I've just realized that there is a
problem in the postinst of fastjar, since it does:

update-alternatives [...] || true

This is against policy:

   The package management system looks at the exit status from these
   scripts. It is important that they exit with a non-zero status if
   there is an error, so that the package management system can stop its
   processing. For shell scripts this means that you almost always need
   to use set -e (this is usually true when writing shell scripts, in
   fact). It is also important, of course, that they don't exit with a
   non-zero status if everything went well.

Reassign again.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 04 Apr 2005 09:32:16 +0100
From: Scott James Remnant <email address hidden>
To: Santiago Vila <email address hidden>
Cc: Blars Blarson <email address hidden>, <email address hidden>, <email address hidden>,
 <email address hidden>
Subject: Re: Bug#302995: gettext: ftbfs on sparc

--=-ZKO020MIIeUgiYJXtWzD
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

severity 302995 normal
tags 302995 - sid
thanks

On Mon, 2005-04-04 at 02:13 +0200, Santiago Vila wrote:

> On Sun, 3 Apr 2005, Blars Blarson wrote:
>=20
> > gettext failed to build from source on the sparc buildd, however it
> > built fine on my sparc pbuilder. The buildd log lacks some things
> > that are in the pbuilder log "config.status: creating
> > intl-java/Makefile" "config.status: creating intl-csharp/Makefile"
> > and of course the sections that use those makefiles.
> >=20
> A diff between the build logs for 0.14.2-1 and 0.14.3-1 for sparc
> yields the following meaningful difference:
>=20
> -checking for jar... jar
> +checking for jar... no
>=20
> So there was no /usr/bin/jar in the sparc autobuilder after installing
> the fastjar package, but /usr/bin/jar is handled via the alternatives
> mechanism. Seems like a dpkg bug to me.
>=20
What makes you think this is a dpkg bug?

Please provide a stat of /usr/bin/jar, /etc/alternatives/jar and output
of "update-alternatives --display jar".

Scott
--=20
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?

--=-ZKO020MIIeUgiYJXtWzD
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBCUPuPIexP3IStZ2wRAnRAAJ4zXuMRdGKCQFw6B6LU5l0yWhmF4wCeMUeM
87BPn96aMZa9Br00RUth4wI=
=JSJj
-----END PGP SIGNATURE-----

--=-ZKO020MIIeUgiYJXtWzD--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 4 Apr 2005 13:31:29 +0200 (CEST)
From: Santiago Vila <email address hidden>
To: <email address hidden>, <email address hidden>
Cc: Debian GCC maintainers <email address hidden>
Subject: Bug#302995: gettext: ftbfs on sparc

retitle 302995 fastjar: postinst does not check for errors
reassign 302995 fastjar
severity 302995 serious
thanks

I hope it works now. See http://bugs.debian.org/302995

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 4 Apr 2005 12:00:15 +0200 (CEST)
From: Santiago Vila <email address hidden>
To: Scott James Remnant <email address hidden>
Cc: Blars Blarson <email address hidden>, <email address hidden>,
 <email address hidden>, <email address hidden>,
 Debian GCC maintainers <email address hidden>
Subject: Re: Bug#302995: gettext: ftbfs on sparc

retitle 302995 fastjar: postinst does not check for errors
reassign 302995 fastjar
severity 302995 serious
thanks

On Mon, 4 Apr 2005, Scott James Remnant wrote:

> On Mon, 2005-04-04 at 02:13 +0200, Santiago Vila wrote:
>
> > On Sun, 3 Apr 2005, Blars Blarson wrote:
> >
> > > gettext failed to build from source on the sparc buildd, however it
> > > built fine on my sparc pbuilder. The buildd log lacks some things
> > > that are in the pbuilder log "config.status: creating
> > > intl-java/Makefile" "config.status: creating intl-csharp/Makefile"
> > > and of course the sections that use those makefiles.
> >
> > A diff between the build logs for 0.14.2-1 and 0.14.3-1 for sparc
> > yields the following meaningful difference:
> >
> > -checking for jar... jar
> > +checking for jar... no
> >
> > So there was no /usr/bin/jar in the sparc autobuilder after installing
> > the fastjar package, but /usr/bin/jar is handled via the alternatives
> > mechanism. Seems like a dpkg bug to me.
>
> What makes you think this is a dpkg bug?

Mainly, the fact that I have seen other packages fail to build because
of the alternatives handling (see for example, the two failed builds
for mips for original-awk_2004-12-22-1).

In this particular case, however, I've just realized that there is a
problem in the postinst of fastjar, since it does:

update-alternatives [...] || true

This is against policy:

   The package management system looks at the exit status from these
   scripts. It is important that they exit with a non-zero status if
   there is an error, so that the package management system can stop its
   processing. For shell scripts this means that you almost always need
   to use set -e (this is usually true when writing shell scripts, in
   fact). It is also important, of course, that they don't exit with a
   non-zero status if everything went well.

Reassign again.

Revision history for this message
In , Steve Langasek (vorlon) wrote : gcc-3.4 NMU in progress

tags 302995 patch
thanks

Hi Matthias,

NMU in progress for these two bugs. Barring any explosions, the attached
patch is the one that will be uploaded.

Thanks,
--
Steve Langasek
postmodern programmer

Revision history for this message
In , Steve Langasek (vorlon) wrote : Fixed in NMU of gcc-3.4 3.4.3-12.1
Download full text (6.3 KiB)

tag 302995 + fixed
tag 307241 + fixed

quit

This message was generated automatically in response to a
non-maintainer upload. The .changes file follows.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 1 May 2005 14:36:39 -0700
Source: gcc-3.4
Binary: g77-3.4-doc gcc-3.4-base libstdc++6 lib64gcj5-awt gnat-3.4 libobjc1 libgcj5 libgcc1 gcc-3.4 lib64g2c0 gobjc-3.4 libstdc++6-0 gcc-3.4-nof libgcc2 libstdc++6-dev libstdc++6-doc protoize libgnat-3.4 libgcj5-dev libstdc++6-0-pic libgcj5-common lib64stdc++6 libstdc++6-dbg lib32stdc++6-0 gij-3.4 lib32gcc1 lib64gnat-3.4 lib64objc1 cpp-3.4 lib64gcj5 gcc-3.4-hppa64 gcc-3.4-soft-float libstdc++6-0-dev libgcj5-awt cpp-3.4-doc libgcj-common libffi3-dev gcc-3.4-doc libg2c0-dev gpc-2.1-3.4-doc lib64gcc1 fastjar treelang-3.4 libffi3 fixincludes libg2c0 lib32stdc++6 libstdc++6-pic lib64ffi3 gnat-3.4-doc libstdc++6-0-dbg gcj-3.4 gpc-2.1-3.4 g++-3.4 g77-3.4
Architecture: source i386 all
Version: 3.4.3-12.1
Distribution: unstable
Urgency: high
Maintainer: Debian GCC maintainers <email address hidden>
Changed-By: Steve Langasek <email address hidden>
Description:
 cpp-3.4 - The GNU C preprocessor
 cpp-3.4-doc - Documentation for the GNU C preprocessor (cpp)
 fastjar - Jar creation utility
 g++-3.4 - The GNU C++ compiler
 g77-3.4 - The GNU Fortran 77 compiler
 g77-3.4-doc - Documentation for the GNU Fortran compiler (g77)
 gcc-3.4 - The GNU C compiler
 gcc-3.4-base - The GNU Compiler Collection (base package)
 gcc-3.4-doc - Documentation for the GNU compilers (gcc, gobjc, g++)
 gcj-3.4 - The GNU compiler for Java(TM)
 gij-3.4 - The GNU Java bytecode interpreter
 gnat-3.4 - The GNU Ada compiler
 gnat-3.4-doc - Documentation for the GNU Ada compiler (gnat)
 gobjc-3.4 - The GNU Objective-C compiler
 gpc-2.1-3.4 - The GNU Pascal compiler
 gpc-2.1-3.4-doc - Documentation for the GNU Pascal compiler (gpc)
 lib64gcc1 - GCC support library (64bit)
 lib64stdc++6 - The GNU Standard C++ Library v3 (64bit)
 libffi3 - Foreign Function Interface library runtime
 libffi3-dev - Foreign Function Interface library (development files)
 libgcc1 - GCC support library
 libgcj5 - Java runtime library for use with gcj
 libgcj5-awt - AWT peer runtime libraries for use with gcj
 libgcj5-common - Java runtime library for use with gcj (jar files)
 libgcj5-dev - Java development headers and static library for use with gcj
 libgnat-3.4 - Runtime library for GNU Ada applications
 libstdc++6 - The GNU Standard C++ Library v3
 libstdc++6-dbg - The GNU Standard C++ Library v3 (debugging files)
 libstdc++6-dev - The GNU Standard C++ Library v3 (development files)
 libstdc++6-doc - The GNU Standard C++ Library v3 (documentation files)
 libstdc++6-pic - The GNU Standard C++ Library v3 (shared library subset kit)
 treelang-3.4 - The GNU Treelang compiler
Closes: 302995 307241
Changes:
 gcc-3.4 (3.4.3-12.1) unstable; urgency=high
 .
   * Non-maintainer upload.
   * High-urgency upload for sarge-targetted RC bugfix.
   * Fix fastjar postinst, to not ignore errors from update-alternatives.
     Closes: #302995.
   * Patch away a doxygen syntax error in
     libstdc++/include/bits/basic_string....

Read more...

Revision history for this message
In , Matthias Klose (doko-cs) wrote : fixed in gcc-3.4-3.4.3-12.1

fixed in gcc-3.4-3.4.3-12.1

Revision history for this message
Matthias Klose (doko) wrote :

that one was fixed in fastjar

Changed in gcc-4.0:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.