Summary: | sysutils/py-salt is not unique: pkg overwrites current package with different python version | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | TAO ZHOU <zhoutao> |
Component: | Individual Port(s) | Assignee: | Kirill Ponomarev <krion> |
Status: | New --- | ||
Severity: | Affects Many People | CC: | brd, christer.edwards, krion, w.schwarzenfeld, zhoutao |
Priority: | --- | Flags: | linimon:
maintainer-feedback?
(krion) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
TAO ZHOU
2017-12-18 01:12:05 UTC
Sorry, I was wrong. This has nothing to do with python, but pkg itself. If the current installed pkg is py36-salt, when I run pkg install sysutils/py-salt, it will install py27-salt. if the current install pkg is py27-salt, when I run pkg install sysutils/py-salt, it will install py36-salt. I am curious, why you have a Salt state that installs salt? If you want 36, why not just `pkg install -y py36-salt' ? @brad That's to ensure every machine have the same version of salt running. that's not important. Even if I run by hand 'pkg install sysutils/py-salt, it have the same problem. If the current installed package is py27-salt, it will install py36-salt. And when you run it again, it will install py-salt. I cannot specify the flavor in the package name, say if I do 'pkg install sysutils/py36-salt or py27-salt, it will say the package does not exist. I am not sure if this is bug of pkg or could it be the way I build the packages with poudiere. What happens if you do: pkg upgrade sysutils/py-salt Hmm, no that doesn't work either.. The main problem is that sysutils/py-salt is not unique: # pkg search -f sysutils/py-salt |grep '^Name' Name : py36-salt Name : py27-salt So, of course, pkg install sysutils/py-salt does not work as you could expect, or want. The problem is If I do pkg install sysutils/py36-salt, it will say 'pkg: No packages available' So I have to use 'sysutils/py-salt' as the package name in my script, which will cause problem is the script was executed a second time. This is a "mean" thing. The trick is, make the command without category: python3.6 -c "import subprocess;subprocess.Popen(['pkg', 'install', '-y', 'py36-salt'])". This is working. this is not a pkg bug, if a fix/change needs to be done, it is on the way the python ports are dealt with. |