Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.97k stars 9.61k forks source link

brew upgraded pinned python and python3 packages #462

Closed JohnSpeno closed 8 years ago

JohnSpeno commented 8 years ago

I have python3 pinned in brew, but it was upgraded today upon a brew upgrade command because it was listed as a dependency of the httpie package. Looks like python2 was also upgraded despite being pinned.

I do not think this is the intended behavior.

: %; brew list --pinned postgresql python python3 : %; brew update Updated Homebrew from 91a225e to f518f57. Updated 4 taps (caskroom/cask, homebrew/core, homebrew/dupes, homebrew/science). ==> New Formulae certigo homebrew/science/qsopt osc ==> Updated Formulae abi-compliance-checker duplicity imapfilter pgloader ace dynamips ircd-hybrid pkgdiff acmetool elm kerl podofo afl-fuzz entr kobalt pre-commit apache-drill etcd kotlin prometheus apache-spark evince libbladerf pwntools artifactory ffmpeg ✔ libgsf re2 avro-c fish libnfs riemann-client avro-cpp freetds ✔ libosinfo roswell avro-tools ganglia libspectre rrdtool aws-elasticbeanstalk geckodriver links s-search aws-sdk-cpp gimme luvit sagittarius-scheme awscli git-credential-manager lzlib sbcl bagit git-octopus mediaconch seexpr bee git-standup mercurial sqlmap carthage gitbucket mergepbx syncthing casperjs gitlab-ci-multi-runner meson tcpkali cassandra glbinding miller unison cayley gnumeric mpg123 uwsgi chaiscript goffice mpv vim ✔ cloc gssh mvtools vnu clog gucharmap mysql-search-replace wartremover compcert heroku no-more-secrets xerces-c conan highlighting-kate notmuch xonsh couchdb-lucene homebrew/dupes/make ntopng xorriso cromwell homebrew/science/allpaths-lg opensc xxhash crystal-lang homebrew/science/dealii osh yaws dasht homebrew/science/nest oysttyer yle-dl dirt homebrew/science/rstudio-server pacapt youtube-dl ✔ dmd hr pegtl zeromq docker-gen http-parser pgbouncer zinc dockutil httpie ✔ pgcli zsh-autosuggestions ==> Deleted Formulae geocouch (dashboard) : %; brew upgrade ==> Upgrading 5 outdated packages, with result: ffmpeg 3.1.1, freetds 1.00.9, httpie 0.9.4, vim 7.4.1967, youtube-dl 2016.07.05 ==> Not upgrading 3 pinned packages: postgresql 9.5.3, python 2.7.12, python3 3.5.2 ==> Upgrading ffmpeg ==> Downloading https://homebrew.bintray.com/bottles/ffmpeg-3.1.1.el_capitan.bottle.tar.gz ###### ################################################################## 100.0% ==> Pouring ffmpeg-3.1.1.el_capitan.bottle.tar.gz ==> Caveats The native FFmpeg AAC encoder has been stable since FFmpeg 3.0. If you were using libvo-aacenc or libaacplus, both of which have been dropped in FFmpeg 3.0, please consider switching to the native encoder (-c:a aac), fdk-aac (-c:a libfdk_aac, ffmpeg needs to be installed with the --with-fdk-aac option), or faac (-c:a libfaac, ffmpeg needs to be installed with the --with-faac option). See the announcement https://ffmpeg.org/index.html#removing_external_aac_encoders for details, and https://trac.ffmpeg.org/wiki/Encode/AAC on best practices of encoding AAC with FFmpeg. ==> Summary 🍺 /usr/local/Cellar/ffmpeg/3.1.1: 236 files, 50.1M ==> Upgrading freetds ==> Downloading https://homebrew.bintray.com/bottles/freetds-1.00.9.el_capitan.bottle.tar.gz ###### ################################################################## 100.0% ==> Pouring freetds-1.00.9.el_capitan.bottle.tar.gz 🍺 /usr/local/Cellar/freetds/1.00.9: 2,918 files, 20.4M ==> Upgrading httpie ==> Installing dependencies for httpie: python3 ==> Installing httpie dependency: python3 ==> Downloading https://homebrew.bintray.com/bottles/python3-3.5.2.el_capitan.bottle.tar.gz ###### ################################################################## 100.0% ==> Pouring python3-3.5.2.el_capitan.bottle.tar.gz ==> /usr/local/Cellar/python3/3.5.2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3. ==> /usr/local/Cellar/python3/3.5.2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3. ==> /usr/local/Cellar/python3/3.5.2/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3. ==> Caveats Pip, setuptools, and wheel have been installed. To update them pip3 install --upgrade pip setuptools wheel You can install Python packages with pip3 install They will install into the site-package directory /usr/local/lib/python3.5/site-packages See: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Homebrew-and-Python.md .app bundles were installed. Run `brew linkapps python3` to symlink these to /Applications. ==> Summary 🍺 /usr/local/Cellar/python3/3.5.2: 3,315 files, 50.6M ==> Installing httpie ==> Downloading https://homebrew.bintray.com/bottles/httpie-0.9.4.el_capitan.bottle.tar.gz ###### ################################################################## 100.0% ==> Pouring httpie-0.9.4.el_capitan.bottle.tar.gz 🍺 /usr/local/Cellar/httpie/0.9.4: 314 files, 4M ==> Upgrading vim ==> Installing dependencies for vim: python ==> Installing vim dependency: python ==> Downloading https://homebrew.bintray.com/bottles/python-2.7.12.el_capitan.bottle.tar.gz ###### ################################################################## 100.0% ==> Pouring python-2.7.12.el_capitan.bottle.tar.gz ==> /usr/local/Cellar/python/2.7.12/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=in ==> /usr/local/Cellar/python/2.7.12/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=in ==> /usr/local/Cellar/python/2.7.12/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=in ==> Caveats Pip and setuptools have been installed. To update them pip install --upgrade pip setuptools You can install Python packages with pip install They will install into the site-package directory /usr/local/lib/python2.7/site-packages See: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Homebrew-and-Python.md .app bundles were installed. Run `brew linkapps python` to symlink these to /Applications. ==> Summary 🍺 /usr/local/Cellar/python/2.7.12: 3,293 files, 44M ==> Installing vim ==> Downloading https://github.com/vim/vim/archive/v7.4.1967.tar.gz ==> Downloading from https://codeload.github.com/vim/vim/tar.gz/v7.4.1967 ###### ################################################################## 100.0% ==> ./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/7.4.1967/share/man --enable-multibyte --with-tlib=ncurses --enable-cscope --wit ==> make ==> make install prefix=/usr/local/Cellar/vim/7.4.1967 STRIP=true 🍺 /usr/local/Cellar/vim/7.4.1967: 1,691 files, 22.6M, built in 9 minutes 57 seconds ==> Upgrading youtube-dl ==> Downloading https://homebrew.bintray.com/bottles/youtube-dl-2016.07.05.el_capitan.bottle.tar.gz ###### ################################################################## 100.0% ==> Pouring youtube-dl-2016.07.05.el_capitan.bottle.tar.gz ==> Caveats To use post-processing options, `brew install ffmpeg` or `brew install libav`. Bash completion has been installed to: /usr/local/etc/bash_completion.d zsh completion has been installed to: /usr/local/share/zsh/site-functions ==> Summary 🍺 /usr/local/Cellar/youtube-dl/2016.07.05: 9 files, 1.5M Removing: /usr/local/Cellar/ffmpeg/3.0.2... (230 files, 47M) Removing: /usr/local/Cellar/ffmpeg/3.1... (236 files, 50.1M) Removing: /usr/local/Cellar/freetds/1.00... (2,918 files, 20.5M) Removing: /usr/local/Cellar/httpie/0.9.3... (290 files, 3.7M) Removing: /usr/local/Cellar/python/2.7.11... (6,206 files, 83.3M) Removing: /usr/local/Cellar/python3/3.4.3... (4,778 files, 72.8M) Removing: /usr/local/Cellar/vim/7.4.1952... (1,691 files, 22.6M) Removing: /usr/local/Cellar/youtube-dl/2016.06.27... (9 files, 1.5M) Removing: /Users/jspeno200/Library/Caches/Homebrew/ffmpeg-3.0.2.el_capitan.bottle.tar.gz... (18.2M) Removing: /Users/jspeno200/Library/Caches/Homebrew/ffmpeg-3.1.el_capitan.bottle.tar.gz... (19.7M) Removing: /Users/jspeno200/Library/Caches/Homebrew/freetds-1.00.el_capitan.bottle.tar.gz... (3.9M) Removing: /Users/jspeno200/Library/Caches/Homebrew/python-2.7.11.tgz... (16M) Removing: /Users/jspeno200/Library/Caches/Homebrew/vim-7.4.1952.tar.gz... (12M) Removing: /Users/jspeno200/Library/Caches/Homebrew/youtube-dl-2016.06.27.el_capitan.bottle.tar.gz... (1.2M) ==> This operation has freed approximately 372.6M of disk space.
UniqMartin commented 8 years ago

I'm sorry, but formula pinning really only works for leaf formulae that are not dependencies of other formulae. The pinning will be ignored if they are a dependency of a formula that is to be installed, because Homebrew is designed around the assumption that all formulae have been updated to their most recent version (thus an older installed version doesn't satisfy a dependency). If a dependency was left at an older version, things could quickly break in unexpected and hard to debug ways.

JohnSpeno commented 8 years ago

Thanks for the reply. Maybe we could get a change to the brew man page in the pin section that warns that this can happen. Thanks.

UniqMartin commented 8 years ago

The documentation change would need to be made in cmd/pin.rb and then the man page needs to be regenerated by running brew man. A pull request with this caveat added would be appreciated!