1 |
Enable resume for the digestgen case (no digests available), when |
2 |
the temporary file exceeds PORTAGE_FETCH_RESUME_MIN_SIZE. This |
3 |
fixes a case which caused the ebuild digest command to skip the |
4 |
download and fail with a message like this: |
5 |
|
6 |
!!! File b'/var/cache/distfiles/foo.tar.xz' doesn't exist, can't update Manifest |
7 |
|
8 |
Bug: https://bugs.gentoo.org/821571 |
9 |
Signed-off-by: Zac Medico <zmedico@g.o> |
10 |
--- |
11 |
lib/portage/package/ebuild/fetch.py | 7 ++++--- |
12 |
1 file changed, 4 insertions(+), 3 deletions(-) |
13 |
|
14 |
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py |
15 |
index 8c64362c2..2d3625800 100644 |
16 |
--- a/lib/portage/package/ebuild/fetch.py |
17 |
+++ b/lib/portage/package/ebuild/fetch.py |
18 |
@@ -1485,10 +1485,11 @@ def fetch( |
19 |
except EnvironmentError: |
20 |
pass |
21 |
elif not orig_digests: |
22 |
- # We don't have a digest, but the file exists. We must |
23 |
- # assume that it is fully downloaded. |
24 |
+ # We don't have a digest, and the temporary file exists. |
25 |
if not force: |
26 |
- continue |
27 |
+ # Try to resume this download when full |
28 |
+ # download has not been explicitly forced. |
29 |
+ fetched = 1 |
30 |
else: |
31 |
if ( |
32 |
mydigests[myfile].get("size") is not None |
33 |
-- |
34 |
2.32.0 |