Re: [OE-core] [master][PATCH 4/5] package / packagedata bbclass: Change the way PRAUTO and AUTOINC are handled

Richard Purdie
2020-08-25T11:00:21Z

On Mon, 2020-08-24 at 18:29 -0500, Mark Hatle wrote:
@@ -2396,6 +2399,14 @@ addtask do_package_setscene
> python do_packagedata () {
> src = d.expand("${PKGDESTWORK}")
> dest = d.expand("${WORKDIR}/pkgdata-pdata-input")
> +
> + bb.build.exec_func("package_get_auto_pr", d)
> + # Store this for later retrieval
> + data_file = src + d.expand("/${PN}_prservice.oe_nohash")
> + with open(data_file, 'w') as fd:
> + fd.write('PRAUTO: %s\n' % d.getVar('PRAUTO'))
> + fd.write('PRSERV_PV_AUTOINC: %s\n' % d.getVar("PRSERV_PV_AUTOINC"))
> +
> oe.path.copyhardlinktree(src, dest)
> }

My instinct here is to drop this oe_nohash file and instead, run a

sed -i -e "s@${PRSERV_PV_AUTOINC}@val@g" -e "s@${PRAUTO}@val2@g"

over the files in dest to expand out the values.

You can then drop much of the other changes trying to expand these
things out. We don't know what out of tree things are also using the
pkgdata files and I'm not sure we should force everything through the
API either.

Cheers,

Richard