BrewPi / brewpi-tools

Various tools to setup/update/configure BrewPi
GNU General Public License v3.0
39 stars 46 forks source link

Apt-get install can fail without running update first #36

Open elcojacobs opened 8 years ago

elcojacobs commented 8 years ago

We now run apt-get update before installing packages when the latest update is not very too long ago. This can cause a failure if the package repo was updated in the meantime. We should take the safe option and update always.

@vanosg Agree?

vanosg commented 8 years ago

If I am reading this correctly, you’re worried that if a .deb package is updated by the software maintainer, it will break things with brewpi. Do you have a specific use case we ran into that this was a problem for? It is your decision, but here are some facts from my experience:

On production machines, packages often go years without being updated, as the operators don’t want anything to ‘break’ in their production environment. Rarely does harm comes from not upgrading your packages (and often causes more havoc- that is absolutely from experience!) (that statement of course does not include critical security updates for thinks like heartbleed or shellshock)

Particularly on a Pi, the apt-get update process can take several minutes just to download the latest list of packages. This is annoying to the user if the user constantly manually updates. That said; how often do we expect the common user to run updates?

Perhaps most importantly, do you expect to take advantage of some updated feature in a package that would cause a breakage? In debian/raspbian, you usually only encounter major version updates from one version of the OS to another, for just this reason- you don’t want to break stuff that is already running. For example, updating apache on wheezy keeps you within the 2.2 version family. Updating on jessie keeps you within the 2.4 family. Despite being able to manually install 2.4 on wheezy if I wanted to, the package manager doesn’t upgrade you to an “incompatible” version program. I can’t imagine you could change any brewpi code that would require a universal update of supporting packages.

So, my opinion is this is a very small corner case that likely would not happen under normal usage. Of course, I’m sure you’re about to tell me where it happened ;) But this is the classic dilemma of weighing convenience and user annoyance against fixing every possible issue that could ever arise. My thought is that this isn’t an issue that needs addressing, I like the idea of only sporadically needing an update. Honestly, I think once a month would still be fine! But, on the other hand, its likely only developers are updating every week anyway, so why not? (think- a brew is going to take over a week, and the most likely case is that I update right before I start a brew, certainly not during one, so users would probably get updated each time anyway)

Hope that gives perspective, but it’s just my two cents.

From: Elco Jacobs [mailto:notifications@github.com] Sent: Tuesday, February 09, 2016 8:44 AM To: BrewPi/brewpi-tools brewpi-tools@noreply.github.com Cc: vanosg george.vo@alum.rpi.edu Subject: [brewpi-tools] Apt-get install can fail without running update first (#36)

We now run apt-get update before installing packages when the latest update is not very too long ago. This can cause a failure if the package repo was updated in the meantime. We should take the safe option and update always.

@vanosg https://github.com/vanosg Agree?

— Reply to this email directly or view it on GitHub https://github.com/BrewPi/brewpi-tools/issues/36 . https://github.com/notifications/beacon/ACU8sT2yw_1us2aLi-7TXvFep5TUZALfks5pifK1gaJpZM4HWce9.gif