Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra '/' in download url #84

Open
BenCoffeed opened this issue May 14, 2020 · 5 comments
Open

Extra '/' in download url #84

BenCoffeed opened this issue May 14, 2020 · 5 comments

Comments

@BenCoffeed
Copy link

Environment

brew version: Homebrew 2.2.16
OS version: MacOS 10.15.5
Current aws-sam-cli version:

How to repeat

brew upgrade aws/tap/aws-sam-cli

Expected Results

Install aws-sam-cli 0.49.0

Received Results

 brew upgrade aws/tap/aws-sam-cli
==> Upgrading 1 outdated package:
aws/tap/aws-sam-cli 0.38.0 -> 0.49.0
==> Upgrading aws/tap/aws-sam-cli 0.38.0 -> 0.49.0
==> Installing dependencies for aws/tap/aws-sam-cli: python
==> Installing aws/tap/aws-sam-cli dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.7.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ac/acd595852aecc2bfa46c57d86db716e64d57bb2753c45ff7f745b46c7655dd65?__gda__=exp=1589484398~hmac=3eaeaec49c5da717ca808481a70dc207c4
######################################################################## 100.0%
==> Pouring python-3.7.7.catalina.bottle.tar.gz
==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.7/bin --install-lib=/usr/local/l
==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.7/bin --install-lib=/usr/local/l
==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.7/bin --install-lib=/usr/local/l
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python/3.7.7: 4,006 files, 61.2MB
==> Installing aws/tap/aws-sam-cli
==> Downloading https://github.com/awslabs/aws-sam-cli/releases/download/v0.48.0//aws-sam-cli-0.49.0.sierra.bottle.tar.gz
##O=#  #
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "aws-sam-cli"
Download failed: https://github.com/awslabs/aws-sam-cli/releases/download/v0.48.0//aws-sam-cli-0.49.0.sierra.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://api.github.com/repos/awslabs/aws-sam-cli/tarball/v0.49.0
==> Downloading from https://codeload.github.com/awslabs/aws-sam-cli/legacy.tar.gz/v0.49.0
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/11/74/2c151a13ef41ab9fb43b3c4ff9e788e0496ed7923b2078d42cab30622bdf/virtualenv-16.7.4.tar.gz
######################################################################## 100.0%
==> python3 -c import setuptools... --no-user-cfg install --prefix=/private/tmp/aws-sam-cli--homebrew-virtualenv-20200514-16947-1arima7/target --install-scripts=/private/tmp/aws-
==> python3 -s /private/tmp/aws-sam-cli--homebrew-virtualenv-20200514-16947-1arima7/target/bin/virtualenv -p python3 /usr/local/Cellar/aws-sam-cli/0.49.0/libexec
==> /usr/local/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip install pip==19.2.3
==> /usr/local/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip install -v --ignore-installed /private/tmp/aws-sam-cli-20200514-16947-d9pf4r/awslabs-aws-sam-cli-2f46818
==> /usr/local/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip uninstall -y aws-sam-cli
==> /usr/local/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/aws-sam-cli-20200514-16947-d9pf4r/awslabs-aws-sam-
load: 1.80  cmd: python3.7 17082 running 0.41u 0.22s
🍺  /usr/local/Cellar/aws-sam-cli/0.49.0: 6,223 files, 81.1MB, built in 2 minutes 28 seconds
Removing: /usr/local/Cellar/aws-sam-cli/0.38.0... (4,620 files, 67.9MB)
==> Checking for dependents of upgraded formulae...
==> No dependents found!
==> Caveats
==> python
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

This isn't a huge deal locally, but I'm using aws-sam-cli in my CI scripts and it's causing build failures.

docker_image: circleci/php:7.4-cli

==> Tapping aws/tap
 
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
 
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/aws/homebrew-tap'...
 
remote: Enumerating objects: 12, done.        
 
remote: Counting objects: 100% (12/12), done.        
 
remote: Compressing objects: 100% (9/9), done.        
 
remote: Total 12 (delta 0), reused 6 (delta 0), pack-reused 0        
 
Unpacking objects: 100% (12/12), done.
 
Tapped 1 formula (43 files, 171.9KB).
 
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 4: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
 
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 4: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
 
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 4: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
 
==> Installing aws-sam-cli from aws/tap
 
==> Installing dependencies for aws/tap/aws-sam-cli: python
 
==> Installing aws/tap/aws-sam-cli dependency: python
 
==> Downloading https://linuxbrew.bintray.com/bottles/python-3.7.7_1.x86_64_linu
 
==> Downloading from https://akamai.bintray.com/9f/9ffe49b04a0035181663e41fd8b77
 
######################################################################## 100.0%
 
