* [OE-core][PATCH] classes/sanity: Add comment about github & gitlab archives
@ 2022-08-04 14:58 Joshua Watt
2022-08-04 20:58 ` Luca Ceresoli
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Watt @ 2022-08-04 14:58 UTC (permalink / raw)
To: openembedded-core; +Cc: Joshua Watt
Add a comment so that users grepping for "github" or "gitlab" will find
this code (since the regex wont).
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta/classes/insane.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 37e10ad850..c8b434bb54 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1335,6 +1335,7 @@ def unpack_check_src_uri(pn, d):
oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d)
for url in d.getVar("SRC_URI").split():
+ # Search for github and gitlab URLs that pull unstable archives (comment for future greppers)
if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url):
oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d)
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core][PATCH] classes/sanity: Add comment about github & gitlab archives
2022-08-04 14:58 [OE-core][PATCH] classes/sanity: Add comment about github & gitlab archives Joshua Watt
@ 2022-08-04 20:58 ` Luca Ceresoli
2022-08-04 21:04 ` Joshua Watt
0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2022-08-04 20:58 UTC (permalink / raw)
To: Joshua Watt; +Cc: openembedded-core
Hi Joshua,
On Thu, 4 Aug 2022 09:58:31 -0500
"Joshua Watt" <JPEWhacker@gmail.com> wrote:
> Add a comment so that users grepping for "github" or "gitlab" will find
> this code (since the regex wont).
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> meta/classes/insane.bbclass | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 37e10ad850..c8b434bb54 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -1335,6 +1335,7 @@ def unpack_check_src_uri(pn, d):
> oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d)
>
> for url in d.getVar("SRC_URI").split():
> + # Search for github and gitlab URLs that pull unstable archives (comment for future greppers)
> if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url):
I think the regexp is unnecessarily baroque and it could become just a
more readable (github|gitlab). And that would add only 4 chars! :-)
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core][PATCH] classes/sanity: Add comment about github & gitlab archives
2022-08-04 20:58 ` Luca Ceresoli
@ 2022-08-04 21:04 ` Joshua Watt
0 siblings, 0 replies; 3+ messages in thread
From: Joshua Watt @ 2022-08-04 21:04 UTC (permalink / raw)
To: Luca Ceresoli; +Cc: openembedded-core
On 8/4/22 15:58, Luca Ceresoli wrote:
> Hi Joshua,
>
> On Thu, 4 Aug 2022 09:58:31 -0500
> "Joshua Watt" <JPEWhacker@gmail.com> wrote:
>
>> Add a comment so that users grepping for "github" or "gitlab" will find
>> this code (since the regex wont).
>>
>> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
>> ---
>> meta/classes/insane.bbclass | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
>> index 37e10ad850..c8b434bb54 100644
>> --- a/meta/classes/insane.bbclass
>> +++ b/meta/classes/insane.bbclass
>> @@ -1335,6 +1335,7 @@ def unpack_check_src_uri(pn, d):
>> oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d)
>>
>> for url in d.getVar("SRC_URI").split():
>> + # Search for github and gitlab URLs that pull unstable archives (comment for future greppers)
>> if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url):
> I think the regexp is unnecessarily baroque and it could become just a
> more readable (github|gitlab). And that would add only 4 chars! :-)
Ya that would be better. I assumed someone was trying to win regex golf ;)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-04 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 14:58 [OE-core][PATCH] classes/sanity: Add comment about github & gitlab archives Joshua Watt
2022-08-04 20:58 ` Luca Ceresoli
2022-08-04 21:04 ` Joshua Watt
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.