summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorLinus Wallgren <linus.wallgren@scypho.com>2016-11-21 21:57:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-16 18:01:53 +0000
commitcde67af8ce9b8e72b5818233a7ef4c2aa181404a (patch)
tree091c40d36e2ed4b084430fd9d14dae8dd5d209ee /meta/recipes-devtools
parent3b46c1ac203717d85a1e2e8da067a69f066b7037 (diff)
downloadopenembedded-core-cde67af8ce9b8e72b5818233a7ef4c2aa181404a.tar.gz
openembedded-core-cde67af8ce9b8e72b5818233a7ef4c2aa181404a.tar.bz2
openembedded-core-cde67af8ce9b8e72b5818233a7ef4c2aa181404a.zip
apt-package: Include maintenance scripts
Apt can run multiple tasks daily, such as for example clean, update, autoclean, unattended-upgrades etc. [YOCTO #10669] Signed-off-by: Linus Wallgren <linus.wallgren@scypho.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc15
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
index 6e8cb84a5b..839d58e2f7 100644
--- a/meta/recipes-devtools/apt/apt-package.inc
+++ b/meta/recipes-devtools/apt/apt-package.inc
@@ -32,13 +32,19 @@ FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
${bindir}/apt-config ${bindir}/apt-cache \
${libdir}/apt ${libdir}/libapt*.so.* \
${localstatedir} ${sysconfdir} \
- ${libdir}/dpkg"
+ ${libdir}/dpkg \
+ ${systemd_unitdir}/system \
+ "
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages'))} \
${docdir}/apt"
FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages'))}"
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} = "apt-daily.timer"
+
do_install () {
set -x
install -d ${D}${bindir}
@@ -75,4 +81,11 @@ do_install () {
install -d ${D}${includedir}/apt-pkg/
install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${S}/debian/apt.systemd.daily ${D}/usr/lib/apt/
+ install -m 0644 ${S}/debian/apt-daily.service ${D}${systemd_unitdir}/system/
+ install -m 0644 ${S}/debian/apt-daily.timer ${D}${systemd_unitdir}/system/
+ install -d ${D}${sysconfdir}/cron.daily/
+ install -m 0755 ${S}/debian/apt.apt-compat.cron.daily ${D}${sysconfdir}/cron.daily/
}