From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [RFC 2/2] dpkg-gdb: Reset git to SRCREV revision before patching
Date: Thu, 12 Aug 2021 10:10:30 +0200 [thread overview]
Message-ID: <20210812081030.4505-3-ubely@ilbers.de> (raw)
In-Reply-To: <20210812081030.4505-1-ubely@ilbers.de>
Rebuilding some packages like cowsay after ISAR configuration
changes causes error during do_patch because the patches were
already applied at previous build and git HEAD was changed.
The change resets package's git HEAD to the appropriate revision.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
meta/classes/dpkg-gbp.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/classes/dpkg-gbp.bbclass b/meta/classes/dpkg-gbp.bbclass
index 20d2d4c..d37b07e 100644
--- a/meta/classes/dpkg-gbp.bbclass
+++ b/meta/classes/dpkg-gbp.bbclass
@@ -26,3 +26,13 @@ builddeps_install_append() {
dpkg_runbuild_prepend() {
export GBP_PREFIX="gbp buildpackage --git-ignore-new ${GBP_EXTRA_OPTIONS} --git-builder="
}
+
+do_patch[prefuncs] = "set_src_rev"
+
+python set_src_rev() {
+ srcsubdir = d.getVar('S')
+ srcrev = d.getVar('SRCREV')
+
+ if srcrev:
+ bb.process.run('git reset --hard ' + srcrev, cwd=srcsubdir)
+}
--
2.20.1
next prev parent reply other threads:[~2021-08-12 8:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 8:10 [RFC 0/2] Fixes for dpkg-gdb packages rebuild Uladzimir Bely
2021-08-12 8:10 ` [RFC 1/2] dpkg-base: Add new git alternates record instead of replace old one Uladzimir Bely
2021-08-12 9:00 ` Jan Kiszka
2021-08-12 9:18 ` Uladzimir Bely
2021-08-12 9:24 ` Jan Kiszka
2021-08-12 8:10 ` Uladzimir Bely [this message]
2021-08-12 9:01 ` [RFC 0/2] Fixes for dpkg-gdb packages rebuild 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=20210812081030.4505-3-ubely@ilbers.de \
--to=ubely@ilbers.de \
--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