Re: [PATCH] systemd.bbclass: Introduce do_install_append and use systemd unitdir

Phil Blundell
2013-02-13T18:08:53Z

On Wed, 2013-02-13 at 00:55 +0100, Andreas Müller wrote:
> Copying similar code in in tons of recipes is easier to maintain?

If the code that needs to go in the "tons" of recipes is just:

do_install_append() {
install -m 644 ${WORKDIR}/my.service ${D}${systemd_unitdir}/system
}

then yes, this is easier to maintain than a mechanism that magically
fishes out files from the workdir and installs them for itself. As
Richard mentioned, we have previous experience with this in the form of
binconfig (and there have been others in the past) and this sort of
thing has universally turned out to be a maintenance headache after a
while.

There's even a comment in the code you quoted:

>> + # ensure installing systemd-files only (e.g not avahi *.service)

which suggests that some poor soul has previously found that it was
installing things it oughtn't to have done.

p.