Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 376767 - app-portage/g-cpan-0.16.4 creates non-existent categories file without newline (inconsistent)
Summary: app-portage/g-cpan-0.16.4 creates non-existent categories file without newlin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal trivial
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 15:39 UTC by Scott Bertilson
Modified: 2014-12-19 19:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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