All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] A couple of package-related fixes
@ 2015-04-13 15:44 Paul Eggleton
  2015-04-13 15:44 ` [PATCH 1/2] classes/package: clarify installed-vs-shipped message Paul Eggleton
  2015-04-13 15:44 ` [PATCH 2/2] lib/oe/package_manager: avoid traceback with no packages Paul Eggleton
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Eggleton @ 2015-04-13 15:44 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit a7d8eaef04c9dd6ede8d4efd8c4b776efbe3c767:

  shadow: split files needed for PAM use into separate package (2015-04-09 19:48:04 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/pkgfixes
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/pkgfixes

Paul Eggleton (2):
  classes/package: clarify installed-vs-shipped message
  lib/oe/package_manager: avoid traceback with no packages

 meta/classes/package.bbclass   | 3 ++-
 meta/lib/oe/package_manager.py | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.1.0



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

* [PATCH 1/2] classes/package: clarify installed-vs-shipped message
  2015-04-13 15:44 [PATCH 0/2] A couple of package-related fixes Paul Eggleton
@ 2015-04-13 15:44 ` Paul Eggleton
  2015-04-13 16:28   ` Martin Jansa
  2015-04-13 15:44 ` [PATCH 2/2] lib/oe/package_manager: avoid traceback with no packages Paul Eggleton
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Eggleton @ 2015-04-13 15:44 UTC (permalink / raw)
  To: openembedded-core

Based on the number of times I've had to explain it over the years it
seems that a lot of new users don't immediately realise what is meant
by "shipped" here (nor should we expect them to) so let's at least
mention packaging and briefly tell the user what they need to do. (I was
going to go into more detail in the message, but there is really more
detail than can be covered succinctly here.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/package.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 5558d0d..9790e9d 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1132,12 +1132,13 @@ python populate_packages () {
                 unshipped.append(path)
 
     if unshipped != []:
-        msg = pn + ": Files/directories were installed but not shipped"
+        msg = pn + ": Files/directories were installed but not shipped in any package:"
         if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
             bb.note("Package %s skipping QA tests: installed-vs-shipped" % pn)
         else:
             for f in unshipped:
                 msg = msg + "\n  " + f
+            msg = msg + "\nPlease either set FILES such that these items are packaged, or alternatively delete them within do_install"
             package_qa_handle_error("installed-vs-shipped", msg, d)
 }
 populate_packages[dirs] = "${D}"
-- 
2.1.0



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

* [PATCH 2/2] lib/oe/package_manager: avoid traceback with no packages
  2015-04-13 15:44 [PATCH 0/2] A couple of package-related fixes Paul Eggleton
  2015-04-13 15:44 ` [PATCH 1/2] classes/package: clarify installed-vs-shipped message Paul Eggleton
@ 2015-04-13 15:44 ` Paul Eggleton
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2015-04-13 15:44 UTC (permalink / raw)
  To: openembedded-core

If you were using deb packaging, had buildhistory enabled and produced
an SDK that contained no packages in one of the sysroots (such as with
uninative-tarball) then the do_populate_sdk was failing with a python
traceback because there were no fields to split in the output line.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oe/package_manager.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index ed0c9a7..e46a7e6 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -446,6 +446,8 @@ class DpkgPkgsList(PkgsList):
         if format == "file":
             tmp_output = ""
             for line in tuple(output.split('\n')):
+                if not line.strip():
+                    continue
                 pkg, pkg_file, pkg_arch = line.split()
                 full_path = os.path.join(self.rootfs_dir, pkg_arch, pkg_file)
                 if os.path.exists(full_path):
-- 
2.1.0



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

* Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message
  2015-04-13 15:44 ` [PATCH 1/2] classes/package: clarify installed-vs-shipped message Paul Eggleton
@ 2015-04-13 16:28   ` Martin Jansa
  2015-04-13 16:46     ` Paul Eggleton
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2015-04-13 16:28 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2070 bytes --]

