* [auh][PATCH 1/4] Add ability to set machines in config file
2014-08-15 9:48 [auh][PATCH 0/4] Misc fixes for Automatic Upgrade Helper Paul Eggleton
@ 2014-08-15 9:48 ` Paul Eggleton
2014-08-15 9:48 ` [auh][PATCH 2/4] Simply config file option reading Paul Eggleton
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2014-08-15 9:48 UTC (permalink / raw)
To: yocto
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
README | 2 ++
upgradehelper.py | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/README b/README
index 74a8ecc..c43fa5e 100644
--- a/README
+++ b/README
@@ -41,6 +41,8 @@ clean_sstate=yes
clean_tmp=yes
# keep previous commits or not
drop_previous_commits=yes
+# machines to test build with
+machines=qemux86 qemux86-64 qemuarm qemumips qemuppc
--------------- snip ---------------
3. Enable distrodata and supply appropriate additional metadata. For
diff --git a/upgradehelper.py b/upgradehelper.py
index cc90958..2429897 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -130,7 +130,7 @@ class Updater(object):
self.skip_compilation = skip_compilation
self.interactive = not auto_mode
- self.machines = ["qemux86", "qemux86-64", "qemuarm", "qemumips", "qemuppc"]
+ self.machines = settings.get('machines', 'qemux86 qemux86-64 qemuarm qemumips qemuppc').split()
self.upgrade_steps = [
(self._create_workdir, None),
--
1.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [auh][PATCH 2/4] Simply config file option reading
2014-08-15 9:48 [auh][PATCH 0/4] Misc fixes for Automatic Upgrade Helper Paul Eggleton
2014-08-15 9:48 ` [auh][PATCH 1/4] Add ability to set machines in config file Paul Eggleton
@ 2014-08-15 9:48 ` Paul Eggleton
2014-08-15 9:48 ` [auh][PATCH 3/4] Handle upgrades for recipes with no maintainer Paul Eggleton
2014-08-15 9:48 ` [auh][PATCH 4/4] README: clarify warning Paul Eggleton
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2014-08-15 9:48 UTC (permalink / raw)
To: yocto
It's much easier to use .get() rather than checking if the item is in
the dict; you can also specify a default value.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
upgradehelper.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/upgradehelper.py b/upgradehelper.py
index 2429897..44b394a 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -495,11 +495,11 @@ class UniverseUpdater(Updater, Email):
self.git.create_branch("upgrades")
def prepare(self):
- if "clean_sstate" in settings and settings["clean_sstate"] == "yes" and \
+ if settings.get("clean_sstate", "no") == "yes" and \
os.path.exists(os.path.join(get_build_dir(), "sstate-cache")):
I(" Removing sstate directory ...")
shutil.rmtree(os.path.join(get_build_dir(), "sstate-cache"))
- if "clean_tmp" in settings and settings["clean_tmp"] == "yes" and \
+ if settings.get("clean_tmp", "no") == "yes" and \
os.path.exists(os.path.join(get_build_dir(), "tmp")):
I(" Removing tmp directory ...")
shutil.rmtree(os.path.join(get_build_dir(), "tmp"))
@@ -580,8 +580,7 @@ class UniverseUpdater(Updater, Email):
# drop last upgrade from git. It's safer this way if the upgrade has
# problems and other recipes depend on it. Give the other recipes a
# chance...
- if ("drop_previous_commits" in settings and
- settings["drop_previous_commits"] == "yes" and
+ if (settings.get("drop_previous_commits", "no") == "yes" and
err is None) or (err is not None and self.patch_file is not None):
I(" %s: Dropping changes from git ..." % self.pn)
self.git.reset_hard(1)
--
1.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [auh][PATCH 3/4] Handle upgrades for recipes with no maintainer
2014-08-15 9:48 [auh][PATCH 0/4] Misc fixes for Automatic Upgrade Helper Paul Eggleton
2014-08-15 9:48 ` [auh][PATCH 1/4] Add ability to set machines in config file Paul Eggleton
2014-08-15 9:48 ` [auh][PATCH 2/4] Simply config file option reading Paul Eggleton
@ 2014-08-15 9:48 ` Paul Eggleton
2014-08-15 9:48 ` [auh][PATCH 4/4] README: clarify warning Paul Eggleton
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2014-08-15 9:48 UTC (permalink / raw)
To: yocto
You still want to be able to use this tool manually even if there is no
maintainer defined for the recipe.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
upgradehelper.py | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/upgradehelper.py b/upgradehelper.py
index 44b394a..42ac110 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -165,9 +165,15 @@ class Updater(object):
self.recipe_dir = os.path.dirname(self.env['FILE'])
def _parse_checkpkg_line(self, line):
- m = re.match("^([^ \t]*)[ \t]+([^ \t]*)[ \t]+([^ \t]*).*<(.*)@(.*)>[ \t]+.*", line)
- if m is not None:
- return (m.group(1), m.group(2), m.group(3), m.group(4) + "@" + m.group(5))
+ m = re.match("^([^ \t]*)[ \t]+([^ \t]*)[ \t]+([^ \t]*)[ \t]+.*", line)
+ if m:
+ res = (m.group(1), m.group(2), m.group(3))
+ m = re.search("<([^ \t]+@[^ \t]+)>", line)
+ if m:
+ maintainer = m.group(1)
+ else:
+ maintainer = None
+ return res + (maintainer,)
return (None, None, None, None)
@@ -290,6 +296,8 @@ class Updater(object):
pkgs_list = []
with open(get_build_dir() + "/tmp/log/checkpkg.csv") as csv:
+ # Skip header line
+ next(csv)
for line in csv:
(pn, cur_ver, next_ver, maintainer) = self._parse_checkpkg_line(line)
@@ -443,6 +451,10 @@ class UniverseUpdater(Updater, Email):
# blacklisted: python, gcc, etc. Also, check the history if the recipe
# hasn't already been tried
def pkg_upgradable(self, pn, next_ver, maintainer):
+ if not maintainer:
+ D("Skipping upgrade of %s: no maintainer" % pn)
+ return False
+
if "blacklist" in settings:
for p in settings["blacklist"].split():
if p == pn:
--
1.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [auh][PATCH 4/4] README: clarify warning
2014-08-15 9:48 [auh][PATCH 0/4] Misc fixes for Automatic Upgrade Helper Paul Eggleton
` (2 preceding siblings ...)
2014-08-15 9:48 ` [auh][PATCH 3/4] Handle upgrades for recipes with no maintainer Paul Eggleton
@ 2014-08-15 9:48 ` Paul Eggleton
3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2014-08-15 9:48 UTC (permalink / raw)
To: yocto
Emails only get sent when "all" is used (at least at the moment).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
README | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/README b/README
index c43fa5e..ec3f955 100644
--- a/README
+++ b/README
@@ -59,9 +59,10 @@ require conf/distro/include/upstream_tracking.inc
WARNING: if you are using the default maintainers.inc file supplied
with Poky (in meta-yocto) and you don't set a
maintainers_whitelist or maintainer_override in the
- upgrade-helper configuration as above, the script will
- automatically send out emails to the default maintainers.
- Please be careful not to do this :)
+ upgrade-helper configuration as above, and you specify "all"
+ on the command line, the script will automatically send out
+ emails to the default maintainers. Please be careful not to
+ do this :)
4. Enable buildhistory by adding the following lines to your
conf/local.conf file:
--
1.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread