Bug#419005: Use of uninitialized value in concatenation (.) or string at /usr/share/svn-buildpackage/SDCommon.pm line 74 (#2)

2007-04-19 Thread Gonéri Le Bouder
On Wed, Apr 18, 2007 at 11:05:35AM +0200, Loïc Minier wrote:
 On Mon, Apr 16, 2007, Eddy Petrișor wrote:
  print STDERR Command $cmd failed in .Cwd::getcwd., how to
  continue now? [Qri?]: ;
   Command /bin/sh -c my-pdebuild   failed in , how to continue now? [Qri?]: 
  Judging from the missing directory name ^
  and from the fact you used COW, I suspect the build directory is
  removed before this message appears making the Cwd::getcwd command fail.
 
  It seems to me your analysis is correct; I reproduced that Cwd::getcwd
  returns undef when the underlying directory is removed.
 
  Your changes seem appropriate.
seems ok for me too. Maybe we can use a conditional operator to avoid a
new var?:
  print STDERR Command $cmd failed in .
  ($Cwd::getcwd?$Cwd::getcwd:unknow).
  , how to continue now?[Qri?]: ;

Cheers,

 Gonéri


pgpFb4Cw9V9u8.pgp
Description: PGP signature


Bug#419005: Use of uninitialized value in concatenation (.) or string at /usr/share/svn-buildpackage/SDCommon.pm line 74 (#2)

2007-04-18 Thread Loïc Minier
On Mon, Apr 16, 2007, Eddy Petrișor wrote:
 print STDERR Command $cmd failed in .Cwd::getcwd., how to
 continue now? [Qri?]: ;
  Command /bin/sh -c my-pdebuild   failed in , how to continue now? [Qri?]: 
 Judging from the missing directory name ^
 and from the fact you used COW, I suspect the build directory is
 removed before this message appears making the Cwd::getcwd command fail.

 It seems to me your analysis is correct; I reproduced that Cwd::getcwd
 returns undef when the underlying directory is removed.

 Your changes seem appropriate.

-- 
Loïc Minier



Bug#419005: Use of uninitialized value in concatenation (.) or string at /usr/share/svn-buildpackage/SDCommon.pm line 74 (#2)

2007-04-15 Thread Eddy Petrișor
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Loïc Minier wrote:
 Package: svn-buildpackage
 Version: 0.6.18
 Severity: normal
 
 Hi,

Hi Loïc,

  I get this warning when a build fails:
  - policy-rc.d already exists
  - Cleaning COW directory
 
 Use of uninitialized value in concatenation (.) or string at
 /usr/share/svn-buildpackage/SDCommon.pm line 74 (#2)

Line 74 is this:

print STDERR Command $cmd failed in .Cwd::getcwd., how to
continue now? [Qri?]: ;

 Command /bin/sh -c my-pdebuild   failed in , how to continue now? [Qri?]: 
Judging from the missing directory name ^
and from the fact you used COW, I suspect the build directory is
removed before this message appears making the Cwd::getcwd command fail.

I am not that sure the attached patch fixes the issue, so I am not
committing it. I would also like Edi to comment on this patch since
I am really not sure of my patch and approach.

- --
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGIqOeY8Chqv3NRNoRAmO0AKCpmNDV1HxWAAUXng5hvsm0YUJYGACffTAD
J6OkcMgdGiuiNUOd16lSHIg=
=qw0M
-END PGP SIGNATURE-
Index: SDCommon.pm
===
--- SDCommon.pm	(revision 3072)
+++ SDCommon.pm	(working copy)
@@ -71,7 +71,9 @@
retry:
print STDERR $cmd\n if(!$SDCommon::opt_quiet);
if(system(@_)) {
-  print STDERR Command $cmd failed in .Cwd::getcwd., how to continue now? [Qri?]: ;
+  my $cdir = Cwd::getcwd ;
+  $cdir = unknown unless ($cdir);
+  print STDERR Command $cmd failed in .$cdir., how to continue now? [Qri?]: ;
   prompt:
   my $ans = STDIN;
   if($ans =~ /^q$/i or $ans =~ /^$/) {


Bug#419005: Use of uninitialized value in concatenation (.) or string at /usr/share/svn-buildpackage/SDCommon.pm line 74 (#2)

2007-04-13 Thread Loïc Minier
Package: svn-buildpackage
Version: 0.6.18
Severity: normal

Hi,

 I get this warning when a build fails:
 - policy-rc.d already exists
 - Cleaning COW directory

Use of uninitialized value in concatenation (.) or string at
/usr/share/svn-buildpackage/SDCommon.pm line 74 (#2)
(W uninitialized) An undefined value was used as if it were already
defined.  It was interpreted as a  or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl tells you what operation
you used the undefined value in.  Note, however, that perl optimizes your
program and the operation displayed in the warning may not necessarily
appear literally in your program.  For example, that $foo is
usually optimized into that  . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.

Command /bin/sh -c my-pdebuild   failed in , how to continue now? [Qri?]: 


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.20 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages svn-buildpackage depends on:
ii  devscripts  2.10.2   Scripts to make the life of a Debi
ii  file4.20-4   Determines file type using magic
ii  libsvn-perl 1.4.2dfsg1-2 Perl bindings for Subversion
ii  perl5.8.8-7  Larry Wall's Practical Extraction 
ii  subversion  1.4.2dfsg1-2 Advanced version control system
ii  unp 1.0.12   unpack (almost) everything with on
ii  wget1.10.2-2 retrieves files from the web

svn-buildpackage recommends no packages.

-- no debconf information

-- 
Loïc Minier
For subalterns, saying something intelligent is as risky as saying something
 stupid.