diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-11-02 20:57:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-03 10:12:01 +0000 |
commit | 876d09bd42e24db3a498148e3305fb27f70ceda0 (patch) | |
tree | 205069dcd222a4d492e00f6a67a610b3131444f1 | |
parent | 78ae8b02bfbf0d98ae481682179439845d30c797 (diff) | |
download | openembedded-core-contrib-876d09bd42e24db3a498148e3305fb27f70ceda0.tar.gz |
apt: Do not install /var/log/apt for target
/var/log is normally a link to /var/volatile/log and /var/volatile is a
tmpfs mount. So anything created in /var/log will not be available when
the tmpfs is mounted.
Also some whitespace clean up.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/apt/apt_2.2.4.bb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/meta/recipes-devtools/apt/apt_2.2.4.bb b/meta/recipes-devtools/apt/apt_2.2.4.bb index 29fc49fb39..4e710e11a8 100644 --- a/meta/recipes-devtools/apt/apt_2.2.4.bb +++ b/meta/recipes-devtools/apt/apt_2.2.4.bb @@ -51,9 +51,8 @@ EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \ -DWITH_TESTS=False \ " -do_configure:prepend () { - echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake - +do_configure:prepend() { + echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake } # Unfortunately apt hardcodes this all over the place @@ -61,7 +60,7 @@ FILES:${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" RDEPENDS:${PN} += "bash perl dpkg" customize_apt_conf_sample() { - cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF + cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF Dir "${STAGING_DIR_NATIVE}/" { State "var/lib/apt/" @@ -114,22 +113,25 @@ EOF } do_install:append:class-native() { - customize_apt_conf_sample + customize_apt_conf_sample } do_install:append:class-nativesdk() { - customize_apt_conf_sample + customize_apt_conf_sample } - do_install:append:class-target() { - #Write the correct apt-architecture to apt.conf - APT_CONF=${D}/etc/apt/apt.conf - echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} + # Write the correct apt-architecture to apt.conf + APT_CONF=${D}${sysconfdir}/apt/apt.conf + echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} + + # Remove /var/log/apt. /var/log is normally a link to /var/volatile/log + # and /var/volatile is a tmpfs mount. So anything created in /var/log + # will not be available when the tmpfs is mounted. + rm -rf ${D}${localstatedir}/log } -# Avoid non-reproducible -src package -do_install:append () { - sed -i -e "s,${B},,g" \ - ${B}/apt-pkg/tagfile-keys.cc +do_install:append() { + # Avoid non-reproducible -src package + sed -i -e "s,${B},,g" ${B}/apt-pkg/tagfile-keys.cc } |