Message ID | 20191127141521.8739-1-ross.burton@intel.com |
---|---|
State | Accepted |
Commit | ddd2c5624404848ee668dabec0f61599ab5003e4 |
Headers | show |
Series | insane: fix GitHub /archive/ test | expand |
On 11/27/19 6:15 AM, Ross Burton wrote: > This test was failing to split the URL list to individual URLs, so if > SRC_URI is something like this then the test incorrectly triggers: > > SRC_URI = "git://github.com/foo http://example.com/archive/foo" > > Fix this by splitting the SRC_URI list and iterating through the URIs > one at time. > > [ YOCTO #13660 ] Test-by: Armin Kuster <akuster808@gmail.com> > > Signed-off-by: Ross Burton <ross.burton@intel.com> > --- > meta/classes/insane.bbclass | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass > index f856cf6a2b6..0564f9c2a41 100644 > --- a/meta/classes/insane.bbclass > +++ b/meta/classes/insane.bbclass > @@ -893,9 +893,9 @@ def package_qa_check_src_uri(pn, d, messages): > if "${PN}" in d.getVar("SRC_URI", False): > package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d) > > - pn = d.getVar("SRC_URI") > - if re.search(r"github\.com/.+/.+/archive/.+", pn): > - package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d) > + for url in d.getVar("SRC_URI").split(): > + if re.search(r"github\.com/.+/.+/archive/.+", url): > + package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d) > > > # The PACKAGE FUNC to scan each package -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index f856cf6a2b6..0564f9c2a41 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -893,9 +893,9 @@ def package_qa_check_src_uri(pn, d, messages): if "${PN}" in d.getVar("SRC_URI", False): package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d) - pn = d.getVar("SRC_URI") - if re.search(r"github\.com/.+/.+/archive/.+", pn): - package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d) + for url in d.getVar("SRC_URI").split(): + if re.search(r"github\.com/.+/.+/archive/.+", url): + package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d) # The PACKAGE FUNC to scan each package
This test was failing to split the URL list to individual URLs, so if SRC_URI is something like this then the test incorrectly triggers: SRC_URI = "git://github.com/foo http://example.com/archive/foo" Fix this by splitting the SRC_URI list and iterating through the URIs one at time. [ YOCTO #13660 ] Signed-off-by: Ross Burton <ross.burton@intel.com> --- meta/classes/insane.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core