Closed lowell80 closed 1 year ago
BTW, I can confirm the behavior looks the same on other package manager poetry. binary executables and other files are removed from the venv/bin directory.
Just trying to rule out any pip-only issues. HTH
Reproduce
pipx install poetry
poetry new ksconf-test
cd ksconf-test
poetry shell
poetry add ksconf
poetry env info
cd to virtualenv.path displayed, confirm binary ksconf present
cd ~/ksconf-test
poetry add ksconf-splunk-conf==0.10b4
cd to virtualenv.path displayed, confirm binary ksconf missing
Thanks for confirming that for me. That's helpful to know. I generally stick with pip, but have heard of poetry, just never taken the dive myself.
I may just have to push forward and explain/document the one-time workaround (re-install). It's annoying, but I don't want to continue holding up the next release when there may not be a great solution, and the workaround is pretty simple.
Closing this issue as v0.10 has been release.
The build automation simply builds and releases two package with the exact same content (ksconf + kintyre-splunk-conf). The only difference between the two is the README. Eventually we'll add deprecation warnings in the ksconf-splunk-conf
package telling everyone to upgrade to ksconf
. The final ksconf-splunk-conf
release may just "require" the new ksconf
package. At that point, hopefully the only references to the old name are old automation jobs (and for fresh-installs, the package dependency approach works fine anyways).
The problem
Upgrading the
kintyre-splunk-conf
package to version 0.10 breaks theksconf
command with a "command not found" message. Upgrade was done usingpip
.Environment
Details
Copying from the release notes:
That's how I want it to work, The older
kintyre-splunk-conf
becomes a "stub" that simply causes the newerksconf
package to be installed. However what happens is that the pip package inventory shows that itkintyre-splunk-conf
was updated andksconf
was installed (both which show the same version #), but the act of upgrades cause things to break. I think it's because the same file are involved with both, so pip seems to get confused about which app owns the files. The end result is that all of the shared*.py
files (which is 90%+ of the code base) is missing in the installation folder. Forcing a re-install fixes it. (So the default behavior of simply runningpip install -U kintyre-splunk-conf
results in the executable breaking.). I couldn't find any other python packages out there that have done this kind of thing and how they've gotten around this problem.My other approach is to release both packages with identical content (other than package metadata, of course), and force users to manually switch between to the new package name eventually. I don't really like this approach as much, but I guess it's better than breaking existing installs.
Requesting help of python packaging experts for guidance!
Steps To Reproduce Issue
kintyre-splunk-conf
via pip. (Assuming 0.9.x, but any earlier version would likely result in a similarly broken install)kintyre-splunk-conf
(past version 0.10)ksconf
is now dead :-(Commands
Example terminal output
Fix command:
Alternate fix once in a broken state:
Workaround
Pip issue???
I think the core issue is the order in which
pip
is performing the operations. Because bothkintyre-spunk-conf
andksconf
share most of the same files, the fact that pip uninstallskintyre-splunk-conf-0.9.3
after it installs ksconf.... ctually, it thinks thatksconf
is already installedksconf==0.10.0-beta4
(Requirement already satisfied). So maybe it just never get's installed. (Explicitly just tellingpip install ksconf
doesn't work either, it really thinks it installed it already, so this all feels very weird.)I'm not sure if there's a packaging change that can fix this?