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:42 +0000 |
commit | 94133e1366f3b00b5ff3dfbde34871dff4971d3f (patch) | |
tree | 9f665a099778102ad0a3d85199b821ddf519d8f2 /meta/recipes-devtools/apt | |
parent | bc18edd076a929f19a11e22407e4a283e90263a5 (diff) | |
download | poky-94133e1366f3b00b5ff3dfbde34871dff4971d3f.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.
(From OE-Core rev: 876d09bd42e24db3a498148e3305fb27f70ceda0)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/apt')
-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 \ | |||
51 | -DWITH_TESTS=False \ | 51 | -DWITH_TESTS=False \ |
52 | " | 52 | " |
53 | 53 | ||
54 | do_configure:prepend () { | 54 | do_configure:prepend() { |
55 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake | 55 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake |
56 | |||
57 | } | 56 | } |
58 | 57 | ||
59 | # Unfortunately apt hardcodes this all over the place | 58 | # Unfortunately apt hardcodes this all over the place |
@@ -61,7 +60,7 @@ FILES:${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" | |||
61 | RDEPENDS:${PN} += "bash perl dpkg" | 60 | RDEPENDS:${PN} += "bash perl dpkg" |
62 | 61 | ||
63 | customize_apt_conf_sample() { | 62 | customize_apt_conf_sample() { |
64 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF | 63 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF |
65 | Dir "${STAGING_DIR_NATIVE}/" | 64 | Dir "${STAGING_DIR_NATIVE}/" |
66 | { | 65 | { |
67 | State "var/lib/apt/" | 66 | State "var/lib/apt/" |
@@ -114,22 +113,25 @@ EOF | |||
114 | } | 113 | } |
115 | 114 | ||
116 | do_install:append:class-native() { | 115 | do_install:append:class-native() { |
117 | customize_apt_conf_sample | 116 | customize_apt_conf_sample |
118 | } | 117 | } |
119 | 118 | ||
120 | do_install:append:class-nativesdk() { | 119 | do_install:append:class-nativesdk() { |
121 | customize_apt_conf_sample | 120 | customize_apt_conf_sample |
122 | } | 121 | } |
123 | 122 | ||
124 | |||
125 | do_install:append:class-target() { | 123 | do_install:append:class-target() { |
126 | #Write the correct apt-architecture to apt.conf | 124 | # Write the correct apt-architecture to apt.conf |
127 | APT_CONF=${D}/etc/apt/apt.conf | 125 | APT_CONF=${D}${sysconfdir}/apt/apt.conf |
128 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} | 126 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} |
127 | |||
128 | # Remove /var/log/apt. /var/log is normally a link to /var/volatile/log | ||
129 | # and /var/volatile is a tmpfs mount. So anything created in /var/log | ||
130 | # will not be available when the tmpfs is mounted. | ||
131 | rm -rf ${D}${localstatedir}/log | ||
129 | } | 132 | } |
130 | 133 | ||
131 | # Avoid non-reproducible -src package | 134 | do_install:append() { |
132 | do_install:append () { | 135 | # Avoid non-reproducible -src package |
133 | sed -i -e "s,${B},,g" \ | 136 | sed -i -e "s,${B},,g" ${B}/apt-pkg/tagfile-keys.cc |
134 | ${B}/apt-pkg/tagfile-keys.cc | ||
135 | } | 137 | } |