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#16181 - [devtools] makechrootpkg fails copying packages with splitting

Attached to Project: Arch Linux
Opened by Allan McRae (Allan) - Monday, 14 September 2009, 11:55 GMT
Last edited by Allan McRae (Allan) - Saturday, 19 September 2009, 04:03 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Aaron Griffin (phrakture)
Allan McRae (Allan)
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 you have something like

pkgname=('foo' 'foo-bar')

where one package name is a substring of the other, makechrootpkg fails to copy the substring package out of the chroot. e.g. the current ruby package:

/home/allan/bin/makechrootpkg64: line 245:
[: /home/stable-x86_64/union/pkgdest/ruby-1.9.1_p243-1-x86_64.pkg.tar.gz:
binary operator expected

The line number might be wrong but close... but here is the error lines:

for _pkgname in ${pkgname[@]}; do
pkgfile="${chrootdir}"/union/pkgdest/${_pkgname}-*${PKGEXT}
...
if [ -e $pkgfile ]; then
if [ -n "$PKGDEST" ]; then


This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 19 September 2009, 04:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  in git commit 06b02906
Comment by Ionut Biru (wonder) - Monday, 14 September 2009, 13:14 GMT
i had that too:

/usr/sbin/makechrootpkg: line 240: [: /home/ioni/arch/arch/union/pkgdest/virtualbox-ose-3.0.6-1-i686.pkg.tar.gz: binary operator expected
Comment by Eric Belanger (Snowman) - Monday, 14 September 2009, 18:10 GMT
The problem is probably caused by the -* in that line. We might need to replace it by the pkgver and pkgrel variables explicitely.
Comment by Allan McRae (Allan) - Monday, 14 September 2009, 23:31 GMT
But there will come a time when pkgrel (and maybe pkgver) can be different in split packages.

How about some sort of regex like "${_pkgname}-[0-9]*-[0-9]*-*${PKGEXT}". That is a really bad example... but works for ruby.
Comment by Eric Belanger (Snowman) - Tuesday, 15 September 2009, 01:13 GMT
Technically, using something like ${pkgfile%% *} instead of using $pkgfile should work. But it doesn't work in the script. I can't see why.


Comment by Aaron Griffin (phrakture) - Wednesday, 16 September 2009, 22:57 GMT
Any possible issues with just using *$PKGEXT?
Comment by Allan McRae (Allan) - Wednesday, 16 September 2009, 23:58 GMT
Nope, to simple... I think we should stick we some kind of regex that does not work rather than use that :D

It would also fix the adding package to the union repo part when pkgrels can vary in split packages.
Comment by Eric Belanger (Snowman) - Thursday, 17 September 2009, 00:00 GMT
If "${chrootdir}"/union/pkgdest/ only contains the packages that we just built (which I think it does), then *$PKGEXT would be OK.
Comment by Aaron Griffin (phrakture) - Friday, 18 September 2009, 19:04 GMT
Yeah that's what I was thinking. The whole point of using srcdest and pkgdest in the chroot is that you can just cp everything from there. It works for the source array, right?
Comment by Eric Belanger (Snowman) - Friday, 18 September 2009, 19:39 GMT
It works for the source. So it should work for the packages. I'll make a patch.
Comment by Eric Belanger (Snowman) - Friday, 18 September 2009, 21:48 GMT
patch sent on ML.

Loading...