port sync: initialize verboseflag before use in HTTPS tarball extract - #417
Closed
caseyandgina wants to merge 1 commit into
Closed
port sync: initialize verboseflag before use in HTTPS tarball extract#417caseyandgina wants to merge 1 commit into
caseyandgina wants to merge 1 commit into
Conversation
mportsync's http/https/ftp tarball branch references ${verboseflag} in the
tar extract command, but only sets it inside the verbose and
progress-download branches. A non-verbose `port sync` with no
download-progress UI leaves it undefined, so extracting a tarball source
fails with:
can't read "verboseflag": no such variable
This bites the first sync and every sync that extracts a newer tarball (the
upgrade case) for any https/ftp tarball ports source. Default verboseflag to
"" next to progressflag, mirroring how progressflag is already initialized.
Member
|
Thanks for the report; fixed in a slightly different way. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
mportsync's http/https/ftp tarball sync branch uses${verboseflag}in the tar extract command:but
verboseflagis only set inside the verbose and progress-download branches:A non-verbose
port syncwith no download-progress UI takes neither branch, soverboseflagis undefined and the extract fails:Reproduction
Configure an https tarball ports source in
sources.conf, e.g.https://example.com/ports.tar.gz, then run a plainsudo port sync. It errors while extracting the tarball and leaves an empty tree (which then makes subsequent syncs report "No updates" and skip).sudo port -v syncworks, because-vsetsverboseflag. Reproduces on 2.12.x / current master; the rsync sync path is unaffected (its extract command doesn't referenceverboseflag).In practice this hits the first sync and every sync that extracts a newer tarball (i.e. the upgrade case) for any https/ftp tarball ports source.
Fix
Default
verboseflagto""next toprogressflag, mirroring howprogressflagis already initialized just above. One line, no behavior change for the verbose/progress paths.