[07:37] goood morning desktopers! [08:02] seb128, hello [08:03] seb128, FTR https://bugs.launchpad.net/snapd/+bug/2039052 [08:03] lissyx, hey, how are you? [08:03] -ubottu:#ubuntu-desktop- Launchpad bug 2039052 in snapd "blocking refresh does not block auto-refresh" [Undecided, New] [08:15] lissyx, I don't understand what is described in there [08:15] lissyx, do you mean you would expect the hold to make snapd refuse the manual sudo snap install --dangerous? [08:20] seb128, all I see is I instructed snapd to hold refreshes for 24h and when I perform the next step, it does a refresh [08:20] seb128, that sounds like a bug to me [08:21] and at best an undocumented behavior because I have searched docs on that matter and found nothing [08:21] where does it do a refresh? [08:21] > [task 2023-10-10T15:05:08.798Z] + sudo snap install --name firefox --dangerous ./firefox.snap [08:21] that's the end of the log? [08:21] you manually call an install, what would you expect? a reject msg? [08:22] https://treeherder.mozilla.org/logviewer?job_id=431990807&repo=try&lineNumber=80-83 [08:22] oh [08:22] looks like copy/pasting cut one line [08:22] ok, without the line the report didn't make sense [08:22] yeah sorry, I fixed it [08:23] are you sure the auto-refresh was not already started when you called the hold cmd? [08:23] you could argue than calling hold should discontinue a started refresh [08:23] my guess is that it's what is happening there [08:25] either way, it's a bug [08:25] if auto-refresh was already in progress, my hold request should either cancel it or fail [08:25] not succeed and then blow like that [08:26] I have not seen a way to block auto-refresh vs refresh [08:26] (for now I'm going to force a refresh before) [08:26] I'm unsure what you mean auto-refresh vs refresh [08:27] you mean as a sysadmin you want to forbid refresh even done manually from a sudo user? [08:27] hold is meant to stop the snap refreshing under your control [08:27] under->outside [08:28] part of the problem is actually I could not find accurate docs on auto-refresh [08:28] I think snapd just don't handle great 'conflicting' request [08:28] until I find some, I assume that holding "refresh" should also impact "auto-refresh" [08:28] or isn't able to discard a started auto-refresh [08:28] you see it also from report like https://askubuntu.com/questions/1167566/snap-not-allowing-me-to-remove-or-refresh-anything [08:29] what do you call 'refresh'? [08:29] whatever this is doing: snap refresh --hold=24h firefox [08:29] I'm not a snapd expert but my understanding is that there is only 'auto-refresh' [08:29] refresh --hold is telling snapd to not update the snap for you during that time [08:30] so basically inhibiting autorefresh for a period [08:30] there is no 'refresh' concept outside of you calling sudo snap refresh manually [08:30] but then holding that wouldn't make sense [08:30] just don't run that cmd :p [08:31] https://snapcraft.io/docs/keeping-snaps-up-to-date [08:31] ``` [08:31] The refresh hold is: [08:31] Effective on auto-refreshes and general snap refresh requests [08:31] Not effective on targeted snap refreshes [08:31] ``` [08:32] $ snap refresh -h [08:32] Usage: [08:32] snap refresh [refresh-OPTIONS] [...] [08:32] The refresh command updates the specified snaps, or all snaps in the system if [08:32] none are specified. [08:32] [08:32] so basically refresh --hold blocks the auto-refresh in background [08:32] and exclude the snap from a 'snap refresh' call [08:32] but if you snap refresh then it's not blocked [08:33] and I think your error is due to the fact that an auto-refresh was already started by the time you call the hold cmd [08:34] and snapd isn't smart enough to handle an install request where there is already a transition ongoing, as also mentioned in that askubuntu 'can't remove snap being refresh' post I shared [08:34] well this needs fixing in a way :p [08:40] lissyx, it's tricky, I think telling you that there is already an active transaction for that snap is ok [08:40] but maybe it should ask you if you want to cancel/replace with the one you try to install [08:41] or block//wait on the current transaction to be over then do the install (but then it would be a blocking call and I don't know if the snapd team want snap calls to be potentially blocking) [08:42] lissyx, to fix the CI you can probably check the 'snap changes' status before calling the install [08:42] I am just forcing a refresh [08:42] if there is a firefox auto-refresh entry then sleep & retry until it's fdone [08:42] like it's not a big deal. [08:43] I just felt it was awkward and needed an upstream fix, whatever the fix would be [08:43] well, it's like if you try to dpkg -i a deb while a dist-upgrade is ongoing [08:43] dpkg is going to tell you there is a lock in place and bail out [08:44] that's the snap equivalent [08:44] I think nowadays apt does the 'display a warning that it can't get the lock, sleep and try again until it can get the lock' [08:45] snap should probably learn to do something similar [08:45] I think as long as there's a "snap refresh hold" option, it's different [08:45] and either snap should gracefully honor it and cancel a pending auto-refresh, or explicitely fail "cannot hold with auto-refresh in progress" [08:51] fair enough [08:51] it should at least warn you at the time of the hold if there is an ongoing refresh [14:14] 23.10 time :) [16:05] https://releases.ubuntu.com/23.10/ubuntu-23.10-desktop-amd64.iso