On Mon, Apr 13, 2015 at 04:44:52PM +0100, Paul Eggleton wrote:
> Based on the number of times I've had to explain it over the years it
> seems that a lot of new users don't immediately realise what is meant
> by "shipped" here (nor should we expect them to) so let's at least
> mention packaging and briefly tell the user what they need to do. (I was
> going to go into more detail in the message, but there is really more
> detail than can be covered succinctly here.)
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  meta/classes/package.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 5558d0d..9790e9d 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1132,12 +1132,13 @@ python populate_packages () {
>                  unshipped.append(path)
>  
>      if unshipped != []:
> -        msg = pn + ": Files/directories were installed but not shipped"
> +        msg = pn + ": Files/directories were installed but not shipped in any package:"
>          if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
>              bb.note("Package %s skipping QA tests: installed-vs-shipped" % pn)
>          else:
>              for f in unshipped:
>                  msg = msg + "\n  " + f
> +            msg = msg + "\nPlease either set FILES such that these items are packaged, or alternatively delete them within do_install"

We should also mention the possibility to fix Makefile.am,
CMakeLists.txt, ... not to install them in first place.

>              package_qa_handle_error("installed-vs-shipped", msg, d)
>  }
>  populate_packages[dirs] = "${D}"
> -- 
> 2.1.0
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message
  2015-04-13 16:28   ` Martin Jansa
@ 2015-04-13 16:46     ` Paul Eggleton
  2015-04-13 17:02       ` Martin Jansa
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Eggleton @ 2015-04-13 16:46 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Monday 13 April 2015 18:28:28 Martin Jansa wrote:
> On Mon, Apr 13, 2015 at 04:44:52PM +0100, Paul Eggleton wrote:
> > Based on the number of times I've had to explain it over the years it
> > seems that a lot of new users don't immediately realise what is meant
> > by "shipped" here (nor should we expect them to) so let's at least
> > mention packaging and briefly tell the user what they need to do. (I was
> > going to go into more detail in the message, but there is really more
> > detail than can be covered succinctly here.)
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > ---
> > 
> >  meta/classes/package.bbclass | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> > index 5558d0d..9790e9d 100644
> > --- a/meta/classes/package.bbclass
> > +++ b/meta/classes/package.bbclass
> > @@ -1132,12 +1132,13 @@ python populate_packages () {
> > 
> >                  unshipped.append(path)
> >      
> >      if unshipped != []:
> > -        msg = pn + ": Files/directories were installed but not shipped"
> > +        msg = pn + ": Files/directories were installed but not shipped in
> > any package:"> 
> >          if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn, True) 
or "").split():
> >              bb.note("Package %s skipping QA tests: installed-vs-shipped"
> >              % pn)
> >          
> >          else:
> >              for f in unshipped:
> >                  msg = msg + "\n  " + f
> > 
> > +            msg = msg + "\nPlease either set FILES such that these items
> > are packaged, or alternatively delete them within do_install"
> We should also mention the possibility to fix Makefile.am,
> CMakeLists.txt, ... not to install them in first place.

This is the sort of thing I was alluding to in the commit message, I'd rather 
not get into too many specifics, or the message is going to end up very long 
indeed covering all of the things you need to pay attention to. That kind of 
thing is much better covered in the documentation.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message
  2015-04-13 16:46     ` Paul Eggleton
@ 2015-04-13 17:02       ` Martin Jansa
  2015-04-13 17:52         ` Paul Eggleton
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2015-04-13 17:02 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2874 bytes --]

On Mon, Apr 13, 2015 at 05:46:03PM +0100, Paul Eggleton wrote:
> On Monday 13 April 2015 18:28:28 Martin Jansa wrote:
> > On Mon, Apr 13, 2015 at 04:44:52PM +0100, Paul Eggleton wrote:
> > > Based on the number of times I've had to explain it over the years it
> > > seems that a lot of new users don't immediately realise what is meant
> > > by "shipped" here (nor should we expect them to) so let's at least
> > > mention packaging and briefly tell the user what they need to do. (I was
> > > going to go into more detail in the message, but there is really more
> > > detail than can be covered succinctly here.)
> > > 
> > > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > > ---
> > > 
> > >  meta/classes/package.bbclass | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> > > index 5558d0d..9790e9d 100644
> > > --- a/meta/classes/package.bbclass
> > > +++ b/meta/classes/package.bbclass
> > > @@ -1132,12 +1132,13 @@ python populate_packages () {
> > > 
> > >                  unshipped.append(path)
> > >      
> > >      if unshipped != []:
> > > -        msg = pn + ": Files/directories were installed but not shipped"
> > > +        msg = pn + ": Files/directories were installed but not shipped in
> > > any package:"> 
> > >          if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn, True) 
> or "").split():
> > >              bb.note("Package %s skipping QA tests: installed-vs-shipped"
> > >              % pn)
> > >          
> > >          else:
> > >              for f in unshipped:
> > >                  msg = msg + "\n  " + f
> > > 
> > > +            msg = msg + "\nPlease either set FILES such that these items
> > > are packaged, or alternatively delete them within do_install"
> > We should also mention the possibility to fix Makefile.am,
> > CMakeLists.txt, ... not to install them in first place.
> 
> This is the sort of thing I was alluding to in the commit message, I'd rather 
> not get into too many specifics, or the message is going to end up very long 
> indeed covering all of the things you need to pay attention to. That kind of 
> thing is much better covered in the documentation.

