Am 04.05.2017 um 17:19 schrieb Patrick Ohly:
On Thu, 2017-05-04 at 16:09 +0200, Ingo Flaschberger wrote:
Am 04.05.2017 um 08:02 schrieb Patrick Ohly:
On Wed, 2017-05-03 at 22:48 +0200, Ingo Flaschberger wrote:

Deleting the directory and changing the version did not help:
*) bitbake imagename did'nt run swupd update again (finishes without
doing anything)
You also need to remove $TMPDIR (= tmp in Poky), then rebuild from
sstate.
In tmpdir there is also the swupd directory (which is no good idea to
delete):
      tmp-glibc/deploy/swupd
The assumption is that the "deploy" directory gets copied out of
"tmp-glibc" into the permanent location where it gets published and
potentially backed up. This is not specific to swupd, but also the other
build artifacts (as far as I know).

If I delete the tmpdir - next build will really take a lot of time -
does a faster option exist?
Once you have the HTTP server for swupd set up with the initial OS
build, you can then point to it with SWUPD_VERSION_URL and
SWUPD_CONTENT_URL and a new build without tmp-glibc will pull whatever
is needed for the build from the server.

It doesn't even have to be HTTP - a file:// URL should also work.

It does not need to pull much (just the compressed manifest files), so
the build should be fairly fast and in particular, only create the
normal incremental delta against the previous published build.


Tested:

 * removed $TMPDIR
 * 900 seconds later - I canceled - download from external http takes
   too long
 * retry with local swupd www copy
     o file:///path/to/swupd/www ( important: 3x /)
 * fails
     o Exception: urllib.error.URLError: <urlopen error [Errno 2] No
       such file or directory:
       '/home/web/yocto/swupd-www/version/format3/latest'>
     o only urllib.error.HTTPError is catched
     o see attached patch
 * retry with patch
     o works - great!

Could this info also mentioned here:
  https://wiki.yoctoproject.org/wiki/Meta-swupd

to save diskspace I can delete the swupd image directory? (same path where www directory resided)


From 4580d6bc09f5c399913ad45e92ace44f97e344de Mon Sep 17 00:00:00 2001
From: ingo <ingo.flaschber...@gmail.com>
Date: Thu, 4 May 2017 22:07:02 +0200
Subject: [PATCH] catch missing file exception on local swupd repositories

---
 lib/swupd/bundles.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/swupd/bundles.py b/lib/swupd/bundles.py
index b4c6f49..ecf7c83 100644
--- a/lib/swupd/bundles.py
+++ b/lib/swupd/bundles.py
@@ -240,6 +240,11 @@ def download_old_versions(d):
                 bb.debug(1, '%s does not exist, skipping that format' % url)
             else:
                 raise
+        except urllib.error.URLError as url_error:
+            if re.search( 'No such file or directory', str(url_error.reason)):
+                bb.debug(1, '%s does not exist, skipping that format' % url)
+            else:
+                raise
 
     # Now get the Manifests of the latest versions and the
     # versions we are supposed to provide a delta for, as a starting point.
-- 
2.7.4

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to