summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/bb')
-rw-r--r--poky/bitbake/lib/bb/cooker.py26
-rw-r--r--poky/bitbake/lib/bb/fetch2/__init__.py3
-rw-r--r--poky/bitbake/lib/bb/runqueue.py32
-rw-r--r--poky/bitbake/lib/bb/tests/fetch.py4
-rw-r--r--poky/bitbake/lib/bb/utils.py2
5 files changed, 28 insertions, 39 deletions
diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py
index 0607fcc70..5840aa75e 100644
--- a/poky/bitbake/lib/bb/cooker.py
+++ b/poky/bitbake/lib/bb/cooker.py
@@ -919,6 +919,10 @@ class BBCooker:
os.unlink('package-depends.dot')
except FileNotFoundError:
pass
+ try:
+ os.unlink('recipe-depends.dot')
+ except FileNotFoundError:
+ pass
with open('task-depends.dot', 'w') as f:
f.write("digraph depends {\n")
@@ -932,27 +936,6 @@ class BBCooker:
f.write("}\n")
logger.info("Task dependencies saved to 'task-depends.dot'")
- with open('recipe-depends.dot', 'w') as f:
- f.write("digraph depends {\n")
- pndeps = {}
- for task in sorted(depgraph["tdepends"]):
- (pn, taskname) = task.rsplit(".", 1)
- if pn not in pndeps:
- pndeps[pn] = set()
- for dep in sorted(depgraph["tdepends"][task]):
- (deppn, deptaskname) = dep.rsplit(".", 1)
- pndeps[pn].add(deppn)
- for pn in sorted(pndeps):
- fn = depgraph["pn"][pn]["filename"]
- version = depgraph["pn"][pn]["version"]
- f.write('"%s" [label="%s\\n%s\\n%s"]\n' % (pn, pn, version, fn))
- for dep in sorted(pndeps[pn]):
- if dep == pn:
- continue
- f.write('"%s" -> "%s"\n' % (pn, dep))
- f.write("}\n")
- logger.info("Flattened recipe dependencies saved to 'recipe-depends.dot'")
-
def show_appends_with_no_recipes(self):
# Determine which bbappends haven't been applied
@@ -1869,6 +1852,7 @@ class CookerCollectFiles(object):
(bbappend, filename) = b
if (bbappend == f) or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])):
filelist.append(filename)
+ filelist.sort()
return filelist
def collection_priorities(self, pkgfns, d):
diff --git a/poky/bitbake/lib/bb/fetch2/__init__.py b/poky/bitbake/lib/bb/fetch2/__init__.py
index f6b5529bb..1f5f8f1f1 100644
--- a/poky/bitbake/lib/bb/fetch2/__init__.py
+++ b/poky/bitbake/lib/bb/fetch2/__init__.py
@@ -962,7 +962,8 @@ def rename_bad_checksum(ud, suffix):
new_localpath = "%s_bad-checksum_%s" % (ud.localpath, suffix)
bb.warn("Renaming %s to %s" % (ud.localpath, new_localpath))
- bb.utils.movefile(ud.localpath, new_localpath)
+ if not bb.utils.movefile(ud.localpath, new_localpath):
+ bb.warn("Renaming %s to %s failed, grep movefile in log.do_fetch to see why" % (ud.localpath, new_localpath))
def try_mirror_url(fetch, origud, ud, ld, check = False):
diff --git a/poky/bitbake/lib/bb/runqueue.py b/poky/bitbake/lib/bb/runqueue.py
index 4f69578e4..addb2bb82 100644
--- a/poky/bitbake/lib/bb/runqueue.py
+++ b/poky/bitbake/lib/bb/runqueue.py
@@ -849,6 +849,20 @@ class RunQueueData:
for depend in depends:
mark_active(depend, depth+1)
+ def invalidate_task(tid, error_nostamp):
+ (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+ taskdep = self.dataCaches[mc].task_deps[taskfn]
+ if fn + ":" + taskname not in taskData[mc].taskentries:
+ logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname)
+ if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
+ if error_nostamp:
+ bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname)
+ else:
+ bb.debug(1, "Task %s is marked nostamp, cannot invalidate this task" % taskname)
+ else:
+ logger.verbose("Invalidate task %s, %s", taskname, fn)
+ bb.parse.siggen.invalidate_task(taskname, self.dataCaches[mc], taskfn)
+
self.target_tids = []
for (mc, target, task, fn) in self.targets:
@@ -917,6 +931,8 @@ class RunQueueData:
for tid in list(runall_tids):
mark_active(tid,1)
+ if self.cooker.configuration.force:
+ invalidate_task(tid, False)
for tid in list(self.runtaskentries.keys()):
if tid not in runq_build:
@@ -938,6 +954,8 @@ class RunQueueData:
for tid in list(runonly_tids):
mark_active(tid,1)
+ if self.cooker.configuration.force:
+ invalidate_task(tid, False)
for tid in list(self.runtaskentries.keys()):
if tid not in runq_build:
@@ -1114,20 +1132,6 @@ class RunQueueData:
continue
self.runq_setscene_tids.append(tid)
- def invalidate_task(tid, error_nostamp):
- (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
- taskdep = self.dataCaches[mc].task_deps[taskfn]
- if fn + ":" + taskname not in taskData[mc].taskentries:
- logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname)
- if 'nostamp' in taskdep and taskname in taskdep['nostamp']:
- if error_nostamp:
- bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname)
- else:
- bb.debug(1, "Task %s is marked nostamp, cannot invalidate this task" % taskname)
- else:
- logger.verbose("Invalidate task %s, %s", taskname, fn)
- bb.parse.siggen.invalidate_task(taskname, self.dataCaches[mc], taskfn)
-
self.init_progress_reporter.next_stage()
# Invalidate task if force mode active
diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py
index 23c6338a4..2ee030546 100644
--- a/poky/bitbake/lib/bb/tests/fetch.py
+++ b/poky/bitbake/lib/bb/tests/fetch.py
@@ -1200,8 +1200,8 @@ class FetchLatestVersionTest(FetcherTest):
# packages with valid UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX
("cups", "http://www.cups.org/software/1.7.2/cups-1.7.2-source.tar.bz2", "https://github.com/apple/cups/releases", "(?P<name>cups\-)(?P<pver>((\d+[\.\-_]*)+))\-source\.tar\.gz")
: "2.0.0",
- ("db", "http://download.oracle.com/berkeley-db/db-5.3.21.tar.gz", "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html", "http://download.oracle.com/otn/berkeley-db/(?P<name>db-)(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz")
- : "6.1.19",
+ ("db", "http://download.oracle.com/berkeley-db/db-5.3.21.tar.gz", "http://ftp.debian.org/debian/pool/main/d/db5.3/", "(?P<name>db5\.3_)(?P<pver>\d+(\.\d+)+).+\.orig\.tar\.xz")
+ : "5.3.10",
}
@skipIfNoNetwork()
diff --git a/poky/bitbake/lib/bb/utils.py b/poky/bitbake/lib/bb/utils.py
index 0618e46fe..3e90b6a30 100644
--- a/poky/bitbake/lib/bb/utils.py
+++ b/poky/bitbake/lib/bb/utils.py
@@ -780,7 +780,7 @@ def movefile(src, dest, newmtime = None, sstat = None):
os.rename(src, destpath)
renamefailed = 0
except Exception as e:
- if e[0] != errno.EXDEV:
+ if e.errno != errno.EXDEV:
# Some random error.
print("movefile: Failed to move", src, "to", dest, e)
return None