All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Patch.bbclass URL Reasoning
@ 2012-03-27 12:41 Robert Abel
  2012-03-27 12:55 ` Paul Eggleton
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Abel @ 2012-03-27 12:41 UTC (permalink / raw)
  To: poky

Bumpity...

So nobody is aware of this issue or has ever tried to edit a patch
before do_patch?

Regards

Robert


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Patch.bbclass URL Reasoning
@ 2012-03-21 17:18 Robert Abel
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Abel @ 2012-03-21 17:18 UTC (permalink / raw)
  To: poky

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-27 13:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2012-03-21 17:18 Robert Abel

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.