* [PATCH] insane: add qa check for lowercase recipe name
@ 2017-08-15 2:23 Yeoh Ee Peng
2017-08-15 14:23 ` Leonardo Sandoval
0 siblings, 1 reply; 3+ messages in thread
From: Yeoh Ee Peng @ 2017-08-15 2:23 UTC (permalink / raw)
To: openembedded-core
Since we disabled uppercase characters in overrides a few releases ago,
uppercase characters in recipe names (and for that matter, distro and
machine names) cannot be supported due to their reliance upon overrides
including the name.
QA check will produce an warning message when it verify that recipe
name is not lowercase.
[YOCTO# 11592]
Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
---
meta/classes/insane.bbclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index b7177c9..8e062d1 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -27,7 +27,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
installed-vs-shipped compile-host-path install-host-path \
pn-overrides infodir build-deps \
unknown-configure-option symlink-to-sysroot multilib \
- invalid-packageconfig host-user-contaminated \
+ invalid-packageconfig host-user-contaminated pn_lowercase \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1274,7 +1274,9 @@ python () {
if pn in overrides:
msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
package_qa_handle_error("pn-overrides", msg, d)
-
+ if pn != pn.lower():
+ package_qa_handle_error("pn_lowercase", 'PN: %s is not lower case, this can result in unexpected behavior.' % pn, d)
+
issues = []
if (d.getVar('PACKAGES') or "").split():
for dep in (d.getVar('QADEPENDS') or "").split():
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] insane: add qa check for lowercase recipe name
2017-08-15 2:23 [PATCH] insane: add qa check for lowercase recipe name Yeoh Ee Peng
@ 2017-08-15 14:23 ` Leonardo Sandoval
2017-08-15 18:08 ` Andre McCurdy
0 siblings, 1 reply; 3+ messages in thread
From: Leonardo Sandoval @ 2017-08-15 14:23 UTC (permalink / raw)
To: Yeoh Ee Peng; +Cc: openembedded-core
On Mon, 2017-08-14 at 19:23 -0700, Yeoh Ee Peng wrote:
> Since we disabled uppercase characters in overrides a few releases ago,
> uppercase characters in recipe names (and for that matter, distro and
> machine names) cannot be supported due to their reliance upon overrides
> including the name.
>
> QA check will produce an warning message when it verify that recipe
> name is not lowercase.
>
> [YOCTO# 11592]
>
> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
> ---
> meta/classes/insane.bbclass | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index b7177c9..8e062d1 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -27,7 +27,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
> installed-vs-shipped compile-host-path install-host-path \
> pn-overrides infodir build-deps \
> unknown-configure-option symlink-to-sysroot multilib \
> - invalid-packageconfig host-user-contaminated \
> + invalid-packageconfig host-user-contaminated pn_lowercase \
> "
IMO, what you warn is that variable has uppercase letters, so the test
should be named 'pn_uppercase'
> ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
> perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
> @@ -1274,7 +1274,9 @@ python () {
> if pn in overrides:
> msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
> package_qa_handle_error("pn-overrides", msg, d)
> -
> + if pn != pn.lower():
> + package_qa_handle_error("pn_lowercase", 'PN: %s is not lower case, this can result in unexpected behavior.' % pn, d)
> +
for performance reasons, perhaps it would be better to create a regex
matching uppercases and if match succeeded, the raise the error/warning
One more thing. At the beginning of the insane class, on the comments
area you can include this one on the 'Checks we do' section.
> issues = []
> if (d.getVar('PACKAGES') or "").split():
> for dep in (d.getVar('QADEPENDS') or "").split():
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] insane: add qa check for lowercase recipe name
2017-08-15 14:23 ` Leonardo Sandoval
@ 2017-08-15 18:08 ` Andre McCurdy
0 siblings, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2017-08-15 18:08 UTC (permalink / raw)
To: Leonardo Sandoval; +Cc: Yeoh Ee Peng, OE Core mailing list
On Tue, Aug 15, 2017 at 7:23 AM, Leonardo Sandoval
<leonardo.sandoval.gonzalez@linux.intel.com> wrote:
> On Mon, 2017-08-14 at 19:23 -0700, Yeoh Ee Peng wrote:
>> Since we disabled uppercase characters in overrides a few releases ago,
>> uppercase characters in recipe names (and for that matter, distro and
>> machine names) cannot be supported due to their reliance upon overrides
>> including the name.
>>
>> QA check will produce an warning message when it verify that recipe
>> name is not lowercase.
>>
>> [YOCTO# 11592]
>>
>> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
>> ---
>> meta/classes/insane.bbclass | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
>> index b7177c9..8e062d1 100644
>> --- a/meta/classes/insane.bbclass
>> +++ b/meta/classes/insane.bbclass
>> @@ -27,7 +27,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
>> installed-vs-shipped compile-host-path install-host-path \
>> pn-overrides infodir build-deps \
>> unknown-configure-option symlink-to-sysroot multilib \
>> - invalid-packageconfig host-user-contaminated \
>> + invalid-packageconfig host-user-contaminated pn_lowercase \
>> "
>
> IMO, what you warn is that variable has uppercase letters, so the test
> should be named 'pn_uppercase'
All the other tests are named using '-' rather than '_', so
pn-uppercase (or uppercase-pn) might be even better.
>> ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
>> perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
>> @@ -1274,7 +1274,9 @@ python () {
>> if pn in overrides:
>> msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
>> package_qa_handle_error("pn-overrides", msg, d)
>> -
>> + if pn != pn.lower():
>> + package_qa_handle_error("pn_lowercase", 'PN: %s is not lower case, this can result in unexpected behavior.' % pn, d)
>> +
>
> for performance reasons, perhaps it would be better to create a regex
> matching uppercases and if match succeeded, the raise the error/warning
>
> One more thing. At the beginning of the insane class, on the comments
> area you can include this one on the 'Checks we do' section.
>
>> issues = []
>> if (d.getVar('PACKAGES') or "").split():
>> for dep in (d.getVar('QADEPENDS') or "").split():
>> --
>> 2.7.4
>>
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-15 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 2:23 [PATCH] insane: add qa check for lowercase recipe name Yeoh Ee Peng
2017-08-15 14:23 ` Leonardo Sandoval
2017-08-15 18:08 ` Andre McCurdy
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.