Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 376767

Summary: app-portage/g-cpan-0.16.4 creates non-existent categories file without newline (inconsistent)
Product: Gentoo Linux Reporter: Scott Bertilson <ssb>
Component: New packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: trivial CC: perl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Scott Bertilson 2011-07-28 15:39:19 UTC
If the file does exist the g-cpan script does:

my $cat_write = IO::File->new($cat_file, '>>');
if (defined $cat_write)
{   
    print $cat_write "$GCPAN_CAT\n";
    undef $cat_write;
    autoflush STDOUT 1;
}   

If it doesn't, it does:

my $cat_write = IO::File->new($cat_file, '>');
if (defined $cat_write)
{   
    print $cat_write $GCPAN_CAT;
}   

It should write it with a newline and it should also "undef $cat_write" to close the file consistently with what's done in the other context.

Reproducible: Always
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2014-12-14 18:01:00 UTC
This makes sense. Added to git master, keeping the bug open until release.
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2014-12-19 19:44:14 UTC
(In reply to Andreas K. Hüttel from comment #1)
> This makes sense. Added to git master, keeping the bug open until release.

Fix included in 0.16.6