On Sat, Dec 3, 2016 at 7:34 PM, Neal Gompa <ngompa13(a)gmail.com> wrote:
On Sat, Dec 3, 2016 at 1:10 PM, Rolf Fokkens
<rolf(a)rolffokkens.nl> wrote:
> Hi all,
Hi,
> As the maintainer of bcache-tools I ran into the situation that a
collegue
> accidentally removed bcache-tools, resulting in a system that failed to boot
> after installing and using a new kernel. dnf logs showed that the package
> had been erased, with a bunch of other packages. It happened 3 weeks ago,
> and the colleague did not recall what he actually did at that time.
>
> I'm considering to make bcache-tools protected (by including a config file
> in the package in /etc/dnf/protected.d/) to prevent accidental erasure of
> the package. Is this the proper way to prevent this situation?
Yes. Remember, in DNF-1.0 you need protected_packages plugin from
dnf-plugins-core, in DNF-2.0 it's core functionality [1].
I would recommend making this a separate subpackage, and having that
package recommended by the main one. It ultimately needs to be
possible to be able to remove it, so making the specific file
removable via a subpackage is the way to go for that.
This could be a solution too.
Note: you can still remove protected packages when you really want to
by `rpm -e` or `dnf remove --setopt=protected_packages='' ...`.
Honza
[1]
http://dnf.readthedocs.io/en/latest/conf_ref.html?highlight=protected_pac...