<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/lib/scriptutils.py, branch 2.7_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=2.7_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=2.7_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2018-11-16T11:46:07+00:00</updated>
<entry>
<title>scripts: Remove deprecated imp module usage</title>
<updated>2018-11-16T11:46:07+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-15T15:04:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dbe49d0ad197975e80c937e5e8da038d5c19e4c1'/>
<id>urn:sha1:dbe49d0ad197975e80c937e5e8da038d5c19e4c1</id>
<content type='text'>
The imp module is deprecated, port the code over to use importlib
as recently done for bb.utils as well.

(From OE-Core rev: 24809582d4850190d87cd8eb8180d0dce215dbdf)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe.scriptutils.run_editor: ditch the error-prone argument quoting</title>
<updated>2018-06-27T12:55:21+00:00</updated>
<author>
<name>Christopher Larson</name>
<email>chris_larson@mentor.com</email>
</author>
<published>2018-06-21T21:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2fe9a05666c69274fda766a2bec29febe94ba8b4'/>
<id>urn:sha1:2fe9a05666c69274fda766a2bec29febe94ba8b4</id>
<content type='text'>
Rather than trying to construct a string by quoting the files in an
error-prone way, parse $EDITOR to pass a list to subprocess rather than
a string.

(From OE-Core rev: c9fdf3d046606a0becb2e6b566a481c483b9021a)

Signed-off-by: Christopher Larson &lt;chris_larson@mentor.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scriptutils: fix fetch_url() to use lowercase dummy recipe name</title>
<updated>2017-08-31T22:30:03+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2017-08-30T23:54:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cd683ca41d952f5d05224498f68f79cfe5adf5ea'/>
<id>urn:sha1:cd683ca41d952f5d05224498f68f79cfe5adf5ea</id>
<content type='text'>
recipetool create (and hence devtool add) and devtool upgrade use
fetch_url() which creates a dummy recipe in order to fetch source.
Previously the random part of the name was using uppercase characters,
and this triggers a QA warning after OE-Core commit
4713f8b2c4f2c74239d284adcf1e59e61aa66576, so use lowercase instead as I
really should have in the first place.

(From OE-Core rev: b48c48b00e82491d1c69e4d89a79c6242361abec)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool: create: disable PREMIRRORS and MIRRORS by default</title>
<updated>2017-08-23T07:47:02+00:00</updated>
<author>
<name>Chang Rebecca Swee Fun</name>
<email>rebecca.swee.fun.chang@intel.com</email>
</author>
<published>2017-08-21T05:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e09b9d4543c6f0cba9215a0ed3cfb97fc7153471'/>
<id>urn:sha1:e09b9d4543c6f0cba9215a0ed3cfb97fc7153471</id>
<content type='text'>
When creating new recipes, we are almost certainly fetching a new
source rather that something that has already been fetched. I have
disable PREMIRRORS and MIRRORS settings in the recipe that created
by devtool while leaving an option for users to enable them manually
if needed. Since devtool already has this options, we need to ensure
that recipetool is able to handle the options passed from devtool.

(From OE-Core rev: 091cee2bdc2378a3425a4ef8558d03e6f9c021ff)

Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scriptutils: pass in logger as parameter</title>
<updated>2017-07-21T21:51:37+00:00</updated>
<author>
<name>Chang Rebecca Swee Fun</name>
<email>rebecca.swee.fun.chang@intel.com</email>
</author>
<published>2017-06-28T01:59:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5778e35378dfa76958239f9a0ecb71ed90c16225'/>
<id>urn:sha1:5778e35378dfa76958239f9a0ecb71ed90c16225</id>
<content type='text'>
logger was not defined in scriptutils.py based on the
observation in python traceback.

Traceback (most recent call last):
  File "/workdir/poky/scripts/devtool", line 351, in &lt;module&gt;
    ret = main()
  File "/workdir/poky/scripts/devtool", line 338, in main
    ret = args.func(args, config, basepath, workspace)
  File "/workdir/poky/scripts/lib/devtool/utilcmds.py", line 55, in
edit_recipe
    return scriptutils.run_editor(find_recipe(args, config, basepath,
workspace))
  File "/workdir/poky/scripts/lib/scriptutils.py", line 141, in
run_editor
    logger.error("Execution of '%s' failed: %s" % (editor, exc))
NameError: name 'logger' is not defined

We pass in logger as parameter to run_editor() from where it has
been called (devtool/utilcmds.py and recipetool/newappend.py),
which both modules already has logger setup.

(From OE-Core rev: 21f04b61973dd9029f0e6bff5445e31cd762bf32)

Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scriptutils: exit politely when no text editor available</title>
<updated>2017-07-21T21:51:37+00:00</updated>
<author>
<name>Chang Rebecca Swee Fun</name>
<email>rebecca.swee.fun.chang@intel.com</email>
</author>
<published>2017-06-28T01:59:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2c035b266f7a7f904afa7698706eba1361b41411'/>
<id>urn:sha1:2c035b266f7a7f904afa7698706eba1361b41411</id>
<content type='text'>
devtool edit-recipe now has ugly tracebacks if executed without an
editor available. This happens in the build containers whenever no
text editor is available.

subprocess.check_call will run text editing command with recipe path
provided. It will wait for command to complete. If the return code
was zero then return, otherwise raise CalledProcessError exception.

This enhancement will suppress the traceback by catching the exception
and prompt the error messages in a proper manner shown below:

pokyuser@59c99c507238:/workdir/docker-dbg$ devtool edit-recipe ifupdown
/bin/sh: 1: vi: not found
ERROR: Execution of 'vi' failed: Command 'vi
"/workdir/docker-dbg/workspace/recipes/ifupdown/ifupdown_0.8.16.bb"'
returned non-zero exit status 127

[YOCTO #11434]

(From OE-Core rev: c536ccfd162fc8871838fa229012c562e3f8e0d9)

Signed-off-by: Chang Rebecca Swee Fun &lt;rebecca.swee.fun.chang@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool: create: reimplement fetching with normal fetch/unpack tasks</title>
<updated>2017-07-21T07:44:25+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2017-07-20T14:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e4346e8be5f451d5cfe0b68a272abd15b0951831'/>
<id>urn:sha1:e4346e8be5f451d5cfe0b68a272abd15b0951831</id>
<content type='text'>
Now that we have the ability to run the tasks in a more standard context
through tinfoil, change recipetool's fetching code to use that to fetch
files using it. This has the major advantage that any dependencies of
do_fetch and do_unpack (e.g. for subversion or npm) will be handled
automatically. This also has the beneficial side-effect of fixing a
recent regression that prevented this fetch operation from working with
memory resident bitbake.

Also fix devtool's usage of fetch_uri() at the same time so that we can
completely replace it.

Fixes [YOCTO #11710].

(From OE-Core rev: 9a47a6690052ef943c0d4760630ee630fb012153)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scriptutils: fix fetch_uri() to work with RSS</title>
<updated>2017-05-25T22:59:31+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2017-05-19T04:11:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=415fbfb0cd1bc5129179596ba27ae2362b7de2a4'/>
<id>urn:sha1:415fbfb0cd1bc5129179596ba27ae2362b7de2a4</id>
<content type='text'>
Since recipe-specific sysroots were implemented, devtool add and devtool
upgrade operations that fetch from a URL that requires native sysroot
dependencies will fail to work as there is no recipe-specific sysroot
set up for them during fetching. An example was any URL pointing to a
tarball compressed with xz, e.g. devtool upgrade on gnutls.

The most expedient way to fix this is to set up a dummy recipe-specific
sysroot to use for the fetch/unpack operations. We do this in the same
manner as bitbake -b does, so we're just taking all of the sysroot
components available and creating a sysroot from those rather than
ensuring the correct dependencies are there - this means that we're
still going to have problems if e.g. xz-native hasn't been built yet,
but that issue will be trickier to solve and is tracked separately.

Fixes [YOCTO #11474].

(From OE-Core rev: 559151e783759af78b5cdd76cdbb9ce325a391e6)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scriptutils: Add support for specify stream on logger_create</title>
<updated>2017-03-22T11:35:21+00:00</updated>
<author>
<name>Aníbal Limón</name>
<email>anibal.limon@linux.intel.com</email>
</author>
<published>2017-03-20T20:51:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=15e65f5f07fd720487a7a09c2854dae1192cc4ac'/>
<id>urn:sha1:15e65f5f07fd720487a7a09c2854dae1192cc4ac</id>
<content type='text'>
It is a good idea to let the script to choose what stream wants
to dump the logging output.

[YOCTO #11160]

(From OE-Core rev: 60c9b06f4085f6bddb6aa397a38bfc2ceb10f964)

Signed-off-by: Aníbal Limón &lt;anibal.limon@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts: remove True option to getVar calls</title>
<updated>2016-12-16T10:23:23+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-12-14T21:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c0f2890c01882e9ea14e781c044f3a84f75bd0fc'/>
<id>urn:sha1:c0f2890c01882e9ea14e781c044f3a84f75bd0fc</id>
<content type='text'>
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 0a36bd96e6b29fd99a296efc358ca3e9fb5af735)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
