Commit Graph

57 Commits (7efe3cac3d5e728ee471bbccfd1043e06e4dcafe)

Author SHA1 Message Date
Adrien Delorme a9d302def8 removed debug logs
8 years ago
Adrien Delorme 541c68aed5 add StackableProgressBar struct that will refresh/show dl status for multiple files
8 years ago
Adrien Delorme fd7cb47adc use proxy reader for download progress & stop storing total/current in downloaders
8 years ago
Adrien Delorme ddd96c513b first draft at self refreshing loading bar centralized/controlled by Ui
8 years ago
Ali Rizvi-Santiago 5726927cba Moved the progress bar out of packer.Ui and unlinked it out of all the packer.Ui implementations. Split up the terminal-related functions into a separate terminal.go and calculate the progress bar width by traversing through packer.Ui to avoid the issue with github.com/ugorji/go/codec serializing private members (or unsafe pointers) of structs. Shuffled some arguments around in getConsoleScreenBufferInfo in common/terminal_windows.go so that the interface forces the user to correctly declare a _CONSOLE_SCREEN_BUFFER_INFO type.
8 years ago
Ali Rizvi-Santiago 0f10032b3d Moved the progress bar from common to the packer.UI interface and refactored it so that the terminal width is calculated based on each interface which returns a custom progressbar specific to its ui.
8 years ago
Ali Rizvi-Santiago 16ecb3ad9a Reverted removal of progress-bar that was done by commit 5d97b105a8 and added some missing arguments that were missed during the rebase. Modified the default progress bar's width to 80 as a result of the conversation on PR #5851.
8 years ago
Adrien Delorme 6b3844a64f
Revert "allow to use ISO images in-place v.s. copying them"
8 years ago
Adrien Delorme 863222b1e2 Also use the terminology Inplace in DownloadConfig for clarity/consistency
8 years ago
Adrien Delorme 82e480a285 allow to use ISO images inplace v.s. copying them
8 years ago
Ali Rizvi-Santiago 71e43d0b7f Updated common/download.go to handle when a connection error happens (response is nil), and reformatted the error that's returned when an HTTP error occurs.
8 years ago
Giovanni Tirloni 28095cf027 Do not return error on initial HEAD request
8 years ago
Giovanni Tirloni b7ea0b44fc HTTPDownloader - Fix invalid error handling
8 years ago
Giovanni Tirloni 413d13c411
Handle HTTP download errors
8 years ago
Ali Rizvi-Santiago c17f827e1d Split up DownloadableURL() into it's individual components: SupportedURL(), DownloadableURL(), and ValidatedURL(). Updated all instances of DownloadableURL() to point to ValidatedURL(). Reverted the tests that are based on un-supported protocols.
8 years ago
Ali Rizvi-Santiago 4a1fb0d262 Grrr...gofmt -w common/*.go
8 years ago
Ali Rizvi-Santiago 5d97b105a8 Removed implementation of the ftp protocol and the usage of cheggaaa's progress-bar as suggested by @SwampDragons. Replaced some of the old smoke-tests that were based on the ftp-protocol non-existing with a "non-existent://" protocol that's guaranteed to not exist.
8 years ago
Ali Rizvi-Santiago 5a3e98b529 Updated the testcases in common/download_test.go to pass a non-nil progress-bar due to the removal of a pointer type in commit ed2e341b7d7f49a063dd5018701b4ae548b8ec14 from yesterday.
8 years ago
Ali Rizvi-Santiago ab4490b967 Consolidated progress bar's appearance into the GetDefaultProgressBar() function. Updated dependency for cheggaaa's progress-bar from the gopkg.in location to the better maintained one on github.com.
8 years ago
Ali Rizvi-Santiago 8c6efe336c Added second argument for custom-formatted progress-bar to NewDownloadClient in common/download_test.go. This second parameter was added as a result of commit f0bd9018f3e318caafb1fe7d46e04c470e07c092 which lets you customize the progress-bar format.
8 years ago
Ali Rizvi-Santiago 69e5eec1ce Consolidated the progress-bar's format into common/step_download.go. Removed DownloadClient's PercentProgress callback since cheggaaa's progress-bar already does that.
8 years ago
Ali Rizvi-Santiago d85883582f Changed a critical error to a non-critical one when dealing with the strange .CopyFile flag in common/download.go.
8 years ago
Ali Rizvi-Santiago c978e27f0f grr. removed an assignment that was dead in common/download.go.
8 years ago
Ali Rizvi-Santiago 5a4ce2165c Modified common/download_test.go to not test the smb:// uri on platforms other than windows. Added an immediate platform error to SMBDownloader.Download as opposed to letting .toPath return it (which would have left the structure partially initialized).
8 years ago
Ali Rizvi-Santiago b1ff14714b go fmt
8 years ago
Ali Rizvi-Santiago 11ff4439a6 Moved the setting of HTTPDownloader's current progress to after the object actually gets instantiated. ;)
8 years ago
Ali Rizvi-Santiago 0fa6c3782e Added a progressbar using gopkg.in/cheggaaa/pb.v1 as per #3578 for all the DownloadClients in common/download.go.
8 years ago
Ali Rizvi-Santiago 6170e24ecb Refactored the code a bit to move the CopyFile hack out of DownloadClient and instead into each protocol.
8 years ago
Ali Rizvi-Santiago 60831801a7 Added the file, ftp, and smb downloaders to common/download.go
8 years ago
Ali Rizvi-Santiago da9c94b345 Added some testcases for the various file uri transforms to download_test.go
8 years ago
Ali Rizvi-Santiago 281dd1258a Added proper support for downloading via a Windows UNC path or a relative uri.
8 years ago
Megan Marsh 54bd057bb9 fix nasty edge case where we can't find guest additions on windows if they are on a different drive
8 years ago
Megan Marsh 3c20176dbb runtime imported but not used
8 years ago
Megan Marsh 4fb8a27879 remove the actual offending code
8 years ago
Matthew Hooker 79287d7e47
simplify some code
9 years ago
Matthew Hooker d920b3fbf4 run gofmt
10 years ago
Vasiliy Tolstov 4392f6df1c common/download.go: allow to specify relative path for file scheme
10 years ago
Chris Bednarski 1764238c0b Added [DEBUG] prefix to log messages
11 years ago
Chris Bednarski 6e8c6a15ad Implement fix, add comments so it's more apparent why we're doing special logic
11 years ago
Chris Bednarski 424ee65866 Added a log message when we use a local file instead of downloading one
11 years ago
Mitchell Hashimoto 0416939c08 common: always reset progress to 0 for downloads
11 years ago
Mitchell Hashimoto 117579808f common: add the current progress to the total size
11 years ago
Mitchell Hashimoto 944b4bf46c common: delete file if checksum fails
11 years ago
Mitchell Hashimoto 2f530534d2 common/download: resume test
11 years ago
Mitchell Hashimoto aa7d3b7841 Merge pull request #2245 from vtolstov/iso
11 years ago
Mitchell Hashimoto 897888fde3 common: fix potential panic case
11 years ago
Vasiliy Tolstov d98de209cb fallback to not ranged request if server lacks HEAD
11 years ago
Vasiliy Tolstov 382fa01e6f resume download after fail
11 years ago
Mark Rushakoff 9e5c0f6c6a HTTPDownloader uses UserAgent from DownloadConfig
12 years ago
Mitchell Hashimoto 24db112b79 common: downloads can be HTTPS [GH-587]
13 years ago