Un-revert a snap

YC Cheng yc.cheng at canonical.com
Thu Oct 27 07:44:32 UTC 2016


Reply in-line, YC

2016-10-27 15:36 GMT+08:00 Didier Roche <didrocks at ubuntu.com>:

> Le 27/10/2016 à 09:18, YC Cheng a écrit :
>
> I found the following command works:
>
> snap revert --revision 29
>
> as expected.
>
>
> Indeed,
> you will notice though that any new data which have been produced after
> the revert by revision 20 will not be available to the new revision 29,
> which may not be the expected outcome.
> (So, the 2 commands are not equivalent)
>

Yes, I saw that and that make sense to me. One idea to make "refresh"
better is: we can check sum the snap and report more information. Or the
message seem not make much sense to me. Do you think this sounds like
another bug to fire ?

> We still need a command to list all revision of a snap install in the
> system (we can get that from 'df', but still better to get all info from a
> command) ?
>
> +1, as we had "snappy list -v" in 15.04.
>

Fire a bug: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1637096


> Didier
>
>
> YC
>
> 2016-10-27 14:38 GMT+08:00 Didier Roche <didrocks at ubuntu.com>:
>
>> Le 27/10/2016 à 08:32, YC Cheng a écrit :
>>
>> I think we need a way to just Un-revert from rev 20 to rev 29 without
>> remove rev 29.
>>
>> Shall we fire a bug for that if we don't have such method exists now ?
>>
>>
>> I think it's not that easy considering the associated data. You need to
>> swap them to restart from the latest version of data from rev 20 to copy to
>> 29. Explicitely removing that version makes sense in that context. Have an
>> unrevert command won't convey that notion.
>>
>> Didier
>>
>>
>>
>> 2016-10-27 14:13 GMT+08:00 Didier Roche <didrocks at ubuntu.com>:
>>
>>> Le 27/10/2016 à 03:01, Marcos Alano a écrit :
>>> > Hello guys,
>>>
>>> Hey Marcos,
>>> >
>>> >
>>> > Sorry if I'm in the wrong mailing list. That's the only one about snap
>>> i
>>> > could found. The question is: how I revert-revert (un-revert) a snap? I
>>> > can install a snap:
>>> >
>>> > (sudo snap install hello) after thatr I can upgrade a snap (snap
>>> refresh
>>> > hello --channel=beta hello) and finally revert (sudo snap revert
>>> hello).
>>> > But after that if I try to re-upgrade I just can't:
>>> >
>>> > $ sudo snap refresh --beta hello
>>> >
>>> > error: cannot refresh "hello": snap "hello" has no updates available
>>> >
>>> > I'm doing something wrong?
>>>
>>> You are not doing it wrong :) The revert command "blacklists" this
>>> particular snap revisions on purpose, so that you don't reupdate to it.
>>> However, there is a way to get back to it! You can remove explicitely
>>> that revision (without removing the current snap). Data associated to
>>> the reverted revision will be cleaned up as well.
>>> Then, you can refresh.
>>>
>>> In a concrete example with the hello snap:
>>> 20 is the revision in the stable channel, 29 corresponds to the revision
>>> in the beta channel.
>>>
>>> # Install and update
>>> $ snap install hello
>>> $ snap list hello
>>> Name   Version  Rev  Developer  Notes
>>> hello         2.10     20   canonical  -
>>> $ snap refresh hello --beta
>>> $ snap list hello
>>> Name   Version  Rev  Developer  Notes
>>> hello         2.10.1   29   canonical  -
>>>
>>> # Revert
>>> $ snap revert hello
>>> $ snap list hello
>>> Name   Version  Rev  Developer  Notes
>>> hello         2.10     20   canonical  -
>>>
>>> # Remove reverted version (and associated data)
>>> $ snap remove hello --revision=29
>>> hello removed
>>> $ snap list hello
>>> Name   Version  Rev  Developer  Notes
>>> hello         2.10     20   canonical  -
>>>
>>> # Reupdate
>>> $ snap refresh hello --beta
>>> $ snap list hello
>>> Name   Version  Rev  Developer  Notes
>>> hello         2.10.1   29   canonical  -
>>>
>>> I hope that answer your questions :)
>>> Cheers,
>>> Didier
>>>
>>>
>>> --
>>> Snapcraft mailing list
>>> Snapcraft at lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/snapcraft
>>>
>>
>>
>>
>>
>>
>> --
>> Snapcraft mailing list
>> Snapcraft at lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
>
>
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161027/2a4dec5a/attachment.html>


More information about the Snapcraft mailing list