Add strict option to echangelog to exit when no changed ebuilds found. (Bug 246226)
authorfuzzyray <fuzzyray@gentoo.org>
Tue, 11 Nov 2008 19:03:17 +0000 (19:03 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Tue, 11 Nov 2008 19:03:17 +0000 (19:03 -0000)
svn path=/; revision=519

trunk/ChangeLog
trunk/src/echangelog/echangelog

index 2e138337de39c29a837f3e2ae8280296a71382e2..6656598c340967cc79ecca52133729681cdffbee 100644 (file)
@@ -1,3 +1,6 @@
+2008-11-11: Paul Varner <fuzzyray@gentoo.org>
+       * echangelog: Add --strict option (Bug 246242).
+
 2008-09-17: Paul Varner <fuzzyray@gentoo.org>
        * euse: Fix check_sanity function to use get_all_make_defaults
        function when checking for the make.defaults files in the profile.
index 81d6e108e79cd0f036eb151d14fe8401f5d5c4b9..f98fed5abd8daf9f182f1ecb34e80b4f6d50d0c3 100644 (file)
@@ -21,7 +21,7 @@ $Text::Wrap::unexpand = 0;
 
 # Global variables
 my (@files, @ebuilds, @conflicts, @trivial, @unknown, @new_versions, %actions);
-my ($input, $editor, $entry, $user, $date, $text, $version, $year, $vcs);
+my ($input, $editor, $entry, $user, $date, $text, $version, $year, $vcs, $strict);
 
 my %vcs =     ( cvs => { diff => "cvs -f diff -U0",
                         status => "cvs -fn up",
@@ -41,6 +41,10 @@ my %vcs =     ( cvs => { diff => "cvs -f diff -U0",
 
 );
 
+use Getopt::Long;
+$strict = 0;
+GetOptions('strict' => \$strict);
+
 # Figure out what kind of repo we are in.
 
 if ( -d "CVS" ) {
@@ -360,6 +364,10 @@ unless (@files) {
     print STDERR "** should be run after all affected files have been added and/or\n";
     print STDERR "** modified.  Did you forget to $vcs add?\n";
     print STDERR "**\n";
+        if ($strict) {
+            print STDERR "** In strict mode, exiting\n";
+                 exit 1;
+        }
     @files = sort sortfunc @trivial;
     @files = qw/ChangeLog/ unless @files;  # last resort to put something in the list
 }