pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/url2pkg/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Jul 16 09:16:50 UTC 2022

Modified Files:
        pkgsrc/pkgtools/url2pkg/files: url2pkg.py

Log Message:
url2pkg: disable resuming transfers when fetching distfiles

Resuming the transfer only works if there already is a distinfo file, as
otherwise the correct size of the file is not known.

This prevents these warnings from mk/fetch/fetch:
> fetch: ``-r'' requires ``-f distinfo''.
> fetch: Falling back to non-resume fetch.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 pkgsrc/pkgtools/url2pkg/files/url2pkg.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.43 pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.44
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.43       Sat Jul 16 08:59:38 2022
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.py    Sat Jul 16 09:16:50 2022
@@ -1,5 +1,5 @@
 #! @PYTHONBIN@
-# $NetBSD: url2pkg.py,v 1.43 2022/07/16 08:59:38 rillig Exp $
+# $NetBSD: url2pkg.py,v 1.44 2022/07/16 09:16:50 rillig Exp $
 
 # Copyright (c) 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -108,7 +108,12 @@ class Globals:
 
     def bmake(self, *args: str) -> None:
         self.debug('running bmake {0} in {1}', args, str(self.pkgdir))
-        subprocess.check_call([self.make, *args], cwd=self.pkgdir)
+        env = dict(os.environ)
+        env.update({
+            # Resuming transfers only works when distinfo already exists.
+            'PKG_RESUME_TRANSFERS': 'no',
+        })
+        subprocess.check_call([self.make, *args], cwd=self.pkgdir, env=env)
 
     def show_var(self, varname: str) -> str:
         output = subprocess.check_output(



Home | Main Index | Thread Index | Old Index