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

brew upgrade --dry-run Reinstalls broken dependents #7033

Closed
3 tasks done
ooglek opened this issue Feb 14, 2020 · 3 comments · Fixed by #7034
Closed
3 tasks done

brew upgrade --dry-run Reinstalls broken dependents #7033

ooglek opened this issue Feb 14, 2020 · 3 comments · Fixed by #7034
Labels
help wanted We want help addressing this outdated PR was locked due to age release blocker A new release should not be done until this is fixed.

Comments

@ooglek
Copy link

ooglek commented Feb 14, 2020

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

I was trying to see what packages where out of date and what they would update to. I assumed that --dry-run would not take any action. I wanted to see if I should upgrade my packages or if I cared if they were out of date.

What happened (include command output)

Expected: Got a list of 62 outdated packages that would be upgraded
Unexpected: Broken dependents were reinstalled from source
Desired: No system-changing actions should be taken

Command output
$computer : ~ --> brew upgrade -n
==> Would upgrade 62 outdated packages:
vim 8.1.1000 -> 8.2.0200
libtiff 4.0.10_1 -> 4.1.0
libxml2 2.9.9_2 -> 2.9.10
xvid 1.3.5 -> 1.3.7
libestr 0.1.10 -> 0.1.11
libplist 2.0.0_1 -> 2.1.0
go 1.12.1 -> 1.13.8
libpng 1.6.36 -> 1.6.37
frei0r 1.6.1 -> 1.7.0
pixman 0.38.0 -> 0.38.4
cmake 3.14.0 -> 3.16.4
opus 1.3 -> 1.3.1
freetype 2.9.1 -> 2.10.1
rtmpdump 2.4+20151223 -> 2.4+20151223_1
python 3.7.3 -> 3.7.6_1
aws-shell 0.2.1 -> 0.2.1_1
smartmontools 6.6 -> 7.1
openjpeg 2.3.0 -> 2.3.1
dart-lang/dart/dart 2.4.0 -> 2.7.1
libogg 1.3.3 -> 1.3.4
perl 5.28.1 -> 5.30.1
harfbuzz 2.3.1 -> 2.6.4
libbluray 1.0.2 -> 1.1.2
glib 2.58.3 -> 2.62.4
rsyslog 8.37.0 -> 8.2001.0
readline 8.0.0_1 -> 8.0.1
awscli 1.16.90 -> 2.0.0
tesseract 4.0.0_1 -> 4.1.1
cairo 1.16.0 -> 1.16.0_2
webp 1.0.2 -> 1.1.0
sqlite 3.28.0 -> 3.31.1
fribidi 1.0.5 -> 1.0.8
dashing 0.3.0 -> 0.4.0
ansible 2.7.0 -> 2.9.4
giflib 5.1.4_1 -> 5.2.1
exercism 3.0.12 -> 3.0.13
libusbmuxd HEAD-6539b02_1 -> HEAD-6539b02
libvpx 1.8.0 -> 1.8.2
snappy 1.1.7_1 -> 1.1.8
flac 1.3.2_1 -> 1.3.3
gettext 0.19.8.1 -> 0.20.1
tmux 2.8 -> 3.0a
libtasn1 4.13 -> 4.16.0
oniguruma 6.9.0 -> 6.9.4
libevent 2.1.8 -> 2.1.11_1
openssl@1.1 1.1.1 -> 1.1.1d
leptonica 1.77.0_1 -> 1.79.0
pcre 8.42 -> 8.43
x264 r2917 -> r2917_1
x265 3.0 -> 3.2.1
node 12.5.0 -> 13.8.0
jpeg 9c -> 9d
nmap 7.70 -> 7.80_1
libzip 1.5.2 -> 1.6.1
jq 1.5_3 -> 1.6
sdl2 2.0.9 -> 2.0.10
libusb 1.0.22 -> 1.0.23
ios-deploy 1.9.4 -> 1.10.0
p11-kit 0.23.15 -> 0.23.20
cocoapods 1.7.5 -> 1.8.4
ruby 2.6.2 -> 2.6.5
gnutls 3.6.6 -> 3.6.12
==> Reinstalling 3 broken dependents from source:
python@2, python@2, python@2
==> Reinstalling python@2
==> Installing dependencies for python@2: openssl@1.1, readline, sqlite, python, sphinx-doc and openssl
==> Installing python@2 dependency: openssl@1.1
==> Downloading https://homebrew.bintray.com/bottles/openssl@1.1-1.1.1d.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/d7/d7f992ebfd78f80828051f6dc6a1a99aed405f86b0f39ea651fd0afeadd1b0f4?__gda__=exp=1581652439~hmac=c500ef83ba4666
######################################################################## 100.0%
==> Pouring openssl@1.1-1.1.1d.catalina.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
/usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because openssl/libressl is provided by macOS so don't link an incompatible version.

If you need to have openssl@1.1 first in your PATH run:
echo 'setenv PATH /usr/local/opt/openssl@1.1/bin:$PATH' >> ~/.tcshrc

For compilers to find openssl@1.1 you may need to set:
setenv LDFLAGS -L/usr/local/opt/openssl@1.1/lib;
setenv CPPFLAGS -I/usr/local/opt/openssl@1.1/include;

For pkg-config to find openssl@1.1 you may need to set:
setenv PKG_CONFIG_PATH /usr/local/opt/openssl@1.1/lib/pkgconfig;

==> Summary
🍺 /usr/local/Cellar/openssl@1.1/1.1.1d: 7,983 files, 17.9MB
==> Installing python@2 dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ab/ab3c966f4cae7d0f3ecc5688bb989820c3261f5ed547a08c84186ba7f53bdd9c?__gda__=exp=1581652450~hmac=8e97ada524ca52
######################################################################## 100.0%
==> Pouring readline-8.0.1.catalina.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
setenv LDFLAGS -L/usr/local/opt/readline/lib;
setenv CPPFLAGS -I/usr/local/opt/readline/include;

