public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: sven.schultschik@siemens.com, cedric_hombourger@mentor.com,
	henning.schild@siemens.com
Subject: [PATCH 2/2] dpkg-raw: Correct path so that git fetching works
Date: Fri,  3 Apr 2020 17:02:57 +0200	[thread overview]
Message-ID: <bdbca046501c86ca5adca28439e0d7294b83c4b1.1585926177.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1585926177.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1585926177.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

Setting D to S and cleaning the former caused problems when fetching the
to-be-installed files via git. Fix this by using a distinct D folder.
This requires setting --sourcedir for dh_install accordingly.

At this chance, simplify ${PN}.install creation and avoid resolving ${D}
in the error message.

Reported-by: Sven Schultschik <sven.schultschik@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes/dpkg-raw.bbclass | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
index 8c01a46a..9d4e8c19 100644
--- a/meta/classes/dpkg-raw.bbclass
+++ b/meta/classes/dpkg-raw.bbclass
@@ -5,22 +5,27 @@
 
 inherit dpkg
 
-D = "${S}"
+D = "${WORKDIR}/image"
 
 # Populate folder that will be picked up as package
 do_install() {
-	bbnote "Put your files for this package in ${D}"
+	bbnote "Put your files for this package in $""{D}"
 }
 
 do_install[cleandirs] = "${D}"
 addtask install after do_unpack before do_prepare_build
 
-do_prepare_build[cleandirs] += "${D}/debian"
+do_prepare_build[cleandirs] += "${S}/debian"
 do_prepare_build() {
 	cd ${D}
 	find . -maxdepth 1 ! -name .. -and ! -name . -and ! -name debian | \
-		sed 's:^./::' > ${WORKDIR}/${PN}.install
-	mv ${WORKDIR}/${PN}.install ${D}/debian/
+		sed 's:^./::' > ${S}/debian/${PN}.install
 
 	deb_debianize
+
+	cat <<EOF >> ${S}/debian/rules
+
+override_dh_install:
+	dh_install --sourcedir=${PP}/image
+EOF
 }
-- 
2.16.4


  parent reply	other threads:[~2020-04-03 15:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 15:02 [PATCH 0/2] Fix dpkg-raw usage of and Jan Kiszka
2020-04-03 15:02 ` [PATCH 1/2] meta-isar: example-raw: Fix misuse of ${S} Jan Kiszka
2020-04-14  7:02   ` Henning Schild
2020-04-03 15:02 ` Jan Kiszka [this message]
2020-04-14  7:05   ` [PATCH 2/2] dpkg-raw: Correct path so that git fetching works Henning Schild
2020-04-14  7:11     ` Henning Schild
2020-04-14  7:53       ` Jan Kiszka
2020-04-14  7:15     ` Jan Kiszka
2020-04-14  7:34   ` [PATCH v2 " Jan Kiszka
2020-04-17 15:32     ` Baurzhan Ismagulov
2020-05-06 19:29     ` Baurzhan Ismagulov
2020-04-06  6:01 ` [PATCH 0/2] Fix dpkg-raw usage of and 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=bdbca046501c86ca5adca28439e0d7294b83c4b1.1585926177.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=cedric_hombourger@mentor.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=sven.schultschik@siemens.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