Re: Best way to handle sub-package conflicts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 18, 2018 at 12:44:37PM -0400, Digimer wrote:
> On 2018-03-18 11:48 AM, Nicolas Mailhot wrote:
> > Le dimanche 18 mars 2018 à 11:22 -0400, Digimer a écrit :
> >>
> >> So this isn't a version conflict, as seems to be what Conflicts and
> >> Obsoletes are designed to handle, if I understand properly.
> > 
> > It is a conflict between the packages.
> > 
> > What you can’t do is to allow the installation of one package to replace
> > the others, because for rpm and dnf installations and updates have the
> > same constrains (so if foo-b is allowed to replace foo-a it will do it
> > for updates too)
> > 
> > So you have too solutions:
> > 
> > 1. make the packages conflict, to force users to choose one of them.
> > Installation of each packages will be forbidden while one of the others
> > is present
> > 
> > 2. make sure the packages do not conflict, and can be parallel
> > installed. Handle role conflicts at runtime, making sure whatever is
> > executed in each role refuses to run if one of the others is already
> > running (via lockfile for example)
> 
> Hi,
> 
>   I think "Conflict" is the way to go. However, given how much the guide
> urges not to use 'Conflicts', I worry that will make it
> harder/impossible later to have the package accepted into Fedora.
> 
>   Would a use-case like this be an acceptable exception, would you guess?
> 
>   As I mentioned in my reply to Micheal, I am not worried about
> auto-removal. If it simply refused to install one sub-package until the
> other is gone, that's fine.

Maybe another way to do it is to have a configuration file describing
the "role" of the machine:

  /etc/anvil.conf:
    role = striker

The services check this file at start up (or with a systemd
precondition perhaps) and disable themselves if the role does not
match, but they can still be parallel installed.

Has the advantage that the sysadmin has to actively choose to change
the role of a machine, rather than having some random package update
change it accidentally.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux