[OE-core] [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives
Andreas Oberritter
obi at opendreambox.org
Tue Dec 6 16:37:56 UTC 2016
On 06.12.2016 17:12, Burton, Ross wrote:
>
> On 6 December 2016 at 16:08, Andreas Oberritter <obi at opendreambox.org
> <mailto:obi at opendreambox.org>> wrote:
>
> I guess ${sysconfdir_native} should work, unless someone overrides
> STAGING_ETCDIR_NATIVE. Would this be ok?
>
>
> If the recipe inherits native then the class reassigns:
>
> sysconfdir = "${STAGING_ETCDIR_NATIVE}"
>
> So you'll need to take sysconfdir, and strip off the staging directory.
I was asking because the result after stripping would essentially equal
${sysconfdir_native}:
STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
It wouldn't work if someone set it to "${STAGING_DIR_NATIVE}/foo"
without adjusting sysconfdir_native, but on the other hand someone could
just as well use "/path-outside-staging-dir-native/etc", which would
break attempts to strip the prefix, too. I'd guess the assumption that
STAGING_ETCDIR_NATIVE doesn't get changed alone should be safe.
Regards,
Andreas
More information about the Openembedded-core
mailing list