diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2015-09-08 11:39:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-09 14:27:51 +0100 |
commit | 8be95c5fbe6ad970943edabe288fd47d1dcac288 (patch) | |
tree | a3a658ff9b01a28d607aa68ea08789fcc666bbed /meta-selftest/recipes-test | |
parent | 7cde0ebd59f12da363e780126ca4284e0930721d (diff) | |
download | poky-8be95c5fbe6ad970943edabe288fd47d1dcac288.tar.gz |
devtool: add upgrade feature
Upgrades a recipe to a particular version and downloads the source code
into a folder. User can avoid patching the source code.
These are the general steps of the upgrade function:
- Extract current recipe source code into srctree and create a branch
- Extract upgrade recipe source code into srctree and rebase with
previous branch. In case the rebase is not correctly applied, source
code will not be deleted, so user correct the patches
- Creates the new recipe under the workspace
[YOCTO #7642]
(From OE-Core rev: 4020f5d91b3e4d011150d5081d36215f8eab732e)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/recipes-test')
-rw-r--r-- | meta-selftest/recipes-test/devtool/devtool-upgrade_0.1.bb | 25 | ||||
-rw-r--r-- | meta-selftest/recipes-test/devtool/files/0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch | 27 | ||||
-rw-r--r-- | meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.1.tar.gz | bin | 0 -> 411 bytes | |||
-rw-r--r-- | meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.2.tar.gz | bin | 0 -> 411 bytes |
4 files changed, 52 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade_0.1.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade_0.1.bb new file mode 100644 index 0000000000..33ffc8803a --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade_0.1.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | # | ||
2 | # This file was derived from the 'Hello World!' example recipe in the | ||
3 | # Yocto Project Development Manual. | ||
4 | # | ||
5 | |||
6 | DESCRIPTION = "Simple helloworld application used to test the devtool upgrade feature" | ||
7 | SECTION = "devtool" | ||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
10 | PR = "r0" | ||
11 | |||
12 | SRC_URI = "file://${THISDIR}/files/${P}.tar.gz \ | ||
13 | file://0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch \ | ||
14 | " | ||
15 | |||
16 | S = "${WORKDIR}/${P}" | ||
17 | |||
18 | do_compile() { | ||
19 | ${CC} helloworld.c -o helloworld | ||
20 | } | ||
21 | |||
22 | do_install() { | ||
23 | install -d ${D}${bindir} | ||
24 | install -m 0755 helloworld ${D}${bindir} | ||
25 | } | ||
diff --git a/meta-selftest/recipes-test/devtool/files/0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch b/meta-selftest/recipes-test/devtool/files/0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch new file mode 100644 index 0000000000..2294a094b2 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/files/0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 0f37affbc6e6c71687301d99d7259f1968e57c48 Mon Sep 17 00:00:00 2001 | ||
2 | From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | ||
3 | Date: Wed, 26 Aug 2015 12:42:23 +0000 | ||
4 | Subject: [PATCH] helloword.c: exit with EXIT_SUCCESS instead of a magic number | ||
5 | |||
6 | --- | ||
7 | helloworld.c | 3 ++- | ||
8 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/helloworld.c b/helloworld.c | ||
11 | index 71f2e46..54bf50b 100644 | ||
12 | --- a/helloworld.c | ||
13 | +++ b/helloworld.c | ||
14 | @@ -1,8 +1,9 @@ | ||
15 | #include <stdio.h> | ||
16 | +#include <stdlib.h> | ||
17 | |||
18 | int main(int argc, char **argv) | ||
19 | { | ||
20 | printf("Hello World!\n"); | ||
21 | |||
22 | - return 0; | ||
23 | + return EXIT_SUCCESS; | ||
24 | } | ||
25 | -- | ||
26 | 1.8.4.5 | ||
27 | |||
diff --git a/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.1.tar.gz b/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.1.tar.gz new file mode 100644 index 0000000000..06a1c49cd9 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.1.tar.gz | |||
Binary files differ | |||
diff --git a/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.2.tar.gz b/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.2.tar.gz new file mode 100644 index 0000000000..9b0dcf4b6c --- /dev/null +++ b/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.2.tar.gz | |||
Binary files differ | |||