Package: dpkg-dev
Version: 1.14.24
Severity: minor

When the line with the architecture is missing from debian/control,
dpkg-genchanges ends up with this error:

 Use of uninitialized value $b in string eq at /usr/share/perl5/Dpkg/Arch.pm 
line 295.
 Use of uninitialized value $_ in pattern match (m//) at 
/usr/share/perl5/Dpkg/Arch.pm line 244.
 Use of uninitialized value $arch in hash element at 
/usr/share/perl5/Dpkg/Arch.pm line 251.
 Use of uninitialized value $a in split at /usr/bin/dpkg-genchanges line 292.

where I really would like to just to report something along the lines of:
 Sorry: No architecture specified. Bye.
or words to that effect.

I've put together a test case which might help you - see attached.

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg-dev depends on:
ii  binutils            2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii  bzip2               1.0.5-1              high-quality block-sorting file co
ii  cpio                2.9-13               GNU cpio -- a program to manage ar
ii  dpkg                1.14.25              Debian package management system
ii  libtimedate-perl    1.1600-9             Time and date functions for Perl
ii  lzma                4.43-14              Compression method of 7z format in
ii  make                3.81-5               The GNU version of the "make" util
ii  patch               2.5.9-5              Apply a diff file to an original
ii  perl [perl5]        5.10.0-19            Larry Wall's Practical Extraction 
ii  perl-modules        5.10.0-19            Core Perl modules

Versions of packages dpkg-dev recommends:
ii  build-essential               11.4       Informational list of build-essent
ii  gcc [c-compiler]              4:4.3.2-2  The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.2-24   The GNU C compiler
ii  gcc-4.2 [c-compiler]          4.2.4-4    The GNU C compiler
ii  gcc-4.3 [c-compiler]          4.3.2-1.1  The GNU C compiler

Versions of packages dpkg-dev suggests:
ii  debian-keyring                2008.07.22 GnuPG (and obsolete PGP) keys of D
ii  gnupg                         1.4.9-3    GNU privacy guard - a free PGP rep

-- debconf-show failed
#!/bin/bash -ex

dir=${TMPDIR:-/tmp}/foobar-0.1

rm -rf $dir
mkdir --parents $dir
cd $dir

cat > Makefile <<!
.PHONY : all install clean

all: 

install:

clean:
!

dh_make --email nob...@example.com --native --multi --packagename foobar

cat > debian/control <<!
Source: foobar
Section: games
Priority: extra
Maintainer: No Body <nob...@example.com>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.7.3
Homepage: http://www.example.com

Package: foobar
Architecture: any
Depends: make
Description: When you die, you lose a very important part of your life.
 The truth according to Brooke Shields

Package: foobar-doc
Architecture: all
Description: Documentation for foobar
 You know you've been sitting in front of your Lisp machine too long
 when you go out to the junk food machine and start wondering how to
 make it give you the CADR of Item H so you can get that yummie
 chocolate cupcake that's stuck behind the disgusting vanilla one.

Package: foobar-noarch
Description: Dummy package
 This package will cause dpkg-buildpackage to fail because it 
 has no 
  Architecture:
 line in debian/control
!

dpkg-buildpackage -us -uc

Reply via email to