[OE-core] [PATCH] apt-package: Include maintenance scripts

Aníbal Limón anibal.limon at linux.intel.com
Thu Nov 17 22:16:38 UTC 2016


Hi Linus,

Your patch looks good, only missing one thing you need to conditional
those lines to only work when systemd is enabled in DISTRO_FEATURES, see
example:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-support/consolekit/consolekit_0.4.6.bb#n26

Thanks in advance,
	alimon


On 11/16/2016 10:33 AM, Linus Wallgren wrote:
> 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 at scypho.com>
> ---
>  meta/recipes-devtools/apt/apt-package.inc | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
> index a553aa2..38cd558 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', True))} \
>  		   ${docdir}/apt"
>  FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}"
>  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/
>  }
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20161117/e05f9752/attachment-0002.sig>


More information about the Openembedded-core mailing list