Skip to contentSkip to conversation

knotty: Make the bb.command.CommandExit event terminate bitbake

PATCH In review Peter Kjellerstedt 5 participants 15 messages Feb 15, 2020 – Mar 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 knotty: Make the bb.command.CommandExit event terminate bitbake

This matches the other bb.command.Command* events and without it, running bitbake --revisions-changed will hang indefinitely if there are changed revisions.

---
 bitbake/lib/bb/ui/knotty.py | 1 +
 1 file changed, 1 insertion(+)
bitbake/lib/bb/ui/knotty.py +1 -0
index a0340dfc20..cbb289b05f 100644
@@ -590,6 +590,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
             if isinstance(event, bb.command.CommandExit):
                 if not return_value:
                     return_value = event.exitcode
+                main.shutdown = 2
                 continue
             if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
                 main.shutdown = 2
Signature · 1 line
2.21.1
#1 lore raw

PATCH 2/3 fetch2: Make fetcher_compare_revisions() work

This seems to have been broken for a very long time. Now it also works regardless of BB_SRCREV_POLICY.

---
 bitbake/lib/bb/fetch2/__init__.py | 33 +++++++++++++------------------
 1 file changed, 14 insertions(+), 19 deletions(-)
bitbake/lib/bb/fetch2/__init__.py +14 -19
index 1b7f573642..56462767e5 100644
@@ -485,17 +485,22 @@ def fetcher_init(d):
     Called to initialize the fetchers once the configuration data is known.
     Calls before this must not hit the cache.
     """
+
+    revs = bb.persist_data.persist('BB_URI_HEADREVS', d)
+    try:
+        # fetcher_init is called multiple times, so make sure we only save the
+        # revs the first time it is called.
+        if not bb.fetch2.saved_headrevs:
+            bb.fetch2.saved_headrevs = dict(revs)
+    except:
+        pass
+
     # When to drop SCM head revisions controlled by user policy
     srcrev_policy = d.getVar('BB_SRCREV_POLICY') or "clear"
     if srcrev_policy == "cache":
         logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy)
     elif srcrev_policy == "clear":
         logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy)
-        revs = bb.persist_data.persist('BB_URI_HEADREVS', d)
-        try:
-            bb.fetch2.saved_headrevs = revs.items()
-        except:
-            pass
         revs.clear()
     else:
         raise FetchError("Invalid SRCREV cache policy of: %s" % srcrev_policy)
@@ -514,22 +519,12 @@ def fetcher_parse_done():
 
 def fetcher_compare_revisions(d):
     """
-    Compare the revisions in the persistant cache with current values and
-    return true/false on whether they've changed.
+    Compare the revisions in the persistent cache with the saved values from
+    when bitbake was started and return true if they have changed.
     """
 
-    data = bb.persist_data.persist('BB_URI_HEADREVS', d).items()
-    data2 = bb.fetch2.saved_headrevs
-
-    changed = False
-    for key in data:
-        if key not in data2 or data2[key] != data[key]:
-            logger.debug(1, "%s changed", key)
-            changed = True
-            return True
-        else:
-            logger.debug(2, "%s did not change", key)
-    return False
+    headrevs = dict(bb.persist_data.persist('BB_URI_HEADREVS', d))
+    return headrevs != bb.fetch2.saved_headrevs
 
 def mirror_from_string(data):
     mirrors = (data or "").replace('\\n',' ').split()
Signature · 1 line
2.21.1
#2 lore raw

PATCH 3/3 fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

In reply to Peter Kjellerstedt

Mark any keys used to cache the srcrevs for a recipe as "dontcache" if BB_DONT_CACHE is set for the recipe. Remove any such keys upon the next bitbake run even if BB_SRCREV_POLICY is set to "cache". This will make sure the srcrev is updated as expected if ${AUTOREV} is used.

---
 bitbake/lib/bb/fetch2/__init__.py | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
bitbake/lib/bb/fetch2/__init__.py +14 -4
index 56462767e5..b83347ad90 100644
@@ -499,6 +499,11 @@ def fetcher_init(d):
     srcrev_policy = d.getVar('BB_SRCREV_POLICY') or "clear"
     if srcrev_policy == "cache":
         logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy)
+        # We still need to remove keys that are marked with "dontcache".
+        for key in list(revs.keys()):
+            if key.startswith("dontcache-"):
+                logger.debug(1, "Removing SRCREV key: %s" % key)
+                revs.pop(key)
     elif srcrev_policy == "clear":
         logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy)
         revs.clear()
@@ -729,9 +734,8 @@ def subprocess_setup():
     signal.signal(signal.SIGPIPE, signal.SIG_DFL)
 
 def get_autorev(d):
-    #  only not cache src rev in autorev case
-    if d.getVar('BB_SRCREV_POLICY') != "cache":
-        d.setVar('BB_DONT_CACHE', '1')
+    # Do not cache the srcrev in the autorev case
+    d.setVar('BB_DONT_CACHE', '1')
     return "AUTOINC"
 
 def get_srcrev(d, method_name='sortable_revision'):
@@ -1594,7 +1598,13 @@ class FetchMethod(object):
         return True, str(latest_rev)
 
     def generate_revision_key(self, ud, d, name):
-        return self._revision_key(ud, d, name)
+        key = self._revision_key(ud, d, name)
+        if d.getVar('BB_DONT_CACHE'):
+            # Mark the key so it can be removed on the next bitbake run even if
+            # BB_SRCREV_POLICY is "cache".
+            return "dontcache-%s" % key
+        else:
+            return key
 
     def latest_versionstring(self, ud, d):
         """
