Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.94k stars 10.71k forks source link

brew cask install android-platform-tools fails to use cached zip #38679

Closed iepathos closed 7 years ago

iepathos commented 7 years ago

General troubleshooting steps

Description of issue

brew cask install android-platform-tools does not properly use cached files. Running brew cask fetch android-platform-tools and then brew cask install android-platform-tools has no effect, it attempts to download fresh from online source every time instead of using the cached zip.

Output of your command with --verbose --debug

brew cask fetch --verbose --debug android-platform-tools
==> Downloading external files for Cask android-platform-tools
==> Downloading https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
/usr/bin/curl --show-error --user-agent Homebrew/1.3.2 (Macintosh; Intel Mac OS X 10.12.6) curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/glen/Library/Caches/Homebrew/Cask/android-platform-tools--latest.zip.incomplete https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7589k  100 7589k    0     0  1489k      0  0:00:05  0:00:05 --:--:-- 1573k
==> Verifying download
==> Determining which verifications to run for Cask android-platform-tools
==> Checking for verification class Hbc::Verify::Checksum
==> No checksum defined for Cask android-platform-tools, skipping verification
==> 0 verifications defined
==> Success! Downloaded to -> /Users/glen/Library/Caches/Homebrew/Cask/android-platform-tools--latest.zip

brew cask install --verbose --debug android-platform-tools
==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
/usr/bin/curl --show-error --user-agent Homebrew/1.3.2 (Macintosh; Intel Mac OS X 10.12.6) curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/glen/Library/Caches/Homebrew/Cask/android-platform-tools--latest.zip.incomplete https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7589k  100 7589k    0     0  3168k      0  0:00:02  0:00:02 --:--:-- 3168k
==> Downloaded to -> /Users/glen/Library/Caches/Homebrew/Cask/android-platform-tools--latest.zip
==> Verifying download
==> Determining which verifications to run for Cask android-platform-tools
==> Checking for verification class Hbc::Verify::Checksum
==> No checksum defined for Cask android-platform-tools, skipping verification
==> 0 verifications defined
==> Installing Cask android-platform-tools
==> Hbc::Installer#stage
==> Extracting primary container
==> Determining which containers to use based on filetype
==> Checking container class Hbc::Container::Pkg
==> Checking container class Hbc::Container::Ttf
==> Checking container class Hbc::Container::Otf
==> Checking container class Hbc::Container::Air
==> Checking container class Hbc::Container::Cab
==> Checking container class Hbc::Container::Dmg
==> Executing: ["/usr/bin/hdiutil", "imageinfo", "/Users/glen/Library/Caches/Homebrew/Cask/android-platform-tools--latest.zip"]
==> Checking container class Hbc::Container::SevenZip
==> Checking container class Hbc::Container::Sit
==> Checking container class Hbc::Container::Rar
==> Checking container class Hbc::Container::Zip
==> Using container class Hbc::Container::Zip for /Users/glen/Library/Caches/Homebrew/Cask/android-platform-tools--latest.zip
==> Executing: ["/usr/bin/ditto", "-x", "-k", "--", "/Users/glen/Library/Caches/Homebrew/Cask/android-platform-tools--latest.zip", "/var/folders/zc/n49tz23d319b2jtk0blzznd00000gn/T/d20170917-69910-5f9e2g"]
==> Creating metadata directory /usr/local/Caskroom/android-platform-tools/.metadata/latest/20170917160139.475.
==> Creating metadata subdirectory /usr/local/Caskroom/android-platform-tools/.metadata/latest/20170917160139.475/Casks.
==> Installing artifacts
==> Determining which artifacts are present in Cask android-platform-tools
==> 1 artifact/s defined
#<Hbc::Artifact::Binary:0x007f8fd98d4710>
==> Installing artifact of class Hbc::Artifact::Binary
==> Linking Binary 'adb' to '/usr/local/bin/adb'.
==> Executing: ["/bin/ln", "-h", "-f", "-s", "--", "/usr/local/Caskroom/android-platform-tools/latest/platform-tools/adb", "/usr/local/bin/adb"]
==> Linking Binary 'dmtracedump' to '/usr/local/bin/dmtracedump'.
==> Executing: ["/bin/ln", "-h", "-f", "-s", "--", "/usr/local/Caskroom/android-platform-tools/latest/platform-tools/dmtracedump", "/usr/local/bin/dmtracedump"]
==> Linking Binary 'etc1tool' to '/usr/local/bin/etc1tool'.
==> Executing: ["/bin/ln", "-h", "-f", "-s", "--", "/usr/local/Caskroom/android-platform-tools/latest/platform-tools/etc1tool", "/usr/local/bin/etc1tool"]
==> Linking Binary 'fastboot' to '/usr/local/bin/fastboot'.
==> Executing: ["/bin/ln", "-h", "-f", "-s", "--", "/usr/local/Caskroom/android-platform-tools/latest/platform-tools/fastboot", "/usr/local/bin/fastboot"]
==> Linking Binary 'hprof-conv' to '/usr/local/bin/hprof-conv'.
==> Executing: ["/bin/ln", "-h", "-f", "-s", "--", "/usr/local/Caskroom/android-platform-tools/latest/platform-tools/hprof-conv", "/usr/local/bin/hprof-conv"]
==> Linking Binary 'sqlite3' to '/usr/local/bin/sqlite3'.
==> Executing: ["/bin/ln", "-h", "-f", "-s", "--", "/usr/local/Caskroom/android-platform-tools/latest/platform-tools/sqlite3", "/usr/local/bin/sqlite3"]
🍺  android-platform-tools was successfully installed!

Output of brew cask doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /Users/glen/.pyenv/shims/python-config
  /Users/glen/.pyenv/shims/python2-config
  /Users/glen/.pyenv/shims/python2.7-config
  /Users/glen/.pyenv/shims/python3-config
  /Users/glen/.pyenv/shims/python3.4-config
  /Users/glen/.pyenv/shims/python3.4m-config
  /Users/glen/.pyenv/shims/python3.5-config
  /Users/glen/.pyenv/shims/python3.5m-config
  /Users/glen/.pyenv/shims/python3.6-config
  /Users/glen/.pyenv/shims/python3.6m-config

Warning: Found Ruby file outside wercker/wercker tap formula directory
(/usr/local/Homebrew/Library/Taps/wercker/homebrew-wercker/Formula):
  /usr/local/Homebrew/Library/Taps/wercker/homebrew-wercker/wercker-cli.template.rb

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  git-crypt

Warning: Some directories in your path end in a slash.
Directories in your path should not end in a slash. This can break other
doctor checks. The following directories should be edited:
  /Users/glen/dev/Yaafe/venv/
commitay commented 7 years ago

android-platform-tools uses version latest. Casks with version latest will always download "fresh" to avoid installing an old cached copy of latest.

iepathos commented 7 years ago

thanks for the help!