Skip to contentSkip to conversation

A couple of package-related fixes

PATCH Superseded Paul Eggleton 2 participants 7 messages Apr 13, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover A couple of package-related fixes

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(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/2 classes/package: clarify installed-vs-shipped message

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.)

---
 meta/classes/package.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package.bbclass +2 -1
index 5558d0d..9790e9d 100644
@@ -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}"
Signature · 1 line
2.1.0
#6 lore raw

PATCH 2/2 lib/oe/package_manager: avoid traceback with no packages

In reply to Paul Eggleton

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.

---
 meta/lib/oe/package_manager.py | 2 ++
 1 file changed, 2 insertions(+)
meta/lib/oe/package_manager.py +2 -0
index ed0c9a7..e46a7e6 100644
@@ -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):
Signature · 1 line
2.1.0
#2 lore raw

Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message

In reply to Paul Eggleton
Quoted 18 lines · Paul Eggleton

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.)

---
 meta/classes/package.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package.bbclass +0 -0
index 5558d0d..9790e9d 100644
@@ -1132,12 +1132,13 @@ python populate_packages () {
                 unshipped.append(path)

meta/classes/package.bbclass python populate_packages () { · line 1141

Quoted 10 lines
meta/classes/package.bbclass +2 -1
 
     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.

Quoted 11 lines
meta/classes/package.bbclass +0 -0
             package_qa_handle_error("installed-vs-shipped", msg, d)
 }
 populate_packages[dirs] = "${D}"
Signature · 7 lines
2.1.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw

Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message

Quoted 20 lines · On Monday 13 April 2015 18:28:28 Martin Jansa wrote:
Quoted 19 lines · Paul Eggleton

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.)

---

 meta/classes/package.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package.bbclass +0 -0
index 5558d0d..9790e9d 100644
@@ -1132,12 +1132,13 @@ python populate_packages () {
 
Quoted 7 lines
Quoted 7 lines
meta/classes/package.bbclass +1 -1
                 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():

Quoted 11 lines
Quoted 9 lines

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

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw

Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message

Quoted 38 lines · Paul Eggleton
Quoted 20 lines · On Monday 13 April 2015 18:28:28 Martin Jansa wrote:
Quoted 19 lines · Paul Eggleton

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.)

---

 meta/classes/package.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package.bbclass +0 -0
index 5558d0d..9790e9d 100644
@@ -1132,12 +1132,13 @@ python populate_packages () {
 
Quoted 7 lines
Quoted 7 lines
meta/classes/package.bbclass +1 -1
                 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():

Quoted 9 lines
Quoted 9 lines

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"

Quoted 7 lines
Quoted 2 lines

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.

Quoted 8 lines

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw

Re: [PATCH 1/2] classes/package: clarify installed-vs-shipped message

Quoted 63 lines · On Monday 13 April 2015 19:02:13 Martin Jansa wrote:
Quoted 48 lines · Paul Eggleton
Quoted 31 lines · On Monday 13 April 2015 18:28:28 Martin Jansa wrote:
Quoted 30 lines · Paul Eggleton

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.)

---

 meta/classes/package.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package.bbclass +0 -1
index 5558d0d..9790e9d 100644
@@ -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:">

Quoted 2 lines
Quoted 2 lines

if "installed-vs-shipped" in (d.getVar('INSANE_SKIP_' + pn, True)

or "").split():

Quoted 12 lines
Quoted 11 lines

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"

Quoted 7 lines
Quoted 2 lines

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.

Quoted 3 lines

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

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre