Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic Downloads #676

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MidnightNerd
Copy link

@MidnightNerd MidnightNerd commented Apr 17, 2021

This Pull request is related to #674.
There's one Problem the .pot file and the .po files aren't updated as i don't know where i can get the xml2po program.

This commit is for automatic Downloads of Upgrades.
The Upgrades are Downloaded automatically and installed Manually.
@Lurux
Copy link

Lurux commented Apr 25, 2021

What happens if a user starts updating while the packages are still downloading in the background?

@MidnightNerd
Copy link
Author

MidnightNerd commented Apr 26, 2021

There is a lock in /var/cache/apt/archives/ so updates will fail.
A solution could be to download the files in a different directory and move them afterwards in /var/cache/apt/archives.
However this isn't the best solution as packages are downloaded twice in the case that updates are manually applied at the same as the automatic-download scripts downloads them.

The best solution would be to make apt wait for the lock to disappear.

By the way there's the same problem with automatic upgrades. When the automatic upgrades script is running it's nearly impossible to install new packages.

@Lurux
Copy link

Lurux commented Apr 26, 2021

Ok, I guess that makes sense. Ideally we'd want to hide the tray icon while the packages are downloading.

@Lurux
Copy link

Lurux commented Apr 29, 2021

Hey, just thought about something else. When the user starts installing updates, the update manager could interrupt the automatic download script and release the lock.

If everything goes well this should mean that the downloaded packages won't be downloaded twice, but this would prevent the updates from failing because of conflicting processes.

@MidnightNerd MidnightNerd marked this pull request as draft May 13, 2021 15:53
@clefebvre clefebvre changed the title Add automatic Downloads [Next] Add automatic Downloads Jun 4, 2021
@clefebvre clefebvre changed the title [Next] Add automatic Downloads Add automatic Downloads Jul 28, 2021
@clefebvre
Copy link
Member

Is this ready for review? It looks ready to me.

I might mark it as Next for now (for Mint 21) since we've big WIP (flatpak support) coming up in the next release and we'll be doing a lot of testing.

I'm wondering also whether or not we need multiple timers for this. This feature is only useful when automatic upgrades are OFF right? So it would make sense from a user point of view to look at a combo here...

Apply updates automatically?

  • No
  • Download Only
  • Yes

And a single timer would suffice to take care of that job. If the service can find the chosen policy, we don't even need to play with the timer, it can remain active all the time.

@clefebvre clefebvre changed the title Add automatic Downloads [Next] Add automatic Downloads Nov 26, 2021
@clefebvre clefebvre changed the title [Next] Add automatic Downloads Add automatic Downloads Jan 17, 2022
@clefebvre clefebvre changed the title Add automatic Downloads [Next] Add automatic Downloads Jun 21, 2022
@mtwebster mtwebster changed the title [Next] Add automatic Downloads Add automatic Downloads Mar 21, 2023
@carlosmintfan
Copy link

@MidnightNerd could you make one switch with a combo here instead of these two toggles? (Or let me do the job...) 😃

@MidnightNerd
Copy link
Author

@carlosmintfan @clefebvre Sorry for not answering so long. The ComboBox is now implemented.

@MidnightNerd MidnightNerd marked this pull request as ready for review April 8, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants