* [meta-oe][RFC PATCH 2/2] insane: make patch upstream-status configurable
[not found] <20211215100344.3266900-1-kweihmann@outlook.com>
@ 2021-12-15 10:03 ` Konrad Weihmann
[not found] ` <16C0E58BF5CDEB84.23449@lists.openembedded.org>
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Weihmann @ 2021-12-15 10:03 UTC (permalink / raw)
To: openembedded-core; +Cc: Konrad Weihmann
instead of hard coding /meta/ into a skip condition introduce a
variable called QA_PATCH_CHECK_LAYER containing a space
separated list of layer names to perform the upstrem-status check
against.
as this will add BBFILE_PATTERN_* and therefore host specific paths
to the task hash, we need to exclude do_qa_patch function from
task hashing.
As it is a postfunc it should run anyway, once do_patch needs to rerun
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
---
meta/classes/insane.bbclass | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 240f3aad62..c19cc6f629 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -65,6 +65,8 @@ QA_EMPTY_DIRS ?= " \
# message if the directory is not empty. If it is not specified for a directory,
# then "but it is expected to be empty" will be used.
+QA_PATCH_CHECK_LAYER ?= "core"
+
def package_qa_clean_path(path, d, pkg=None):
"""
Remove redundant paths from the path for display. If pkg isn't set then
@@ -1171,12 +1173,15 @@ python do_qa_patch() {
# Check if the patch contains a correctly formatted and spelled Upstream-Status
import re
from oe import patch
+ from oe.recipeutils import get_layer_name
+
+ check_layer = (d.getVar("QA_PATCH_CHECK_LAYER") or "").split()
for url in patch.src_patches(d):
(_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
- # skip patches not in oe-core
- if '/meta/' not in fullpath:
+ # skip patches in all but the configured ones
+ if get_layer_name(fullpath, d) not in check_layer:
continue
content = open(fullpath, encoding='utf-8', errors='ignore').read()
@@ -1298,6 +1303,7 @@ do_populate_sysroot[postfuncs] += "do_qa_staging "
# Check for patch fuzz
do_patch[postfuncs] += "do_qa_patch "
+do_patch[vardepsexclude] += "do_qa_patch "
# Check broken config.log files, for packages requiring Gettext which
# don't have it in DEPENDS.
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [meta-oe][RFC PATCH 2/2] insane: make patch upstream-status configurable
[not found] ` <16C0E58BF5CDEB84.23449@lists.openembedded.org>
@ 2021-12-15 10:06 ` Konrad Weihmann
2021-12-15 14:55 ` Alexander Kanavin
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Weihmann @ 2021-12-15 10:06 UTC (permalink / raw)
To: openembedded-core; +Cc: Alexander Kanavin, Richard Purdie
Picking up where Alex left it last time, this proposes a different way
to make the layers where the Upstream-Status check is run configurable.
Please share your thoughs - esp. about the vardepsexclude, as I so far
don't see any other option to get rid of the BBFILE_PATTERN creeping
into the task hash
On 15.12.21 11:03, Konrad Weihmann wrote:
> instead of hard coding /meta/ into a skip condition introduce a
> variable called QA_PATCH_CHECK_LAYER containing a space
> separated list of layer names to perform the upstrem-status check
> against.
>
> as this will add BBFILE_PATTERN_* and therefore host specific paths
> to the task hash, we need to exclude do_qa_patch function from
> task hashing.
> As it is a postfunc it should run anyway, once do_patch needs to rerun
>
> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> ---
> meta/classes/insane.bbclass | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 240f3aad62..c19cc6f629 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -65,6 +65,8 @@ QA_EMPTY_DIRS ?= " \
> # message if the directory is not empty. If it is not specified for a directory,
> # then "but it is expected to be empty" will be used.
>
> +QA_PATCH_CHECK_LAYER ?= "core"
> +
> def package_qa_clean_path(path, d, pkg=None):
> """
> Remove redundant paths from the path for display. If pkg isn't set then
> @@ -1171,12 +1173,15 @@ python do_qa_patch() {
> # Check if the patch contains a correctly formatted and spelled Upstream-Status
> import re
> from oe import patch
> + from oe.recipeutils import get_layer_name
> +
> + check_layer = (d.getVar("QA_PATCH_CHECK_LAYER") or "").split()
>
> for url in patch.src_patches(d):
> (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
>
> - # skip patches not in oe-core
> - if '/meta/' not in fullpath:
> + # skip patches in all but the configured ones
> + if get_layer_name(fullpath, d) not in check_layer:
> continue
>
> content = open(fullpath, encoding='utf-8', errors='ignore').read()
> @@ -1298,6 +1303,7 @@ do_populate_sysroot[postfuncs] += "do_qa_staging "
>
> # Check for patch fuzz
> do_patch[postfuncs] += "do_qa_patch "
> +do_patch[vardepsexclude] += "do_qa_patch "
>
> # Check broken config.log files, for packages requiring Gettext which
> # don't have it in DEPENDS.
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#159718): https://lists.openembedded.org/g/openembedded-core/message/159718
> Mute This Topic: https://lists.openembedded.org/mt/87741230/3647476
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [kweihmann@outlook.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [meta-oe][RFC PATCH 2/2] insane: make patch upstream-status configurable
2021-12-15 10:06 ` [OE-core] " Konrad Weihmann
@ 2021-12-15 14:55 ` Alexander Kanavin
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2021-12-15 14:55 UTC (permalink / raw)
To: Konrad Weihmann; +Cc: OE-core, Richard Purdie
[-- Attachment #1: Type: text/plain, Size: 3231 bytes --]
I don't have any immediate objections :)
Alex
On Wed, 15 Dec 2021 at 11:06, Konrad Weihmann <kweihmann@outlook.com> wrote:
> Picking up where Alex left it last time, this proposes a different way
> to make the layers where the Upstream-Status check is run configurable.
>
> Please share your thoughs - esp. about the vardepsexclude, as I so far
> don't see any other option to get rid of the BBFILE_PATTERN creeping
> into the task hash
>
> On 15.12.21 11:03, Konrad Weihmann wrote:
> > instead of hard coding /meta/ into a skip condition introduce a
> > variable called QA_PATCH_CHECK_LAYER containing a space
> > separated list of layer names to perform the upstrem-status check
> > against.
> >
> > as this will add BBFILE_PATTERN_* and therefore host specific paths
> > to the task hash, we need to exclude do_qa_patch function from
> > task hashing.
> > As it is a postfunc it should run anyway, once do_patch needs to rerun
> >
> > Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> > ---
> > meta/classes/insane.bbclass | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> > index 240f3aad62..c19cc6f629 100644
> > --- a/meta/classes/insane.bbclass
> > +++ b/meta/classes/insane.bbclass
> > @@ -65,6 +65,8 @@ QA_EMPTY_DIRS ?= " \
> > # message if the directory is not empty. If it is not specified for a
> directory,
> > # then "but it is expected to be empty" will be used.
> >
> > +QA_PATCH_CHECK_LAYER ?= "core"
> > +
> > def package_qa_clean_path(path, d, pkg=None):
> > """
> > Remove redundant paths from the path for display. If pkg isn't
> set then
> > @@ -1171,12 +1173,15 @@ python do_qa_patch() {
> > # Check if the patch contains a correctly formatted and spelled
> Upstream-Status
> > import re
> > from oe import patch
> > + from oe.recipeutils import get_layer_name
> > +
> > + check_layer = (d.getVar("QA_PATCH_CHECK_LAYER") or "").split()
> >
> > for url in patch.src_patches(d):
> > (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
> >
> > - # skip patches not in oe-core
> > - if '/meta/' not in fullpath:
> > + # skip patches in all but the configured ones
> > + if get_layer_name(fullpath, d) not in check_layer:
> > continue
> >
> > content = open(fullpath, encoding='utf-8',
> errors='ignore').read()
> > @@ -1298,6 +1303,7 @@ do_populate_sysroot[postfuncs] += "do_qa_staging "
> >
> > # Check for patch fuzz
> > do_patch[postfuncs] += "do_qa_patch "
> > +do_patch[vardepsexclude] += "do_qa_patch "
> >
> > # Check broken config.log files, for packages requiring Gettext which
> > # don't have it in DEPENDS.
> >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#159718):
> https://lists.openembedded.org/g/openembedded-core/message/159718
> > Mute This Topic: https://lists.openembedded.org/mt/87741230/3647476
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> kweihmann@outlook.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
[-- Attachment #2: Type: text/html, Size: 4727 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-15 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211215100344.3266900-1-kweihmann@outlook.com>
2021-12-15 10:03 ` [meta-oe][RFC PATCH 2/2] insane: make patch upstream-status configurable Konrad Weihmann
[not found] ` <16C0E58BF5CDEB84.23449@lists.openembedded.org>
2021-12-15 10:06 ` [OE-core] " Konrad Weihmann
2021-12-15 14:55 ` Alexander Kanavin
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.