==> Pouring python-3.7.7_1.x86_64_linux.bottle.tar.gz
 
==> /home/linuxbrew/.linuxbrew/Cellar/python/3.7.7_1/bin/python3 -s setup.py --n
 
==> /home/linuxbrew/.linuxbrew/Cellar/python/3.7.7_1/bin/python3 -s setup.py --n
 
==> /home/linuxbrew/.linuxbrew/Cellar/python/3.7.7_1/bin/python3 -s setup.py --n
 
==> Caveats
 
Python has been installed as
 
  /home/linuxbrew/.linuxbrew/bin/python3
 

 
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
 
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
 
  /home/linuxbrew/.linuxbrew/opt/python/libexec/bin
 

 
You can install Python packages with
 
  pip3 install <package>
 
They will install into the site-package directory
 
  /home/linuxbrew/.linuxbrew/lib/python3.7/site-packages
 

 
See: https://docs.brew.sh/Homebrew-and-Python
 
==> Summary
 
🍺  /home/linuxbrew/.linuxbrew/Cellar/python/3.7.7_1: 3,654 files, 67MB
 
==> Installing aws/tap/aws-sam-cli
 
==> Downloading https://github.com/awslabs/aws-sam-cli/releases/download/v0.48.0
 

 
curl: (22) The requested URL returned error: 404 Not Found
 
Error: Failed to download resource "aws-sam-cli"
 
Download failed: https://github.com/awslabs/aws-sam-cli/releases/download/v0.48.0//aws-sam-cli-0.49.0.x86_64_linux.bottle.tar.gz
 
Warning: Bottle installation failed: building from source.
 
==> Downloading https://api.github.com/repos/awslabs/aws-sam-cli/tarball/v0.49.0
 
==> Downloading from https://codeload.github.com/awslabs/aws-sam-cli/legacy.tar.
 
######################################################################## 100.0%
 
==> Downloading https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a
 
######################################################################## 100.0%
 
==> python3 -c import setuptools... --no-user-cfg install --prefix=/tmp/aws-sam-
 
==> python3 -s /tmp/aws-sam-cli--homebrew-virtualenv-20200514-9730-2sgjnb/target
 
==> /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip install
 
==> /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip install
 
==> /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip uninsta
 
==> /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.49.0/libexec/bin/pip install
 
Error: invalid byte sequence in US-ASCII
 
Please report this issue:
 
  https://docs.brew.sh/Troubleshooting
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:337:in `gsub'
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:337:in `install'
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:329:in `install_formula'
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:261:in `block in install'
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:259:in `each'
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:259:in `install'
 
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'
@stefansundin
Copy link

I think the real issue may be that this line still references the old version, 0.48.0.

"root_url": "https://github.com/awslabs/aws-sam-cli/releases/download/v0.48.0/",

@stefansundin
Copy link

Hmm.. actually, not as simple as that.. there are no assets in this release here: https://github.com/awslabs/aws-sam-cli/releases/tag/v0.49.0

I was able to install the old version, 0.48.0 with the following:

cd /usr/local/Homebrew/Library/Taps/aws/homebrew-tap
git reset --hard 9ddfdddbe1fed52940f9561ed04618682d5b24b2
brew install aws-sam-cli

Your next brew update should undo this.

@dlaudams
Copy link

My brew was doing an autoupdate, which rolled back the reset.

==> Auto-updated Homebrew!
Updated 1 tap (aws/tap).
No changes to formulae.

==> Installing aws-sam-cli from aws/tap
...

It works if I prevent the auto-update by setting HOMEBREW_NO_AUTO_UPDATE=1

i.e.,

cd /usr/local/Homebrew/Library/Taps/aws/homebrew-tap
git reset --hard 9ddfdddbe1fed52940f9561ed04618682d5b24b2
HOMEBREW_NO_AUTO_UPDATE=1 brew install aws-sam-cli

@stefansundin
Copy link

It works if I prevent the auto-update by setting HOMEBREW_NO_AUTO_UPDATE=1

👍 I already had that set in my ~/.bash_profile. I don't like it auto-updating. :)

@ctash
Copy link

ctash commented Oct 8, 2020

This is happening again:

==> Upgrading aws/tap/aws-sam-cli 1.5.0 -> 1.6.2 
==> Downloading https://github.com/aws/aws-sam-cli/releases/download/v1.6.0//aws-sam-cli-1.6.2.sierr
##O#- #                                                                       
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "aws-sam-cli"
Download failed: https://github.com/aws/aws-sam-cli/releases/download/v1.6.0//aws-sam-cli-1.6.2.sierra.bottle.tar.gz
Warning: Bottle installation failed: building from source.

I noticed it last week w/v1.5.0// as well... the extra / after the version before aws-sam-cli-... is the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants