Skip to contentSkip to conversation

devtool: Upgrade feature

RFC PATCH Superseded [email protected] 3 participants 6 messages Aug 11, 2015 – Aug 18, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover devtool: Upgrade feature

From: Leonardo Sandoval <[email protected]>

There are several approaches when upgrading a recipe and on this patch it was decided to reused the code from the auto-upgrade-helper [1] and ported it into the devtool. There are several pending tasks as described in the patch's description. The progress of this feature is being track on [2].

[1] http://git.yoctoproject.org/cgit/cgit.cgi/auto-upgrade-helper/
[2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=7642

The following changes since commit 48b5ea6782ec7e9ab8f9a28438ef0ededa5fe224:

sanity.bbclass: check /bin/sh is dash or bash (2015-06-26 09:28:53 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib lsandov1/devtool-upgrade-functionality-7642
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lsandov1/devtool-upgrade-functionality-7642

Leonardo Sandoval (1):
devtool: Upgrade feature

 scripts/lib/devtool/auto-upgrade-helper/bitbake.py | 102 +++++
 scripts/lib/devtool/auto-upgrade-helper/errors.py  |  87 +++++
 scripts/lib/devtool/auto-upgrade-helper/git.py     | 101 +++++
 .../lib/devtool/auto-upgrade-helper/gitrecipe.py   |  98 +++++
 scripts/lib/devtool/auto-upgrade-helper/recipe.py  | 428 +++++++++++++++++++++
 .../lib/devtool/auto-upgrade-helper/svnrecipe.py   |  28 ++
 .../devtool/auto-upgrade-helper/upgradehelper.py   | 150 ++++++++
 scripts/lib/devtool/standard.py                    | 119 ++++++
 8 files changed, 1113 insertions(+)
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/bitbake.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/errors.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/git.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/gitrecipe.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/recipe.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/svnrecipe.py
 create mode 100755 scripts/lib/devtool/auto-upgrade-helper/upgradehelper.py
Signature · 1 line
1.8.4.5
#1 lore raw

RFC PATCH 1/1 devtool: Upgrade feature

From: Leonardo Sandoval <[email protected]>

This is a new devtool's feature, which upgrades a recipe to a particular version number. Code was taken from [1] where some modifications were done (remove all email, buildhistory and statistics features, use devtool logger instead of AUH logger) to adapt the devtool framework. Once the upgrade is over, the new recipe will be located under the devtool's workspace. This is a first approach to this feature; pending tasks include:

1. The AUH [1] is used to rename and update the recipe. AUH is not using the lib/oe/recipeutils library to do this work. AUH ported code should use this library which is the one being used by the rest of the devtool features.

2. Currently, when 'update-recipe' is executed, the recipe under workspace is updated with latest commits. The only task missing is to replace the new recipe with the old one, commonly located under the meta layer.

3. When patches fail to apply, follow the PATCHRESOLVE behavior instead of just failing.

4. Patches most of the time do not apply correctly on the new recipe version, so include a command line option to indicate the system not to apply these, so it can be applied manually later on.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/auto-upgrade-helper/

[YOCTO #7642]

---
 scripts/lib/devtool/auto-upgrade-helper/bitbake.py | 102 +++++
 scripts/lib/devtool/auto-upgrade-helper/errors.py  |  87 +++++
 scripts/lib/devtool/auto-upgrade-helper/git.py     | 101 +++++
 .../lib/devtool/auto-upgrade-helper/gitrecipe.py   |  98 +++++
 scripts/lib/devtool/auto-upgrade-helper/recipe.py  | 428 +++++++++++++++++++++
 .../lib/devtool/auto-upgrade-helper/svnrecipe.py   |  28 ++
 .../devtool/auto-upgrade-helper/upgradehelper.py   | 150 ++++++++
 scripts/lib/devtool/standard.py                    | 119 ++++++
 8 files changed, 1113 insertions(+)
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/bitbake.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/errors.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/git.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/gitrecipe.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/recipe.py
 create mode 100644 scripts/lib/devtool/auto-upgrade-helper/svnrecipe.py
 create mode 100755 scripts/lib/devtool/auto-upgrade-helper/upgradehelper.py
scripts/lib/devtool/auto-upgrade-helper/bitbake.py new file +102 -0
new file mode 100644
index 0000000..5404807
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+# vim: set ts=4 sw=4 et:
+#
+# Copyright (c) 2013 - 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+# AUTHORS
+# Laurentiu Palcu   <[email protected]>
+# Marius Avram      <[email protected]>
+#
+
+import os
+import logging
+import sys
+from errors import *
+
+logger = logging.getLogger('devtool')
+
+for path in os.environ["PATH"].split(':'):
+    if os.path.exists(path) and "bitbake" in os.listdir(path):
+        sys.path.insert(0, os.path.join(path, "../lib"))
+        import bb
+
+class Bitbake(object):
+    def __init__(self, build_dir):
+        self.build_dir = build_dir
+        self.log_dir = None
+        super(Bitbake, self).__init__()
+
+    def _cmd(self, recipe, options=None, env_var=None):
+        cmd = ""
+        if env_var is not None:
+            cmd += env_var + " "
+        cmd += "bitbake "
+        if options is not None:
+            cmd += options + " "
+
+        cmd += recipe
+
+        os.chdir(self.build_dir)
+
+        try:
+            stdout, stderr = bb.process.run(cmd)
+        except bb.process.ExecutionError as e:
+            logger.debug("%s returned:\n%s" % (cmd, e.__str__()))
+
+            if self.log_dir is not None and os.path.exists(self.log_dir):
+                with open(os.path.join(self.log_dir, "bitbake_log.txt"), "w+") as log:
+                    log.write(e.stdout)
+
+            raise Error("\'" + cmd + "\' failed", e.stdout, e.stderr)
+
+        return stdout
+
+    def set_log_dir(self, dir):
+        self.log_dir = dir
+
+    def get_stdout_log(self):
+        return os.path.join(self.log_dir, "bitbake_log.txt")
+
+    def env(self, recipe):
+        return self._cmd(recipe, "-e")
+
+    def fetch(self, recipe):
+        return self._cmd(recipe, "-c fetch")
+
+    def patch(self, recipe):
+        return self._cmd(recipe, "-c patch")
+
+    def unpack(self, recipe):
+        return self._cmd(recipe, "-c unpack")
+
+    def checkpkg(self, recipe):
+        if recipe == "universe":
+            return self._cmd(recipe, "-c checkpkg -k")
+        else:
+            return self._cmd(recipe, "-c checkpkg")
+
+    def cleanall(self, recipe):
+        return self._cmd(recipe, "-c cleanall")
+
+    def cleansstate(self, recipe):
+        return self._cmd(recipe, "-c cleansstate")
+
+    def complete(self, recipe, machine):
+        return self._cmd(recipe, env_var="MACHINE=" + machine)
+
+    def dependency_graph(self, package_list):
+        return self._cmd(package_list, "-g")
scripts/lib/devtool/auto-upgrade-helper/errors.py new file +87 -0

87 lines not on this page · raw message

scripts/lib/devtool/auto-upgrade-helper/git.py new file +101 -0

101 lines not on this page · raw message

scripts/lib/devtool/auto-upgrade-helper/gitrecipe.py new file +98 -0

98 lines not on this page · raw message

scripts/lib/devtool/auto-upgrade-helper/recipe.py new file +428 -0

428 lines not on this page · raw message

scripts/lib/devtool/auto-upgrade-helper/svnrecipe.py new file +28 -0
new file mode 100644
index 0000000..7d8ad16
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+# vim: set ts=4 sw=4 et:
+#
+# Copyright (c) 2013 - 2014 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+# AUTHORS
+# Laurentiu Palcu   <[email protected]>
+# Marius Avram      <[email protected]>
+#
+
+from recipe import Recipe
+
+class SvnRecipe(Recipe):
+    pass
scripts/lib/devtool/auto-upgrade-helper/upgradehelper.py new file +150 -0

150 lines not on this page · raw message

scripts/lib/devtool/standard.py +119 -0

134 lines not on this page · raw message

Signature · 1 line
1.8.4.5
#2 lore raw

Hi Leo,

Quoted 17 lines · On Tuesday 11 August 2015 14:04:14 [email protected]…

This is a new devtool's feature, which upgrades a recipe to a particular version number. Code was taken from [1] where some modifications were done (remove all email, buildhistory and statistics features, use devtool logger instead of AUH logger) to adapt the devtool framework. Once the upgrade is over, the new recipe will be located under the devtool's workspace. This is a first approach to this feature; pending tasks include:

1. The AUH [1] is used to rename and update the recipe. AUH is not using the lib/oe/recipeutils library to do this work. AUH ported code should use this library which is the one being used by the rest of the devtool features.

2. Currently, when 'update-recipe' is executed, the recipe under workspace is updated with latest commits. The only task missing is to replace the new recipe with the old one, commonly located under the meta layer.

Quoted 6 lines

3. When patches fail to apply, follow the PATCHRESOLVE behavior instead of just failing.

4. Patches most of the time do not apply correctly on the new recipe version, so include a command line option to indicate the system not to apply these, so it can be applied manually later on.

So, this is a good first implementation and gives an idea of how the command will work - and I'm quite keen for us to have this, I've had several people asking me recently about when we'll be adding it, so it's definitely something we want.

However, I'm concerned about the volume of code we're adding here, some of which duplicates what we already have in devtool or elsewhere in lib/oe. I know this is the easiest approach and you've noted it's todo item #1 above to work on - I'll be a lot happier if you can improve that before the final version.

In particular, I see the upgrade() function is duplicating a bunch of code from modify() - we should split the common parts out to separate function(s) that can be called from both places instead.

Some other comments:

* I can see it's actually making changes to the original recipe - I found this because I'd run a devtool upgrade on dropbear and specified the wrong version to --version Ctrl+C'd out during the fetch part, and the original dropbear.inc was modified instead of the one in the workspace. We don't want to touch the original recipe, not until you run update-recipe at least.

* As far as the source tree is concerned I think that this is doing things slightly backwards - it's using the AUH code to do the upgrade, and then it's extracting the code. What I'd like to see happen is it extract the code for the old version (including applying patches), use the AUH code to figure out how to fetch the new version, fetch it into a different branch (assuming it's not already there since it was fetched from git), then rebase the patches onto the new version - the user can then use git to fix things up if patches don't apply.

* I'm not sure if using an existing source tree is a reasonable default for this command - I'm not even sure it's something people will want to do at all in the context of an upgrade. I'm willing to be convinced otherwise though - any opinions (from anyone)?

* We need oe-selftest tests for this that test as much of the functionality as possible. This may require adding some simple "synthetic" recipes to meta- selftest so that we have something that's always there to upgrade. Based upon my recent experience in devtool (with my own code), the sooner we add these the better.

* I'd like to see the implementation for this in its own file rather than in standard.py.

* Probably just a result of this being WIP, but I found that if I don't specify a version with --version then it says "NOTE: Upgrading to None" and then fails with "ERROR: cannot concatenate 'str' and 'NoneType' objects".

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw

Hi Paul,

Quoted 39 lines · Paul Eggleton

Hi Leo,

Quoted 17 lines · On Tuesday 11 August 2015 14:04:14 [email protected]…

This is a new devtool's feature, which upgrades a recipe to a particular version number. Code was taken from [1] where some modifications were done (remove all email, buildhistory and statistics features, use devtool logger instead of AUH logger) to adapt the devtool framework. Once the upgrade is over, the new recipe will be located under the devtool's workspace. This is a first approach to this feature; pending tasks include:

1. The AUH [1] is used to rename and update the recipe. AUH is not using the lib/oe/recipeutils library to do this work. AUH ported code should use this library which is the one being used by the rest of the devtool features.

2. Currently, when 'update-recipe' is executed, the recipe under workspace is updated with latest commits. The only task missing is to replace the new recipe with the old one, commonly located under the meta layer.

Quoted 6 lines

3. When patches fail to apply, follow the PATCHRESOLVE behavior instead of just failing.

4. Patches most of the time do not apply correctly on the new recipe version, so include a command line option to indicate the system not to apply these, so it can be applied manually later on.

So, this is a good first implementation and gives an idea of how the command will work - and I'm quite keen for us to have this, I've had several people asking me recently about when we'll be adding it, so it's definitely something we want.

However, I'm concerned about the volume of code we're adding here, some of which duplicates what we already have in devtool or elsewhere in lib/oe. I know this is the easiest approach and you've noted it's todo item #1 above to work on - I'll be a lot happier if you can improve that before the final version.

Quoted 3 lines

In particular, I see the upgrade() function is duplicating a bunch of code from modify() - we should split the common parts out to separate function(s) that can be called from both places instead.

As you noticed, there is code duplication specially on the standard.py. Code on this file needs to be refactor somehow so the function upgrade can call these new functions.

Quoted 9 lines

Some other comments:

* I can see it's actually making changes to the original recipe - I found this because I'd run a devtool upgrade on dropbear and specified the wrong version to --version Ctrl+C'd out during the fetch part, and the original dropbear.inc was modified instead of the one in the workspace. We don't want to touch the original recipe, not until you run update-recipe at least.

Ok. This is definitely a bug. All work must be done in the workspace. This is contrary to the AUH code, which works on poky default layers, so this bug may be something I did not change on the ported code.

Quoted 9 lines

* As far as the source tree is concerned I think that this is doing things slightly backwards - it's using the AUH code to do the upgrade, and then it's extracting the code. What I'd like to see happen is it extract the code for the old version (including applying patches), use the AUH code to figure out how to fetch the new version, fetch it into a different branch (assuming it's not already there since it was fetched from git), then rebase the patches onto the new version - the user can then use git to fix things up if patches don't apply.

got it. Looks good to me. I also though using the recipetool script (instead of AUH), but this one creates a recipe from scratch so it is not really useful at this moment.

Quoted 10 lines

* I'm not sure if using an existing source tree is a reasonable default for this command - I'm not even sure it's something people will want to do at all in the context of an upgrade. I'm willing to be convinced otherwise though - any opinions (from anyone)?

* We need oe-selftest tests for this that test as much of the functionality as possible. This may require adding some simple "synthetic" recipes to meta- selftest so that we have something that's always there to upgrade. Based upon my recent experience in devtool (with my own code), the sooner we add these the better.

good point. I will add these on v2.

Quoted 3 lines

* I'd like to see the implementation for this in its own file rather than in standard.py.

Good. What about the other features (add, update-recipe, modify, etc.)? will these remain in the same place?

Quoted 5 lines

* Probably just a result of this being WIP, but I found that if I don't specify a version with --version then it says "NOTE: Upgrading to None" and then fails with "ERROR: cannot concatenate 'str' and 'NoneType' objects".

Bug. I will also add it on V2.

Quoted 3 lines

Cheers,
Paul

Thanks for your comments.

#4 lore raw
Quoted 60 lines · On Thursday 13 August 2015 12:45:08 Leonardo Sandoval wrote:
Quoted 42 lines · Paul Eggleton
Quoted 20 lines · On Tuesday 11 August 2015 14:04:14 [email protected]>…

This is a new devtool's feature, which upgrades a recipe to a particular version number. Code was taken from [1] where some modifications
were done (remove all email, buildhistory and statistics features, use devtool logger instead of AUH logger) to adapt the devtool framework. Once the upgrade is over, the new recipe will be located under the devtool's workspace. This is a first approach to this feature; pending tasks include:

1. The AUH [1] is used to rename and update the recipe. AUH is not using the lib/oe/recipeutils library to do this work. AUH ported code should use this library which is the one being used by the rest of the devtool features.

2. Currently, when 'update-recipe' is executed, the recipe under workspace
is updated with latest commits. The only task missing is to replace the new
recipe with the old one, commonly located under the meta layer.

Quoted 7 lines

3. When patches fail to apply, follow the PATCHRESOLVE behavior instead of
just failing.

4. Patches most of the time do not apply correctly on the new recipe version, so include a command line option to indicate the system not to apply these, so it can be applied manually later on.

So, this is a good first implementation and gives an idea of how the command will work - and I'm quite keen for us to have this, I've had several people asking me recently about when we'll be adding it, so it's definitely something we want.

However, I'm concerned about the volume of code we're adding here, some of which duplicates what we already have in devtool or elsewhere in lib/oe. I know this is the easiest approach and you've noted it's todo item #1 above to work on - I'll be a lot happier if you can improve that before the final version.

Quoted 3 lines

In particular, I see the upgrade() function is duplicating a bunch of code from modify() - we should split the common parts out to separate function(s) that can be called from both places instead.

As you noticed, there is code duplication specially on the standard.py. Code on this file needs to be refactor somehow so the function upgrade can call these new functions.

Quoted 8 lines

Some other comments:

* I can see it's actually making changes to the original recipe - I found this because I'd run a devtool upgrade on dropbear and specified the wrong version to --version Ctrl+C'd out during the fetch part, and the original dropbear.inc was modified instead of the one in the workspace. We don't want to touch the original recipe, not until you run update-recipe at least.

Quoted 3 lines

Ok. This is definitely a bug. All work must be done in the workspace. This is contrary to the AUH code, which works on poky default layers, so this bug may be something I did not change on the ported code.

That's what I'd assume as well yes.

Quoted 9 lines
Quoted 8 lines

* As far as the source tree is concerned I think that this is doing things slightly backwards - it's using the AUH code to do the upgrade, and then it's extracting the code. What I'd like to see happen is it extract the code for the old version (including applying patches), use the AUH code to figure out how to fetch the new version, fetch it into a different branch (assuming it's not already there since it was fetched from git), then rebase the patches onto the new version - the user can then use git to fix things up if patches don't apply.

Quoted 3 lines

got it. Looks good to me. I also though using the recipetool script (instead of AUH), but this one creates a recipe from scratch so it is not really useful at this moment.

For pointers, look at how "devtool extract" and "devtool modify" work (for the extraction part, they use the same _extract_source() function).

Quoted 11 lines
Quoted 10 lines

* I'm not sure if using an existing source tree is a reasonable default for this command - I'm not even sure it's something people will want to do at all in the context of an upgrade. I'm willing to be convinced otherwise though - any opinions (from anyone)?

* We need oe-selftest tests for this that test as much of the functionality as possible. This may require adding some simple "synthetic" recipes to meta- selftest so that we have something that's always there to upgrade. Based upon my recent experience in devtool (with my own code), the sooner we add these the better.

Quoted 7 lines

good point. I will add these on v2.

Quoted 2 lines

* I'd like to see the implementation for this in its own file rather than in standard.py.

Good. What about the other features (add, update-recipe, modify, etc.)? will these remain in the same place?

At some point we might refactor these out, but I don't know if I'd make it a priority at the moment.

Quoted 6 lines
Quoted 4 lines

* Probably just a result of this being WIP, but I found that if I don't specify a version with --version then it says "NOTE: Upgrading to None" and
then fails with "ERROR: cannot concatenate 'str' and 'NoneType' objects".

Bug. I will also add it on V2.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw
Quoted 111 lines · Paul Eggleton
Quoted 86 lines · On Thursday 13 August 2015 12:45:08 Leonardo Sandoval wrote:
Quoted 61 lines · Paul Eggleton
Quoted 34 lines · On Tuesday 11 August 2015 14:04:14 [email protected]>…

This is a new devtool's feature, which upgrades a recipe to a particular version number. Code was taken from [1] where some modifications
were done (remove all email, buildhistory and statistics features,
use devtool logger instead of AUH logger) to adapt the devtool framework.
Once the upgrade is over, the new recipe will be located under the
devtool's workspace. This is a first approach to this feature; pending
tasks include:

1. The AUH [1] is used to rename and update the recipe. AUH is not
using the lib/oe/recipeutils library to do this work. AUH ported code
should use this library which is the one being used by the rest of the
devtool features.

2. Currently, when 'update-recipe' is executed, the recipe under
workspace
is updated with latest commits. The only task missing is to replace the
new
recipe with the old one, commonly located under the meta layer.

3. When patches fail to apply, follow the PATCHRESOLVE behavior instead
of
just failing.

Quoted 5 lines

4. Patches most of the time do not apply correctly on the new recipe
version, so include a command line option to indicate the system not to
apply these, so it can be applied manually later on.

So, this is a good first implementation and gives an idea of how the
command will work - and I'm quite keen for us to have this, I've had
several people asking me recently about when we'll be adding it, so it's
definitely something we want.

However, I'm concerned about the volume of code we're adding here, some of
which duplicates what we already have in devtool or elsewhere in lib/oe. I
know this is the easiest approach and you've noted it's todo item #1 above
to work on - I'll be a lot happier if you can improve that before the
final version.

Quoted 4 lines

In particular, I see the upgrade() function is duplicating a bunch of code
from modify() - we should split the common parts out to separate function(s) that can be called from both places instead.

As you noticed, there is code duplication specially on the standard.py.
Code on this file needs to be refactor somehow so the function upgrade
can call these new functions.

Quoted 12 lines

Some other comments:

* I can see it's actually making changes to the original recipe - I found
this because I'd run a devtool upgrade on dropbear and specified the
wrong version to --version Ctrl+C'd out during the fetch part, and the
original dropbear.inc was modified instead of the one in the workspace.
We don't want to touch the original recipe, not until you run update-recipe at least.

Quoted 5 lines

Ok. This is definitely a bug. All work must be done in the workspace.
This is contrary to the AUH code, which works on poky default layers, so
this bug may be something I did not change on the ported code.

That's what I'd assume as well yes.

Quoted 16 lines
Quoted 15 lines

* As far as the source tree is concerned I think that this is doing things
slightly backwards - it's using the AUH code to do the upgrade, and then
it's extracting the code. What I'd like to see happen is it extract the
code for the old version (including applying patches), use the AUH code
to figure out how to fetch the new version, fetch it into a different
branch (assuming it's not already there since it was fetched from git),
then rebase the patches onto the new version - the user can then use git
to fix things up if patches don't apply.

Quoted 17 lines
Quoted 4 lines

got it. Looks good to me. I also though using the recipetool script (instead of AUH), but this one creates a recipe from scratch so it is
not really useful at this moment.

For pointers, look at how "devtool extract" and "devtool modify" work (for the
extraction part, they use the same _extract_source() function).

Quoted 8 lines
Quoted 8 lines

* I'm not sure if using an existing source tree is a reasonable default
for this command - I'm not even sure it's something people will want to do
at all in the context of an upgrade. I'm willing to be convinced otherwise
though - any opinions (from anyone)?

You usually don't touch the original tree when performing an update until you're ready to switch.

Quoted 14 lines
Quoted 14 lines
Quoted 7 lines

* We need oe-selftest tests for this that test as much of the functionality as possible. This may require adding some simple "synthetic" recipes to meta- selftest so that we have something that's
always there to upgrade. Based upon my recent experience in devtool (with
my own code), the sooner we add these the better.

good point. I will add these on v2.

Quoted 3 lines

* I'd like to see the implementation for this in its own file rather than
in standard.py.

Quoted 17 lines
Quoted 3 lines

Good. What about the other features (add, update-recipe, modify, etc.)?
will these remain in the same place?

At some point we might refactor these out, but I don't know if I'd make it a
priority at the moment.

Quoted 9 lines
Quoted 7 lines

* Probably just a result of this being WIP, but I found that if I don't
specify a version with --version then it says "NOTE: Upgrading to None"
and
then fails with "ERROR: cannot concatenate 'str' and 'NoneType' objects".

Bug. I will also add it on V2.

A test here would be nice too :)

Quoted 7 lines

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre