diff mbox

[1/1] Support for cachefiles in tmp when meta-data is outside TOPDIR

Message ID 20de89231133b1b113865206d27bb49afead64eb.1372076428.git.kibo@prevas.dk
State Rejected
Delegated to: Esben Haabendal
Headers show

Commit Message

Kim Bøndergaard June 24, 2013, 12:21 p.m. UTC
---
 lib/oelite/cookbook.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Esben Haabendal July 3, 2013, 7:37 a.m. UTC | #1
Kim Bøndergaard <kibo@prevas.dk> writes:

> ---
>  lib/oelite/cookbook.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/lib/oelite/cookbook.py b/lib/oelite/cookbook.py
> index 7ac4262..336c9c5 100644
> --- a/lib/oelite/cookbook.py
> +++ b/lib/oelite/cookbook.py
> @@ -500,8 +500,7 @@ class CookBook(Mapping):
>  
>  
>      def cachefilename(self, recipefile):
> -        recipefile = self.shortfilename(recipefile)
> -        return os.path.join(self.cachedir, recipefile + ".p")
> +        return os.path.join(self.cachedir, recipefile.lstrip("/") + ".p")

And what will happen if you have a manifest with both an meta/foobar (in
TOPDIR) layer and an /meta/foobar layer?

>  
>  
>      def add_recipefile(self, filename):

I am not very comfortable with the idea of using meta-data layers
outside of TOPDIR, as I haven't considered it, and have the feeling that
other problems might be lurking for those trying to do this.

That said, I don't see any reasons for why it should not be possible.
But why not just symlink the out-of-TOPDIR layer into TOPDIR/meta ?

One of the ideas of OE-lite is to accept restrictions on the supported
manifest layout, as long as we get sufficient benefit from it in the
form of fx. a simpler system and/or simpler transition between different
OE-lite projects.  So unless there is any (sufficient) benefits from
using meta-data outside of TOPDIR, I think I will be reluctant to
support it.

/Esben
diff mbox

Patch

diff --git a/lib/oelite/cookbook.py b/lib/oelite/cookbook.py
index 7ac4262..336c9c5 100644
--- a/lib/oelite/cookbook.py
+++ b/lib/oelite/cookbook.py
@@ -500,8 +500,7 @@  class CookBook(Mapping):
 
 
     def cachefilename(self, recipefile):
-        recipefile = self.shortfilename(recipefile)
-        return os.path.join(self.cachedir, recipefile + ".p")
+        return os.path.join(self.cachedir, recipefile.lstrip("/") + ".p")
 
 
     def add_recipefile(self, filename):