From 94133e1366f3b00b5ff3dfbde34871dff4971d3f Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Tue, 2 Nov 2021 20:57:24 +0100 Subject: 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. (From OE-Core rev: 876d09bd42e24db3a498148e3305fb27f70ceda0) Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- meta/recipes-devtools/apt/apt_2.2.4.bb | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'meta/recipes-devtools/apt') 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 } -- cgit v1.2.3-54-g00ecf