Make mbslave compatible with Windows (without WSL)
The problem: in the run_script function, the shell is (unnecessarily) hard-coded to bash. When run on Windows, this triggers the Windows subsystem for Linux that not everyone may have set up.
The solution: use the shell=True parameter of subprocess.run rather than hard-coding to bash.
This should not break anything (correct me if i'm wrong).
The problem: When importing, the call to connect to the database was wrong (connect_database is not defined).
The solution: Corrected the call like already suggested in that issue.
Fix the triggers on l_area_area table
The problem: These triggers contain not fully-qualified references to table "link" in the musicbrainz schema.
That led, for me, to the data import failing on the l_area_area table because the table "link" was not found.
The solution: Added a command to set the postgres search_path to include the musicbrainz schema upon database creation (if this schema is not ignored).
If i should split the PR, let me know. But i felt uncomfortable making so many PRs with each of them having so little code changes.
The following is addressed by this PR:
Make mbslave compatible with Windows (without WSL)
The problem: in the run_script function, the shell is (unnecessarily) hard-coded to
bash
. When run on Windows, this triggers the Windows subsystem for Linux that not everyone may have set up.The solution: use the
shell=True
parameter ofsubprocess.run
rather than hard-coding tobash
. This should not break anything (correct me if i'm wrong).fix https://github.com/acoustid/mbdata/issues/60
The problem: When importing, the call to connect to the database was wrong (connect_database is not defined).
The solution: Corrected the call like already suggested in that issue.
Fix the triggers on
l_area_area
tableThe problem: These triggers contain not fully-qualified references to table "link" in the
musicbrainz
schema. That led, for me, to the data import failing on the l_area_area table because the table "link" was not found.The solution: Added a command to set the postgres
search_path
to include themusicbrainz
schema upon database creation (if this schema is not ignored).If i should split the PR, let me know. But i felt uncomfortable making so many PRs with each of them having so little code changes.