Fix restoration error with pip cache

This commit is contained in:
Josué Tille 2020-03-27 13:25:40 +01:00
parent b537e0fe26
commit 1e2e1742d7
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
2 changed files with 9 additions and 7 deletions

View file

@ -23,6 +23,8 @@ install_dependance() {
ynh_install_app_dependencies python2.7 python-pip libpython2.7 python-setuptools python-ldap python-urllib3 python-simplejson python-imaging python-mysqldb python-flup expect python-requests python-dev ffmpeg python-memcache \
libjpeg62-turbo-dev zlib1g-dev # For building pillow
ynh_add_swap 2000
# We need to do that because we can have some issue about the permission access to the pip cache without this
set_permission
# Note that we install imageio to force the dependance, without this imageio 2.8 is installed and it need python3.5
sudo -u $seafile_user pip install --user --upgrade Pillow 'moviepy<1.0' 'imageio<2.8' certifi idna
ynh_del_swap

View file

@ -67,6 +67,12 @@ ynh_app_setting_set --app $app --key installed_version --value $seafile_version
# STANDARD MODIFICATIONS
#=================================================
ynh_script_progression --message="Creating base directory..."
mkdir -p $final_path
mkdir -p $final_path/installed
mkdir -p $final_path/logs
mkdir -p $final_path/seafile-data
# Create User
ynh_script_progression --message="Configuring system user..."
ynh_system_user_create --username $seafile_user --home_dir $final_path
@ -75,16 +81,10 @@ ynh_system_user_create --username $seafile_user --home_dir $final_path
ynh_script_progression --message="Installing dependencies..." --weight=7
install_dependance
# Copy files to the right place
# Clean data directory
ynh_script_progression --message="Cleaning data directory..."
test -e $seafile_data && ynh_secure_remove --file="$seafile_data"
ynh_script_progression --message="Creating base directory..."
mkdir -p $final_path
mkdir -p $final_path/installed
mkdir -p $final_path/logs
mkdir -p $final_path/seafile-data
# Download new version from sources
ynh_script_progression --message="Installing sources files..." --weight=7
install_source