All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Gary Thomas <gary@mlbassoc.com>
Cc: poky@yoctoproject.org
Subject: Re: Files missing from package
Date: Mon, 08 Oct 2012 17:24:18 +0100	[thread overview]
Message-ID: <5797264.jLXkT5xyjF@helios> (raw)
In-Reply-To: <5072FBB8.9060703@mlbassoc.com>

On Monday 08 October 2012 10:13:44 Gary Thomas wrote:
> I'm building a package(recipe) for a system which uses opkg
> as the packaging tool.  In my recipe, I have these additional
> lines (only the relevant parts shown):
> 
>    do_install_append() {
>        install -d ${D}${sbindir}
>        install -d ${D}/etc
>        install -m 0755 ${S}/tools/get_tool ${D}${sbindir}
>        ln -s get_tool ${D}${sbindir}/put_tool
>        install -m 0644 ${WORKDIR}/tool.config ${D}/etc
>    }
> 
>    PACKAGES += "${PN}-tools"
>    FILES_${PN}-tools = "${sbindir}/get_tool \
>    		     ${sbindir}/put_tool \
>                         /etc/tool.config \
>    "
> 
> When the recipe is built, I get the correct files in my image:
>    $ find tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/
>    tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/
>    tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/etc
>   
> tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/etc/tool.conf
> ig tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/usr
> tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/usr/sbin
> tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/usr/sbin/get_
> tool
> tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/usr/sbin/put_
> tool tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/bin
> tmp/work/mytarget-poky-linux-gnueabi/some-tool-1.0-r0.1/image/bin/some_tool
> 
> However, the 'some-tool-tools' package it missing the '/etc/tools.config'
> file. I unpacked it manually to see this:
> 
>    $ tar -ztvf data.tar.gz
>    drwxr-xr-x root/root         0 2012-10-08 09:28 ./
>    drwxr-xr-x root/root         0 2012-10-08 09:28 ./usr/
>    drwxr-xr-x root/root         0 2012-10-08 09:28 ./usr/sbin/
>    lrwxrwxrwx root/root         0 2012-10-08 09:28 ./usr/sbin/put_tool ->
> get_tool -rwxr-xr-x root/root     15044 2012-10-08 09:28
> ./usr/sbin/get_tool
> 
> There is no '/etc' directory to be seen.
> 
> What am I doing wrong?  This is built using poky:master
> '7c39c87d52c20e47cf90275a16e4517a296c8388' from just a few days ago.

Since ${sysconfdir} is /etc by default and ${sysconfdir} is in the default 
value of FILES_${PN}, and your additional package is appended to PACKAGES, I 
suspect you'll find the file is being picked up by the main package first. You 
need to use =+ instead of += so that the some-tool-tools package is prepended 
to PACKAGES and thus gets the file before the main package.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


  reply	other threads:[~2012-10-08 16:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 16:13 Files missing from package Gary Thomas
2012-10-08 16:24 ` Paul Eggleton [this message]
2012-10-08 16:32   ` Gary Thomas
2012-10-08 17:40   ` Tomas Frydrych
2012-10-08 18:22     ` Paul Eggleton
2012-10-08 18:56       ` Tomas Frydrych
2012-10-08 20:37     ` Richard Purdie
2012-10-08 22:22       ` Gary Thomas
2012-10-08 22:39         ` Richard Purdie
2012-10-09 12:36           ` Gary Thomas
2012-10-09 12:41             ` Paul Eggleton
2012-10-09 12:46               ` Gary Thomas
2012-10-09 12:48                 ` Paul Eggleton
2012-10-09 12:53                   ` Gary Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5797264.jLXkT5xyjF@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=gary@mlbassoc.com \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.