Merge lp:~bgeron/apt-btrfs-snapshot/silence-apt into lp:apt-btrfs-snapshot

Proposed by Bram Geron
Status: Merged
Merged at revision: 52
Proposed branch: lp:~bgeron/apt-btrfs-snapshot/silence-apt
Merge into: lp:apt-btrfs-snapshot
Diff against target: 6 lines (+1/-1)
1 file modified
data/80-btrfs-snapshot (+1/-1)
To merge this branch: bzr merge lp:~bgeron/apt-btrfs-snapshot/silence-apt
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+265997@code.launchpad.net

Description of the change

This silences the "Supported" message when running through APT, expands on the "Not supported" message.

I tested this by copying the file into the appropriate location, and negating the test by prepending a ! before the -x.

Thanks for giving my 2 merge proposals a look!

Bram

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the MP and sorry for the slow reply.

What do you think about simply changing the "supported" message inside apt-btfs-snapshot? Like:
- print(_("Sorry, your system lacks support for the snapshot feature"))
+ print(_("The system does not support apt-btrfs-snapshot"))

The advantage is that this way the message is translated :)

Revision history for this message
Bram Geron (bgeron) wrote :

Sounds very nice as well.

How shall we silence the hook in the case that apt-btrfs-snapshot is supported? We'll already eventually get a confirmation of the snapshot; printing "Supported" doesn't seem to give the user much info.

Such a patch would change the behaviour in that the hook would no longer complain when /usr/bin/apt-btrfs-snapshot is absent, but that doesn't seem like a big deal at all.

(Sorry for the late reply myself.. too much teaching load :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/80-btrfs-snapshot'
2--- data/80-btrfs-snapshot 2011-02-16 16:45:35 +0000
3+++ data/80-btrfs-snapshot 2015-07-27 16:05:14 +0000
4@@ -1,1 +1,1 @@
5-DPkg::Pre-Invoke {"if [ -x /usr/bin/apt-btrfs-snapshot ] && apt-btrfs-snapshot supported; then apt-btrfs-snapshot snapshot; fi "; };
6+DPkg::Pre-Invoke {"if [ -x /usr/bin/apt-btrfs-snapshot ] && apt-btrfs-snapshot supported > /dev/null; then apt-btrfs-snapshot snapshot; else echo System configuration does not support apt-btrfs-snapshot. ; fi "; };

Subscribers

People subscribed via source and target branches

to all changes: