<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/lib/oe/image.py, branch uninative-1.6</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.6</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.6'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2016-01-11T23:26:29+00:00</updated>
<entry>
<title>image: Create separate tasks for rootfs construction</title>
<updated>2016-01-11T23:26:29+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-01-06T22:57:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0a4e1f968ada5099e3270ed06404d2827e9729aa'/>
<id>urn:sha1:0a4e1f968ada5099e3270ed06404d2827e9729aa</id>
<content type='text'>
This patch splits the code in lib/oe/image into separate tasks, one per
image type. This removes the need for the simple task graph code and defers
to the bitbake task management code to handle this instead.

This is a good step forward in splitting up the monolithic code and starting
to make it more accessible to people.

It should also make it easier for people to hook in other tasks and processes
into the rootfs code.

Incidentally, the reason this code was all combined originally was due to
limitations of fakeroot where if you exited the session, you lost permissions
data. With pseudo this constraint was removed.

We did start to rework the rootfs/image code previously and got so far with
untangling it however we did prioritise some performance tweaks over splitting
into separate tasks and in hindsight, this was a mistake and should have been done
the other way around. That work was suspended due to changes in the people working
on the project but this split has always been intended, now is the time to finish
it IMO.

There were some side effects of doing this:

* The symlink for the manifest moves to the rootfs-postcommands class and into
  the manifest function.
* There is no seperate "symlink removal" and "symlink creation", they are merged
* The date/time stamps of the manifest and the built images can now be different since
  the tasks can be run separately and the datetime stamp will then be different
  between do_rootfs and the do_image_* tasks.

(From OE-Core rev: c2dab181c1cdabac3be6197f4b9ea4235cbbc140)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>image: Move pre/post process commands to bbclass</title>
<updated>2016-01-11T23:26:29+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-01-06T22:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fdced52387613a09368716d1f3bb7a13a6edd46d'/>
<id>urn:sha1:fdced52387613a09368716d1f3bb7a13a6edd46d</id>
<content type='text'>
As the next step in splitting up do_image, move the pre and post processing
commands to separate tasks. This also creates the do_image_complete task
which acts as the end marker task for image generation.

(From OE-Core rev: 800528eaa421d451b596545125cb218e08989151)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>image.py: avoid mkdir race when building multiple images</title>
<updated>2015-12-01T21:32:03+00:00</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2015-11-19T11:48:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=804f5b83f39a0b8b57fbe9f5378dd46febe8058d'/>
<id>urn:sha1:804f5b83f39a0b8b57fbe9f5378dd46febe8058d</id>
<content type='text'>
If multiple images are being built simultaneously against the same
sysroot then the call to os.makedirs in Image._write_wic_env can fail
with:

File: '.../meta/lib/oe/image.py', lineno: 341, function: _write_wic_env
     0337:        """
     0338:        stdir = self.d.getVar('STAGING_DIR_TARGET', True)
     0339:        outdir = os.path.join(stdir, 'imgdata')
     0340:        if not os.path.exists(outdir):
 *** 0341:            os.makedirs(outdir)
     0342:        basename = self.d.getVar('IMAGE_BASENAME', True)
     0343:        with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
     0344:            for var in self.d.getVar('WICVARS', True).split():
     0345:                value = self.d.getVar(var, True)
File: '/usr/lib/python2.7/os.py', lineno: 157, function: makedirs
     0153:            if e.errno != errno.EEXIST:
     0154:                raise
     0155:        if tail == curdir:           # xxx/newdir/. exists if xxx/newdir exists
     0156:            return
 *** 0157:    mkdir(name, mode)
     0158:
     0159:def removedirs(name):
     0160:    """removedirs(path)
     0161:
Exception: OSError: [Errno 17] File exists: '.../tmp-glibc/sysroots/cheetah/imgdata'

Using bb.utils.mkdirhier() protects against this.

There's also little point in checking to see if the directory already
exists - we might as well just try and create it regardless.

Once the directory has been created, there's no race on the actual file
since the filename contains IMAGE_BASENAME.

(From OE-Core rev: e3f216eef1b7a8ecfd00317e60704cff472238ba)

Signed-off-by: Mike Crowe &lt;mac@mcrowe.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>image.py: Avoid creating empty .env file in _write_wic_env</title>
<updated>2015-12-01T21:32:02+00:00</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2015-11-19T11:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b00f73429a025da09fba3285a7006db83e74c727'/>
<id>urn:sha1:b00f73429a025da09fba3285a7006db83e74c727</id>
<content type='text'>
Creating a file for every image containing a few variables isn't
necessary if wic is not being used, so don't write the file if WICVARS
is empty.

(From OE-Core rev: d40779a7d3ce4f326c29ec7971731cab1f505a37)

Signed-off-by: Mike Crowe &lt;mac@mcrowe.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>classes: Ensure pass setVar/setVarFlag strings, not integers</title>
<updated>2015-11-24T15:50:26+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2015-11-10T09:52:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fecb07755ca6aec978cac19d5cb17fdc888b0057'/>
<id>urn:sha1:fecb07755ca6aec978cac19d5cb17fdc888b0057</id>
<content type='text'>
This doesn't cause any issues right now but it make sense to standardise
on consistently using strings in the data store.

(From OE-Core rev: 99203fbe5ad470ef65cff93cec9d7f332883b5ee)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&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>lib/oe/image.py: Fix dependency handling for compressed types</title>
<updated>2015-10-14T15:08:37+00:00</updated>
<author>
<name>Otavio Salvador</name>
<email>otavio@ossystems.com.br</email>
</author>
<published>2015-10-13T15:29:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=556c0ea92eb32ddb9c9a5e30a74b2ca24ac69c68'/>
<id>urn:sha1:556c0ea92eb32ddb9c9a5e30a74b2ca24ac69c68</id>
<content type='text'>
The dependency code needs to also include the dependency of base
types. For example:

 - sdcard.gz image with ext4

The dependency chain needs to include:

 - sdcard
 - ext4
 - gz

Until this change, the ext4 dependency were not being taken into
account when using the compressed one.

(From OE-Core rev: 10e5df3503632a6e1c54612055b19f7258c3ae2f)

Signed-off-by: Otavio Salvador &lt;otavio@ossystems.com.br&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/oe/image.py: Add image generation for companion debug filesystem</title>
<updated>2015-10-06T23:11:16+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@windriver.com</email>
</author>
<published>2015-10-02T15:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a0d9d2d727d646d7847ca9824ae535f9e369d485'/>
<id>urn:sha1:a0d9d2d727d646d7847ca9824ae535f9e369d485</id>
<content type='text'>
The companion debug filesystem, enabled with IMAGE_GEN_DEBUGFS, was
creating the companion filesystem but was missing the code to actually
package it into a usable filesystem.

The code (and associated documentation) will allow the debugfs to generate a
companion tarball or other image.

Signed-off-by: Mark Hatle &lt;mark.hatle@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>image.py: Ensure base image size is an integer</title>
<updated>2015-09-18T08:05:29+00:00</updated>
<author>
<name>Patrick Williams</name>
<email>patrick@stwcx.xyz</email>
</author>
<published>2015-09-16T16:48:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=18845508a216106a703558c4dedcef4fa384673a'/>
<id>urn:sha1:18845508a216106a703558c4dedcef4fa384673a</id>
<content type='text'>
There is a floating point multiplication done of a base image size
and an "overhead factor", which is currently rounded up to the next
integer.  If the multiplication results in a whole number, the value
will still be a float.  When this float is used to generate a shell
script, a buggy script is generated.

Fix this by always forcing to an integer.

(From OE-Core rev: bf74a002b8fa18d94cec93f0341cbe74cc010ca7)

Signed-off-by: Patrick Williams &lt;patrick@stwcx.xyz&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>image.py: Allow IMAGE_LINK_NAME to be empty</title>
<updated>2015-09-14T19:46:35+00:00</updated>
<author>
<name>Mike Looijmans</name>
<email>mike.looijmans@topic.nl</email>
</author>
<published>2015-09-11T17:02:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=722aa22d157f27025a5e78d0c8db16769cb9cf8b'/>
<id>urn:sha1:722aa22d157f27025a5e78d0c8db16769cb9cf8b</id>
<content type='text'>
When IMAGE_LINK_NAME is empty, OE will try to create a "blank" link instead
of just skipping it. The code checks for "link_name is not None" which will
never evaluate to true. Change the test to a simple "if link_name:" so it
no longer attempt to create links when the variable is an empty string.

(From OE-Core rev: 7f03dd50de76f0b5c3a10c514e920615ffaa846c)

Signed-off-by: Mike Looijmans &lt;mike.looijmans@topic.nl&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>image.py: rename _write_env -&gt; _write_wic_env</title>
<updated>2015-09-03T11:43:31+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2015-09-02T10:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a3fec07654e6992eab96861892d4261b1e2e0ebf'/>
<id>urn:sha1:a3fec07654e6992eab96861892d4261b1e2e0ebf</id>
<content type='text'>
Renamed this function as it's too generic name for it.
It writes variables, which are used by wic to .env file,
so _write_wic_env is better name for it.

Thanks Christopher Larson for poining out to this.

(From OE-Core rev: f8c7542164ebbe29613532c93ddc34c94238453c)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
