(i asked about this on the docs ML because i wanted to add a note
about this to the documentation, but it's more appropriate here, i
think.)

  after i noticed an OE recipe defining
"do_install_ptest_base:append()", i assumed that this meant that there
was something related to ptest installation that could not be done
with a regular do_install_ptest() function -- that is, for whatever
reason, something had to wait until everything else in
do_install_ptest_base() was run, so i dug into why that might be the
case, and it's a bit confusing.

  first, in all of the layers i have checked out, i found these few
examples (all in the oe-core layer and nowhere else):

$ grep -r "do_install_ptest_base:append" *
meta/recipes-devtools/quilt/quilt.inc:do_install_ptest_base:append()
meta/recipes-core/musl/libc-test_git.bb:do_install_ptest_base:append()
meta/recipes-extended/cpio/cpio_2.15.bb:do_install_ptest_base:append()
$

so obviously this is not a popular feature. so what are those recipes
doing?

  to set the stage, the ptest-runner recipe, for whatever reason,
creates a non-root user, "ptest":

  # Create a non-root user that test suites can use easily
  inherit useradd
  USERADD_PACKAGES = "${PN}"
  USERADD_PARAM:${PN} = "--system --no-create-home --home / --user-group ptest"

first impression is that lots of recipes would take advantage of this
but, no, both the cpio and quilt recipes define that append function
to do nothing more than (this is from cpio recipe):

# ptest.bbclass currently chowns the ptest directory explicitly, so we need to
# change permission after that has happened so the ptest user can write a
# temporary directory.
do_install_ptest_base:append() {
    chgrp -R ptest ${D}${PTEST_PATH}/
    chmod -R g+w ${D}${PTEST_PATH}/
}

same thing for the quilt recipe:

do_install_ptest_base:append() {
    chgrp ptest ${D}${PTEST_PATH}/test
    chmod g+w ${D}${PTEST_PATH}/test
}

it's not clear why these two recipes need to do this, just as it isn't
clear why, if this is a useful feature, these are the *only* recipes
i've run across that do this.

  finally, as for musl/libc-test_git.bb:

do_install_ptest_base:append() {
    install -Dm 0755 ${UNPACKDIR}/run-libc-ptests 
${D}${PTEST_PATH}/run-libc-ptests
}

i don't see why that can't be handled with a regular
do_install_ptest() function.

  in short, this feature is used so infrequently that it's not clear
what the point is. is it part of some legacy cruft that is no longer
necessary?

rday


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#239623): 
https://lists.openembedded.org/g/openembedded-core/message/239623
Mute This Topic: https://lists.openembedded.org/mt/119987455/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to