FS#50285 - [pacman] repo-add doesn't work with directories containing spaces

Attached to Project: Pacman
Opened by Muflone (muflone) - Saturday, 06 August 2016, 16:53 GMT
Last edited by Allan McRae (Allan) - Tuesday, 11 October 2016, 10:11 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version 5.0.2
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When I try to add some files to a custom repository whose directory contains spaces some errors are shown:

/usr/bin/repo-add: line 652: pushd: /media/Dati/Owncloud: No such file or directory
/usr/bin/repo-add: line 690: popd: directory stack empty


Additional info:
* pacman 5.0.1-4

Steps to reproduce:

$ pwd
/media/Dati/Owncloud Muflone/Arch Linux Repositories/mysql/i686

$ LANG=C repo-add foo.db.tar *.xz
==> Adding package 'libmysqlclient-5.7.14-1-i686.pkg.tar.xz'
-> Adding package signature...
-> Computing checksums...
-> Creating 'desc' db entry...
-> Creating 'files' db entry...
==> Adding package 'mysql-5.7.14-1-i686.pkg.tar.xz'
-> Adding package signature...
-> Computing checksums...
-> Creating 'desc' db entry...
-> Creating 'files' db entry...
==> Adding package 'mysql-clients-5.7.14-1-i686.pkg.tar.xz'
-> Adding package signature...
-> Computing checksums...
-> Creating 'desc' db entry...
-> Creating 'files' db entry...
==> Creating updated database file 'foo.db.tar'
/usr/bin/repo-add: line 652: pushd: /media/Dati/Owncloud: No such file or directory
/usr/bin/repo-add: line 690: popd: directory stack empty

==> ERROR: An unknown error has occurred. Exiting...
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 11 October 2016, 10:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit 07d1e044
Comment by Muflone (muflone) - Saturday, 06 August 2016, 16:54 GMT
Wrong patch file, please ignore
Comment by Muflone (muflone) - Saturday, 06 August 2016, 16:55 GMT
Simple fix proposed #2

Loading...