From eccb239dd45c793db9ae67412cfa13fcfda21cd5 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Fri, 2 Nov 2018 11:56:01 +0800 Subject: [PATCH] Refine Vagrantfile Major change is to create a dedicated Python virtual environment for MBS instead of installing required packages (listed in requirements) into system site-packages directory. This would be convenient for developer to install other Python packages via package manager, for example to install rhpkg. I found an issue when I installed rhpkg in original Vagrant machine, that is whole kobo package is installed via pip, and `dnf install rhpkg' will result in python2-kobo is installed and then it fails to import module kobo.rpmlib. The fix is I have to install python2-kobo-rpmlib via dnf again. With this change, this issue could be avoided. Two environments are separated rather than mixed together. Another two minor improvements base on this change are, after logging into the machine, 1) the virtual environment is activated automatically, and 2) change working directory to /opt/module_build_service. Signed-off-by: Chenxiong Qi --- Vagrantfile | 62 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 156bab76..88b505dd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,5 +1,5 @@ # -*- mode: ruby -*- -# vi: set ft=ruby : +# vi: set ft=ruby ts=2 sw=2 ai et: $script = <