Signature · 1 line
2.21.1
#3 lore raw

Re: [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

removing

if d.getVar('BB_SRCREV_POLICY') != "cache":

Will cause autorevs to be excluded from policy and its not documented

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#var-BB_SRCREV_POLICY

did not state that AUTOREVs plus BB_SRCREV_POLICY behavior, this patch is regressing the case where we rely on this behavior to use externalsrc on AUTOREVed recipes.

#4 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always want the latest revision.

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = “cache” didn’t work, which also wasn’t documented.

//Peter

From: [email protected] <[email protected]> On Behalf Of Khem Raj
Sent: den 21 mars 2020 22:44
To: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

removing

if d.getVar('BB_SRCREV_POLICY') != "cache":

Will cause autorevs to be excluded from policy and its not documented

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#var-BB_SRCREV_POLICY

did not state that AUTOREVs plus BB_SRCREV_POLICY behavior, this patch is regressing the case where we rely on this behavior to use externalsrc on AUTOREVed recipes.

#5 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 3 lines · Peter Kjellerstedt

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always want the latest revision.

Autorev + clear srcrev policy if you want that

Quoted 4 lines

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = “cache” didn’t work, which also wasn’t documented.

It could be interpreted also that cache also caches AUTOREVs this will break downstream projects. Its equivalent of ABI change, that perhaps will do more harm then what it fixes.

Quoted 23 lines

//Peter

From: [email protected] <[email protected]> On Behalf Of Khem Raj
Sent: den 21 mars 2020 22:44
To: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

removing

if d.getVar('BB_SRCREV_POLICY') != "cache":

Will cause autorevs to be excluded from policy and its not documented

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#var-BB_SRCREV_POLICY

did not state that AUTOREVs plus BB_SRCREV_POLICY behavior, this patch is regressing the case where we rely on this behavior to use externalsrc on AUTOREVed recipes.

#6 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 8 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: den 22 mars 2020 00:59
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 8 lines
Quoted 4 lines · Peter Kjellerstedt

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always want the latest revision.

Autorev + clear srcrev policy if you want that

Well, obviously ${AUTOREV} works with BB_SRCREV_POLICY = "clear". But BB_SRCREV_POLICY is a distro configuration and it is not possible to override it per recipe. Which means that if it is set to "cache", it is not possible to use ${AUTOREV}. This is not documented, and to the developers it will look as if it is working, since it fetches the very first time the recipe is built. But there will be no updates, so it is as useful as setting SRCREV = "master" (which some of our developers also have tried before being educated to how BitBake works)...

Quoted 6 lines
Quoted 2 lines

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = "cache" didn’t work, which also wasn’t documented.

It could be interpreted also that cache also caches AUTOREVs this will break downstream projects. Its equivalent of ABI change, that perhaps will do more harm then what it fixes.

I fail to see how it will break stuff as it was not possible to use ${AUTOREV} before in a meaningful way together with BB_SRCREV_POLICY = "cache".

Quoted 1 line
Quoted 1 line

//Peter

//Peter

Quoted 21 lines
Quoted 1 line

From: [email protected] <bitbake-

[email protected]> On Behalf Of Khem Raj

Quoted 3 lines

Sent: den 21 mars 2020 22:44
To: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow

${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 10 lines

removing

if d.getVar('BB_SRCREV_POLICY') != "cache":

Will cause autorevs to be excluded from policy and its not documented

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-

manual.html#var-BB_SRCREV_POLICY

Quoted 2 lines

did not state that AUTOREVs plus BB_SRCREV_POLICY behavior, this patch

is regressing the case

Quoted 1 line

where we rely on this behavior to use externalsrc on AUTOREVed recipes.

#7 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 35 lines · Peter Kjellerstedt
Quoted 8 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: den 22 mars 2020 00:59
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 5 lines
Quoted 3 lines · Peter Kjellerstedt

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always

want

Quoted 3 lines
Quoted 1 line

the latest revision.

Autorev + clear srcrev policy if you want that

Well, obviously ${AUTOREV} works with BB_SRCREV_POLICY = "clear". But BB_SRCREV_POLICY is a distro configuration and it is not possible to override
it per recipe. Which means that if it is set to "cache", it is not possible
to use ${AUTOREV}. This is not documented, and to the developers it will look
as if it is working, since it fetches the very first time the recipe is built.
But there will be no updates, so it is as useful as setting SRCREV = "master"
(which some of our developers also have tried before being educated to how BitBake works)...

Quoted 3 lines
Quoted 2 lines

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = "cache" didn’t work, which also wasn’t documented.

Quoted 7 lines
Quoted 3 lines

It could be interpreted also that cache also caches AUTOREVs this will break downstream projects. Its equivalent of ABI change, that perhaps will do more harm then what it fixes.

I fail to see how it will break stuff as it was not possible to use ${AUTOREV}
before in a meaningful way together with BB_SRCREV_POLICY = "cache".

There are workflows depending on this behavior unfortunately

Quoted 28 lines
Quoted 2 lines
Quoted 2 lines

//Peter

//Peter

Quoted 16 lines
Quoted 1 line

From: [email protected] <bitbake-

[email protected]> On Behalf Of Khem Raj

Quoted 3 lines

Sent: den 21 mars 2020 22:44
To: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow

${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 10 lines

removing

if d.getVar('BB_SRCREV_POLICY') != "cache":

Will cause autorevs to be excluded from policy and its not documented

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-

Quoted 5 lines

manual.html#var-BB_SRCREV_POLICY

Quoted 2 lines

did not state that AUTOREVs plus BB_SRCREV_POLICY behavior, this patch

is regressing the case

Quoted 1 line

where we rely on this behavior to use externalsrc on AUTOREVed recipes.

#8 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Care to elaborate? Because I obviously do not see the usefulness in combining BB_SRCREV_POLICY = "cache" with ${AUTOREV} as it was implemented before my change.

//Peter

From: Khem Raj <[email protected]>
Sent: den 22 mars 2020 02:27
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 8 lines · On Sat, Mar 21, 2020 at 5:38 PM Peter Kjellerstedt…

-----Original Message-----
From: Khem Raj <[email protected]<mailto:[email protected]>>
Sent: den 22 mars 2020 00:59
To: Peter Kjellerstedt <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 8 lines
Quoted 4 lines · On Sat, Mar 21, 2020 at 4:50 PM Peter Kjellerstedt…

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always want the latest revision.

Autorev + clear srcrev policy if you want that

Well, obviously ${AUTOREV} works with BB_SRCREV_POLICY = "clear". But BB_SRCREV_POLICY is a distro configuration and it is not possible to override it per recipe. Which means that if it is set to "cache", it is not possible to use ${AUTOREV}. This is not documented, and to the developers it will look as if it is working, since it fetches the very first time the recipe is built. But there will be no updates, so it is as useful as setting SRCREV = "master" (which some of our developers also have tried before being educated to how BitBake works)...

Quoted 6 lines
Quoted 2 lines

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = "cache" didn’t work, which also wasn’t documented.

It could be interpreted also that cache also caches AUTOREVs this will break downstream projects. Its equivalent of ABI change, that perhaps will do more harm then what it fixes.

I fail to see how it will break stuff as it was not possible to use ${AUTOREV} before in a meaningful way together with BB_SRCREV_POLICY = "cache".

There are workflows depending on this behavior unfortunately

Quoted 1 line
Quoted 1 line

//Peter

//Peter

Quoted 21 lines
Quoted 1 line

From: [email protected]<mailto:[email protected]> <bitbake-

[email protected]<mailto:[email protected]>> On Behalf Of Khem Raj

Quoted 3 lines

Sent: den 21 mars 2020 22:44
To: [email protected]<mailto:[email protected]>
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow

${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 10 lines

removing

if d.getVar('BB_SRCREV_POLICY') != "cache":

Will cause autorevs to be excluded from policy and its not documented

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-

manual.html#var-BB_SRCREV_POLICY

Quoted 2 lines

did not state that AUTOREVs plus BB_SRCREV_POLICY behavior, this patch

is regressing the case

Quoted 1 line

where we rely on this behavior to use externalsrc on AUTOREVed recipes.

#9 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 3 lines · Peter Kjellerstedt

Care to elaborate? Because I obviously do not see the usefulness in combining BB_SRCREV_POLICY = "cache" with ${AUTOREV} as it was implemented before my change.

One of the use cases this was used for was in an autobuilder environment where a given build directory could have multiple bitbake invocations against it and have the same src revs. Something like:

MACHINE=A bitbake X
MACHINE=B bitbake X
MACHINE=C bitbake X

and have the same revision of some AUTOREV recipe built for this session/build directory.

Cheers,

Richard

#10 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

In reply to Peter Kjellerstedt
Quoted 14 lines · Peter Kjellerstedt
Quoted 14 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: den 22 mars 2020 00:59
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 3 lines · Peter Kjellerstedt

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always want the latest revision.

Quoted 5 lines
Quoted 1 line

Autorev + clear srcrev policy if you want that

Well, obviously ${AUTOREV} works with BB_SRCREV_POLICY = "clear". But BB_SRCREV_POLICY is a distro configuration and it is not possible to override it per recipe.

BB_SRCREV_POLICY is quite an old piece of code and its design has issues. It should really be changed to work per recipe (and use something other than persist db but that is another story).

Quoted 10 lines

Which means that if it is set to "cache", it is not possible
to use ${AUTOREV}. This is not documented, and to the developers it will look as if it is working, since it fetches the very first time the recipe is built. But there will be no updates, so it is as useful as setting SRCREV = "master" (which some of our developers also have tried before being educated to how BitBake works)...

Quoted 3 lines
Quoted 2 lines

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = "cache" didn’t work, which also wasn’t documented.

Quoted 6 lines
Quoted 3 lines

It could be interpreted also that cache also caches AUTOREVs this will break downstream projects. Its equivalent of ABI change, that perhaps will do more harm then what it fixes.

I fail to see how it will break stuff as it was not possible to use ${AUTOREV} before in a meaningful way together with BB_SRCREV_POLICY = "cache".

It gives a behaviour people asked for and need under certain scenarios. I appreciate that isn't yours. I should not have merged the patch as it breaks behaviour that people do use and I misunderstood what the patch was doing :(.

The question is where from here, technically a revert is justified but I do understand the per recipe configuration issue.

Cheers,

Richard

#11 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 18 lines · Richard Purdie
Quoted 16 lines · Peter Kjellerstedt
Quoted 15 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: den 22 mars 2020 00:59
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]
Subject: Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

Quoted 3 lines · Peter Kjellerstedt

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always want the latest revision.

Autorev + clear srcrev policy if you want that

Quoted 8 lines
Quoted 3 lines

Well, obviously ${AUTOREV} works with BB_SRCREV_POLICY = "clear". But BB_SRCREV_POLICY is a distro configuration and it is not possible to override it per recipe.

BB_SRCREV_POLICY is quite an old piece of code and its design has issues. It should really be changed to work per recipe (and use something other than persist db but that is another story).

Right, I agree lets keep it as it is.

Quoted 17 lines
Quoted 10 lines

Which means that if it is set to "cache", it is not possible
to use ${AUTOREV}. This is not documented, and to the developers it will look as if it is working, since it fetches the very first time the recipe is built. But there will be no updates, so it is as useful as setting SRCREV = "master" (which some of our developers also have tried before being educated to how BitBake works)...

Quoted 3 lines
Quoted 2 lines

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = "cache" didn’t work, which also wasn’t documented.

Quoted 6 lines
Quoted 3 lines

It could be interpreted also that cache also caches AUTOREVs this will break downstream projects. Its equivalent of ABI change, that perhaps will do more harm then what it fixes.

I fail to see how it will break stuff as it was not possible to use ${AUTOREV} before in a meaningful way together with BB_SRCREV_POLICY = "cache".

Quoted 7 lines

It gives a behaviour people asked for and need under certain scenarios. I appreciate that isn't yours. I should not have merged the patch as it breaks behaviour that people do use and I misunderstood what the patch was doing :(.

The question is where from here, technically a revert is justified but I do understand the per recipe configuration issue.

I think there are large usecases depending on current behaviour. While RDK will migrate away
from AUTOREVs but this is not happening in 3.1 time frame and there are other projects perhaps
who are in same boat.

Quoted 5 lines

Cheers,

Richard

#12 lore raw

Re: [bitbake-devel] [master][zeus][PATCH 3/3] fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"

In reply to Peter Kjellerstedt
Quoted 6 lines · Peter Kjellerstedt

Rather than blindly reverting, can’t we update the documentation instead? If you use ${AUTOREV} you obviously do it because you always want the latest revision.

Before this change, using ${AUTOREV} in combination with BB_SRCREV_POLICY = “cache” didn’t work, which also wasn’t documented.

I can confirm that the design of "cache" with AUTOREV was only to update the first time.

This differentiates it from the other option or clear where you'd get the behaviour you'd describe.

Cheers,

Richard

#13 lore raw
In reply to Peter Kjellerstedt
Quoted 30 lines

-----Original Message-----
From: [email protected] <bitbake-devel- [email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 15 februari 2020 04:30
To: [email protected]
Subject: [bitbake-devel] [master][zeus][PATCH 1/3] knotty: Make the bb.command.CommandExit event terminate bitbake

This matches the other bb.command.Command* events and without it, running bitbake --revisions-changed will hang indefinitely if there are changed revisions.

---
 bitbake/lib/bb/ui/knotty.py | 1 +
 1 file changed, 1 insertion(+)
bitbake/lib/bb/ui/knotty.py +1 -1
index a0340dfc20..cbb289b05f 100644
@@ -590,6 +590,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
             if isinstance(event, bb.command.CommandExit):
                 if not return_value:
                     return_value = event.exitcode
+                main.shutdown = 2
                 continue
             if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
                 main.shutdown = 2
--
Quoted 1 line

2.21.1

Please backport the three patches in this set to Zeus now that they have been integrated to master.

//Peter

#14 lore raw

got them.

had to cherry pick as the patches did not apply.

- armin

Quoted 36 lines · Peter Kjellerstedt
Quoted 30 lines

-----Original Message-----
From: [email protected] <bitbake-devel- [email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 15 februari 2020 04:30
To: [email protected]
Subject: [bitbake-devel] [master][zeus][PATCH 1/3] knotty: Make the bb.command.CommandExit event terminate bitbake

This matches the other bb.command.Command* events and without it, running bitbake --revisions-changed will hang indefinitely if there are changed revisions.

---
 bitbake/lib/bb/ui/knotty.py | 1 +
 1 file changed, 1 insertion(+)
bitbake/lib/bb/ui/knotty.py +1 -1
index a0340dfc20..cbb289b05f 100644
@@ -590,6 +590,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
             if isinstance(event, bb.command.CommandExit):
                 if not return_value:
                     return_value = event.exitcode
+                main.shutdown = 2
                 continue
             if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
                 main.shutdown = 2
--
Quoted 1 line

2.21.1

Please backport the three patches in this set to Zeus now that they have been integrated to master.

//Peter