Re: [OE-core] [PATCH 2/9] file: 5.23 - 5.24

2015-07-29 Thread Richard Purdie
On Tue, 2015-07-28 at 15:48 +0200, Martin Jansa wrote:
 On Tue, Jul 28, 2015 at 02:08:20PM +0100, Burton, Ross wrote:
  On 28 July 2015 at 03:12, Robert Yang liezhi.y...@windriver.com wrote:
  
   * Use git repo rather than tarball since the original SRC_URI is not
 stable, it is not reachable sometimes.
  
  
  Personally speaking I see this as a recipe for a release of file which just
  happens to use git to fetch the tarball (and presumably that hash is the
  5.24 tag).  In situations like this I prefer to see the recipe called
  file_5.24.bb as there's no point having a giant PV including git SHAs when
  it's just the release.
 
 until someone sets SRCREV_pn-file = ${AUTOREV} somewhere and git SHAs
 in PV suddenly gets very useful.
 
 Personally speaking I prefer recipes with git SCM in SRC_URI named
 foo_git.bb and PV set to A.B.C+gitr${SRCPV}.

Having thought a bit about this, I have to admit I have a preference for
not doing this, just so we can know it is meant to be file 5.24 and not
that version plus some random git commits. If you override SRCREV, you
can override PV too to match the SRCREV.

Perhaps more importantly, its also more useful for the version
comparisons in the update tracking tooling. That might tip the balance.

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/9] file: 5.23 - 5.24

2015-07-28 Thread Burton, Ross
On 28 July 2015 at 03:12, Robert Yang liezhi.y...@windriver.com wrote:

 * Use git repo rather than tarball since the original SRC_URI is not
   stable, it is not reachable sometimes.


Personally speaking I see this as a recipe for a release of file which just
happens to use git to fetch the tarball (and presumably that hash is the
5.24 tag).  In situations like this I prefer to see the recipe called
file_5.24.bb as there's no point having a giant PV including git SHAs when
it's just the release.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/9] file: 5.23 - 5.24

2015-07-28 Thread Martin Jansa
On Tue, Jul 28, 2015 at 02:08:20PM +0100, Burton, Ross wrote:
 On 28 July 2015 at 03:12, Robert Yang liezhi.y...@windriver.com wrote:
 
  * Use git repo rather than tarball since the original SRC_URI is not
stable, it is not reachable sometimes.
 
 
 Personally speaking I see this as a recipe for a release of file which just
 happens to use git to fetch the tarball (and presumably that hash is the
 5.24 tag).  In situations like this I prefer to see the recipe called
 file_5.24.bb as there's no point having a giant PV including git SHAs when
 it's just the release.

until someone sets SRCREV_pn-file = ${AUTOREV} somewhere and git SHAs
in PV suddenly gets very useful.

Personally speaking I prefer recipes with git SCM in SRC_URI named
foo_git.bb and PV set to A.B.C+gitr${SRCPV}.

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


signature.asc
Description: Digital signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/9] file: 5.23 - 5.24

2015-07-28 Thread Robert Yang



On 07/28/2015 09:48 PM, Martin Jansa wrote:

On Tue, Jul 28, 2015 at 02:08:20PM +0100, Burton, Ross wrote:

On 28 July 2015 at 03:12, Robert Yang liezhi.y...@windriver.com wrote:


* Use git repo rather than tarball since the original SRC_URI is not
   stable, it is not reachable sometimes.



Personally speaking I see this as a recipe for a release of file which just
happens to use git to fetch the tarball (and presumably that hash is the
5.24 tag).  In situations like this I prefer to see the recipe called
file_5.24.bb as there's no point having a giant PV including git SHAs when
it's just the release.


until someone sets SRCREV_pn-file = ${AUTOREV} somewhere and git SHAs
in PV suddenly gets very useful.

Personally speaking I prefer recipes with git SCM in SRC_URI named
foo_git.bb and PV set to A.B.C+gitr${SRCPV}.


Thanks Ross and Martin, as Ross suggested, when the release is just 5.24,
not 5.24+some patches in the repo, I prefer name it as file_5.24.bb,
so the PV would be 5.24 which is more clear, I will update the patch.

// Robert




--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/9] file: 5.23 - 5.24

2015-07-27 Thread Robert Yang
* Remove backported patch:
- 0001-Fix-bug-with-long-options-and-explicitly-number-them.patch \
- 0002-fix-bug-with-5.23-long-options.patch \

* Use git repo rather than tarball since the original SRC_URI is not
  stable, it is not reachable sometimes.

