[devscripts] 01/02: Merge branch 'pu/yaml-excuses'

James McCoy jamessan at debian.org
Tue Jul 4 19:19:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit b1a0b0dfb2f86dfc2478d70a91895eb22b9a1b16
Merge: 65399e1 ad345f5
Author: James McCoy <jamessan at debian.org>
Date:   Tue Jul 4 14:10:55 2017 -0400

    Merge branch 'pu/yaml-excuses'
    
    Refactor grep-excuses to consume the YAML file instead of hand-parsing
    HTML.

 scripts/grep-excuses.pl | 142 +++++++++++++++++++++++++++---------------------
 1 file changed, 81 insertions(+), 61 deletions(-)

diff --cc scripts/grep-excuses.pl
index 8a4308f,2462ef0..6f7a6c9
--- a/scripts/grep-excuses.pl
+++ b/scripts/grep-excuses.pl
@@@ -22,8 -22,28 +22,29 @@@ use 5.006
  use strict;
  use warnings;
  use File::Basename;
 +use File::HomeDir;
  
+ my $yaml_broken;
+ sub have_yaml()
+ {
+     return ($yaml_broken ? 0 : 1) if defined $yaml_broken;
+ 
+     eval {
+ 	require YAML::Syck;
+     };
+ 
+     if ($@) {
+ 	if ($@ =~ m/^Can't locate YAML/) {
+ 	    $yaml_broken = 'the libyaml-syck-perl package is not installed';
+ 	} else {
+ 	    $yaml_broken = "couldn't load YAML::Syck $@";
+ 	}
+     } else {
+ 	$yaml_broken = '';
+     }
+     return $yaml_broken ? 0 : 1;
+ }
+ 
  # Needed for --wipnity option
  
  open DEBUG, ">/dev/null" or die $!;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list