Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#29657 - makepkg Directory Problem

Attached to Project: Arch Linux
Opened by Anthony (Amzo) - Sunday, 29 April 2012, 11:02 GMT
Last edited by Allan McRae (Allan) - Sunday, 29 April 2012, 12:06 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

when running makepkg from within a directory that contains a space in the name. The build fails as it is unable to change into this directory.

==> Starting build()...
/home/amzo/Source Files/cw/PKGBUILD: line 19: cd: /home/amzo/Source: No such file or directory
==> ERROR: A failure occurred in build().
Aborting...

makepkg (pacman) 4.0.3

Steps to reproduce.

Run makepkg from within a directory that contains a space in it's name.
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 29 April 2012, 12:06 GMT
Reason for closing:  Not a bug
Comment by Ionut Biru (wonder) - Sunday, 29 April 2012, 11:09 GMT
paste PKGBUILD. the error is in there.
you should quote properly $pkgdir and $srcdir
Comment by Anthony (Amzo) - Sunday, 29 April 2012, 11:16 GMT
The original PKGBUILD file didn't quote the pkgdir or the srcdir. But even after quoting. It still fails to change into the directory that contains spaces.

The Original PKGBUILD file:

https://aur.archlinux.org/packages/cw/cw/PKGBUILD

With all the variables quoted: I get this error now.

* Installing color wrapper...
/usr/bin/install: cannot stat ‘/home/amzo/Source’: No such file or directory
/usr/bin/install: cannot stat ‘/home/amzo/Source’: No such file or directory
Comment by Ionut Biru (wonder) - Sunday, 29 April 2012, 11:20 GMT
like i said, paste your testing PKGBUILD.
Comment by Anthony (Amzo) - Sunday, 29 April 2012, 11:22 GMT
Okay, but the PKGBUILD is from AUR. I never changed anything of the above, until you asked to quote the variables. So here is the copy of the PKGBUILD I posted above with the quotes.


# Mantainer: William Díaz <wdiaz[at]archlinux[dot]us>

pkgname=cw
pkgver=1.0.16
pkgrel=1
pkgdesc="A non-intrusive ANSI color wrapper for common unix-based commands on GNU/linux."
url="http://sourceforge.net/projects/cwrapper/"
license=('GPL2')
arch=('i686' 'x86_64')
depends=()
makedepends=('patch')
install=cw.install
source=("http://cwrapper.sourceforge.net/${pkgname}-${pkgver}.tar.bz2"
"${pkgname}.patch")
md5sums=('142a1e9a25abbb01c3b90091d0bf68fd'
'5c54fab22fdb0601e6e4fb3fa87c435d')

build() {
cd "${srcdir}"/"${pkgname}"-"${pkgver}"

install -d "${pkgdir}"/usr/bin \
"${pkgdir}"/usr/share/man/man1 \
"${pkgdir}"/usr/share/doc/cw

msg "Patching Files"
patch -Np1 -i "${srcdir}"/"${pkgname}".patch || return 1

./configure --prefix=/usr || return 1
}

package() {
cd "${srcdir}"/"${pkgname}"-"${pkgver}"

make DESTDIR="${pkgdir}" install || return 1

# Deleting the problematic files
rm -R "${pkgdir}"/usr/lib/"${pkgname}"/{file,gcc,g++,stat,du}

cp CHANGES CONTRIB INSTALL README PLATFORM \
"${pkgdir}"/usr/share/doc/cw

ln -sf /usr/bin/cw "${pkgdir}"/usr/bin/cwe
}
Comment by Allan McRae (Allan) - Sunday, 29 April 2012, 12:06 GMT
Ugh...

the patch adds support for installing the files to DESTDIR to the Makefile and that is the cause of the issue.

Not makepkg's fault.

Loading...