diff mbox series

[11/13] fetch2: remove basepath from FetchData

Message ID 20250207124701.14787-11-stefan.herbrechtsmeier-oss@weidmueller.com
State New
Headers show
Series [01/13] fetch2: do not decode user from file URI | expand

Commit Message

Stefan Herbrechtsmeier Feb. 7, 2025, 12:46 p.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 bd87f18be..a680783c4 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1270,7 +1270,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
@@ -1343,8 +1342,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)