Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-24 Thread Ola Lundqvist
Hi Julian

On Sun, Sep 23, 2007 at 03:12:05PM +, Julian Mehnle wrote:
 Ola Lundqvist wrote:
  On Sun, Sep 23, 2007 at 11:49:36AM +, Julian Mehnle wrote:
   So I think debarchiver should check $! and $@ rather than the result
   of do() (unless ($t)), which really says nothing about whether the
   file could be read and compiled successfully, UNLESS you require
   every configuration file to end with a true-valued statement (which
   the debarchiver man-page says nothing about).  And I would not make
   such a requirement.  Checking $! and $@ should do just fine.
 
  The problem here is that $! $@ can contain quite different values, as
  you noticed... I do not know if perl actually requires the file to end
  with a true statement or not. Maybe it does. I have not checked the
  documentation for that.
 
 `perldoc -f do` says:
 
 | If do cannot read the file, it returns undef and sets $! to the error. 
 | If do can read the file but cannot compile it, it returns undef and
 | sets an error message in [EMAIL PROTECTED]   If the file is successfully 
 compiled,
 | do returns the value of the last expression evaluated.
 
 Thus relying on $! and $@ is officially sanctioned.

I can not see that. It do not say anything about the $! or $@ when the
expression return true. It only tell that they are set when it returns
false.

The above statements formalized:
If X return undef and set $!
if Y return undef and set $@
if Z return $lastexpr

I can not see anything about
if return true, set $! = 0, set $@ = 0;

It may be so that it do that and I did some test code that verifies that.
However I do not want to rely on undocumented features too much if
there are documented features that I can rely on.

 I think the check whether do() returns true idiom is a remnant from old 
 times when Perl didn't know exceptions ($@).

This is the result of the test code:

Condition return$!  $@
--
Read errorundef string 
Syntax error  undef  string
No statements undef  
last 00  
last 11  

The  above could also be undef, but I did not have the time to check that
now.

But this is from my perl version. In your case for No statements the
value for $! and $@ was ^I. This means that if I would rely on that
$! and $@ is the empty string, it would have failed in your case
anyway.

I can provide some testing code to you if you want so we can determine
the table above for your perl version.

Best regards,

// Ola

-- 
 - Ola Lundqvist ---
/  [EMAIL PROTECTED] Annebergsslingan 37  \
|  [EMAIL PROTECTED] 654 65 KARLSTAD  |
|  http://opalsys.net/ +46 (0)70-332 1551   |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-24 Thread Julian Mehnle
Ola Lundqvist wrote:
  `perldoc -f do` says:
  | If do cannot read the file, it returns undef and sets $! to the
  | error. If do can read the file but cannot compile it, it returns
  | undef and sets an error message in [EMAIL PROTECTED]   If the file is
  | successfully compiled, do returns the value of the last
  | expression evaluated.
 
  Thus relying on $! and $@ is officially sanctioned.

 I can not see that. It do not say anything about the $! or $@ when the
 expression return true. It only tell that they are set when it returns
 false.

 The above statements formalized:
 If X return undef and set $!
 if Y return undef and set $@
 if Z return $lastexpr

 I can not see anything about
 if return true, set $! = 0, set $@ = 0;
 
 It may be so that it do that and I did some test code that verifies
 that. However I do not want to rely on undocumented features too much
 if there are documented features that I can rely on.

You're right, and it even actually says (in `perldoc perlvar`) that $! 
does NOT get set to 0 if there is no failure.  Perhaps you could 
explicitly set $! to 0 before the do() call, though?

About $@, I'm certain that it gets set to  if the file could be read and 
compiled successfully.

  I think the check whether do() returns true idiom is a remnant from
  old times when Perl didn't know exceptions ($@).

 This is the result of the test code:

 Condition return$!  $@
 --
 Read errorundef string 
 Syntax error  undef  string
 No statements undef  
 last 00  
 last 11  

 The  above could also be undef, but I did not have the time to check
 that now.

 But this is from my perl version. In your case for No statements the
 value for $! and $@ was ^I.

