Commit Graph

1714 Commits

Author SHA1 Message Date
Niko Mauno 80fdfa4b36 package_manager.py: Explicit complementary fail
When running bitbake -c populate_sdk <image_name>, it is expected that
packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless
declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting
SDK. Underlying mechanism issues a package manager install call for set
of complementary packages. However the mechanism doesn't seem to inform
the user all too obviously in case the package manager command behind
install_complementary() method fails -- and since it is combined with
attempt_only=True option, user might end up wondering why several *-dev,
*-dbg packages are missing from resulting SDK.

Improve associated install() method behaviour in affected OpkgPM and
DpkgPM classes so that a problematic state of affairs becomes directly
obvious for bitbake user, resulting in shell output like:

  WARNING: someimage-1.0-r0 do_populate_sdk: Unable to install packages.
  Command '...' returned 1:
  Collected errors:
   * Solver encountered 1 problem(s):
   * Problem 1/1:
   *   - package somepkg-dev-1.0-r0.x86 requires somepkg = 1.0-r0, but
         none of the providers can be installed
   *
   * Solution 1:
   *   - allow deinstallation of someotherpkg-1.1-r1.x86

   *   - do not ask to install a package providing somepkg-dev

   * Solution 2:
   *   - do not ask to install a package providing somepkg-dev

(From OE-Core rev: 2502bd591c37bf532d02dc6b37fc1e8b5224fb0a)

(From OE-Core rev: 88bbc4b84ce97f82d08c841edf25e6fc29d408b0)

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0d4459e7086fced5e9e0b4ad10378c9eddec56a8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05 16:26:19 +01:00
Ross Burton e04867e26f sdk: streamline locale removal
For some reason dnf is aborting with the fairly useless "failed to read RPMDB"
error during SDK creation.  Luckily as we're just deleting locale packages we
can pass False to remove() to use RPM directly, which doesn't crash.

(From OE-Core rev: cb118806841e585ec6ca820360329ae7d122c0af)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton f768fb3d22 package-manager: add install_glob()
(From OE-Core rev: 8d1b530c82de386d4183f5673c060b9d416a3835)

(From OE-Core rev: b9a7821086b5165fda9f1c8a7c79a7997803f2a6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 9248da456e package_manager: improve install_complementary
- No need to use bb.utils.which() as subprocess will search $PATH
- Clarity flow by moving the install inside the try/except

(From OE-Core rev: f4d22b7195dd8f08fe26dd353c7e860208e87d6a)

(From OE-Core rev: 1267df89164d7dcbbf77668ac49452bd0df87b54)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 883c22e343 sdk: generate locale archive and remove packages
(From OE-Core rev: c6f1010a47df33b40320aa5784181b659a3254d7)

(From OE-Core rev: 5256809c570e618171bcb643bef3e2a36d4440bb)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 8dfa0e5d46 sdk: only install locales if we're using glibc
Using glibc-locale to install locales only makes sense if we're using glibc.

(From OE-Core rev: 8fc80734053645fa893694dfe33ddaee99aa9a1a)

(From OE-Core rev: 14269b953c1f74d7dd72c65df5e925d9ae4e75be)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Ross Burton 39bbb91468 sdk: install specified locales into SDK
(From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50)

(From OE-Core rev: 13ad745bf40a5e3e08a4e1f3295353b395eec43d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-02 17:06:24 +01:00
Richard Purdie 97f2538009 oeqa/runtime/buildcpio: Use our own mirror for source
We see occasional network glitches which break this test. Use our own
mirror (which has a .gz instead of .bz2) to avoid the errors, we're not
trying to test network connectivity.

(From OE-Core rev: 01df65be2ae4bc337e10babeb9c2394d71ddff84)

(From OE-Core rev: b37a049327626ffc6413e53a2d23c55cf18af7f4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:59 +00:00
Richard Purdie 9a2074b54a qemurunner: Simplify binary data handling
I have concerns that bad timing of the flow of data from the logger
might corrupt the output due to the way binary strings are handled
in qemurunner.

This simplifies the code to do the same thing it did before but much
more safely.

(From OE-Core rev: 20bc247316ab915465a4b1add6d09b48e07202ac)

(From OE-Core rev: 84f801e44f4b5ba65489a3a418e5f699abccd003)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1e87283e92a2765bb5d54d17138b208bc395953b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:59 +00:00
Richard Purdie 66f536ad57 oeqa: Clean up logger handling
The logger handling in oeqa was confused at best. This patch:

a) Passes in a logger through various qemu runner pieces
b) Uses that logger consistently in the code
c) Creates a logger for QemuRunner outside the bitbake namespace
   meaning we don't conflict with the tinfoil logging changes

The result of this is more consistency. For runtime tests in testimage,
the logs always contain the debug info, nothing is shwon on the console.
For the oe-selftests, logs are intercepted and only shown if the test
fails.

(From OE-Core rev: ba8babc45141891d0624f9a181a580fa416e87ec)

(From OE-Core rev: 22003f97ff7f53c32999dc466d26c1471ead9b6b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:59 +00:00
Richard Purdie a71e71f9c4 oeqa/targetcontrol: Drop unused get_target_controller function
This funciton appears completely unused, drop it.

(From OE-Core rev: 31ccc70c4ea58e3781ea14eb534e00e9e06e131a)

(From OE-Core rev: 31b8991de32ce91af58eab183f283adcded737c2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:59 +00:00
Richard Purdie 1659b33553 oeqa/qemurunner: Use logger.debug, not logger.info
Bitbake logs info messages to the console. These messages are really
there as debugging information. At the debug level, they will be shown
in failure logs and in the task logs but not on the console which
is what we want in this case.

(From OE-Core rev: 5c1cdd4f3ea59a202fff853e0390b9aa5859dc74)

(From OE-Core rev: 7274a9caa39c77128ecaf398437e685923ebc2c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:59 +00:00
Richard Purdie 23037f8c91 qemurunner: Ensure logging handler is removed
If we don't remove the handler we end up with duplicate log messages
which is undesireable.

(From OE-Core rev: 39e6194615b139e2b772084641940fffa2c9380f)

(From OE-Core rev: 074b510c8720e82e5f5978e2824d2168f7f11139)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Erik Botö 768dad3469 sshcontrol.py: in copy_to() always use scp
The current implementation is broken when the localpath is a link.
Then only a symlink would be created on the target, instead of copying
the actual file.

[YOCTO #11524]

(From OE-Core rev: a9d446d9c42a67109ae87a156ae43dcbb0f56e1e)

(From OE-Core rev: fc0cdeca1b9820e070175a0b8d9fefa40eaed15d)

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Ross Burton e629e05a1f qemurunner: fix bad indentation in serial login
(cherry picked from commit c4f57aed7a29000067c63a2821fddf18a88a23ce)
(From OE-Core rev: 2de7ffd9f0656ffd5b6fa002213e5f619480aba8)

(From OE-Core rev: 1f15fb106f791fe0e7136578ca6f5501324eb826)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Leonardo Sandoval 9e036b011e qemurunner: print tail qemu log in case bootlog is empty
There are cases where the 'while loop' waiting for login prompt fails
and the bootlog variable does not get populated, thus use the the new
qemurunner member (self.msg) which stores all output coming from the qemu
process.

[YOCTO #12113]

(From OE-Core rev: 39ffa0f3779305c5e8ef86fe4572e961c5912021)

(From OE-Core rev: 40f9f0358184660f23ac7b5fc3e477e2c54e21bc)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Juro Bystricky dd79b50980 qemurunner.py: wait for PID to appear in procfs
We need QEMU PID in order to access "/proc/<qemupid>/cmdline"
Having a valid QEMU PID does not mean we can access the proc entry
immediately, we need to wait for the /proc/<qemupid> to appear
before we can access it.

(From OE-Core rev: d2d069fa9910d1c7a94c898355a63fca03ec5ad8)

(From OE-Core rev: bf05abc7931a9a9e0823b24c6f4df4f93913da82)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Juro Bystricky 8100e7c44e qemurunner.py: refactor searching for QEMU PID
Ask QEMU to store the QEMU process PID in a file, this way we don't
have to parse running processes and analyze descendents.
This is done via QEMU command line argument "-pidfile".

[YOCTO #12001]

(From OE-Core rev: 67612dcd2a8a1aa1d683dddb0bd2f592886ff020)

(From OE-Core rev: 9fe7aa1824666d3f7ceb085bef59026e245cb752)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Richard Purdie 50750e1572 oeqa/qemurunner: Improve logging
Python unittest intercepts stdout and stderr however qemurunner sets
up a streamhandler before that interception occurs, hence the messages
spam the unittest output.

By moving the logging init to the class init time, we use the unittest
stdout/stderr and this means unittest can only show the log output upon
failure. This cleans up the selftest and testimage output whilst still
showing logging upon failure.

(From OE-Core rev: 9099cecc727fe0ae5f1559582426d30ba7a9f4d3)

(From OE-Core rev: ee13216284c4d49b762eaab488f21de573d2079d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Richard Purdie 8f35c388b4 qemurunner: Tweak qemu pid starting timeout code
We're seeing timeouts in the autobuilder testing code. Increase these
timeouts to 120, print the length of time we're having to wait, change
the error messages to really be errors and don't print empty logs, its
not helpful, print a message about the empty log instead.

(From OE-Core rev: b87a33d9c86cc1d2ea196259020e1d3dc712ccef)

(From OE-Core rev: 4234ea8aae52347e49f848292deb0936ffd905ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-04 11:11:58 +00:00
Richard Purdie 75883f84c8 lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk repos don't conflict
(From OE-Core rev: c9c0927bb6e71253cbdd5b6b780dca829526e1d8)

(From OE-Core rev: a18942b0b3b848ccfa4bc50c56a565c279da9d74)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-22 10:40:08 +00:00
Patrick Ohly 88e11f3295 archiver.bbclass: do not cause kernel rebuilds
Adding or removing archiver.bbclass from a build configuration causes
rebuilds of linux-yocto-based kernels because of the
do_kernel_configme->do_unpack_and_patch task dependency.

This particular dependency can be ignored for the do_kernel_configme
sstate signature calculcation. Idea for the fix from Richard Purdie.

Note that building the kernel and adding archiver.bbclass later to
archive sources leads to do_unpack_and_patch running after
do_kernel_configme (because that already ran in the first build),
which might be problematic. This is independent of the change here.

The use case in YOCTO #11441 is to removed archiver.bbclass between a
production build with archiving enabled and builds via oe-selftests
without archiving. That direction is fine.

Fixes: YOCTO #11441

(From OE-Core rev: fed0ed82928e6a7846fbad233ac657bd17bcefc7)

(From OE-Core rev: 201c634946d07c8d0ab6d486e5031b4479eb6707)

(From OE-Core rev: 81a6623592c3c496b16f0dc2c0ad04c16b0baf29)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07 17:07:57 +00:00
Ming Liu 673999ac76 lib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehome
A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is
the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the
child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

It could be fixed by using an absolute path instead per test.

(From OE-Core rev: 6dcafdc6754f9eda22dfe93609401d75e8626c05)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Jose Perez Carranza 595c92e204 oeqa/sdk: Replace buildiptables for buildlzip tests
Buildiptables test cases are conflicting with images built with “musl”
as standard C library, in order to avoid those issues lzip package was
selected to be used on the tests as this does not have any "musl"
dependency.

[YOCTO #11713]

(From OE-Core rev: b798284f62b3cb171373716b1ee84403439314aa)

(From OE-Core rev: 0699de9efe40029a6c5e799bb8c9616337fd163e)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Jose Perez Carranza a6e7401378 oeqa/runtime: Replace buildiptables for buildlzip on runtime tests
Buildiptables test cases are conflicting with images built with “musl”
as standard C library, in order to avoid those issues lzip package was
selected to be used on the tests as this does not have any "musl"
dependency.

This patch is applicable for testimage tests

[YOCTO # 11713]

(From OE-Core rev: 41683e0ab316049e28b1f4ceaf39f0fe17722d92)

(From OE-Core rev: d40bcafb574788ed26855c5d1a072523893c1b4b)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
André Draszik 0c9925f229 selftest/archiver: only execute deploy_archives task
There should be no reason to execute a full build, as we're
just interested in the deployment of the archives.

The newly added tests already do the same.

(From OE-Core rev: 89a00238c45b0457bdf7add3629124901bc72f4b)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 78c2897dff7cd9fe2cab511549cb146d5231e573)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik edae320ef5 selftest/archiver: add tests for recipe type filtering
The archiver used to be able to filter based on COPYLEFT_RECIPE_TYPES.

Unfortunately, this got broken with the fix for
  https://bugzilla.yoctoproject.org/show_bug.cgi?id=6929
in commit ae9102bda3 ("copyleft_filter.bbclass: Allow to filter on name")

Add two tests to prevent that from happening again.

(From OE-Core rev: 11064f15d7fc10b99eac4084af48a91d8b212932)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 709f02c5cb25983090251c6237bac4fc0a295c4f)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Ross Burton 24be54c87c oeqa/selftest/recipetool: use stable tarball for recipetool create test
GitHub dynamically generates the /archive/ tarballs but we're encoding checksums
in the test suite.  Change the URL to use a static tarball, and update the
checksums.

(From OE-Core rev: 9c668f9ff989a34e615e2ecc051dadbfe24a5bb4)

(From OE-Core rev: 20f54eb2b2a306858f330eb50205e594d53767ec)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:46 +00:00
Andre McCurdy b1ffdf653c terminal.py: fix devshell with mate-terminal
Without the --disable-factory option, mate-terminal fails to start
with the error:

 | There was an error creating the child process for this terminal
 | Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)

The --disable-factory option was removed by:

  http://git.openembedded.org/openembedded-core/commit/?id=e8dca725ed8211a874472300a3ed50e494039ab9

apparently based on an assuption that mate-terminal continues to
track gnome-terminal since forking from it. However, based on the
mate-terminal man page in the upstream master branch, the option is
still supported:

  https://github.com/mate-desktop/mate-terminal

(From OE-Core rev: c7f769bd400756d180abf80dbfdf4ed2703fab60)

(From OE-Core rev: 764159600a202d1f0c2f0217c7bf7b55348a2f5d)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Andre McCurdy 452164e7d6 terminal.py: avoid 100% cpu while waiting for phonehome pid file
Some of the less common terminal types haven't been tested with the
recent phonehome pid file changes and there may be error cases where
the pid file is never created.

(From OE-Core rev: 6b0cf568e9fbe28fb6e7b17f4ad92348d33e2bf4)

(From OE-Core rev: 9aa06b3116c095a512be1d1f5da84ffaedf845dc)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Leonardo Sandoval 0f81fcb600 terminal: wait for terminal task to finish before procedding
This commit generalizes the work done in [1] and [2], both fixing
issues on several areas (the former with -c patch and gnome-terminal and
the latter with -c menuconfig and several terminals, including
gnome-terminal and tmux). The main idea is to get the PID
from the new spawned terminal and loop there until finished.

[1] 76e8ab47c9: terminal: Fix gnome-terminal to work with recent versions
[2] 7d02ea283b: cml1.bbclass: wait until menuconfig terminal finishes

(From OE-Core rev: 55707401d5bfb1f7686c273fc2d0db89df206395)

(From OE-Core rev: 3987dddff58410f1b2535ceb1f48aebbbd987889)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Peter Kjellerstedt 7ea76684cb package.bbclass: Restore functionality to detect RPM dependencies
During the transition to dnf and rpm4, the functionality to
automatically make RPM determine dependencies was lost.

Before the transition, an OE specific tool called rpmdeps-oecore had
been added to the rpm suit. It was based on the rpmdeps tool that is
part of rpm. For each file specified on its command line, it would
output the provides and requires that RPM could determine.

During the transition to rpm4, rpmdeps-oecore was replaced with the
standard rpmdeps. However, what no one noticed was that unless rpmdeps
is given options, e.g., -P or -R, to tell it what it should output, it
will not output anything. Thus, it would do all the work to determine
the requirements, but would keep silent about it. And since no output
from rpmdeps is expected unless there are requirements, there were no
warnings indicating that everything was not working as expected.

Porting the old rpmdeps-oecore to work with rpm4 is not really
possible since it relied on being able to access internals of RPM that
are no longer available. However, it turned out that rpmdeps had a
debug option, --rpmfcdebug, that would output exactly the information
that we need, albeit in a different format and to stderr. To make this
usable, rpmdeps has now received a new option, --alldeps, which sends
the information we need to stdout.

Since enabling this may cause packages to break, it is required that
ENABLE_RPM_FILEDEPS_FOR_PYRO is set to "1" to activate it for Pyro.
The name of this variable has been chosen as to indicate that it only
affects Pyro (since releases before and after Pyro has it enabled by
default).

(From OE-Core rev: 1009498f23ad319825c00ba60a4693d15aada553)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt 01406f8bf6 package_manager.py: Generate correct RPM package names again
During the transition to RPM4, the package names returned by
RpmPM.list_installed() changed from the expected names of the packages
that were installed into the image to some fictitious source RPM
names.

This restores the original functionality so that the
installed-packages.txt files produced by inheriting buildhistory yet
again contains a list of the names of the installed packages.

(From OE-Core rev: cd982d5b8944fe231c7dd38c9a563d0fc0737b88)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:11 +01:00
Richard Röjfors 2002de4eae package_manager: Fix support for NO_RECOMMENDATONS
When support for dnf was introduced the check of the
no NO_RECOMMENDATIONS variable got broken.

This fixes the issue by compairing to the string "1"
rather than the number 1.

(From OE-Core rev: 5f9ea84d304a519acb0504516b86f2683a43f9e9)

Signed-off-by: Richard Röjfors <richard@puffinpack.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 1849ce3bd7c0af055f3e849a6508e746b6a0dca5)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:28 +01:00
Alexander Kanavin d4c4708906 package_manager.py: set dnf's releasever setting from DISTRO_CODENAME
So that:

1) dnf does not complain anymore about releasever not being set and then fail
for the same reason;

2) it's possible to refer to $releasever in dnf package feed configuration
(repo paths in particular) without hardconding the release name (pyro, morty, etc.)

(From OE-Core rev: 789e3fc225adbb61f10aaa3bbc3677856f5f0238)

(From OE-Core rev: 5a97694767c76f3083e9ffeeaaa19d76ff424c83)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Martin Jansa 185f4e7e6e package_manager: flush installed_pkgs file before oe-pkgdata-util uses it
* since this commit:
  commit f5a1013ffa9815f22e13989e2bcb83f966e7ce2c
  Author: Ross Burton <ross.burton@intel.com>
  Date:   Tue Apr 18 16:19:12 2017 +0100

    package_manager: don't race on a file when installing complementary
    packages

  the file isn't closed before oe-pkgdata-util uses it and this
  temporary file might look empty to oe-pkgdata-util, because it
  wasn't flushed yet. Which resulted in almost empty debugfs tarballs
  and no locale packages in regular rootfs.
* without this change:
  124K May 30 07:41 core-image-full-cmdline-raspberrypi3-64-20170530054003-dbg.rootfs.tar.gz
* with this change:
  173M May 30 07:29 core-image-full-cmdline-raspberrypi3-64-20170530052715-dbg.rootfs.tar.gz

(From OE-Core rev: 9b34200048b3d2b477a19b7ddc8d447f873adbb2)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 877d38db08aa7060d16405443cf70539c559fe82)
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-07 09:19:08 +01:00
Ross Burton f375c30a17 oeqa/selftest: lock down Meson git revision for reliability
The test_recipetool_create_github test fetches HEAD of the repository so
upstream changes can (and do) break the test.  Avoid these problems by passing
the rev= argument in the URL to lock the checkout to the same version that is
fetched in the github_tarball test.

Also pass the commands to runCmd() as a list instead of a string, the semicolon
in the URL needs more quotes if the shell is involved and passing a list
bypasses the shell entirely.

(From OE-Core rev: 5f02b4300fb2ed54270aede54d30317ba757f587)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 17:59:57 +01:00
Peter Kjellerstedt 439bb8cc71 bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-components
The path to where to install and find the sysroot components is used
in many places. This warrants it to get its own variable.

(From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-11 16:55:59 +01:00
Jose Perez Carranza 71fd36a8ab devtool: Avoid touch sstates when cleaning linux-yocto environment
sstates are cleaned when ruining  test_devtool_virtual_kernel_modify to
have a clean environment but this is affecting eSDK test that are
dependent of those sstates, hence “cleansstate” is replaced for
“clean”.

[YOCTO #11300]

(From OE-Core rev: 182fdb97ed6c11c7b55fdb99773da6f72c9828b3)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:22 +01:00
Ross Burton 1bc292fe25 selftest/bbtests: improve download rename test
This test was assuming the format of SRC_URI so broke when SRC_URI was changed.
Fix the test by hardcoding a complete SRC_URI instead of appending and hoping
for the best.

(From OE-Core rev: afe1d3073a435ef6c838cc676748842af4c4af83)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:22 +01:00
brian avery ecd485650c meta: add search, replace strings to export2json
We want to be able to save relative paths so that we can relocate the
deploy dir images and kernels, yet still have qemu and testimage work
correctly.  This extends export2json with 2 named arguments so a
search/replace operation can be done to remove the leading path.

[YOCTO #11375]

(From OE-Core rev: 4829f1ebd89dc91860cf72fbbdc7b6bb0d5822bc)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20 07:55:26 +01:00
Jussi Kukkonen adea8003ab package_manager.py: Reverse rpm arch order
The architecture list used by dnf/libsolv was in the wrong order.
As a result, the images were built with wrong and unpredictable
packages.

$ MACHINE=intel-corei7-64 bitbake core-image-sato
$ MACHINE=qemux86-64 bitbake core-image-sato
$ MACHINE=intel-corei7-64 bitbake -ccleansstate core-image-sato
$ MACHINE=intel-corei7-64 bitbake core-image-sato

The first image had 0 core2_64 packages in it, but the last one had
583 core2_64 packages (which were built for the qemu image in
between).

Reverse the arch order in etc/dnf/vars/arch.

Fixes [YOCTO #11384].

(From OE-Core rev: 4a82433de42943f8219beca3286f40b67157172f)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20 07:55:25 +01:00
Ross Burton ae5d643114 package_manager: don't race on a file when installing complementary packages
PackageManager.install_complementary() uses WORKDIR/installed_pkgs.txt as a
temporary file but if two tasks are executing for the same recipe which uses
this file (e.g. bitbake my-image my-image:do_populate_sdk) then it's possible
for the file to be overwritten or deleted.

Instead of using a static filename, use tempfile to generate a unique name and
ensure it is cleaned up when finished.

Also move the glob generation/expansion earlier in the function as if there are
no globs to install, we don't need to generate a package list.

(From OE-Core rev: f5a1013ffa9815f22e13989e2bcb83f966e7ce2c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-19 10:18:43 +01:00
Ian.Arkver 2bc2e67dd0 package_manager.py: Generate separate repo entries per arch
dnf requires a serparate repo for each architecture. This patch
writes one config file per PACKAGE_FEED_URIS entry with an entry
for each architecture, if any.

It also uses a space separated version of the repo id as the repo
name instead of just the id again.

(From OE-Core rev: 3eed822b5c5661aa9f43af6582c1481bacf0d39a)

Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
Leonardo Sandoval 3f32ca2a57 oeqa/core/runner: Append PID in the test result folder name
It was found a case (see the bugzilla entry) where two runners were running at the same
second, creating identical test result folders, so one of them (the second runner)
was not able to create the folder because the other has already created it,
raising the following exception (many text was removed from log)

NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 2 (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/recipes-core/images/core-image-minimal.bb:do_testsdkext)
NOTE: Running task 2 of 2 (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/recipes-sato/images/core-image-sato.bb:do_testsdkext)
NOTE: recipe core-image-sato-1.0-r0: task do_testsdkext: Started
NOTE: recipe core-image-minimal-1.0-r0: task do_testsdkext: Started
.
.
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_testsdkext(d)
     0003:
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/classes/testsdk.bbclass', lineno: 188, function: do_testsdkext
     0184:
     0185:testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
     0186:
     0187:python do_testsdkext() {
 *** 0188:    testsdkext_main(d)
     0189:}
     0190:addtask testsdkext
     0191:do_testsdkext[nostamp] = "1"
     0192:
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/classes/testsdk.bbclass', lineno: 171, function: testsdkext_main
     0167:        except Exception as e:
     0168:            import traceback
     0169:            bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
     0170:
 *** 0171:        result = tc.runTests()
.
.
File: '/usr/lib64/python3.5/os.py', lineno: 241, function: makedirs
     0237:            cdir = bytes(curdir, 'ASCII')
     0238:        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
     0239:            return
     0240:    try:
 *** 0241:        mkdir(name, mode)
     0242:    except OSError:
     0243:        # Cannot rely on checking for EEXIST, since the operating system
     0244:        # could give priority to other errors like EACCES or EROFS
     0245:        if not exist_ok or not path.isdir(name):
Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/build/TestResults_20170409130114'

[YOCTO #11318]

(From OE-Core rev: 10aa09d39c1b70ce2a88f59601f1f8dbc96ed817)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Ian.Arkver f2e41a197f package_manager.py: Add a name for the generated dnf repo.
This adds repo_name as the name, which is the same as the
repo ID and hence a bit pointless, but it stops dnf from
complaining that the repo doesn't have a configured name.

(From OE-Core rev: c92cff23893e87cfb7ef9f77b16761310104543a)

Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Robert Yang 620655697d selftest/wic.py: vda -> sda
Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and
would use vda if no grep result, now we have set QB_DRIVE_TYPE to
"/dev/sd" by default, and the device will be /dev/sda, so use sda to
replace vda in the test case.

(From OE-Core rev: a722016df3f452f7a870157a99a1abb7d97d8280)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:57 +01:00
Ed Bartosh 8838dd2dbd oe-selftest: test wic sparse_copy API
Added new parameter 'api' to sparse_copy function to specify
underlying filemap API to use. By default sparse_copy will
try both available APIs.

Added test case for sparse_copy to wic test suite.

(From OE-Core rev: 88701cef6ba399e82f96ed1b0eef9a44ed8c1687)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:57 +01:00
Joshua Lock 1b4bd1b659 oeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIR
All build project test cases will try to copy the requested source
artefacts from DL_DIR before fetching. This testcase is referencing bzipped
tarball whereas the recipe fetches a gzipped tarball.

Switch to fetching the gzipped tarball in the test case so that we're able
to use a cached tarball from DL_DIR

(From OE-Core rev: 27a5883e8ae01e69f5425efe8b035bea7087b2f9)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Paul Eggleton 1f19d9dfe5 buildhistory-diff: add option to compare actual signature differences
Use the code underpinning bitbake-diffsigs to add an option to
buildhistory-diff to determine and display the differences between the
actual signature inputs, with a twist - we collapse identical
changes across different tasks, showing only the most recent task to
have that difference, meaning that there's less noise to wade through
when you just want to know what changed in order to cause some
rebuilding you're seeing.

(From OE-Core rev: 86cb4b01f2020553902554e512c02147eb4e0f51)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00