Ease restrictions on installing into non-empty site directories.
Review Request #12997 — Created April 30, 2023 and updated
Information | |
---|---|
chipx86 | |
Review Board | |
release-5.0.x | |
Reviewers | |
reviewboard | |
rb-site install
will now permit installing into a site directory that
contains only avenv
folder. This is to enable deployments where a
virtual environment is first set up in the destination sitedir, and then
the installedrb-site
is used to populate the sitedir.There's also a
--allow-non-empty-sitedir
option for advanced use,
which bypasses the empty sitedir check.
Tested installing into a populated sitedir. It gave me the expected error.
Tested installing into a new location. Installation was allowed.
Tested installing into a directory containing just a
venv
directory.
Installation was allowed.Tested installing into an empty directory. Installation was allowed.
Tested installing into a populated sitedir and using
--allow-non-empty-sitedir
. Installation was allowed.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
I think it's somewhat confusing to have the conditional be in the assignment to site_contents. How about we do: site_contents … |
|
Testing Done: |
|
---|
-
-
reviewboard/cmdline/rbsite.py (Diff revision 1) I think it's somewhat confusing to have the conditional be in the assignment to
site_contents
. How about we do:site_contents = os.listdir(install_dir) if (site_contents and site contents != ['venv'] and not options.allow_non_empty_sitedir): ...
Change Summary:
Simplified the logic for determining whether a directory can be installed into.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+42 -6) |