[BUG] 3000.0 pkg.latest state does not work on macOS
Open
Nobody has claimed this yet.
bug
MacOS
severity-high
State-Module
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
Using pkg.latest state fails to upgrade packages using brew.
Setup
install_git.sls:
Install or upgrade git:
pkg.latest:
- name: git
OS: macOS 10.13.6
salt-master/minion: 3000 (installed via brew, run via launchd plist)
git: 2.24.0 (installed previously via brew)
Steps to Reproduce the behavior
Run sudo salt '<target machine>' state.apply install_git.
mini2:
----------
ID: Install git
Function: pkg.latest
Name: git
Result: False
Comment: An error was encountered while installing package(s): Brew command failed. Additional info follows:
result:
----------
pid:
57932
retcode:
1
stderr:
Updating Homebrew...
Error: git 2.24.0 is already installed
To upgrade to 2.26.1, run `brew upgrade git`.
stdout:
Started: 17:11:32.986756
Duration: 15156.012 ms
Changes:
Summary for mini2
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 15.156 s
Expected behavior
The package should be upgraded properly using brew upgrade.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3000
Dependency Versions:
cffi: 1.13.2
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.10.3
libgit2: 0.99.0
M2Crypto: 0.35.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.2
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 1.1.1
Python: 3.7.7 (default, Mar 10 2020, 15:43:27)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 18.1.1
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.2
System Versions:
dist:
locale: UTF-8
machine: x86_64
release: 17.7.0
system: Darwin
version: 10.13.6 x86_64
Additional context
I think this issue is related: #56609
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.