From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 2/2] example-app: Add two patches for demonstration and testing purposes
Date: Sun, 18 Feb 2018 20:40:02 +0100 [thread overview]
Message-ID: <c4c2528e-ac7f-49b9-52fc-8fa51e461e05@siemens.com> (raw)
In-Reply-To: <389542c1-1367-2639-a13c-ebbb9318c05b@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
This stresses repo patching, patch ordering, strip level and the apply
parameter.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../recipes-app/example-hello/example-hello.bb | 5 ++-
.../example-hello/files/0001-Add-some-help.patch | 40 ++++++++++++++++++++++
.../example-hello/files/yet-another-change.txt | 11 ++++++
3 files changed, 55 insertions(+), 1 deletion(-)
create mode 100644 meta-isar/recipes-app/example-hello/files/0001-Add-some-help.patch
create mode 100644 meta-isar/recipes-app/example-hello/files/yet-another-change.txt
diff --git a/meta-isar/recipes-app/example-hello/example-hello.bb b/meta-isar/recipes-app/example-hello/example-hello.bb
index 73cca0a..9788ec0 100644
--- a/meta-isar/recipes-app/example-hello/example-hello.bb
+++ b/meta-isar/recipes-app/example-hello/example-hello.bb
@@ -14,7 +14,10 @@ PV = "0.2-86cc719"
# for now it's the only way to correctly build bitbake pipeline.
DEPENDS += "libhello"
-SRC_URI = "git://github.com/ilbers/hello.git;protocol=https"
+SRC_URI = " \
+ git://github.com/ilbers/hello.git;protocol=https \
+ file://0001-Add-some-help.patch \
+ file://yet-another-change.txt;apply=yes;striplevel=0"
SRCREV = "86cc719b3359adc3c4e243387feba50360a860f3"
S = "git"
diff --git a/meta-isar/recipes-app/example-hello/files/0001-Add-some-help.patch b/meta-isar/recipes-app/example-hello/files/0001-Add-some-help.patch
new file mode 100644
index 0000000..3c68a93
--- /dev/null
+++ b/meta-isar/recipes-app/example-hello/files/0001-Add-some-help.patch
@@ -0,0 +1,40 @@
+From 4615f473881aaff12a52aa3bb625bfb38753b4f2 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Sun, 18 Feb 2018 09:02:11 +0100
+Subject: [PATCH] Add some help
+
+This just provides a commit to demonstrate patching in Isar recipes.
+
+Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
+---
+ hello.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/hello.c b/hello.c
+index 269c24b..329a0c5 100644
+--- a/hello.c
++++ b/hello.c
+@@ -5,10 +5,19 @@
+ * version 2.
+ */
+
++#include <stdio.h>
+ #include <hello.h>
+
+-int main(void)
++int main(int argc, char *argv[])
+ {
++ while (argc > 1) {
++ if (strcmp(argv[argc - 1], "--help") == 0) {
++ printf("42\n");
++ return 0;
++ }
++ argc--;
++ }
++
+ say_hello();
+ return 0;
+ }
+--
+2.13.6
+
diff --git a/meta-isar/recipes-app/example-hello/files/yet-another-change.txt b/meta-isar/recipes-app/example-hello/files/yet-another-change.txt
new file mode 100644
index 0000000..0f8c1c8
--- /dev/null
+++ b/meta-isar/recipes-app/example-hello/files/yet-another-change.txt
@@ -0,0 +1,11 @@
+--- hello.c.orig 2018-02-18 09:09:26.712855740 +0100
++++ hello.c 2018-02-18 09:09:51.969056718 +0100
+@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
+ {
+ while (argc > 1) {
+ if (strcmp(argv[argc - 1], "--help") == 0) {
+- printf("42\n");
++ printf("42. Or what was the question?\n");
+ return 0;
+ }
+ argc--;
--
2.13.6
next prev parent reply other threads:[~2018-02-18 19:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-18 19:39 [PATCH 1/2] Add basic patch support Jan Kiszka
2018-02-18 19:40 ` Jan Kiszka [this message]
2018-02-20 11:12 ` Alexander Smirnov
2018-02-21 9:36 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4c2528e-ac7f-49b9-52fc-8fa51e461e05@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox