On Tue, 2012-10-23 at 12:58 +0200, Petr Viktorin wrote:
> On 10/22/2012 08:48 PM, Alexander Bokovoy wrote:
> > On Mon, 22 Oct 2012, Petr Viktorin wrote:
> >> For example, ipapython.platform.systemd.SystemdService.is_installed().
> >> What is it supposed to do?
> >> Is it checking if the package is installed, or if IPΑ's instance of
> >> the service is configured and ready to use?
> >>
> >> There's no documentation and from the implementation it's not clear
> >> either. Since people will hopefully want to port the platform code, it
> >> would be good to document this.
> >>
> >>
> >> Also, I think the current implementation is wrong, but I can't know
> >> for sure.
> > is_installed() supposed to handle system-specific details of software
> > availability. We wanted to avoid embedding package manager-specific
> > knowledge which might not be possible to use during upgrades (to avoid
> > potential lock ups on parallel access to the same database in some
> > package managers).
> >
> > So, for httpd it is correctly reporting that the service is installed.
> >
> 
> Thanks for clearing it up.
> 
> As far as I can see, the install() method counterintuitively assumes 
> that is_installed()==True, and configures the system so that enable() 
> can be called (e.g. install() does `chkconfig --add` and enable() does 
> `chkconfig on`). Is that also correct?

Yes, afaik.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to