Maybe this is a syslog oddity?  I've never seen $! or $@ getting set 
to ^I (\t), so I don't think this is their actual value.

 I can provide some testing code to you if you want so we can determine
 the table above for your perl version.

I doubt it would be any different with Perl 5.8.8, which is what I'm 
running.

Well, we could try setting $! to 0 before the do() call and checking 
($! || $@) afterwards.  If that doesn't work, then the debarchiver 
man-page would have to explain that there needs to be a final, true- 
valued statement in every config file.


signature.asc
Description: This is a digitally signed message part.


Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-24 Thread Ola Lundqvist
Hi Julian

On Mon, Sep 24, 2007 at 10:34:59AM +, Julian Mehnle wrote:
 Ola Lundqvist wrote:
   `perldoc -f do` says:
   | If do cannot read the file, it returns undef and sets $! to the
   | error. If do can read the file but cannot compile it, it returns
   | undef and sets an error message in [EMAIL PROTECTED]   If the file is
   | successfully compiled, do returns the value of the last
   | expression evaluated.
  
   Thus relying on $! and $@ is officially sanctioned.
 
  I can not see that. It do not say anything about the $! or $@ when the
  expression return true. It only tell that they are set when it returns
  false.
 
  The above statements formalized:
  If X return undef and set $!
  if Y return undef and set $@
  if Z return $lastexpr
 
  I can not see anything about
  if return true, set $! = 0, set $@ = 0;
  
  It may be so that it do that and I did some test code that verifies
  that. However I do not want to rely on undocumented features too much
  if there are documented features that I can rely on.
 
 You're right, and it even actually says (in `perldoc perlvar`) that $! 
 does NOT get set to 0 if there is no failure.  Perhaps you could 
 explicitly set $! to 0 before the do() call, though?

Ok, good to know.

 About $@, I'm certain that it gets set to  if the file could be read and 
 compiled successfully.

Ok that is likely so.

   I think the check whether do() returns true idiom is a remnant from
   old times when Perl didn't know exceptions ($@).
 
  This is the result of the test code:
 
  Condition return$!  $@
  --
  Read errorundef string 
  Syntax error  undef  string
  No statements undef  
  last 00  
  last 11  
 
  The  above could also be undef, but I did not have the time to check
  that now.
 
  But this is from my perl version. In your case for No statements the
  value for $! and $@ was ^I.
 
 Maybe this is a syslog oddity?  I've never seen $! or $@ getting set 
 to ^I (\t), so I don't think this is their actual value.

Ahh ^I = \t, then I understand. Yes that is likely a syslog oddity.

  I can provide some testing code to you if you want so we can determine
  the table above for your perl version.
 
 I doubt it would be any different with Perl 5.8.8, which is what I'm 
 running.
 
 Well, we could try setting $! to 0 before the do() call and checking 
 ($! || $@) afterwards.  If that doesn't work, then the debarchiver 

That could be a solution, yes. I'll check that out.

 man-page would have to explain that there needs to be a final, true- 
 valued statement in every config file.

True.

I'll come up with a solution.

I hope you do not see this log everytime now at least. :)

Best regards,

// Ola

-- 
 - Ola Lundqvist ---
/  [EMAIL PROTECTED] Annebergsslingan 37  \
|  [EMAIL PROTECTED] 654 65 KARLSTAD  |
|  http://opalsys.net/ +46 (0)70-332 1551   |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-23 Thread Ola Lundqvist
tags 443405 + unreproducible help
thanks

Hi Julian

I have now tried to reproduce your problem, but failed.

The current code that cause the warning looks like this:

if (-e $etcconfigfile) {
my $t = do $etcconfigfile;
unless ($t) {
pdebug(3, Loading config file $etcconfigfile:\n\t$!\n\t$@);
}
}

So I created the following test code:

my $t = do test.conf;
unless ($t) {
print [EMAIL PROTECTED];
}

And then copied your config file to test.conf.

I did not get any output.

This means that you must have some local problem, or that this is a
bug in perl for the version you are using.

I have also copied in your version to the debarchiver.conf file
with a new installation of debarchiver, and I can not get the same
fault as you.

Do you have any special version of perl, or other things
that can cause this problem?

Best regards,

// Ola

On Sat, Sep 22, 2007 at 01:27:11AM +, Julian Mehnle wrote:
 Ola Lundqvist wrote:
  I think you need to end the configuration file with
 
  1;
 
 Why would that make a difference?  The last statement is ...
 
   $gpgkey = '74E1D63F';
 
 which returns a true value.  So this is equivalent to a trailing 1;.
 
  Please try that and tell me if the warning disappear.
 
 As expected, it did not make the warning go away.
 
  The ^I part is the error output from perl. It should contain the error
  code and error string. I do not know why it is ^I in your case.
 
 Odd.
 
 So can you do something about debarchiver filling up my syslog despite 
 everything working fine?



-- 
 - Ola Lundqvist ---
/  [EMAIL PROTECTED] Annebergsslingan 37  \
|  [EMAIL PROTECTED] 654 65 KARLSTAD  |
|  http://opalsys.net/ +46 (0)70-332 1551   |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-23 Thread Julian Mehnle
Ola Lundqvist wrote:
 I have now tried to reproduce your problem, but failed.

 The current code that cause the warning looks like this:

 if (-e $etcconfigfile) {
 my $t = do $etcconfigfile;
 unless ($t) {
   pdebug(3, Loading config file $etcconfigfile:\n\t$!\n\t$@);
 }
 }

 So I created the following test code:

 my $t = do test.conf;
 unless ($t) {
 print [EMAIL PROTECTED];
 }

 And then copied your config file to test.conf.

 I did not get any output.

Oh, now I get what the problem is!