Signed-off-by: Robert Yang liezhi.y...@windriver.com
---
 ...h-long-options-and-explicitly-number-them.patch |  116 
 .../file/0002-fix-bug-with-5.23-long-options.patch |   26 -
 .../file/{file_5.23.bb = file_git.bb} |   17 ++-
 3 files changed, 8 insertions(+), 151 deletions(-)
 delete mode 100644 
meta/recipes-devtools/file/file/0001-Fix-bug-with-long-options-and-explicitly-number-them.patch
 delete mode 100644 
meta/recipes-devtools/file/file/0002-fix-bug-with-5.23-long-options.patch
 rename meta/recipes-devtools/file/{file_5.23.bb = file_git.bb} (64%)

diff --git 
a/meta/recipes-devtools/file/file/0001-Fix-bug-with-long-options-and-explicitly-number-them.patch
 
b/meta/recipes-devtools/file/file/0001-Fix-bug-with-long-options-and-explicitly-number-them.patch
deleted file mode 100644
index 0a3e27a..000
--- 
a/meta/recipes-devtools/file/file/0001-Fix-bug-with-long-options-and-explicitly-number-them.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 21f9d5f0e0340ada998f7f9d316368c7167a4afa Mon Sep 17 00:00:00 2001
-From: Christos Zoulas chris...@zoulas.com
-Date: Thu, 11 Jun 2015 12:52:32 +
-Subject: [PATCH 1/2] Fix bug with long options and explicitly number them to
- avoid this in the future.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang liezhi.y...@windriver.com
-

- src/file.c  |   44 +++--
- src/file_opts.h |   10 +-
- 2 files changed, 27 insertions(+), 26 deletions(-)
-
-diff --git a/src/file.c b/src/file.c
-index f60dde0..c700f66 100644
 a/src/file.c
-+++ b/src/file.c
-@@ -89,10 +89,15 @@ private int/* Global command-line options  
*/
- 
- private const char *separator = :;  /* Default field separator  */
- private const struct option long_options[] = {
-+#define OPT_HELP  1
-+#define OPT_APPLE 2
-+#define OPT_EXTENSIONS3
-+#define OPT_MIME_TYPE 4
-+#define OPT_MIME_ENCODING 5
- #define OPT(shortname, longname, opt, doc)  \
- {longname, opt, NULL, shortname},
--#define OPT_LONGONLY(longname, opt, doc)\
--{longname, opt, NULL, 0},
-+#define OPT_LONGONLY(longname, opt, doc, id)\
-+{longname, opt, NULL, id},
- #include file_opts.h
- #undef OPT
- #undef OPT_LONGONLY
-@@ -182,24 +187,20 @@ main(int argc, char *argv[])
-   while ((c = getopt_long(argc, argv, OPTSTRING, long_options,
-   longindex)) != -1)
-   switch (c) {
--  case 0 :
--  switch (longindex) {
--  case 0:
--  help();
--  break;
--  case 10:
--  flags |= MAGIC_APPLE;
--  break;
--  case 11:
--  flags |= MAGIC_EXTENSION;
--  break;
--  case 12:
--  flags |= MAGIC_MIME_TYPE;
--  break;
--  case 13:
--  flags |= MAGIC_MIME_ENCODING;
--  break;
--  }
-+  case OPT_HELP:
-+  help();
-+  break;
-+  case OPT_APPLE:
-+  flags |= MAGIC_APPLE;
-+  break;
-+  case OPT_EXTENSIONS:
-+  flags |= MAGIC_EXTENSION;
-+  break;
-+  case OPT_MIME_TYPE:
-+  flags |= MAGIC_MIME_TYPE;
-+  break;
-+  case OPT_MIME_ENCODING:
-+  flags |= MAGIC_MIME_ENCODING;
-   break;
-   case '0':
-   nulsep = 1;
-@@ -595,7 +596,7 @@ help(void)
- #define OPT(shortname, longname, opt, doc)  \
-   fprintf(stdout,   -%c, -- longname, shortname), \
-   docprint(doc);
--#define OPT_LONGONLY(longname, opt, doc)\
-+#define OPT_LONGONLY(longname, opt, doc, id)\
-   fprintf(stdout,   -- longname),   \
-   docprint(doc);
- #include file_opts.h
-diff --git a/src/file_opts.h b/src/file_opts.h
-index 036505f..2e30d06 100644
 a/src/file_opts.h
-+++ b/src/file_opts.h
-@@ -12,7 +12,7 @@
-  * switch statement!
-  */
- 
--OPT_LONGONLY(help, 0,  display this help and exit\n)
-+OPT_LONGONLY(help, 0,  display this help and exit\n, 
OPT_HELP)
- OPT('v', version, 0,   output version information and exit\n)
- OPT('m', magic-file, 1,  LIST  use LIST as a colon-separated list of 
magic\n
-