OK, maybe I'm too sensitive for this, because recently I was fixing few
recipes where do_install task was doing
cp -ra ${S} ${D}
and then INSANE_SKIP was used to ignore "patches" and ".pc" files
"installed" in ${D} but luckily not included in any package.

So I fear that obvious fix after reading this message will be to delete
"patches" and ".pc" directories in do_install instead of fixing the root
cause.

> 
> Cheers,
> Paul
> 
> -- 
> 
> Paul Eggleton
> Intel Open Source Technology Centre

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message
  2015-04-13 17:02       ` Martin Jansa
@ 2015-04-13 17:52         ` Paul Eggleton
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2015-04-13 17:52 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Monday 13 April 2015 19:02:13 Martin Jansa wrote:
> On Mon, Apr 13, 2015 at 05:46:03PM +0100, Paul Eggleton wrote:
> > On Monday 13 April 2015 18:28:28 Martin Jansa wrote:
> > > On Mon, Apr 13, 2015 at 04:44:52PM +0100, Paul Eggleton wrote:
> > > > Based on the number of times I've had to explain it over the years it
> > > > seems that a lot of new users don't immediately realise what is meant
> > > > by "shipped" here (nor should we expect them to) so let's at least
> > > > mention packaging and briefly tell the user what they need to do. (I
> > > > was
> > > > going to go into more detail in the message, but there is really more
> > > > detail than can be covered succinctly here.)
> > > > 
> > > > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > > > ---
> > > > 
> > > >  meta/classes/package.bbclass | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/meta/classes/package.bbclass
> > > > b/meta/classes/package.bbclass
> > > > index 5558d0d..9790e9d 100644
> > > > --- a/meta/classes/package.bbclass
> > > > +++ b/meta/classes/package.bbclass
> > > > @@ -1132,12 +1132,13 @@ python populate_packages () {
> > > > 
> > > >                  unshipped.append(path)
> > > >      
> > > >      if unshipped != []:
> > > > -        msg = pn + ": Files/directories were installed but not
> > > > shipped"
> > > > +        msg = pn + ": Files/directories were installed but not
> > > > shipped in
> > > > any package:">
> > > > 
> > > >          if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn,
> > > >          True)
> > 
> > or "").split():
> > > >              bb.note("Package %s skipping QA tests:
> > > >              installed-vs-shipped"
> > > >              % pn)
> > > >          
> > > >          else:
> > > >              for f in unshipped:
> > > >                  msg = msg + "\n  " + f
> > > > 
> > > > +            msg = msg + "\nPlease either set FILES such that these
> > > > items
> > > > are packaged, or alternatively delete them within do_install"
> > > 
> > > We should also mention the possibility to fix Makefile.am,
> > > CMakeLists.txt, ... not to install them in first place.
> > 
> > This is the sort of thing I was alluding to in the commit message, I'd
> > rather not get into too many specifics, or the message is going to end up
> > very long indeed covering all of the things you need to pay attention to.
> > That kind of thing is much better covered in the documentation.
> 
> OK, maybe I'm too sensitive for this, because recently I was fixing few
> recipes where do_install task was doing
> cp -ra ${S} ${D}
> and then INSANE_SKIP was used to ignore "patches" and ".pc" files
> "installed" in ${D} but luckily not included in any package.
> 
> So I fear that obvious fix after reading this message will be to delete
> "patches" and ".pc" directories in do_install instead of fixing the root
> cause.

OK fair enough, I guess we could say "Please set FILES such that these
items are packaged. Alternatively if they are unneeded, avoid installing them 
or delete them within do_install."

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

end of thread, other threads:[~2015-04-13 17:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 15:44 [PATCH 0/2] A couple of package-related fixes Paul Eggleton
2015-04-13 15:44 ` [PATCH 1/2] classes/package: clarify installed-vs-shipped message Paul Eggleton
2015-04-13 16:28   ` Martin Jansa
2015-04-13 16:46     ` Paul Eggleton
2015-04-13 17:02       ` Martin Jansa
2015-04-13 17:52         ` Paul Eggleton
2015-04-13 15:44 ` [PATCH 2/2] lib/oe/package_manager: avoid traceback with no packages Paul Eggleton

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.