From: Robert Abel <abel@uni-bielefeld.de>
To: poky@yoctoproject.org
Subject: Patch.bbclass URL Reasoning
Date: Wed, 21 Mar 2012 18:18:31 +0100 [thread overview]
Message-ID: <4F6A0D67.3080005@uni-bielefeld.de> (raw)
Hi,
Could somebody enlighten me why the following is done in patch.bbclass?
> def src_patches(d, all = False ):
> workdir = d.getVar('WORKDIR', True)
> fetch = bb.fetch2.Fetch([], d)
> patches = []
> sources = []
> for url in fetch.urls:
> local = patch_path(url, fetch, workdir)
> if not local:
> if all:
> local = fetch.localpath(url)
> sources.append(local)
> continue
As you can see (or guess), patches are resolved back to their original
URLs inside the recipe folder. The ones that are copied to ${WORKDIR}
during unpack don't seem to be used at all. Is there any special reason
why this is done?
Basically, I was happily editing patches using sed when I noticed that
my changes weren't applied at all. I thought the patches are copied to
${WORKDIR} precisely for the reason that they are used, i.e. can be
edited before patching.
The reason for editing them in the first place is that they contain
specific IDs (which I put there) that a task before do_patch replaces
for actual values (e.g. MHz for external hardware) for the board
configuration so my users will be able to simply change a variable
inside their local.conf for added comfort/ease-of-use.
It seems the patches are copied just because and aren't actually
utilized at all. Could this behavior be changed to use the copied
patches instead of the original patches inside the recipe folder? IMHO
it would make much more sense to be able to edit the patches before they
are being applied without having to overwrite the original patches in
the process.
Regards
Robert
next reply other threads:[~2012-03-21 17:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 17:18 Robert Abel [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-27 12:41 Patch.bbclass URL Reasoning Robert Abel
2012-03-27 12:55 ` Paul Eggleton
[not found] ` <4F71B96F.5020409@uni-bielefeld.de>
2012-03-27 13:05 ` Paul Eggleton
2012-03-27 13:25 ` Bruce Ashfield
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=4F6A0D67.3080005@uni-bielefeld.de \
--to=abel@uni-bielefeld.de \
--cc=poky@yoctoproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.