diff mbox series

[v3,2/7] fetch2/wget: don't conditionalise --continue

Message ID 20250326122523.293551-2-ross.burton@arm.com
State Accepted, archived
Commit a5ee50d4d2b2e6c00abe1551382afd9799345dbf
Headers show
Series [v3,1/7] fetch2/wget: consider downloadfilename when checking for upstream | expand

Commit Message

Ross Burton March 26, 2025, 12:25 p.m. UTC
If the target file exists, we pass --continue so that wget will try to
resume the download instead of starting from the beginning.  However if
the file doesn't exist --continue has no effect, so there's no need to
conditionalise the use of the argument.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 bitbake/lib/bb/fetch2/wget.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index df3e649312f..ee7afd3fda4 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -122,12 +122,7 @@  class Wget(FetchMethod):
                 fetchcmd += " --user=%s --password=%s" % (ud.user, ud.pswd)
 
         uri = ud.url.split(";")[0]
-        if os.path.exists(ud.localpath):
-            # file exists, but we didnt complete it.. trying again..
-            fetchcmd += " -c -P " + dldir + " '" + uri + "'"
-        else:
-            fetchcmd += " -P " + dldir + " '" + uri + "'"
-
+        fetchcmd += " -c -P " + dldir + " '" + uri + "'"
         self._runwget(ud, d, fetchcmd, False)
 
         # Sanity check since wget can pretend it succeed when it didn't