[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 8/9] Build: Fix removal of .pl suffix from scripts during installation



process_<foo>_files isn't defined to return anything. Checking its return
returned a bogus value which meant processing halted before renaming.

Also removed all bogus return values from subclassed process_<foo>_files.
---
 Build.PL |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/Build.PL b/Build.PL
index 5e085a1..d661b62 100644
--- a/Build.PL
+++ b/Build.PL
@@ -44,19 +44,16 @@ sub process_script_files
     my $self = shift;
 
     # Run the regular process_script_files action
-    $self->SUPER::process_script_files()
-        or return 1;
+    $self->SUPER::process_script_files();
 
     foreach my $script (<blib/script/*>) {
         if($script =~ /^(.*)\.pl$/) {
             unless(rename($script, $1)) {
                 $self->log_info("rename $script to $1 failed: $1\n");
-                return 1;
+                die(); # Return isn't checked
             }
         }
     }
-
-    return 0;
 }
 
 # Also process confdoc files
@@ -85,8 +82,6 @@ sub process_confdoc_files
         $self->log_info("Manifying $pod -> $outfile\n");
         $parser->parse_from_file( $pod, $outfile );
     }
-
-    return 0;
 }
 
 # Add syntaxcheck target
-- 
1.6.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]