diff mbox series

[RFC,06/15] fetch2: remove basepath from FetchData

Message ID 20250205071538.2681-7-stefan.herbrechtsmeier-oss@weidmueller.com
State New
Headers show
Series Make mirror replacement syntax explicit | expand

Commit Message

Stefan Herbrechtsmeier Feb. 5, 2025, 7:15 a.m. UTC
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

Remove the basepath variable from the FetchData class. The variable is
never used in the class because the only user of the variable also sets
the needdonestamp variable to false. The basepath variable is useless
because it contains the content of the path variable.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
---

 lib/bb/fetch2/__init__.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index f282ecf17..f4cf25cfd 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1305,7 +1305,6 @@  class FetchData(object):
         self.lockfile = None
         self.mirrortarballs = []
         self.basename = None
-        self.basepath = None
         (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(d.expand(url))
         self.date = self.getSRCDate(d)
         self.url = url
@@ -1378,8 +1377,8 @@  class FetchData(object):
             basepath = self.localpath
         elif self.localpath:
             basepath = dldir + os.sep + os.path.basename(self.localpath)
-        elif self.basepath or self.basename:
-            basepath = dldir + os.sep + (self.basepath or self.basename)
+        elif self.basename:
+            basepath = dldir + os.sep + self.basename
         else:
             bb.fatal("Can't determine lock path for url %s" % url)