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

Failure to remove legacy poetry version in 5.0.6-0 rpm #2782 #2784

Conversation

phillxnet
Copy link
Member

@phillxnet phillxnet commented Jan 23, 2024

Add legacy poetry install path to avoid failing its uninstall. Without this additional path, when build.sh is run from within RPM's constrained %posttrans scriptlet, we fail to find and uninstall our prior 1.1.15 poetry version. This leads to having both poetry 1.1.15 (via upstream installer) and our new pipx installed poetry 1.7.1.

Includes:

  • Remove dangling legacy poetry symlink - apparently neglected by legacy poetry installer/uninstaller.
  • After the above there is an in-memory 'poetry' resolution to `/root/.local/bin/poetry' until path is reset. So use reset as opportunity to remove legacy paths.
  • Add echo of PATH used by remainder of build.sh.
  • Remove .venv related path from PATH as the entire directory is deleted in the %post RPM scriptlet. And build.sh (outside of development) is run after this: from %posttrans.

Testing

See the following comment in this PR's draft predecessor:
#2783 (comment)

Fixes #2782
In that we now remove the legacy Poetry, where-as previously, the mechanism to update Poetry introduced in rpm 5.0.6-0 failed in this regard. This did no show-up in development as we prove each testing rpm's install (not update) capability on the build host, and in our rpm %build scriptlet the required legacy poetry path was established before hand.

Add legacy poetry install path to avoid failing its uninstall.
Without this additional path, when build.sh is run from within
RPM's constrained %posttrans scriptlet, we fail to find and
uninstall our prior 1.1.15 poetry version. This leads to having
both poetry 1.1.15 (via upstream installer) and our new pipx
installed poetry 1.7.1.

## Includes:
- Remove dangling legacy poetry symlink - apparently
neglected by legacy poetry installer/uninstaller.
- After the above there is an in-memory 'poetry'
resolution to `/root/.local/bin/poetry' until path
is reset. So use reset as opportunity to remove
legacy path.
- Add echo of PATH used by remainder of build.sh.
- Remove .venv related path from PATH as the entire
directory is deleted in the %post RPM scriptlet. And
build.sh (outside of development) is run after this:
from %posttrans.
@phillxnet
Copy link
Member Author

@FroggyFlox & @Hooverdan96
As this essentially fixes only one part of other ongoing show-stoppers in the testing channel, i.e. the also pending db_update script PR, and its rpmbuild intergration, and they, in turn, reply on this PR's improvements/fix; I'll go ahead and merge.

We have more work to do in this area: but that is never news :).

@phillxnet phillxnet merged commit 1415363 into rockstor:testing Jan 23, 2024
@phillxnet phillxnet deleted the 2782-Failure-to-remove-legacy-poetry-version-in-5.0.6-0-rpm branch January 23, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant