perl warning in dpkg-source

Bug #133024 reported by Fabien Tassin
4
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

 dpkg-source -b nspr-trunk-4.7.0~cvs20070713
Use of uninitialized value in pattern match (m//) at /usr/bin/dpkg-source line 342.
dpkg-source: warning: Version number suggests Ubuntu changes, but Maintainer: does not have Ubuntu address
dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field
dpkg-source: building nspr-trunk in nspr-trunk_4.7.0~cvs20070713-0ubuntu1.tar.gz

tiny patch attached.

Related branches

Revision history for this message
Fabien Tassin (fta) wrote :
Changed in dpkg:
importance: Undecided → Low
Revision history for this message
Colin Watson (cjwatson) wrote :

Confirmed, although && binds more tightly than list operators rightward, so strictly speaking that should be either:

  if (defined($ENV{'DEBEMAIL'}) && $ENV{'DEBEMAIL'} =~ /ubuntu/) {

... or:

  if (defined $ENV{'DEBEMAIL'} and $ENV{'DEBEMAIL'} =~ /ubuntu/) {

The prevailing style in this file leans towards the former.

(In practice it happens to make no difference in this case since undef is also false, but better safe than sorry.)

Changed in dpkg:
status: New → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

Hmm, and of course defined is a named unary operator rather than a list operator, so never mind me; your code is perfectly correct. (Though, since some operators do behave like this, I always prefer to use either parentheses or 'and' anyway for clarity.)

Revision history for this message
petski (petski) wrote :

Bug still present in hardy heron:

   428 if ($fields->{'Maintainer'} !~ /ubuntu/) {
   429 if ($ENV{'DEBEMAIL'} =~ /ubuntu/) {
   430 &error(_g('Version number suggests Ubuntu changes, but Maintainer: does not have Ubuntu address'));

Assigned bug to package maintainer

Changed in dpkg:
assignee: nobody → ubuntu-core-dev
assignee: ubuntu-core-dev → nobody
Revision history for this message
Daniel Holbach (dholbach) wrote :

petski: I'm not sure if somebody mailed you about it already, but please don't assign bugs to teams, in particular not to ubuntu-core-dev.

Revision history for this message
petski (petski) wrote :

I already figured that out (Launchpad warned me about it after the change was made) and I cleared the assignment.

Sorry if I've caused any trouble.

Martin Pitt (pitti)
Changed in dpkg:
assignee: nobody → pitti
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpkg - 1.14.19ubuntu2

---------------
dpkg (1.14.19ubuntu2) intrepid; urgency=low

  * scripts/dpkg-source.pl: Check if $DEBEMAIL is defined before testing it
    for @ubuntu, to avoid Perl warnings. Thanks to Fabien Tassin!
    (LP: #133024)

 -- Martin Pitt <email address hidden> Mon, 09 Jun 2008 09:51:08 +0000

Changed in dpkg:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

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