Skip to content

fetch.custom: Allow for partial resuming#464

Open
swagtoy wants to merge 1 commit intopkgcore:masterfrom
swagtoy:keyboard-interrupt-delete
Open

fetch.custom: Allow for partial resuming#464
swagtoy wants to merge 1 commit intopkgcore:masterfrom
swagtoy:keyboard-interrupt-delete

Conversation

@swagtoy
Copy link

@swagtoy swagtoy commented Feb 12, 2026

This will attempt to download all files as XXX.partial. The file
will rename to XXX upon success.

Correlatively, this also fixes the issue where interrupted
downloads (i.e. pkgdev manifest) ended up counting as fetched,
requiring the user to manually delete them to continue.

@swagtoy swagtoy marked this pull request as draft February 12, 2026 03:17
@swagtoy
Copy link
Author

swagtoy commented Feb 12, 2026

gonna change this to just start downloading straight to .partial entirely, actually.

This will attempt to download all files as XXX._partial_. The file
will rename to XXX upon success.

Correlatively, this also fixes the issue where interrupted
downloads (i.e. pkgdev manifest) ended up counting as fetched,
requiring the user to manually delete them to continue.

Closes: pkgcore#52
Signed-off-by: Swagtoy <[email protected]>
@swagtoy swagtoy force-pushed the keyboard-interrupt-delete branch from 8279625 to 6145ffa Compare February 12, 2026 04:43
@swagtoy swagtoy marked this pull request as ready for review February 12, 2026 04:44
Comment on lines +147 to +150
if 0 == spawn_bash(
command % {"URI": next(uris), "FILE": f"{target.filename}._partial_"}, **spawn_opts
):
os.rename(f"{path}._partial_", path)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should I do about this on error? I'm not super familiar on what would be wise to do in such a case.

@swagtoy swagtoy changed the title fetch.custom: Allow for partial fetch resuming on interrupt fetch.custom: Allow for partial resuming Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants