Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90502 - perl cleaner leaves empty log files when run without arguments
Summary: perl cleaner leaves empty log files when run without arguments
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-26 08:13 UTC by Jim Faulkner
Modified: 2005-06-05 06:40 UTC (History)
0 users

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 Jim Faulkner 2005-04-26 08:13:51 UTC
perl-cleaner adds a log file to /tmp every time it is run.  There's nothing wrong with that, but it probably shouldn't leave empty log files when it hasn't done anything.

delta-9 tmp # /usr/portage/dev-lang/perl/files/perl-cleaner
Usage: /usr/portage/dev-lang/perl/files/perl-cleaner [options] [ask]
        modules - rebuild perl modules
        libperl - rebuild anything linked against libperl
        ph-clean - clean out old ph files from a previous perl
        phupdate - update existing ph files, useful after an upgrade to system parts like the kernel
        phall - clean out old ph files and run phupdate
        all - rebuild modules, libperl linkages, clean ph files, and rebuild them

        ask - ask for confirmation on each emerge


For a complete log, please read /tmp/perl-cleaner.log.20050426110247.XXXXlDNlXs

delta-9 tmp # ls -al /tmp/perl-cleaner.log.20050426110247.XXXXlDNlXs
-rw-------  1 root root 0 Apr 26 11:02 /tmp/perl-cleaner.log.20050426110247.XXXXlDNlXs
delta-9 tmp #

An easy way to accomplish this would be to replace this:
   echo
   echo "For a complete log, please read $LOG"
   echo

with this:
   if [ -s $LOG ] ; then
      echo
      echo "For a complete log, please read $LOG"
      echo
   else
      rm -f $LOG
   fi


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Michael Cummings (RETIRED) gentoo-dev 2005-04-30 05:27:33 UTC
Good point. Let me get through some of the critical bugs and I'll swing back to take care of this.
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2005-06-05 06:40:35 UTC
fixed and on its way into the tree. Sorry for the delay :)