The cli sync_langpacks.php returns an error

Bug #1681169 reported by Dominique-Alain JAN
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon
17.10
Fix Released
High
Unassigned

Bug Description

When I try to update the langpacks with the cli interface, e.g. for French:

    php /pathtomahara/admin/cli/sync_langpacks.php -l=fr

I get the following error: Invalid argument, /var/maharadata/temp/fr-17.04_STABLE.tar cannot be found.

The full message display is:

Version de Mahara pour accéder à la version ad hoc des paquets de langue « 17.04 »
================== fr ==================
Le paquet de langue « fr » est déjà installé : true
Faire une sauvegarde ? true
URL du paquet de langue « http://langpacks.mahara.org/fr-17.04_STABLE.tar.gz »
Enregistrement du paquet de langue « fr-17.04_STABLE.tar.gz » dans un dossier temporaire
Sauvegarde de la langue « fr » effectuée
*** ATTENTION *** Impossible d'extraire les fichiers depuis « fr-17.04_STABLE.tar ». La raison est : Invalid argument, /var/maharadata/temp/fr-17.04_STABLE.tar cannot be found
------------------------------------------
Terminé

In the temp folder I have the following files:

fr-17.04_STABLE.tar.gz
fr-17.tar

It seems that the script is looking for a file in tar format where the file present in the temp folder is in gz format.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7607

Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Dajan

Yep - there is a bug in the extraction bit of the CLI script. It gets confused between the dots in the extension and other dots in the file name.

I've added a patch to deal with this; https://reviews.mahara.org/#/c/7607/1

Please test

Cheers

Robert

Changed in mahara:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Robert Lyon (robertl-9)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7607
Committed: https://git.mahara.org/mahara/mahara/commit/00c5b0f83cfa5f1e65af9b6c40d688d0544ad388
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 00c5b0f83cfa5f1e65af9b6c40d688d0544ad388
Author: Robert Lyon <email address hidden>
Date: Mon Apr 10 09:42:59 2017 +1200

Bug 1681169: Dealing with filenames containing dots

The PharData decompress is now having issues with what is the
extension and what isn't in the filename

behatnotneeded - CLI function

Change-Id: Iafa044d11f00d8472b7c5338b380c67287d44760
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/7644

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7644
Committed: https://git.mahara.org/mahara/mahara/commit/e18ca0ca62384214c7f6853563c107dc68b8bd3d
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit e18ca0ca62384214c7f6853563c107dc68b8bd3d
Author: Robert Lyon <email address hidden>
Date: Mon Apr 10 09:42:59 2017 +1200

Bug 1681169: Dealing with filenames containing dots

The PharData decompress is now having issues with what is the
extension and what isn't in the filename

behatnotneeded - CLI function

Change-Id: Iafa044d11f00d8472b7c5338b380c67287d44760
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 00c5b0f83cfa5f1e65af9b6c40d688d0544ad388)

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.