[pve-devel] [PATCH v2 proxmox-apt-hook] initial commit
Fiona Ebner
f.ebner at proxmox.com
Fri Nov 29 15:29:24 CET 2024
Am 09.09.24 um 12:20 schrieb Fiona Ebner:
> Many people will use 'upgrade' instead of 'full-upgrade' or
> 'dist-upgrade' (e.g. [0][1]) despite the documentation explicitly
> mentioning 'dist-upgrade' [3]. Proxmox projects use different
> packaging guarantees than Debian (necessary for a rolling release
> model) and using 'upgrade' can lead to the system being stuck on
> outdated versions, or in rare cases, even break the system [2].
>
> The match is kept simple, to not accidentally catch things like
>> -o 'foo=bar upgrade baz'
> and trip up advanced users.
>
> It does not catch invocations with '-y' either, making it less likely
> to break automated user scripts. Although they should not use
> 'upgrade' either, it still would be bad to break them. If the risk is
> still considered too high, this change should wait until a major or
> at least point release.
>
> To avoid false positives, it would be necessary to properly parse
> options, which is likely not worth the effort.
>
> A downside is that the hook is only invoked after the user confirms
> the upgrade and fetching the packages, but there doesn't seem to be an
> early enough hook entry that provides access to the command line.
> Since this is just an additional safety warning to guide new users, it
> should still be good enough.
>
> It is intended that meta-packages for Proxmox projects recommend this
> package.
>
> The same postinst/postrm logic for the hook like in proxmox-ve and
> apt-listchanges is used to not have disable/re-enable the hook upon
> removal/re-install of the package.
>
> [0]: https://forum.proxmox.com/threads/150217/post-680158
> [1]: https://forum.proxmox.com/threads/140580/post-630419
> [2]: https://www.reddit.com/r/Proxmox/comments/ujqig9/use_apt_distupgrade_or_the_gui_not_apt_upgrade/
> [3]: https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#system_software_updates
>
> Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
>
> Changes in v2:
> * Mention that actual breakage is rare, being stuck on outdated
> versions is much more common.
> * Do not ask for confirmation, only log the warning.
> * Split into own package, so it can be re-used by different products.
Ping
More information about the pve-devel
mailing list