Just for the next person that comes along.  My issue was not the
dependencies, it was that I was trying to extract a "control.tar.xz" inside
my custom "do_prepare" task.  I am using "kas-container" for my build and
the Docker image does not contain "xz".  The "tar" command was failing
because of this.

I ended up adding


# This is needed to ensure that xz is staged before it is needed.

do_prepare[depends] = "xz-native:do_populate_sysroot"

to the recipe to ensure that "xz" native was built and installed where
"tar" could then find it.  I verified that this is working multiple times by

bitbake -c cleanall xz zebra-scanner-corescanner


to clean the recipe and "xz" and then running

bitbake -c devshell zebra-scanner-corescanner


and I verified that "xz" was present in
"../recipe-sysroot-native/usr/bin/xz".

All is working correctly now.

On Tue, Jul 30, 2024 at 3:34 PM Brett Bergquist via lists.yoctoproject.org
<bbergquist=epc-instore....@lists.yoctoproject.org> wrote:

> I have a recipe that basically is repackaging an Debian package.  We don't
> have the source so we cannot build the package directly.
>
> I have to patch the "postinst" file that is within the "control.tar.xz"
> file.   I wrote a task "do_prepare" that will expand the "control.tar.xz"
> file and I want to ensure the task is run before the "do_patch" task but
> after the "do_fetch" task.
>
> I added this
>
> addtask do_prepare after do_unpack before do_patch
>
> Sometimes this fails and the "do_patch" task does not see the extracted
> content to patch.   Adding in a "-D" to the bitbake command will sometimes
> cause a difference in what I perceive to be timing and the recipe builds
> fine.  I have not been able to figure out what the issue is.
>
> If I look at the dependencies of the recipe's
> "zebra-scanner-corescanner:do_patch" task, I see for my recipe which is
> "zebra-scanner-corescanner"
>
>    - patch-native:do_populate_sysroot
>    - quilt-native:do_populate_sysroot
>    - zebra-scanner-corescanner:do_prepare
>    - zebra-scanner-corescanner:do_unpack
>
> and for for the "zebra-scanner-corescanner:do_prepare" task I see:
>
>    - zebra-scanner-corescanner:do_unpack
>
> Being a bit new to this, I think the "zebra-scanner-corescanner:do_patch"
> should wait for all of its tasks to complete before it runs and those tasks
> might be run in parallel, one of which will be the
> "zebra-scanner-corescanner:do_unpack" but the
> "zebra-scanner-corescanner:do_prepare" also has a dependency on the
> "zebra-scanner-corescanner:do_unpack" so ultimately the
> "zebra-scanner-corescanner:do_patch" should be waiting until the
> "zebra-scanner-corescanner:do_prepare" completes.
>
> However it appears that sometimes it does not.  Anyone have any ideas on
> this?
>
> --
> Brett M. Bergquist
> *Distinguished Member Technical Staff*
> *EntryPoint Communications LLC*
> *30 Waterside Drive, Suite 100*
> *Farmington, CT 06032*
>
> Phone: (203) 206 3542
> Email: bbergqu...@epc-instore.com
>
> CONFIDENTIALITY NOTICE
> This message (including any attachments) contains information that may be
> confidential.  If you are the intended recipient, and the message is marked
> confidential, by opening the message, you accept responsibility for
> treating the message and information contained in the message as
> confidential, including not distributing or disclosing its contents to any
> third party without the express written consent of the sender.  If you are
> not the intended recipient, you may not read, print, retain, use, copy,
> distribute or disclose to anyone the message or any information contained
> in the message, and such conduct is prohibited.  If you have received this
> message in error, please advise the sender by reply e-mail, and destroy all
> copies of the original message (including any attachments).  Sender
> reserves all rights of confidentiality and privilege, and nothing regarding
> this e-mail or its transmission is intended to be a waiver thereof.
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#63638): https://lists.yoctoproject.org/g/yocto/message/63638
Mute This Topic: https://lists.yoctoproject.org/mt/107633847/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to