swupd-client icon indicating copy to clipboard operation
swupd-client copied to clipboard

Put "swupd bundle-add" into the queue if swupd update is in progress

Open bktan8 opened this issue 5 years ago • 5 comments

It would be nice if swupd would simply append the bundle-add to a queue and perform it after update is completed instead of simply telling the user the bundle-add command can't be done.

Output a message something like this: swupd update is in progress. This bundle will be added after update is completed.

bktan8 avatar Oct 23 '19 20:10 bktan8

I don't like the idea on having multiple async commands queued to be executed after update. It's hard to notify the user on errors or when it's done.

For example, you enqueue a bundle to be added. How can the user check when the bundle was definitely added?

otaviobp avatar Oct 23 '19 20:10 otaviobp

I'm just trying to come up with a solution to keep people from killing the swupd update process.

Can you output the messages to standard out? Would be great to output swupd update progress to standard out as well instead of having to go look for a log file.

bktan8 avatar Oct 23 '19 20:10 bktan8

Now I think I understood it better. We can get locked until the lock isn't released and then just proceed with the command. And print a warning like:

Error: Cannot acquire lock file, another swupd process is already running (possibly auto-update)
Waiting command to finish to proceed

Does this looks like a good approach?

otaviobp avatar Oct 23 '19 20:10 otaviobp

Sounds great!

bktan8 avatar Oct 23 '19 20:10 bktan8

It whould b nice if there was some kind of method to display what it is actually doing at the momment in the error description as i dont know if it is simply hanging or doing something usefull.

NicTanghe avatar Feb 05 '22 23:02 NicTanghe