From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by mail.openembedded.org (Postfix) with ESMTP id AAA727C4BB for ; Mon, 11 Mar 2019 04:01:42 +0000 (UTC) Received: by mail-lj1-f174.google.com with SMTP id v16so2724038ljg.13 for ; Sun, 10 Mar 2019 21:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F6yhbWa+ymPsvIAROsm8klYUpWfkC/xJ9+3H2GLzk5Q=; b=NhdoSTcmtaHzHdDfbxEj1exjhKBDXqO2wEARKIoeZBrbTqn0vZVcCYCVmrLTYUMGpm P+zLLRiF2Fh79SfuoeCHkCH7w1TBSlsL9ENWRnR9r/v1L7I2qTKEZnaF0kPkaethnX5O nLn7YfwDPDv2krQMMCTFverAhvLytG3etD+/oaEtnP78h0/TTIhG++NDsCc96JTNxwz7 aFrLfHLKaSehGo9ZQTVww86QyZccaEk41lHZxtKhNaYVizlNCrRwVIzCD8V00ecsgo/J tKcLO/6hiP/61BU/cTLSjTJtJwUF6YiE2ClgXfybNKtOn5wUb0hP4D5YYPp8Yj8z/vBl 60nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F6yhbWa+ymPsvIAROsm8klYUpWfkC/xJ9+3H2GLzk5Q=; b=dUiuig0Sc12eQivybqw0XjfSAUufRKjWcF0TlUg6cfXfExZqoCEcHoMRxsLH1cE/gi 8Jv7cZu5b/hXX0QvujdsHhJtNPD4cq9IFbwvtJy7YraOl0JTBLuHZvZlCwj4RdkY1Q/D AmSfeIZckOSFYnhXARlvG5zKJyChScFQDmse0Yvr3aUH7UdFhKzh43Q4Za5ze5Rdk1aB 3+JZkmpjNf4nM/1v6vZ0btCgst1m3xoFSlsksRFCJ59kxqV3XVhv1ClIabg/eUjRYs0H UCTPbpsnMrVq6WY4k+MTaigTWTIiX9qatgoSBofqzm5p2lY899pDio5wAHSBNdC7PLrM vS3w== X-Gm-Message-State: APjAAAUz+lK8FT/W2UnOoH86vu7jdDCWAy7QinJDXWuQz+JSjv3iruXO v8ZcQOQdA9vAMYgoIapHOJaJi+LaUvy1WYsDnsI= X-Google-Smtp-Source: APXvYqyh9pq0uW5wWILyHzVEsbTv9T8qxCFcZ+P6ThHCx9I+In3/8/Ps5KedyK8ztamYg1LYvby/ZPE8Y0aYezdl8xA= X-Received: by 2002:a2e:6309:: with SMTP id x9mr14931533ljb.75.1552276902927; Sun, 10 Mar 2019 21:01:42 -0700 (PDT) MIME-Version: 1.0 References: <05adfd2c8d029ee397c9d2046ebb11aec8d3e952.1551889557.git.bruce.ashfield@gmail.com> <751a6405-4e20-89d6-daf5-664ec775bb7d@betafive.co.uk> In-Reply-To: From: Bruce Ashfield Date: Mon, 11 Mar 2019 00:01:31 -0400 Message-ID: To: Paul Barker Cc: Patches and discussions about the oe-core layer Subject: Re: [PATCH 1/6] kernel-yocto: allow kernel-meta repositories to be patched X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 04:01:42 -0000 Content-Type: text/plain; charset="UTF-8" On Sun, Mar 10, 2019 at 11:14 PM Bruce Ashfield wrote: > > On Sun, Mar 10, 2019 at 10:35 PM Bruce Ashfield > wrote: > > > > On Sat, Mar 9, 2019 at 5:10 PM Paul Barker wrote: > > > > > > On 06/03/2019 16:37, bruce.ashfield@gmail.com wrote: > > > > From: Bruce Ashfield > > > > > > > > For testing purposes, it is often easier to patch a fragment > > > > in a kernel-meta repository versus needing to make a copy or > > > > modify the source repository. > > > > > > > > We can allow this sort of patching when a patchdir of kernel-meta > > > > is passed (to indicate the nested kernel-meta repository). > > > > > > > > Also note that we must patch the meta data before they are > > > > processed/gathered, since migrated copies to the kernel source > > > > directory will be used later. > > > > > > > > Signed-off-by: Bruce Ashfield > > > > --- > > > > meta/classes/kernel-yocto.bbclass | 29 +++++++++++++++++++++++++---- > > > > 1 file changed, 25 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass > > > > index 496c8a7f68..d2b194dd55 100644 > > > > --- a/meta/classes/kernel-yocto.bbclass > > > > +++ b/meta/classes/kernel-yocto.bbclass > > > > @@ -5,12 +5,21 @@ PATCH_GIT_USER_NAME ?= "OpenEmbedded" > > > > > > > > # returns local (absolute) path names for all valid patches in the > > > > # src_uri > > > > -def find_patches(d): > > > > +def find_patches(d,subdir): > > > > patches = src_patches(d) > > > > patch_list=[] > > > > for p in patches: > > > > - _, _, local, _, _, _ = bb.fetch.decodeurl(p) > > > > - patch_list.append(local) > > > > + _, _, local, _, _, parm = bb.fetch.decodeurl(p) > > > > + # if patchdir has been passed, we won't be able to apply it so skip > > > > + # the patch for now, and special processing happens later > > > > + patchdir = '' > > > > + if "patchdir" in parm: > > > > + patchdir = parm["patchdir"] > > > > + if patchdir: > > > > > > Did you mean 'if subdir:' here? > > > > Nope. I did mean if patchdir: here, that doesn't mean it is working perfectly, > > but I did definitely mean patchdir. > > > > > > > > I'm seeing duplicate attempts to apply a patch listed on SRC_URI in the > > > linux-raspberrypi_4.14.bb recipe from meta-raspberrypi. The first > > > attempt is in do_kernel_metadata and this succeeds, the second is in > > > do_patch and this fails as the patch has already been applied. > > > > Hmm. The only thing that should be patchable in the meta data > > gathering is the meta data. Not the kernel source tree. It is just > > there as a rough debug / devel trigger. kernel-meta is a separate > > repo, so patches are only applied there. > > > > Something that triggers in do_patch can't be patching that same > > repo, since the kernel tree is separate .. > > > > Is the raspberrypi recipe using the upstream kernel-cache repo > > or is it doing something else ? > > > > Is it also using patches with patchdir specified in the src_uri ? > > If it isn't, I can't see how any of this is triggering. > > > > I'm out of the office this week, but this is something I can sort > > out .. can you send me the exact set of layers (and any > > local.conf I'd need) to trigger this ? I'll have some time tomorrow > > night to poke at it a bit. > > I just did a build with meta-raspberrypi and did recreate the issue, > I'll have a look at see what I can do. I'll need to test some other > use cases against any changes I make, so it'll be a bit touchy :P On a closer look, yes, it is safer to just have the test on subdir versus some other compound conditions that I was using. That being said, even with that fixed, I'm not able to complete the patch process for the linux-raspberrypi kernel, I'm seeing and error in do_patch itself, and it doesn't look related to the change in question. Are you seeing something similar ? Bruce > > Bruce > > > > > Bruce > > > > > > > > In this case, patchdir = '' as there is no patchdir set for this in the > > > recipe. The patch is still picked up when find_patches() is called with > > > subdir='kernel-meta' since the test here is false and the comparison > > > below is not performed. > > > > > > > + if subdir == patchdir: > > > > + patch_list.append(local) > > > > + else: > > > > + patch_list.append(local) > > > > > > > > return patch_list > > > > > > > > @@ -119,8 +128,20 @@ do_kernel_metadata() { > > > > fi > > > > fi > > > > > > > > + # was anyone trying to patch the kernel meta data ?, we need to do > > > > + # this here, since the scc commands migrate the .cfg fragments to the > > > > + # kernel source tree, where they'll be used later. > > > > + check_git_config > > > > + patches="${@" ".join(find_patches(d,'kernel-meta'))}" > > > > + for p in $patches; do > > > > + ( > > > > + cd ${WORKDIR}/kernel-meta > > > > + git am -s $p > > > > + ) > > > > + done > > > > + > > > > sccs_from_src_uri="${@" ".join(find_sccs(d))}" > > > > - patches="${@" ".join(find_patches(d))}" > > > > + patches="${@" ".join(find_patches(d,''))}" > > > > feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}" > > > > > > > > # a quick check to make sure we don't have duplicate defconfigs > > > > > > > > > > -- > > > Paul Barker > > > Beta Five Ltd > > > > > > > > -- > > - Thou shalt not follow the NULL pointer, for chaos and madness await > > thee at its end > > - "Use the force Harry" - Gandalf, Star Trek II > > > > -- > - Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end > - "Use the force Harry" - Gandalf, Star Trek II -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II