Skip to contentSkip to conversation

should indent recipe use "${prefix}" instead of "/usr"?

DISCUSSION Robert P. J. Day 2 participants 8 messages Mar 17, 2020 – Mar 18, 2020

lore
Share & tools
lore
#0 lore raw

just noticed that ./meta-oe/recipes-extended/indent/indent_2.2.12.bb
on master branch contains the line:

  FILES_${PN}-doc += "/usr/doc/indent/indent.html"

should that not properly read:

  FILES_${PN}-doc += "${prefix}/doc/indent/indent.html"

or am i misreading something?

rday

#1 lore raw
Quoted 10 lines · Robert P. J. Day

just noticed that ./meta-oe/recipes-extended/indent/indent_2.2.12.bb
on master branch contains the line:

   FILES_${PN}-doc += "/usr/doc/indent/indent.html"

should that not properly read:

   FILES_${PN}-doc += "${prefix}/doc/indent/indent.html"

or am i misreading something?

Recipes should never use /usr directly unless they're relocating something from e.g. ${D}/usr/lib to ${D}${libdir}.

The recipe should be telling the Makefiles to install into ${docdir} (typically, /usr/share/doc).

Ross

#2 lore raw
Quoted 10 lines · Ross Burton
Quoted 9 lines · Robert P. J. Day

just noticed that ./meta-oe/recipes-extended/indent/indent_2.2.12.bb
on master branch contains the line:

   FILES_${PN}-doc += "/usr/doc/indent/indent.html"

should that not properly read:

   FILES_${PN}-doc += "${prefix}/doc/indent/indent.html"
Quoted 7 lines
Quoted 1 line

or am i misreading something?

Recipes should never use /usr directly unless they're relocating something from e.g. ${D}/usr/lib to ${D}${libdir}.

The recipe should be telling the Makefiles to install into ${docdir} (typically, /usr/share/doc).

ah, of course ... i can submit a patch for that shortly.

rday

#3 lore raw
In reply to Ross Burton
Quoted 10 lines · Ross Burton
Quoted 9 lines · Robert P. J. Day

just noticed that ./meta-oe/recipes-extended/indent/indent_2.2.12.bb
on master branch contains the line:

   FILES_${PN}-doc += "/usr/doc/indent/indent.html"

should that not properly read:

   FILES_${PN}-doc += "${prefix}/doc/indent/indent.html"
Quoted 7 lines
Quoted 1 line

or am i misreading something?

Recipes should never use /usr directly unless they're relocating something from e.g. ${D}/usr/lib to ${D}${libdir}.

The recipe should be telling the Makefiles to install into ${docdir} (typically, /usr/share/doc).

just to be clear, this depends on where the indent software actually
installs the documentation, yes? i'll have to check when i get home as to were that stuff is actually placed. for all i know, it *could* be under /usr/doc.

rday

#4 lore raw
Quoted 4 lines

just to be clear, this depends on where the indent software actually
installs the documentation, yes? i'll have to check when i get home as to were that stuff is actually placed. for all i know, it *could* be under /usr/doc.

Yes.

That FILES suggests that the makefile is installing to /usr/doc/ and needs to be told somehow to use $docdir.

Ross

#5 lore raw
Quoted 9 lines · Ross Burton
Quoted 4 lines

just to be clear, this depends on where the indent software
actually installs the documentation, yes? i'll have to check when i get home as to were that stuff is actually placed. for all i know, it *could* be under /usr/doc.

Yes.

That FILES suggests that the makefile is installing to /usr/doc/ and needs to be told somehow to use $docdir.

never scared to look silly, but i just did a sample build (randomly
chose qemuarm64 MACHINE), added:

IMAGE_FEATURES += "doc-pkgs"
RM_WORK_EXCLUDE = "indent"

to local.conf, then ran:

  $ bitbake indent

to look at everything that was generated as part of the "indent" build and how it was packaged, to understand what that:

  FILES_${PN}-doc += "/usr/doc/indent/indent.html"

line is doing in indent_2.2.12.bb, and maybe i'm misreading what was produced, but the only documentation content produced and bundled into the indent-doc rpm package was:

  $ rpm -qpl indent-doc-2.2.12-r0.aarch64.rpm
  /usr
  /usr/share
  /usr/share/man
  /usr/share/man/man1
  /usr/share/man/man1/indent.1
  $

so i'm confused as to that line's purpose ... thoughts?

rday

p.s. it's not like i'm obsessed with the indent package ... i'm more interested in knowing whether i'm examining this the right way in case it ever happens again.

#6 lore raw
Quoted 6 lines · Robert P. J. Day

never scared to look silly, but i just did a sample build (randomly
chose qemuarm64 MACHINE), added:

IMAGE_FEATURES += "doc-pkgs"
RM_WORK_EXCLUDE = "indent"

Quoted 6 lines

to local.conf, then ran:

   $ bitbake indent

to look at everything that was generated as part of the "indent" build and how it was packaged, to understand what that:

Much easier way:

$ oe-pkgdata-util list-pkg-files -p indent
Quoted 14 lines
   FILES_${PN}-doc += "/usr/doc/indent/indent.html"

line is doing in indent_2.2.12.bb, and maybe i'm misreading what was produced, but the only documentation content produced and bundled into the indent-doc rpm package was:

   $ rpm -qpl indent-doc-2.2.12-r0.aarch64.rpm
   /usr
   /usr/share
   /usr/share/man
   /usr/share/man/man1
   /usr/share/man/man1/indent.1
   $
Quoted 1 line

so i'm confused as to that line's purpose ... thoughts?

Historical, maybe. If that line doesn't serve any purpose, delete it.

Ross

#7 lore raw
Quoted 32 lines · Ross Burton
Quoted 6 lines · Robert P. J. Day

never scared to look silly, but i just did a sample build (randomly
chose qemuarm64 MACHINE), added:

IMAGE_FEATURES += "doc-pkgs"
RM_WORK_EXCLUDE = "indent"

Quoted 6 lines

to local.conf, then ran:

   $ bitbake indent

to look at everything that was generated as part of the "indent" build and how it was packaged, to understand what that:

Much easier way:

$ oe-pkgdata-util list-pkg-files -p indent
Quoted 14 lines
   FILES_${PN}-doc += "/usr/doc/indent/indent.html"

line is doing in indent_2.2.12.bb, and maybe i'm misreading what was produced, but the only documentation content produced and bundled into the indent-doc rpm package was:

   $ rpm -qpl indent-doc-2.2.12-r0.aarch64.rpm
   /usr
   /usr/share
   /usr/share/man
   /usr/share/man/man1
   /usr/share/man/man1/indent.1
   $
Quoted 4 lines
Quoted 1 line

so i'm confused as to that line's purpose ... thoughts?

Historical, maybe. If that line doesn't serve any purpose, delete it.

will do ... just nervous when something *looks* too obvious. thanks
for the guidance.

rday