I had sent you only my input.conf file from my (currently single) 
debarchive's incoming/ directory, but not my /etc/debarchiver.conf file, 
because I had all configuration directives commented out in the latter!  
(I don't want to set any options globally.)

Now it occurs to me that debarchiver reads /etc/debarchiver.conf and since 
it contains only empty and comment lines, the result of do() is 0, but $! 
and $@ are empty since no error actually occurs.  (Still no idea where 
the '^I's come from, though.)

So I think debarchiver should check $! and $@ rather than the result of 
do() (unless ($t)), which really says nothing about whether the file 
could be read and compiled successfully, UNLESS you require every 
configuration file to end with a true-valued statement (which the 
debarchiver man-page says nothing about).  And I would not make such a 
requirement.  Checking $! and $@ should do just fine.

If, however, you absolutely do not want to do this, then consider this bug 
report a request for documentation of the config files must end with 1; 
requirement.

Thanks,
Julian.
# This is a sample configuration file.
# 
# The configuration file consist of perl variables that can be set to
# different values. The suggested value in this sample configuration file
# is the default value set by debarchiver.

# $destdir = /var/lib/debarchiver/dists;
# $inputdir = /var/lib/debarchiver/incoming;
# $copycmd = cp -af;
# $movecmd = mv;
# $rmcmd = rm -f;
# $vrfycmd = dscverify;
# $cinstall = installed;
# $distinputcriteria = ^linux.*\\.deb\$;

# Choose to enable or disable signature verification for packages uploaded
# into $inputdir (not %distinputdirs).
# $verifysignatures = 0;

# Choose to enable or disable signature verification for packages uploaded
# into %distinputdirs. This works indepentently from $verifysignatures.
# $verifysignaturesdistinput = 0;

# Generate bzip2 files or not (1 will generate and 0 will not do so).
# $bzip = 0;

# This one is used for debarchives that matches distinput criteria.
# %distinputdirs =
#   (
#   stable = 'stable',
#   testing = 'testing',
#   unstable = 'unstable'
#   );

# What distributions that should exist.
# @distributions = ('stable', 'testing', 'unstable');

# Default major section to install to, if not defined in the uploaded files.
# $majordefault = main;

# Mapping of aliases.
# OBS! If you create a mapping that will only be created if you have
#  added the key to @distributions above. If you want the symlink to be created
#  in a proper way you MUST add them at the same time. Else you will have
#  two directories that are independent (and not mapped).
# %distmapping =
#   (
#   stable = 'etch',
#   testing = 'lenny',
#   unstable = 'sid'
#   );

# What architectures that should exist (automatically created).
# All and source will exist anyway.
# @architectures = ('i386');

# What sections that should exist.
# @sections = ('main', 'contrib', 'non-free');

# What changes file fields that should be used for determine where to send
# mail. If there is an '@' character is found here it will be used directly
# without consulting the .changes-file. Default is to mail no one. If there
# is an '@' character in the beginning, the user owning the file will be
# prepended.
# @mailtos = ('Maintainer',  The Maintainer field in control file
# 'Uploaders',   The Uploaders field in control file
# '@bar.com',User id @bar.com that own the changes file
# '[EMAIL PROTECTED]',   An explicit email address
# 'Changed-By'); The email in the changelog file

# If you want additional information in the generated Release files you have
# to set this hash-value.  Supported keys are origin, label, and description.

# %release = (  'origin' = ,
#   'label' = ,
#   'description' = );

# Where to put the apt-ftparchive cache files if --index is used.  Default
# is /var/cache/debarchiver.  Must be a directory.
# $cachedir = '/var/cache/debarchiver';

# GnuPG key to use to sign the archive.
# $gpgkey = ;

# File to provide password to GnuPG.
# If you use a key with an empty passphrase, set this variable to 0 or .
# If the file does not exist, debarchiver will also fall back to .
# $gpgpassfile = $ENV{HOME}/.gnupg/passphrase;


signature.asc
Description: This is a digitally signed message part.


Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-23 Thread Ola Lundqvist
Hi

On Sun, Sep 23, 2007 at 11:49:36AM +, Julian Mehnle wrote:
 Ola Lundqvist wrote:
  I have now tried to reproduce your problem, but failed.
 
  The current code that cause the warning looks like this:
 
  if (-e $etcconfigfile) {
  my $t = do $etcconfigfile;
  unless ($t) {
  pdebug(3, Loading config file $etcconfigfile:\n\t$!\n\t$@);
  }
  }
 
  So I created the following test code:
 
  my $t = do test.conf;
  unless ($t) {
  print [EMAIL PROTECTED];
  }
 
  And then copied your config file to test.conf.
 
  I did not get any output.
 
 Oh, now I get what the problem is!

Good.

 I had sent you only my input.conf file from my (currently single) 
 debarchive's incoming/ directory, but not my /etc/debarchiver.conf file, 
 because I had all configuration directives commented out in the latter!  
 (I don't want to set any options globally.)
 
 Now it occurs to me that debarchiver reads /etc/debarchiver.conf and since 
 it contains only empty and comment lines, the result of do() is 0, but $! 
 and $@ are empty since no error actually occurs.  (Still no idea where 
 the '^I's come from, though.)

Then I understand.

 So I think debarchiver should check $! and $@ rather than the result of 
 do() (unless ($t)), which really says nothing about whether the file 
 could be read and compiled successfully, UNLESS you require every 
 configuration file to end with a true-valued statement (which the 
 debarchiver man-page says nothing about).  And I would not make such a 
 requirement.  Checking $! and $@ should do just fine.

The problem here is that $! $@ can contain quite different values, as
you noticed... I do not know if perl actually requires the file to end
with a true statement or not. Maybe it does. I have not checked the
documentation for that.

 If, however, you absolutely do not want to do this, then consider this bug 
 report a request for documentation of the config files must end with 1; 
 requirement.

I'll check which is best. I'll consider checking $! but if that is not
possible, I'll update the documentation instead.

Best regards,

// Ola

 Thanks,
 Julian.

 # This is a sample configuration file.
 # 
 # The configuration file consist of perl variables that can be set to
 # different values. The suggested value in this sample configuration file
 # is the default value set by debarchiver.
 
 # $destdir = /var/lib/debarchiver/dists;
 # $inputdir = /var/lib/debarchiver/incoming;
 # $copycmd = cp -af;
 # $movecmd = mv;
 # $rmcmd = rm -f;
 # $vrfycmd = dscverify;
 # $cinstall = installed;
 # $distinputcriteria = ^linux.*\\.deb\$;
 
 # Choose to enable or disable signature verification for packages uploaded
 # into $inputdir (not %distinputdirs).
 # $verifysignatures = 0;
 
 # Choose to enable or disable signature verification for packages uploaded
 # into %distinputdirs. This works indepentently from $verifysignatures.
 # $verifysignaturesdistinput = 0;
 
 # Generate bzip2 files or not (1 will generate and 0 will not do so).
 # $bzip = 0;
 
 # This one is used for debarchives that matches distinput criteria.
 # %distinputdirs =
 # (
 # stable = 'stable',
 # testing = 'testing',
 # unstable = 'unstable'
 # );
 
 # What distributions that should exist.
 # @distributions = ('stable', 'testing', 'unstable');
 
 # Default major section to install to, if not defined in the uploaded files.
 # $majordefault = main;
 
 # Mapping of aliases.
 # OBS! If you create a mapping that will only be created if you have
 #  added the key to @distributions above. If you want the symlink to be 
 created
 #  in a proper way you MUST add them at the same time. Else you will have
 #  two directories that are independent (and not mapped).
 # %distmapping =
 # (
 # stable = 'etch',
 # testing = 'lenny',
 # unstable = 'sid'
 # );
 
 # What architectures that should exist (automatically created).
 # All and source will exist anyway.
 # @architectures = ('i386');
 
 # What sections that should exist.
 # @sections = ('main', 'contrib', 'non-free');
 
 # What changes file fields that should be used for determine where to send
 # mail. If there is an '@' character is found here it will be used directly
 # without consulting the .changes-file. Default is to mail no one. If there
 # is an '@' character in the beginning, the user owning the file will be
 # prepended.
 # @mailtos = ('Maintainer',  The Maintainer field in control file
 #   'Uploaders',   The Uploaders field in control file
 # '@bar.com',User id @bar.com that own the changes 
 file
 # '[EMAIL PROTECTED]',   An explicit email address
 # 'Changed-By'); The email in the changelog file
 
 # If you want additional information in the generated Release files you have
 # to set this hash-value.  Supported keys are origin, label, and description.
 
 # %release = ('origin' = ,
 # 'label' = ,
 # 'description' 

Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-23 Thread Ola Lundqvist
Hi again

Now I have checked the documentation and it says like this:

If do cannot read the file, it returns undef and sets $!  to the error.
If do can read the file but cannot compile it, it returns undef and sets
an error message in $@ . If the file is successfully compiled, do returns
the value of the last expression evaluated.

From this I can only determine that I have to document the return
value in the configuration file.

I checked the config file and it do not return anything. That will
also be corrected.

Thanks for your help.

Best regards,

// Ola

On Sun, Sep 23, 2007 at 11:49:36AM +, Julian Mehnle wrote:
 Ola Lundqvist wrote:
  I have now tried to reproduce your problem, but failed.
 
  The current code that cause the warning looks like this:
 
  if (-e $etcconfigfile) {
  my $t = do $etcconfigfile;
  unless ($t) {
  pdebug(3, Loading config file $etcconfigfile:\n\t$!\n\t$@);
  }
  }
 
  So I created the following test code:
 
  my $t = do test.conf;
  unless ($t) {
  print [EMAIL PROTECTED];
  }
 
  And then copied your config file to test.conf.
 
  I did not get any output.
 
 Oh, now I get what the problem is!
 
 I had sent you only my input.conf file from my (currently single) 
 debarchive's incoming/ directory, but not my /etc/debarchiver.conf file, 
 because I had all configuration directives commented out in the latter!  
 (I don't want to set any options globally.)
 
 Now it occurs to me that debarchiver reads /etc/debarchiver.conf and since 
 it contains only empty and comment lines, the result of do() is 0, but $! 
 and $@ are empty since no error actually occurs.  (Still no idea where 
 the '^I's come from, though.)
 
 So I think debarchiver should check $! and $@ rather than the result of 
 do() (unless ($t)), which really says nothing about whether the file 
 could be read and compiled successfully, UNLESS you require every 
 configuration file to end with a true-valued statement (which the 
 debarchiver man-page says nothing about).  And I would not make such a 
 requirement.  Checking $! and $@ should do just fine.
 
 If, however, you absolutely do not want to do this, then consider this bug 
 report a request for documentation of the config files must end with 1; 
 requirement.
 
 Thanks,
 Julian.

 # This is a sample configuration file.
 # 
 # The configuration file consist of perl variables that can be set to
 # different values. The suggested value in this sample configuration file
 # is the default value set by debarchiver.
 
 # $destdir = /var/lib/debarchiver/dists;
 # $inputdir = /var/lib/debarchiver/incoming;
 # $copycmd = cp -af;
 # $movecmd = mv;
 # $rmcmd = rm -f;
 # $vrfycmd = dscverify;
 # $cinstall = installed;
 # $distinputcriteria = ^linux.*\\.deb\$;
 
 # Choose to enable or disable signature verification for packages uploaded
 # into $inputdir (not %distinputdirs).
 # $verifysignatures = 0;
 
 # Choose to enable or disable signature verification for packages uploaded
 # into %distinputdirs. This works indepentently from $verifysignatures.
 # $verifysignaturesdistinput = 0;
 
 # Generate bzip2 files or not (1 will generate and 0 will not do so).
 # $bzip = 0;
 
 # This one is used for debarchives that matches distinput criteria.
 # %distinputdirs =
 # (
 # stable = 'stable',
 # testing = 'testing',
 # unstable = 'unstable'
 # );
 
 # What distributions that should exist.
 # @distributions = ('stable', 'testing', 'unstable');
 
 # Default major section to install to, if not defined in the uploaded files.
 # $majordefault = main;
 
 # Mapping of aliases.
 # OBS! If you create a mapping that will only be created if you have
 #  added the key to @distributions above. If you want the symlink to be 
 created
 #  in a proper way you MUST add them at the same time. Else you will have
 #  two directories that are independent (and not mapped).
 # %distmapping =
 # (
 # stable = 'etch',
 # testing = 'lenny',
 # unstable = 'sid'
 # );
 
 # What architectures that should exist (automatically created).
 # All and source will exist anyway.
 # @architectures = ('i386');
 
 # What sections that should exist.
 # @sections = ('main', 'contrib', 'non-free');
 
 # What changes file fields that should be used for determine where to send
 # mail. If there is an '@' character is found here it will be used directly
 # without consulting the .changes-file. Default is to mail no one. If there
 # is an '@' character in the beginning, the user owning the file will be
 # prepended.
 # @mailtos = ('Maintainer',  The Maintainer field in control file
 #   'Uploaders',   The Uploaders field in control file
 # '@bar.com',User id @bar.com that own the changes 
 file
 # '[EMAIL PROTECTED]',   An explicit email address
 # 'Changed-By'); The email in the changelog file
 
 # If you want additional information in the generated Release files you have
 # to set 

Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-23 Thread Julian Mehnle
Ola Lundqvist wrote:
 On Sun, Sep 23, 2007 at 11:49:36AM +, Julian Mehnle wrote:
  So I think debarchiver should check $! and $@ rather than the result
  of do() (unless ($t)), which really says nothing about whether the
  file could be read and compiled successfully, UNLESS you require
  every configuration file to end with a true-valued statement (which
  the debarchiver man-page says nothing about).  And I would not make
  such a requirement.  Checking $! and $@ should do just fine.

 The problem here is that $! $@ can contain quite different values, as
 you noticed... I do not know if perl actually requires the file to end
 with a true statement or not. Maybe it does. I have not checked the
 documentation for that.

`perldoc -f do` says:

| If do cannot read the file, it returns undef and sets $! to the error. 
| If do can read the file but cannot compile it, it returns undef and
| sets an error message in [EMAIL PROTECTED]   If the file is successfully 
compiled,
| do returns the value of the last expression evaluated.

Thus relying on $! and $@ is officially sanctioned.

I think the check whether do() returns true idiom is a remnant from old 
times when Perl didn't know exceptions ($@).


signature.asc
Description: This is a digitally signed message part.


Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-22 Thread Ola Lundqvist
Hi Julian

On Sat, Sep 22, 2007 at 01:27:11AM +, Julian Mehnle wrote:
 Ola Lundqvist wrote:
  I think you need to end the configuration file with
 
  1;
 
 Why would that make a difference?  The last statement is ...
 
   $gpgkey = '74E1D63F';
 
 which returns a true value.  So this is equivalent to a trailing 1;.

That is what I was unsure of. I did not have the time to check.

  Please try that and tell me if the warning disappear.
 
 As expected, it did not make the warning go away.

Ok.

  The ^I part is the error output from perl. It should contain the error
  code and error string. I do not know why it is ^I in your case.
 
 Odd.
 
 So can you do something about debarchiver filling up my syslog despite 
 everything working fine?

I'll see what I can do about this. One way is of course to revert the
latest change, but I want to know why it behaves like this...

Best regards,

// Ola

-- 
 - Ola Lundqvist ---
/  [EMAIL PROTECTED] Annebergsslingan 37  \
|  [EMAIL PROTECTED] 654 65 KARLSTAD  |
|  http://opalsys.net/ +46 (0)70-332 1551   |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-21 Thread Ola Lundqvist
Hi Julian

I think you need to end the configuration file with

1;

Please try that and tell me if the warning disappear.

The ^I part is the error output from perl. It should contain the error
code and error string. I do not know why it is ^I in your case.

Best regards,

// Ola

On Fri, Sep 21, 2007 at 12:33:20PM +, Julian Mehnle wrote:
 Ola Lundqvist wrote:
  Please send me the output from
 
  debarchiver yournormaloptions --dl 5
 
  and the /etc/debarchiver.conf file.
 
 See attachments.

 io:~ sudo -H -u bitshapers /usr/bin/debarchiver -so --scanall -i 
 /proj/bitshapers/debarchive/incoming --dl 5
 Password:
 Warning: Loading config file /etc/debarchiver.conf:
 
 
 Debug: Change to dir /proj/bitshapers/debarchive/incoming
 Debug: Change to dir /proj/bitshapers/debarchive/dists
 Debug: Read Release file in sid/main/binary-i386
 Debug: Read Release file in sid/main/binary-amd64
 Debug: Read Release file in sid/main/source
 Debug: Change to dir /proj/bitshapers/debarchive/incoming
 Message: Creating lockfile debarchiver.lock
 Debug: CMD: touch debarchiver.lock
 Debug: Creating lockfile debarchiver.lock
 
 Debug: Change to dir /proj/bitshapers/debarchive/incoming
 Message: Removing lockfile debarchiver.lock.
 Debug: CMD: rm debarchiver.lock
 Debug: Removing lockfile debarchiver.lock.
 
 Debug: Change to dir /proj/bitshapers/debarchive/dists
 Message: Creating lockfile /proj/bitshapers/debarchive/dists/debarchiver.lock
 Debug: CMD: touch /proj/bitshapers/debarchive/dists/debarchiver.lock
 Debug: Creating lockfile /proj/bitshapers/debarchive/dists/debarchiver.lock
 
 Debug: Create apt-ftparchive config
 Message: Index source and package files in /proj/bitshapers/debarchive/dists
 Debug: CMD: apt-ftparchive generate 
 /proj/bitshapers/debarchive/dists/.apt-ftparchive.conf
  dists/unstable/main/binary-i386/: New 1946B 1 files 99.2kB 0s
  dists/unstable/main/binary-amd64/: New 20B 0 files 0B 0s
  dists/unstable/main/binary-all/: New 12.4kB 11 files 593kB 0s
  dists/unstable/main/source/:  imap-mailbox-maintenance has no source 
 override entry
   imap-mailbox-maintenance has no binary override entry either
   mail-spf-perl has no source override entry
   mail-spf-perl has no binary override entry either
   mail-spf-test-perl has no source override entry
   mail-spf-test-perl has no binary override entry either
   thingy has no source override entry
   thingy has no binary override entry either
   libwookee-perl has no source override entry
   libwookee-perl has no binary override entry either
   libnetaddr-ip-perl has no source override entry
   libnetaddr-ip-perl has no binary override entry either
   libmodule-build-perl has no source override entry
   libmodule-build-perl has no binary override entry either
   apache-auth-userdb-perl has no source override entry
   apache-auth-userdb-perl has no binary override entry either
   net-dns-resolver-programmable-perl has no source override entry
   net-dns-resolver-programmable-perl has no binary override entry either
   libdbix-dynaclass-perl has no source override entry
   libdbix-dynaclass-perl has no binary override entry either
   libclass-data-perl has no source override entry
   libclass-data-perl has no binary override entry either
  11 pkgs in 0s
 Done Packages, Starting contents.
  dists/unstable/Contents-i386: New 5746B 1 files 99.2kB 0s
  dists/unstable/Contents-amd64: New 20B 0 files 0B 0s
  dists/unstable/Contents-all: New 21.4kB 11 files 593kB 0s
 Done. 692kB in 12 archives. Took 0s
 Debug: Index source and package files in /proj/bitshapers/debarchive/dists
 
 Debug: Append to unstable/Contents-i386
 Debug: Read unstable/Contents-all
 Message: Compress merged Contents files
 Debug: CMD: gzip unstable/Contents-i386 -c  unstable/Contents-i386.gz
 Debug: Compress merged Contents files
 
 Debug: Append to unstable/Contents-amd64
 Debug: Read unstable/Contents-all
 Message: Compress merged Contents files
 Debug: CMD: gzip unstable/Contents-amd64 -c  unstable/Contents-amd64.gz
 Debug: Compress merged Contents files
 
 Debug: Append to unstable/main/binary-binary-i386/Packages
 Debug: Read unstable/main/binary-all/Packages
 Message: Compress merged Packages file with gzip
 Debug: CMD: gzip unstable/main/binary-i386/Packages -c  
 unstable/main/binary-i386/Packages.gz
 Debug: Compress merged Packages file with gzip
 
 Debug: Append to unstable/main/binary-binary-amd64/Packages
 Debug: Read unstable/main/binary-all/Packages
 Message: Compress merged Packages file with gzip
 Debug: CMD: gzip unstable/main/binary-amd64/Packages -c  
 unstable/main/binary-amd64/Packages.gz
 Debug: Compress merged Packages file with gzip
 
 Debug: Create apt-ftparchive Release config for unstable
 Message: Generate Release file for unstable
 Debug: CMD: apt-ftparchive -c unstable/.apt-ftparchive.conf release unstable 
  Release
 Debug: Generate Release file for unstable
 
 Message: Put Release for unstable in the right location
 Debug: CMD: mv Release unstable/Release
 

Bug#443405: Bug#437508: debarchiver now _always_ warns: Loading config file /etc/debarchiver.conf:\n^I\n^I in syslog, even if no error condition

2007-09-21 Thread Julian Mehnle
Ola Lundqvist wrote:
 I think you need to end the configuration file with

 1;

Why would that make a difference?  The last statement is ...

  $gpgkey = '74E1D63F';

which returns a true value.  So this is equivalent to a trailing 1;.

 Please try that and tell me if the warning disappear.

As expected, it did not make the warning go away.

 The ^I part is the error output from perl. It should contain the error
 code and error string. I do not know why it is ^I in your case.

Odd.

So can you do something about debarchiver filling up my syslog despite 
everything working fine?


signature.asc
Description: This is a digitally signed message part.