[Rt-commit] [rtir] 02/02: Add debug messages to 1.1.1 upgrade for scrip deletes

Jim Brandt jbrandt at bestpractical.com
Thu Jun 20 09:06:45 EDT 2013


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

jbrandt pushed a commit to branch 2.9/1.1.1-upgrade-script-updates
in repository rtir.

commit fa2e021f4e31f31d7286390af59620f65b863741
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Jun 20 09:03:43 2013 -0400

    Add debug messages to 1.1.1 upgrade for scrip deletes
    
    Previously the 1.1.1 upgrade printed an error message when
    scrips to be deleted were not found. Add debug messages to make
    it clearer that the upgrade script is deleting scrips in that
    phase and it's OK if the scrips to be deleted are not found.
---
 etc/upgrade/1.1.1/content | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/etc/upgrade/1.1.1/content b/etc/upgrade/1.1.1/content
index 83fba89..0f71200 100644
--- a/etc/upgrade/1.1.1/content
+++ b/etc/upgrade/1.1.1/content
@@ -350,7 +350,14 @@ sub set_scrip_condition {
 }
 
 sub delete_scrip {
-    my $obj = get_scrip( @_ ) or return;
+    my $obj = get_scrip( @_ );
+
+    unless ( $obj ){
+        $RT::Logger->debug("Scrip " . $_[0]->{Description}
+                           . " already deleted or renamed. Nothing to do.");
+        return;
+    }
+
     # Delete has no return value
     my ($status, $msg) = $obj->Delete;
     print "Deleted scrip #". $obj->id .": ". $obj->Description ."\n";
@@ -402,6 +409,7 @@ sub set_scrip_field {
         );
     }
 }, sub {
+    $RT::Logger->debug("Deleting old scrips");
     delete_scrip( $_ ) foreach @DeleteScrips;
 } );
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Rt-commit mailing list