[Pkg-mc-devel] Bug#582078: mc: postin runs dpkg-architecture from dpkg-dev but not depend on dpkg-dev

Sven Joachim svenjoac at gmx.de
Tue May 18 08:54:02 UTC 2010

On 2010-05-18 10:36 +0200, Yury V. Zaytsev wrote:

> On Tue, 2010-05-18 at 09:35 +0200, Hilmar Preusse wrote:
>> Indeed the postin script calls dpkg-architecture from dpkg-dev, which is not
>> installed on that box.  Interestingly the script does not fail, but reports
>> the package to be fully set up -> Severity normal.
> This is my fault! I've taken these bits from mediatomb package, but it
> does not depend upon dpkg-dev...
>> I guess simply putting dpkg-dev to the depends is not the best solution.
>> Plase use another method to determine the arch or check if dpkg-architecture
>> is available before calling it.
> I need to set an SGID bit, if the machine is running linux kernel. In
> future, I would need to detect kfreebsd as well. The bits for Hurd will
> probably never be implemented.
> Is there any other way to detect the architecture in such a case? I did
> some research, but the references to dpkg-architecture are all that I
> could find.

If checking for Linux is all you need to do, "uname -s" should be
sufficient.  However, it would be better to check DEB_HOST_GNU_SYSTEM at
build time and set the permissions of /usr/lib/mc/cons.saver in the
package instead of using dpkg-statoverride in the postinst.


More information about the Pkg-mc-devel mailing list