]> xenbits.xensource.com Git - people/gdunlap/xsatool.git/commitdiff
xsa: Return success when backport succeeds
authorGeorge Dunlap <george.dunlap@citrix.com>
Fri, 15 Sep 2017 14:56:57 +0000 (15:56 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Fri, 15 Sep 2017 14:56:57 +0000 (15:56 +0100)
Forgot to change the "unimplemented" message and return value after
implementing the 'backport' command.

While we're here, make backport a bit more chatty about what it's
doing.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
xsa.go

diff --git a/xsa.go b/xsa.go
index 76c7baad183d39ab730424fea6a5e5ee581df4ab..5ec4ba34dc82a2a6b21816680eb23abaeb369e04 100644 (file)
--- a/xsa.go
+++ b/xsa.go
@@ -197,8 +197,10 @@ func MainBackport(xsa *XSAMeta, args []string) (ret int) {
 
        var from XenVersion
        for _, to := range xsa.SupportedVersions {
+               fmt.Printf("Checking version %v...", to)
                if to == XenVersionMaster ||
                        xsa.RepoHasPatches(to) {
+                       fmt.Printf("already done\n", to)
                        from = to
                        continue
                }
@@ -221,8 +223,8 @@ func MainBackport(xsa *XSAMeta, args []string) (ret int) {
                // from = to
        }
 
-       fmt.Printf("Not implemented\n")
-       return 1
+       fmt.Printf("No more versions to backport to\n")
+       return 0
 }
 
 // xsatool NNN backport-fixup [version]