public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* Is this a bug? Installed-but-not-packaged warning for a file which is in a package
@ 2013-01-23 20:43 Peter Seebach
  2013-01-24 20:05 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Seebach @ 2013-01-23 20:43 UTC (permalink / raw)
  To: Openembedded-core@lists.openembedded.org

FILES_${PN} = "fascinating"

do_install() {
	touch ${D}/fascinating
}

At least in our local copy of oe-core, this results in:

1. A package which contains a /fascinating file.
2. An installed-but-unpackaged warning for /fascinating.

This confused the heck out of me. I eventually figured it out: The "not
in seen" test is not aware of the possibility of differing path names.
In general, all path names in FILES_* are being written as absolute
paths by convention; in the actual code, this is silently corrected by
the addition of a leading period.

But an unqualified path works; it's treated as relative to the
sysroot/image/whatever, and it has the expected behavior. But then we
insert "fascinating" in seen, and check for "./fascinating" in the next
phase.

Possible solution:

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index b06cca5..9d50a61 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -981,6 +981,8 @@ python populate_packages () {
                 file.replace("//", "/")
             if os.path.isabs(file):
                 file = '.' + file
+            if not file.startswith("./")
+                fle = './' + file
             if not os.path.islink(file):
                 if os.path.isdir(file):

Before I send this as an actual patch and such: Is this behavior a bug?
If it is a bug, is this the right fix, or should we do something else,
like reject non-absolute paths?

Note that just adding a / to files that don't start with one doesn't
work; there appear to be at least *some* non-absolute paths in some
packages.

-s
-- 
Listen, get this.  Nobody with a good compiler needs to be justified.



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Is this a bug? Installed-but-not-packaged warning for a file which is in a package
  2013-01-23 20:43 Is this a bug? Installed-but-not-packaged warning for a file which is in a package Peter Seebach
@ 2013-01-24 20:05 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2013-01-24 20:05 UTC (permalink / raw)
  To: Peter Seebach; +Cc: Openembedded-core@lists.openembedded.org

On Wed, 2013-01-23 at 14:43 -0600, Peter Seebach wrote:
> FILES_${PN} = "fascinating"
> 
> do_install() {
> 	touch ${D}/fascinating
> }
> 
> At least in our local copy of oe-core, this results in:
> 
> 1. A package which contains a /fascinating file.
> 2. An installed-but-unpackaged warning for /fascinating.
> 
> This confused the heck out of me. I eventually figured it out: The "not
> in seen" test is not aware of the possibility of differing path names.
> In general, all path names in FILES_* are being written as absolute
> paths by convention; in the actual code, this is silently corrected by
> the addition of a leading period.
> 
> But an unqualified path works; it's treated as relative to the
> sysroot/image/whatever, and it has the expected behavior. But then we
> insert "fascinating" in seen, and check for "./fascinating" in the next
> phase.
> 
> Possible solution:
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index b06cca5..9d50a61 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -981,6 +981,8 @@ python populate_packages () {
>                  file.replace("//", "/")
>              if os.path.isabs(file):
>                  file = '.' + file
> +            if not file.startswith("./")
> +                fle = './' + file
>              if not os.path.islink(file):
>                  if os.path.isdir(file):
> 
> Before I send this as an actual patch and such: Is this behavior a bug?
> If it is a bug, is this the right fix, or should we do something else,
> like reject non-absolute paths?
> 
> Note that just adding a / to files that don't start with one doesn't
> work; there appear to be at least *some* non-absolute paths in some
> packages.

It is a bug and that would appear to be a reasonable fix or fix the
unshipped list construction so it handles items without a . correctly.
I'd take the above patch...

Cheers,

Richard




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-24 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 20:43 Is this a bug? Installed-but-not-packaged warning for a file which is in a package Peter Seebach
2013-01-24 20:05 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox