All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] A few misc fixes for `recipetool appendsrcfile`
@ 2015-07-17 17:15 Christopher Larson
  2015-07-17 17:16 ` [PATCH 1/3] recipetool: appendsrcfile: fix duplicate SRC_URI check Christopher Larson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christopher Larson @ 2015-07-17 17:15 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

The following changes since commit ff384c084678dab33bbd7eb82ece21a2baa13dfb:

  qemu: upgrade to 2.4.0-rc0 (2015-07-16 20:40:00 +0100)

are available in the git repository at:

  git@github.com:kergoth/openembedded-core recipetool-appendsrcfile-fixes

for you to fetch changes up to 927dba1917b9fa5e2d526b0994d959fc8465800c:

  recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR (2015-07-17 10:12:10 -0700)

----------------------------------------------------------------
Christopher Larson (3):
      recipetool: appendsrcfile: fix duplicate SRC_URI check
      recipetool: appendsrcfile: use -D, not -d for destdir
      recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR

 scripts/lib/recipetool/append.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

-- 
2.2.1



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

* [PATCH 1/3] recipetool: appendsrcfile: fix duplicate SRC_URI check
  2015-07-17 17:15 [PATCH 0/3] A few misc fixes for `recipetool appendsrcfile` Christopher Larson
@ 2015-07-17 17:16 ` Christopher Larson
  2015-07-17 17:16 ` [PATCH 2/3] recipetool: appendsrcfile: use -D, not -d for destdir Christopher Larson
  2015-07-17 17:16 ` [PATCH 3/3] recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR Christopher Larson
  2 siblings, 0 replies; 4+ messages in thread
From: Christopher Larson @ 2015-07-17 17:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 scripts/lib/recipetool/append.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index a2133f7..0997f82 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -349,7 +349,7 @@ def appendsrc(args, files, rd):
     for uri in src_uri:
         simple_uri = bb.fetch.URI(uri)
         simple_uri.params = {}
-        simplified[simple_uri] = uri
+        simplified[str(simple_uri)] = uri
 
     copyfiles = {}
     extralines = []
@@ -365,9 +365,10 @@ def appendsrc(args, files, rd):
 
         simple = bb.fetch.URI(source_uri)
         simple.params = {}
-        if simple in simplified:
-            existing = simplified[simple]
-            if uri != existing:
+        simple_str = str(simple)
+        if simple_str in simplified:
+            existing = simplified[simple_str]
+            if source_uri != existing:
                 logger.warn('{0!r} is already in SRC_URI, with different parameters: {1!r}, not adding'.format(source_uri, existing))
             else:
                 logger.warn('{0!r} is already in SRC_URI, not adding'.format(source_uri))
-- 
2.2.1



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

* [PATCH 2/3] recipetool: appendsrcfile: use -D, not -d for destdir
  2015-07-17 17:15 [PATCH 0/3] A few misc fixes for `recipetool appendsrcfile` Christopher Larson
  2015-07-17 17:16 ` [PATCH 1/3] recipetool: appendsrcfile: fix duplicate SRC_URI check Christopher Larson
@ 2015-07-17 17:16 ` Christopher Larson
  2015-07-17 17:16 ` [PATCH 3/3] recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR Christopher Larson
  2 siblings, 0 replies; 4+ messages in thread
From: Christopher Larson @ 2015-07-17 17:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

-d is already taken for --debug.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 scripts/lib/recipetool/append.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index 0997f82..ed4af20 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -456,7 +456,7 @@ def register_command(subparsers):
                                    parents=[common_src],
                                    help='Create/update a bbappend to add or replace source files',
                                    description='Creates a bbappend (or updates an existing one) to add or replace the specified file in the recipe sources, either those in WORKDIR or those in the source tree. This command lets you specify multiple files with a destination directory, so cannot specify the destination filename. See the `appendsrcfile` command for the other behavior.')
-    parser.add_argument('-d', '--destdir', help='Destination directory (relative to S or WORKDIR, defaults to ".")', default='', type=destination_path)
+    parser.add_argument('-D', '--destdir', help='Destination directory (relative to S or WORKDIR, defaults to ".")', default='', type=destination_path)
     parser.add_argument('files', nargs='+', metavar='FILE', help='File(s) to be added to the recipe sources (WORKDIR or S)', type=existing_path)
     parser.set_defaults(func=lambda a: appendsrcfiles(parser, a), parserecipes=True)
 
-- 
2.2.1



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

* [PATCH 3/3] recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR
  2015-07-17 17:15 [PATCH 0/3] A few misc fixes for `recipetool appendsrcfile` Christopher Larson
  2015-07-17 17:16 ` [PATCH 1/3] recipetool: appendsrcfile: fix duplicate SRC_URI check Christopher Larson
  2015-07-17 17:16 ` [PATCH 2/3] recipetool: appendsrcfile: use -D, not -d for destdir Christopher Larson
@ 2015-07-17 17:16 ` Christopher Larson
  2 siblings, 0 replies; 4+ messages in thread
From: Christopher Larson @ 2015-07-17 17:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

When determining the path from WORKDIR to the extracted sources, we're using
S, but if S is in work-shared, that's problematic and won't give us good
results, so assume 'git' for that case, warning when appropriate.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 scripts/lib/recipetool/append.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index ed4af20..3f2f9a4 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -356,6 +356,10 @@ def appendsrc(args, files, rd):
     for newfile, srcfile in files.iteritems():
         src_destdir = os.path.dirname(srcfile)
         if not args.use_workdir:
+            if rd.getVar('S', True) == rd.getVar('STAGING_KERNEL_DIR', True):
+                srcdir = os.path.join(workdir, 'git')
+                if not bb.data.inherits_class('kernel-yocto', rd):
+                    logger.warn('S == STAGING_KERNEL_DIR and non-kernel-yocto, unable to determine path to srcdir, defaulting to ${WORKDIR}/git')
             src_destdir = os.path.join(os.path.relpath(srcdir, workdir), src_destdir)
         src_destdir = os.path.normpath(src_destdir)
 
-- 
2.2.1



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

end of thread, other threads:[~2015-07-17 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17 17:15 [PATCH 0/3] A few misc fixes for `recipetool appendsrcfile` Christopher Larson
2015-07-17 17:16 ` [PATCH 1/3] recipetool: appendsrcfile: fix duplicate SRC_URI check Christopher Larson
2015-07-17 17:16 ` [PATCH 2/3] recipetool: appendsrcfile: use -D, not -d for destdir Christopher Larson
2015-07-17 17:16 ` [PATCH 3/3] recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR Christopher Larson

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.