For pkg-config to find readline you may need to set:
setenv PKG_CONFIG_PATH /usr/local/opt/readline/lib/pkgconfig;

==> Summary
🍺 /usr/local/Cellar/readline/8.0.1: 48 files, 1.5MB
==> Installing python@2 dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.31.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e0/e09e8c96db88178e4f47b0cdab6477c46fa582326900ec9309c3ce1b9f7ff9aa?__gda__=exp=1581652452~hmac=5152c00735233e
######################################################################## 100.0%
==> Pouring sqlite-3.31.1.catalina.bottle.tar.gz
==> Caveats
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
echo 'setenv PATH /usr/local/opt/sqlite/bin:$PATH' >> ~/.tcshrc

For compilers to find sqlite you may need to set:
setenv LDFLAGS -L/usr/local/opt/sqlite/lib;
setenv CPPFLAGS -I/usr/local/opt/sqlite/include;

For pkg-config to find sqlite you may need to set:
setenv PKG_CONFIG_PATH /usr/local/opt/sqlite/lib/pkgconfig;

==> Summary
🍺 /usr/local/Cellar/sqlite/3.31.1: 11 files, 4MB
==> Installing python@2 dependency: python
Warning: Building python from source:
The bottle needs the Apple Command Line Tools to be installed.
You can install them, if desired, with:
xcode-select --install

==> Downloading https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/python/3.7.6_1 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/3.7.6_1/share --datadir=/usr/local/Cellar/pytho
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/3.7.6_1
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python/3.7.6_1/share/python
==> Downloading https://files.pythonhosted.org/packages/f7/b6/5b98441b6749ea1db1e41e5e6e7a93cbdd7ffd45e11fe1b22d45884bc777/setuptools-42.0.2.zip
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/ce/ea/9b445176a65ae4ba22dce1d93e4b5fe182f953df71a145f557cffaffc1bf/pip-19.3.1.tar.gz
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/59/b0/11710a598e1e148fb7cbf9220fd2a0b82c98e94efbdecb299cb25e7f0b39/wheel-0.33.6.tar.gz
######################################################################## 100.0%
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --

==> 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
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.6_1: 8,586 files, 120.6MB, built in 2 minutes 21 seconds
==> Installing python@2 dependency: sphinx-doc
==> Downloading https://homebrew.bintray.com/bottles/sphinx-doc-2.4.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/cd/cdb00afc230afc66a73399f326159bad142e058615b50bf1925e8d6bb6dd2afb?__gda__=exp=1581652596~hmac=b1f56b905b3f8b
######################################################################## 100.0%
==> Pouring sphinx-doc-2.4.1.catalina.bottle.tar.gz
==> Caveats
sphinx-doc is keg-only, which means it was not symlinked into /usr/local,
because this formula is mainly used internally by other formulae.
Users are advised to use pip to install sphinx-doc.

If you need to have sphinx-doc first in your PATH run:
echo 'setenv PATH /usr/local/opt/sphinx-doc/bin:$PATH' >> ~/.tcshrc

==> Summary
🍺 /usr/local/Cellar/sphinx-doc/2.4.1: 3,791 files, 52.2MB
==> Installing python@2
Error: Could not symlink Frameworks/Python.framework/Headers
Target /usr/local/Frameworks/Python.framework/Headers
is a symlink belonging to python. You can unlink it:
brew unlink python

To force the link and overwrite all conflicting files:
brew link --overwrite python@2

To list all files that would be deleted:
brew link --overwrite --dry-run python@2

Time spent in user mode (CPU seconds) : 146.874s
Time spent in kernel mode (CPU seconds) : 66.042s
Total time : 2:53.89s
CPU utilisation (percentage) : 122.4%
Times the process was swapped : 0
Times of major page faults : 13478
Times of minor page faults : 15429139
Exit 1

What you expected to happen

I expected that --dry-run would show me what it would do and not actually make any changes to my system or installed packages.

Step-by-step reproduction instructions (by running brew commands)

  1. (have a system with broken dependents -- not sure how to do this)
  2. brew upgrade -n

Output of brew config and brew doctor commands

HOMEBREW_VERSION: 2.2.5
ORIGIN: https://github.com/Homebrew/brew
HEAD: 4493f27db28be7f083737424cecd8edb863ec3f6
Last commit: 11 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a381fd1cc99b814a80d2d766dab801527c8e31e0
Core tap last commit: 6 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_VISUAL: vim
CPU: octa-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.21.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 12
macOS: 10.15.3-x86_64
CLT: N/A
Xcode: 11.3.1

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 or file an issue; just ignore this. Thanks!

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:
  python@2
  perl

I wonder if the lack of linking caused it. Still, --dry-run should not have caused any action to occur. IMO.

@MikeMcQuaid MikeMcQuaid added help wanted We want help addressing this release blocker A new release should not be done until this is fixed. labels Feb 14, 2020
@MikeMcQuaid
Copy link
Member

Ouch, a bad one. Opened a PR to fix this ASAP: #7034

@ooglek
Copy link
Author

ooglek commented Feb 14, 2020

Whoohoo! Thanks @MikeMcQuaid for the quick review and fix. Thrilled to contribute to Homebrew, even if it only resulted in two new lines of code. :-)

@MikeMcQuaid
Copy link
Member

You're welcome @ooglek, thanks for the well-written report.

@lock lock bot added the outdated PR was locked due to age label Mar 17, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted We want help addressing this outdated PR was locked due to age release blocker A new release should not be done until this is fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants