Debian Bug report logs - #365190
import_from() sets empty parameter to array reference

version graph

Package: libconfig-simple-perl; Maintainer for libconfig-simple-perl is Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>; Source for libconfig-simple-perl is src:libconfig-simple-perl.

Reported by: Antony Gelberg <antony.gelberg@gmail.com>

Date: Fri, 28 Apr 2006 12:48:11 UTC

Severity: normal

Fixed in version libconfig-simple-perl/4.58-1

Done: tony mancill <tmancill@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://rt.cpan.org/Public/Bug/Display.html?id=22559

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, tony mancill <tmancill@debian.org>:
Bug#365190; Package clusterssh. Full text and rfc822 format available.

Acknowledgement sent to Antony Gelberg <antony@wayforth.co.uk>:
New Bug report received and forwarded. Copy sent to tony mancill <tmancill@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Antony Gelberg <antony@wayforth.co.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: clusterssh: syntax error near unexpected token
Date: Fri, 28 Apr 2006 13:36:17 +0100
Package: clusterssh
Version: 2.18-1
Severity: normal

I get:

sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `x-terminal-emulator ARRAY(0xd47590)  -title 'ssh:neil' -e
/usr/bin/perl /usr/lib/cchp  -s 0.1 -k 0 -x /tmp/tcB4vNu5oE -y 21522 -z 238
/usr/bin/ssh -x  -p 22 -C neil &'
Could not create session to neil: No such file or directory  at /usr/bin/cssh
line 571.

My config file is:

always_tile = yes
cchp_path = /usr/lib
cchp_sleep = 0.1
cx_args = -C
cx_path = /usr/bin
keep_open = 0
key_addhost = Control-plus
key_clientname = Alt-n
key_quit = Control-q
reserve_bottom = 0
reserve_right = 0
term_font = 6x13
term_size = 80x24
terminal = x-terminal-emulator
terminal_options =
tiocsti = 21522
title_number = no
titlebar_size = 30
user = antony
variables = no

wayforth_servers = neil
clusters = wayforth_servers

This file was generated with cssh -u > ~/.csshrc, as per the manpage.

Line 571 is:

system("$user_config{'default.terminal'}
$user_config{'default.terminal_options'} $place -title '$method:$serv' -e $^X
$user_config{'default.cchp_path'}/cchp $debug -s
$user_config{'default.cchp_sleep'} -k $user_config{'default.keep_open'} -x
$servers{$serv_name}[2] -y $user_config{'default.tiocsti'} -z $KILLOFF
$path_method $portarg $user_config{'default.cx_args'} $serv &") == 0 or
warn("Could not create session to $serv: $! ");

It appears that terminal_options having no value in the default config file,
causes the perl script to hang.  I bodged it by making the line:
terminal_options = -sb
but really the program shouldn't fail with an unintelligible error if an
option is not given.

Antony

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.8-12-amd64-k8
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages clusterssh depends on:
ii  libconfig-simple-p 4.58-1                simple configuration file class
ii  perl-suid          5.8.4-8sarge3         Runs setuid Perl scripts
ii  perl-tk            1:800.025-2           Perl module providing the Tk graph
ii  rxvt-unicode [x-te 5.3-1                 RXVT-like terminal emulator with U
ii  ssh                1:3.8.1p1-8.sarge.4   Secure rlogin/rsh/rcp replacement 
ii  xbase-clients      4.3.0.dfsg.1-14sarge1 miscellaneous X clients
ii  xterm [x-terminal- 4.3.0.dfsg.1-14sarge1 X terminal emulator

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#365190; Package clusterssh. Full text and rfc822 format available.

Acknowledgement sent to tony mancill <tmancill@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #10 received at 365190@bugs.debian.org (full text, mbox):

From: tony mancill <tmancill@debian.org>
To: 365190@bugs.debian.org
Subject: clusterssh: syntax error near unexpected token
Date: Wed, 09 Aug 2006 17:25:37 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you for the bug report.  I agree entirely that you shouldn't have to
set terminal_options.  If .csshrc doesn't exist, there is no problem, but if
the .csshrc exists and the parameter is blank, the variable gets set to that
array reference instead of an empty string.

The problem actually appears to be with libconfig-simple-perl; more
specifically, Config::Simple->import_from().

Note that Config::Simple isn't used in the 3.x versions of clusterssh.




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE2n0BpdwBkPlyvgMRAtqwAJ40Gpu39qqOWbb1N1sjI0i20rtPLgCdGIqC
nCBHGEpdVru+He8cdI0HQ7A=
=yKGo
-----END PGP SIGNATURE-----



Bug reassigned from package `clusterssh' to `libconfig-simple-perl'. Request was from tony mancill <tmancill@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Changed Bug title. Request was from tony mancill <tmancill@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#365190; Package libconfig-simple-perl. Full text and rfc822 format available.

