From: Jan Kiszka <jan.kiszka@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>,
sven.schultschik@siemens.com, cedric_hombourger@mentor.com
Subject: Re: [PATCH 2/2] dpkg-raw: Correct path so that git fetching works
Date: Tue, 14 Apr 2020 09:15:41 +0200 [thread overview]
Message-ID: <9ee8eecd-56df-6152-178e-190d7961396c@siemens.com> (raw)
In-Reply-To: <20200414090524.04d023f1@md1za8fc.ad001.siemens.net>
On 14.04.20 09:05, Henning Schild wrote:
> Am Fri, 3 Apr 2020 17:02:57 +0200
> schrieb Jan Kiszka <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}
>
> How about we create a recursive copy of S into D and leave the rest of
> the code as it was?
This may cause artifacts being distributed that shall not. ${S} may
contain a complete git repo while ${D} shall only contain some selected
files of it.
>
>> 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
>
> Because this looks confusing and will break if people already had their
> own override ... for some weird reason.
>
> And because of the hidden API "change" i commented on in the other
> patch.
I can write a small changelog entry, but I don't see any point in
addressing purely hypothetical user issues by copying stuff around -
which may even not be as simple as you think.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2020-04-14 7:15 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 ` [PATCH 2/2] dpkg-raw: Correct path so that git fetching works Jan Kiszka
2020-04-14 7:05 ` Henning Schild
2020-04-14 7:11 ` Henning Schild
2020-04-14 7:53 ` Jan Kiszka
2020-04-14 7:15 ` Jan Kiszka [this message]
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=9ee8eecd-56df-6152-178e-190d7961396c@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