Message ID | 20251006140246.2459639-2-u.kleine-koenig@baylibre.com |
---|---|
State | New |
Headers | show |
Series | bitbake/bzr: Drop check for unset .revision after .setup_revisions() | expand |
diff --git a/lib/bb/fetch2/bzr.py b/lib/bb/fetch2/bzr.py index fc558f50b047..443195fa00bc 100644 --- a/lib/bb/fetch2/bzr.py +++ b/lib/bb/fetch2/bzr.py @@ -35,9 +35,6 @@ class Bzr(FetchMethod): ud.setup_revisions(d) - if not ud.revision: - ud.revision = self.latest_revision(ud, d) - ud.localfile = d.expand('bzr_%s_%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.revision)) def _buildbzrcommand(self, ud, d, command):
FetchMethod.latest_revision() expects three parameters, so the call `self.latest_revision(ud, d)` triggers an exception. Drop that error path that obviously isn't used. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> --- Hello, I didn't hit this exception and only noticed that problem during research for another problem. I'm unsure if deleting is really the right thing to do (i.e. if .setup_revisions() always returns something that evaluates to True when interpreted as Bool), but it seems nobody hit that error path since commit 7b7a4517c600 ("fetch2: Allow multiple src rev to be used in one src_uri"). (Hmm, maybe the author of commit 7c94ca56b2fd ("fetch2: Correct a few calls to latest_revision()") should have noticed ....) There is a similar issue in lib/bb/fetch2/hg.py. I'll postpone sending a patch for that until we agreed on what to do here. Best regards Uwe lib/bb/fetch2/bzr.py | 3 --- 1 file changed, 3 deletions(-) base-commit: 7bd36f6c6d33211bb2a6b6fc6d40bdbd83b8b7c3