[OE-core] [PATCH 02/22] classes/lib: Convert to use python3 octal syntax

Christopher Larson clarson at kergoth.com
Wed Jun 1 21:57:39 UTC 2016


On Wed, Jun 1, 2016 at 5:35 AM, Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:

> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 4be0a7e..1ba1222 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -456,15 +456,15 @@ python () {
>      # If we're building a target package we need to use fakeroot (pseudo)
>      # in order to capture permissions, owners, groups and special files
>      if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross',
> d):
> -        d.setVarFlag('do_unpack', 'umask', '022')
> -        d.setVarFlag('do_configure', 'umask', '022')
> -        d.setVarFlag('do_compile', 'umask', '022')
> +        d.setVarFlag('do_unpack', 'umask', '0o022')
> +        d.setVarFlag('do_configure', 'umask', '0o022')
> +        d.setVarFlag('do_compile', 'umask', '0o022')
>          d.appendVarFlag('do_install', 'depends', '
> virtual/fakeroot-native:do_populate_sysroot')
>          d.setVarFlag('do_install', 'fakeroot', '1')
> -        d.setVarFlag('do_install', 'umask', '022')
> +        d.setVarFlag('do_install', 'umask', '0o022')
>          d.appendVarFlag('do_package', 'depends', '
> virtual/fakeroot-native:do_populate_sysroot')
>          d.setVarFlag('do_package', 'fakeroot', '1')
> -        d.setVarFlag('do_package', 'umask', '022')
> +        d.setVarFlag('do_package', 'umask', '0o022')
>          d.setVarFlag('do_package_setscene', 'fakeroot', '1')
>          d.appendVarFlag('do_package_setscene', 'depends', '
> virtual/fakeroot-native:do_populate_sysroot')
>          d.setVarFlag('do_devshell', 'fakeroot', '1')
>

Rather than modifying the string values in the metadata, shouldn't we
retain compatibility by letting the umask *string* stored in the flag use
the old format and if needed convert it when we convert the string to a
number to pass to the appropriate os functions? Or was this just a sed gone
wild, since these are string values, not python source octal syntax?
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160601/47572c37/attachment-0002.html>


More information about the Openembedded-core mailing list