Merge lp:~mterry/snappy/rollback-reboot-15.04 into lp:~snappy-dev/snappy/15.04-deprecated

Proposed by Michael Terry on 2015-06-04
Status: Merged
Approved by: Sergio Schvezov on 2015-06-04
Approved revision: 451
Merged at revision: 451
Proposed branch: lp:~mterry/snappy/rollback-reboot-15.04
Merge into: lp:~snappy-dev/snappy/15.04-deprecated
Diff against target: 26 lines (+10/-0)
1 file modified
cmd/snappy/cmd_rollback.go (+10/-0)
To merge this branch: bzr merge lp:~mterry/snappy/rollback-reboot-15.04
Reviewer Review Type Date Requested Status
Sergio Schvezov 2015-06-04 Approve on 2015-06-04
Review via email: mp+261135@code.launchpad.net

Commit Message

When rolling back. output version info, especially any messages about rebooting to pick up the new version.

This is a backport of r485 from trunk.

Description of the Change

When rolling back. output version info, especially any messages about rebooting to pick up the new version.

This makes "rollback" work just like "update" which makes the same output about parts it updates.

I didn't add a test. Seems like such cmd tests tend to go in the selftests branch.

This is a backport of r485 from trunk.

To post a comment you must log in.
review: Approve
Michael Vogt (mvo) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmd/snappy/cmd_rollback.go'
2--- cmd/snappy/cmd_rollback.go 2015-04-30 16:56:15 +0000
3+++ cmd/snappy/cmd_rollback.go 2015-06-04 19:20:39 +0000
4@@ -19,6 +19,7 @@
5
6 import (
7 "fmt"
8+ "os"
9
10 "launchpad.net/snappy/priv"
11 "launchpad.net/snappy/progress"
12@@ -64,5 +65,14 @@
13 }
14 fmt.Printf("Setting %s to version %s\n", pkg, nowVersion)
15
16+ m := snappy.NewMetaRepository()
17+ installed, err := m.Installed()
18+ if err != nil {
19+ return err
20+ }
21+
22+ parts := snappy.FindSnapsByNameAndVersion(pkg, nowVersion, installed)
23+ showVerboseList(parts, os.Stdout)
24+
25 return nil
26 }

Subscribers

People subscribed via source and target branches