Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On Tue, Apr 7, 2015 at 7:52 AM, Ed Bartosh ed.bart...@linux.intel.com wrote: On Mon, Apr 06, 2015 at 11:28:24AM -0300, Otavio Salvador wrote: If we want to have it as a 'standalone' tool we will need to somehow package the tool set for it to use, otherwise we have a maintenance nightmare (does patch X has been applied to Parted?). Can you elaborate a bit on how tool set can be packaged? We could do a tarball like the buildtools toolchain. I was thinking about providing wic and its dependencies as repository with rpm/deb packages. Providing them as a tarball doesn't differ much from what we already have from my point of view. There are several solutions for this very same problem. Each one has advantages or disadvantages. To be honest, I think we ought to focus in making wic more easy to use and robust right now. Later we can think about how to enable side use cases (Buildroot might be one). -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On Mon, Apr 06, 2015 at 11:28:24AM -0300, Otavio Salvador wrote: If we want to have it as a 'standalone' tool we will need to somehow package the tool set for it to use, otherwise we have a maintenance nightmare (does patch X has been applied to Parted?). Can you elaborate a bit on how tool set can be packaged? We could do a tarball like the buildtools toolchain. I was thinking about providing wic and its dependencies as repository with rpm/deb packages. Providing them as a tarball doesn't differ much from what we already have from my point of view. -- Regards, Ed -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On Sun, Apr 5, 2015 at 4:16 PM, Philip Balister phi...@balister.org wrote: On 04/04/2015 10:20 AM, Ed Bartosh wrote: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. I'm with Otavio. Given wic is intimately dependent on internal build artifacts, it should use utilities from the sysroot and not depend on tools from the path. Let's make wic 100% before creating a tool to build images from packages. If we want to have it as a 'standalone' tool we will need to somehow package the tool set for it to use, otherwise we have a maintenance nightmare (does patch X has been applied to Parted?). -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On Mon, Apr 6, 2015 at 11:15 AM, Ed Bartosh ed.bart...@linux.intel.com wrote: On Mon, Apr 06, 2015 at 09:00:50AM -0300, Otavio Salvador wrote: On Sun, Apr 5, 2015 at 4:16 PM, Philip Balister phi...@balister.org wrote: On 04/04/2015 10:20 AM, Ed Bartosh wrote: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. I'm with Otavio. Given wic is intimately dependent on internal build artifacts, it should use utilities from the sysroot and not depend on tools from the path. Let's make wic 100% before creating a tool to build images from packages. If we want to have it as a 'standalone' tool we will need to somehow package the tool set for it to use, otherwise we have a maintenance nightmare (does patch X has been applied to Parted?). Can you elaborate a bit on how tool set can be packaged? We could do a tarball like the buildtools toolchain. Back to the original topic. wic never used native parted as it's not useable(there is no executable in systoor). Anybody knows the reason? bitbake parted-native Documentation also suggests to install parted on the host: http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#wic-requirements So it also needs fixing. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On Mon, Apr 06, 2015 at 09:00:50AM -0300, Otavio Salvador wrote: On Sun, Apr 5, 2015 at 4:16 PM, Philip Balister phi...@balister.org wrote: On 04/04/2015 10:20 AM, Ed Bartosh wrote: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. I'm with Otavio. Given wic is intimately dependent on internal build artifacts, it should use utilities from the sysroot and not depend on tools from the path. Let's make wic 100% before creating a tool to build images from packages. If we want to have it as a 'standalone' tool we will need to somehow package the tool set for it to use, otherwise we have a maintenance nightmare (does patch X has been applied to Parted?). Can you elaborate a bit on how tool set can be packaged? Back to the original topic. wic never used native parted as it's not useable(there is no executable in systoor). Anybody knows the reason? Documentation also suggests to install parted on the host: http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#wic-requirements -- Regards, Ed -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On 04/04/2015 02:34 PM, Ed Bartosh wrote: On Sat, Apr 04, 2015 at 03:34:59PM -0300, Otavio Salvador wrote: Em 04/04/2015 14:21, Ed Bartosh ed.bart...@linux.intel.com escreveu: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. [YOCTO #7122] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com I think we shouldn't do that. If user wants something to be found the PATH environment variable should have them included. Some users think that this is confusing: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7122 For current implementation of wic it practically means that it must be always run as PATH=/usr/sbin:$PATH wic on OpenSUSE systems. This also brings one serious error off wic which is it relying on host utilities. It should use parted from native sysroot instead otherwise we cannot be sure if witch version we will be using. This makes sense to me. Not sure how easy is to do it as I suspect that not only parted is used this way. BTW, this approach conflicts with this feature request: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6558 So, should wic rely on system utilities or not? If it should not then what would you suggest to do with #6558? I added a comment to this. Basically wic is very dependent on data from the build system. It has no knowledge of packages. If we want to build images outside the build system from packages/package feeds, that would be a different tool than wic. Philip -- Regards, Ed -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On 04/04/2015 10:20 AM, Ed Bartosh wrote: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. I'm with Otavio. Given wic is intimately dependent on internal build artifacts, it should use utilities from the sysroot and not depend on tools from the path. Let's make wic 100% before creating a tool to build images from packages. Philip [YOCTO #7122] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/fs_related.py | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/lib/wic/utils/fs_related.py b/scripts/lib/wic/utils/fs_related.py index ea9f85c..832a44a 100644 --- a/scripts/lib/wic/utils/fs_related.py +++ b/scripts/lib/wic/utils/fs_related.py @@ -32,13 +32,16 @@ from wic.utils.errors import * from wic.utils.oe.misc import * def find_binary_path(binary): +paths = [] if os.environ.has_key(PATH): paths = os.environ[PATH].split(:) -else: -paths = [] -if os.environ.has_key(HOME): -paths += [os.environ[HOME] + /bin] -paths += [/usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin] +if os.environ.has_key(HOME): +path = os.path.join(os.environ[HOME], bin) +if path not in paths: +paths.append(path) +for path in [/usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin]: +if path not in paths: +paths.append(path) for path in paths: bin_path = %s/%s % (path, binary) -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. [YOCTO #7122] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/fs_related.py | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/lib/wic/utils/fs_related.py b/scripts/lib/wic/utils/fs_related.py index ea9f85c..832a44a 100644 --- a/scripts/lib/wic/utils/fs_related.py +++ b/scripts/lib/wic/utils/fs_related.py @@ -32,13 +32,16 @@ from wic.utils.errors import * from wic.utils.oe.misc import * def find_binary_path(binary): +paths = [] if os.environ.has_key(PATH): paths = os.environ[PATH].split(:) -else: -paths = [] -if os.environ.has_key(HOME): -paths += [os.environ[HOME] + /bin] -paths += [/usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin] +if os.environ.has_key(HOME): +path = os.path.join(os.environ[HOME], bin) +if path not in paths: +paths.append(path) +for path in [/usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin]: +if path not in paths: +paths.append(path) for path in paths: bin_path = %s/%s % (path, binary) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
Em 04/04/2015 14:21, Ed Bartosh ed.bart...@linux.intel.com escreveu: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. [YOCTO #7122] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com I think we shouldn't do that. If user wants something to be found the PATH environment variable should have them included. This also brings one serious error off wic which is it relying on host utilities. It should use parted from native sysroot instead otherwise we cannot be sure if witch version we will be using. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [wic][PATCH] wic: extended list of paths in find_binary_path
On Sat, Apr 04, 2015 at 03:34:59PM -0300, Otavio Salvador wrote: Em 04/04/2015 14:21, Ed Bartosh ed.bart...@linux.intel.com escreveu: wic requires tools that are not always possible to find in $PATH. This causes wic to fail with confusing errors like this: External command 'parted' not found, exiting. (Please install 'parted' on your host system) Adding ~/bin/, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin and /bin to the list of paths makes find_binary_path to produce more reliable results. [YOCTO #7122] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com I think we shouldn't do that. If user wants something to be found the PATH environment variable should have them included. Some users think that this is confusing: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7122 For current implementation of wic it practically means that it must be always run as PATH=/usr/sbin:$PATH wic on OpenSUSE systems. This also brings one serious error off wic which is it relying on host utilities. It should use parted from native sysroot instead otherwise we cannot be sure if witch version we will be using. This makes sense to me. Not sure how easy is to do it as I suspect that not only parted is used this way. BTW, this approach conflicts with this feature request: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6558 So, should wic rely on system utilities or not? If it should not then what would you suggest to do with #6558? -- Regards, Ed -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core