public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Subject: Re: [PATCH 11-16 of 16 v2 1/6] meta: dpkg rename install to package_write_deb
Date: Tue, 8 Aug 2017 18:06:22 +0300	[thread overview]
Message-ID: <c7340150-bb6f-8890-00d5-df80cca9c4d6@ilbers.de> (raw)
In-Reply-To: <20170808164930.22ef5a22@md1em3qc>

On 08/08/2017 05:49 PM, Henning Schild wrote:
> Am Tue, 8 Aug 2017 16:06:11 +0300
> schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:
> 
>> 2017-08-03 22:15 GMT+03:00 Henning Schild
>> <henning.schild@siemens.com>:
>>
>>> This way we stay with OE names. The name "install" will be used to
>>> populate ${D} in a later patch, also in line with OE.
>>>
>>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>>> ---
>>>   meta/classes/dpkg.bbclass  | 9 ++++-----
>>>   meta/classes/image.bbclass | 2 +-
>>>   2 files changed, 5 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>>> index ca0c5ab..97238b5 100644
>>> --- a/meta/classes/dpkg.bbclass
>>> +++ b/meta/classes/dpkg.bbclass
>>> @@ -23,12 +23,11 @@ do_build() {
>>>       sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
>>>   }
>>>
>>> -
>>>   # Install package to dedicated deploy directory
>>> -do_install() {
>>> +do_package_write_deb() {
>>>   
>>
>> Why it's 'package_write_deb'? If we speak about 'like-OE' style, in
>> OE this function does (NOTE: I provide links to GitHub because they
>> have line numbering):
>>
>> 1. package_write_deb:
>> https://github.com/MentorEmbedded/poky/blob/master/meta/classes/package_deb.bbclass#L342
>>
>> 2. It calls package_deb:
>> https://github.com/MentorEmbedded/poky/blob/master/meta/classes/package_deb.bbclass#L51
>>
>> So this function performs creating of deb package from built binaries.
>>
>>
>> In general it's quite difficult to map Isar package building process
>> to OE (some tasks like 'patch' are missed due to no meaning in this
>> context):
>>
>> 1. Isar: fetch -> unpack -> (!) build (using dpkg)
>>
>> 2. OE: fetch -> unpack -> (!) configure -> compile -> install ->
>> package_write_deb
>>
>> So all the tasks after (!) in OE are done in single task in Isar.
>> That's one of the Isar main difference from OE, that package building
>> is performed by native Debian tools and this process can't be
>> break-down and one-to-one mapped to OE tasks.
>>
>> Regarding the function in patch, this is defenitely install and not
>> package write, but we can specify what kind of install, for example:
>> install_to_deploy, or populate_apt or etc...
> 
> http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#ref-tasks-package_write_deb
> 
> Yes they also build the package in that step. But after that step
> a .deb is in DEPLOY_DEB_DIR.

In your link, this task *creates* Debian package and stores it to deploy 
directory, what is *not* true for Isar. I'd suggest to name tasks 
identically to OE *only* when they have identical meaning, otherwise 
there is no reason to do so.

Isar is not OE, so not every task in Isar could be directly mapped to 
relevant OE one.

Alex

>>
>>
>>>       install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
>>>   }
>>>
>>> -addtask install after do_build
>>> -do_install[dirs] = "${DEPLOY_DIR_DEB}"
>>> -do_install[stamp-extra-info] = "${MACHINE}"
>>> +addtask package_write_deb after do_build
>>> +do_package_write_deb[dirs] = "${DEPLOY_DIR_DEB}"
>>> +do_package_write_deb[stamp-extra-info] = "${MACHINE}"
>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>> index 3e4877c..f60ec11 100644
>>> --- a/meta/classes/image.bbclass
>>> +++ b/meta/classes/image.bbclass
>>> @@ -27,4 +27,4 @@ do_populate() {
>>>   }
>>>
>>>   addtask populate before do_build
>>> -do_populate[deptask] = "do_install"
>>> +do_populate[deptask] = "do_package_write_deb"
>>> --
>>> 2.13.0
>>>
>>>

  reply	other threads:[~2017-08-08 18:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 19:15 [PATCH 11-16 of 16 v2 0/6] and now for the second half Henning Schild
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 1/6] meta: dpkg rename install to package_write_deb Henning Schild
2017-08-08 13:06   ` Alexander Smirnov
2017-08-08 14:49     ` Henning Schild
2017-08-08 15:06       ` Alexander Smirnov [this message]
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 2/6] package_write_deb: change access rights on .debs Henning Schild
2017-08-08 13:16   ` Alexander Smirnov
2017-08-21 23:14   ` Baurzhan Ismagulov
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 3/6] meta: classes: move package_write_deb to new class isar-base-dpkg Henning Schild
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 4/6] meta: classes: rename dpkg to dpkg-src Henning Schild
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 5/6] meta: add dpkg-bin class Henning Schild
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 6/6] recipes-app/hello-bin: add example on how to use dpkg-bin Henning Schild

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=c7340150-bb6f-8890-00d5-df80cca9c4d6@ilbers.de \
    --to=asmirnov@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