Acknowledgement sent to tony mancill <tmancill@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #19 received at 365190@bugs.debian.org (full text, mbox):

From: tony mancill <tmancill@debian.org>
To: sherzodr@cpan.org
Cc: 365190@bugs.debian.org
Subject: behavior of Config::Simple for keys with empty values in config file
Date: Thu, 10 Aug 2006 22:27:39 -0700
[Message part 1 (text/plain, inline)]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Mr. Ruzmetov,

I am the maintainer for the Debian packaging of your Config::Simple CPAN
module.  I wanted to ask you about the behavior of
Config::Simple->import_from() when the config file being loaded has keys
with empty values.

tony@honig:~/debian/maint/libconfig-simple-perl/365190$ cat test.pl
#!/usr/bin/perl
use Config::Simple;
my %config = ();
Config::Simple->import_from('test.ini', \%config);
foreach $key (sort keys %config) {
        print "$key = $config{$key}\n";
}

tony@honig:~/debian/maint/libconfig-simple-perl/365190$ cat test.ini
parm1 = 1
parm2 =
parm3 = 3

tony@honig:~/debian/maint/libconfig-simple-perl/365190$ ./test.pl
default.parm1 = 1
default.parm2 = ARRAY(0x821b624)
default.parm3 = 3

The problem appears to be in get_param(), where $rv is defined, but doesn't
point to anything.  The attached patch solved the problem I was having with
import_from(), but I'm not sure whether or not it may cause problems for
other methods.  (I'm still trying to grok exactly what all is happening in
get_param().)

Any guidance you can provide would be appreciated.  By the way, this is with
version 4.58.

Thank you,
tony mancill
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE3BVLpdwBkPlyvgMRAoihAJ0S7YqNINPToIpS/AbTbteMt4wUxQCcDPFT
MA3hTf9jNPSc8LbHwtlU2N8=
=nHsM
-----END PGP SIGNATURE-----
[import_from_empty.patch (text/x-patch, inline)]
--- libconfig-simple-perl-4.58.orig/Simple.pm
+++ libconfig-simple-perl-4.58/Simple.pm
@@ -469,8 +469,7 @@
   } else {
     $rv = $self->{_DATA}->{$arg};
   }
-
-  defined($rv) or return;
+  defined($rv->[0]) or return;
 
   for ( my $i=0; $i < @$rv; $i++ ) {
     $rv->[$i] =~ s/\\n/\n/g;

Changed Bug submitter from Antony Gelberg <antony@wayforth.co.uk> to Antony Gelberg <antony.gelberg@wayforth.com>. Request was from Antony Gelberg <antony.gelberg@wayforth.com> to control@bugs.debian.org. (Mon, 06 Oct 2008 01:21:06 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'http://rt.cpan.org/Public/Bug/Display.html?id=22559'. Request was from tony mancill <tmancill@debian.org> to control@bugs.debian.org. (Mon, 14 Sep 2009 23:48:20 GMT) Full text and rfc822 format available.

Changed Bug submitter to 'Antony Gelberg <antony.gelberg@gmail.com>' from 'Antony Gelberg <antony.gelberg@wayforth.com>' Request was from Antony Gelberg <antony.gelberg@gmail.com> to control@bugs.debian.org. (Sun, 06 Jun 2010 12:18:18 GMT) Full text and rfc822 format available.

Bug marked as fixed in version 4.58-1, send any further explanations to Antony Gelberg <antony.gelberg@gmail.com> Request was from tony mancill <tmancill@debian.org> to control@bugs.debian.org. (Fri, 06 Aug 2010 18:27:06 GMT) Full text and rfc822 format available.

Message sent on to Antony Gelberg <antony.gelberg@gmail.com>:
Bug#365190. (Fri, 06 Aug 2010 18:27:11 GMT) Full text and rfc822 format available.

Message #30 received at 365190-submitter@bugs.debian.org (full text, mbox):

From: tony mancill <tmancill@debian.org>
To: control@bugs.debian.org
Cc: 365190-submitter@bugs.debian.org
Subject: closing 365190
Date: Fri, 06 Aug 2010 11:21:49 -0700
close 365190 4.58-1
thanks

A patch for this bug was included in the 4.58-1 upload.

Thanks,
tony





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 04 Sep 2010 07:37:15 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 05:22:56 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.