All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc
@ 2018-09-27  5:22 mingli.yu
  2018-09-27  9:36 ` richard.purdie
  0 siblings, 1 reply; 4+ messages in thread
From: mingli.yu @ 2018-09-27  5:22 UTC (permalink / raw)
  To: openembedded-core, richard.purdie

From: Mark Hatle <mark.hatle@windriver.com>

Other recipes, such as meta-networking inetutils
may also provide a man page for syslogd.8.
Use the alternatives mechanism to select the man
page to display.

This is a partial revert of commit:
988aad01b20c18a8850db0ad6dc547525d94116c

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
 meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index fc4e67c..c932b20 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
                     file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
                    "
 
-inherit update-rc.d systemd
+inherit update-rc.d update-alternatives systemd
 
 SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
            file://no-strip-install.patch \
@@ -58,6 +58,10 @@ do_install () {
 
 FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
 
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN}-doc = "syslogd.8"
+ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
+
 pkg_prerm_${PN} () {
 	if test "x$D" = "x"; then
 	if test "$1" = "upgrade" -o "$1" = "remove"; then
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc
  2018-09-27  5:22 [PATCH] sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc mingli.yu
@ 2018-09-27  9:36 ` richard.purdie
  2018-09-27 15:19   ` Mark Hatle
  0 siblings, 1 reply; 4+ messages in thread
From: richard.purdie @ 2018-09-27  9:36 UTC (permalink / raw)
  To: mingli.yu, openembedded-core

On Thu, 2018-09-27 at 13:22 +0800, mingli.yu@windriver.com wrote:
> From: Mark Hatle <mark.hatle@windriver.com>
> 
> Other recipes, such as meta-networking inetutils
> may also provide a man page for syslogd.8.
> Use the alternatives mechanism to select the man
> page to display.
> 
> This is a partial revert of commit:
> 988aad01b20c18a8850db0ad6dc547525d94116c
> 
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
> ---
>  meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

I'm not sure I like the sound of this. Why would it provide a man page
but not the actual tool itself?

At the very least this needs a better explanation but I'm not sure it
sounds correct or is something we want to encourage.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc
  2018-09-27  9:36 ` richard.purdie
@ 2018-09-27 15:19   ` Mark Hatle
  2018-09-27 15:49     ` richard.purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Hatle @ 2018-09-27 15:19 UTC (permalink / raw)
  To: richard.purdie, mingli.yu, openembedded-core

On 9/27/18 4:36 AM, richard.purdie@linuxfoundation.org wrote:
> On Thu, 2018-09-27 at 13:22 +0800, mingli.yu@windriver.com wrote:
>> From: Mark Hatle <mark.hatle@windriver.com>
>>
>> Other recipes, such as meta-networking inetutils
>> may also provide a man page for syslogd.8.
>> Use the alternatives mechanism to select the man
>> page to display.
>>
>> This is a partial revert of commit:
>> 988aad01b20c18a8850db0ad6dc547525d94116c
>>
>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
>> ---
>>  meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> I'm not sure I like the sound of this. Why would it provide a man page
> but not the actual tool itself?
> 
> At the very least this needs a better explanation but I'm not sure it
> sounds correct or is something we want to encourage.

The syslogd 'tool' is provided by both recipes in their respective 'runtime'
packages.  In the inet case, it is inetutils-syslogd, which has an appropriate
RCONFLICTS with the syslogd version.  So only one or the other will be
installed.  This is the conflict resolution the original commit of
"988aad01b20c18a8850db0ad6dc547525d94116c" was referring to.

HOWEVER, both syslogd and inetutils each only have a singular 'doc' package.
(As do most packages it seems.)  Since this is the case, there and syslogd and
inetutils (not syslogd part) is requested for this configuration -- AND ---
doc-pkgs are configured in, you get an error of conflicting files.

Thus a partial revert of the prior work enabled documentation to be installed
correctly.

Now does the documentation match whichever package was installed, maybe not...
but this isn't a big deal as it turns out, since most syslogd share a common set
of arguments and those are the things a run-time user would query from the man
pages.

The only alternative is to start spliting up the docs into their relevant
subpackages, as we have the runtime items.  But this then complicates the
doc-pkgs processing and related...

--Mark

> Cheers,
> 
> Richard
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc
  2018-09-27 15:19   ` Mark Hatle
@ 2018-09-27 15:49     ` richard.purdie
  0 siblings, 0 replies; 4+ messages in thread
From: richard.purdie @ 2018-09-27 15:49 UTC (permalink / raw)
  To: Mark Hatle, mingli.yu, openembedded-core

On Thu, 2018-09-27 at 10:19 -0500, Mark Hatle wrote:
> On 9/27/18 4:36 AM, richard.purdie@linuxfoundation.org wrote:
> > On Thu, 2018-09-27 at 13:22 +0800, mingli.yu@windriver.com wrote:
> > > From: Mark Hatle <mark.hatle@windriver.com>
> > > 
> > > Other recipes, such as meta-networking inetutils
> > > may also provide a man page for syslogd.8.
> > > Use the alternatives mechanism to select the man
> > > page to display.
> > > 
> > > This is a partial revert of commit:
> > > 988aad01b20c18a8850db0ad6dc547525d94116c
> > > 
> > > Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> > > Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
> > > ---
> > >  meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
> > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > I'm not sure I like the sound of this. Why would it provide a man
> > page
> > but not the actual tool itself?
> > 
> > At the very least this needs a better explanation but I'm not sure
> > it
> > sounds correct or is something we want to encourage.
> 
> The syslogd 'tool' is provided by both recipes in their respective 'runtime'
> packages.  In the inet case, it is inetutils-syslogd, which has an appropriate
> RCONFLICTS with the syslogd version.  So only one or the other will be
> installed.  This is the conflict resolution the original commit of
> "988aad01b20c18a8850db0ad6dc547525d94116c" was referring to.
> 
> HOWEVER, both syslogd and inetutils each only have a singular 'doc' package.
> (As do most packages it seems.)  Since this is the case, there and syslogd and
> inetutils (not syslogd part) is requested for this configuration -- AND ---
> doc-pkgs are configured in, you get an error of conflicting files.
> 
> Thus a partial revert of the prior work enabled documentation to be installed
> correctly.
> 
> Now does the documentation match whichever package was installed, maybe not...
> but this isn't a big deal as it turns out, since most syslogd share a common set
> of arguments and those are the things a run-time user would query from the man
> pages.
> 
> The only alternative is to start spliting up the docs into their relevant
> subpackages, as we have the runtime items.  But this then complicates the
> doc-pkgs processing and related...

This makes much more sense with more information. Could someone rewrite
the commit message please?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-27 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-27  5:22 [PATCH] sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc mingli.yu
2018-09-27  9:36 ` richard.purdie
2018-09-27 15:19   ` Mark Hatle
2018-09-27 15:49     ` richard.purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.