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#19192 - $startdir is not set within makechrootpkg

Attached to Project: Arch Linux
Opened by Andreas (drschwalbenmann) - Wednesday, 21 April 2010, 11:28 GMT
Last edited by Pierre Schmitz (Pierre) - Sunday, 02 May 2010, 13:24 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
$startdir is not set within makechrootpkg

Additional info:
* devtools 0.9.5-1
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Sunday, 02 May 2010, 13:24 GMT
Reason for closing:  Fixed
Comment by Allan McRae (Allan) - Wednesday, 21 April 2010, 11:49 GMT
Any chance you can give some actual details for your bug report? And it appears you are wrong:

PKGBUILD extract:
build() {
echo $startdir
echo $srcdir
echo $pkgdir
}

makechrootpkg output:
...
==> Starting build()...
/build
/build/src
/build/pkg
Comment by Ionut Biru (wonder) - Wednesday, 21 April 2010, 12:31 GMT
i supposed his PKGBUILD is faulty and he doesn't have all his patches/files to sources array and makechrootpkg is not copying his file into chroot
Comment by Andreas (drschwalbenmann) - Wednesday, 21 April 2010, 12:57 GMT
ohhh, my fault the problem is not the incorrect $startdir but the local src files are not copied to chroot

$ sudo makechrootpkg -r /media/data/arch32/ -- --noconfirm
==> Making package: rar 3.9.3-4 i686 (Wed Apr 21 12:53:42 UTC 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
-> Downloading rarlinux-3.9.3.tar.gz...
--2010-04-21 12:53:42-- http://www.rarlab.com/rar/rarlinux-3.9.3.tar.gz
Resolving www.rarlab.com... 217.70.129.242
Connecting to www.rarlab.com|217.70.129.242|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 833828 (814K) [application/x-gzip]
Saving to: `rarlinux-3.9.3.tar.gz.part'

100%[============================================================================================================================================>] 833,828 898K/s in 0.9s

2010-04-21 12:53:45 (898 KB/s) - `rarlinux-3.9.3.tar.gz.part' saved [833828/833828]

==> ERROR: rar.1 was not found in the build directory and is not a URL.
Build failed, check /media/data/arch32/copy/build
[andreas@neosalio rar]$ ls
PKGBUILD rar.1 rarlinux-3.9.3.tar.gz
[andreas@neosalio rar]$ ls /media/data/arch32/copy/build/
PKGBUILD src
Comment by Ionut Biru (wonder) - Wednesday, 21 April 2010, 13:01 GMT
like i said, add the file to sources array in PKGBUILD and use $srcdir/rar.1 to access it.
Comment by Andreas (drschwalbenmann) - Wednesday, 21 April 2010, 13:08 GMT Comment by Allan McRae (Allan) - Wednesday, 21 April 2010, 13:33 GMT
Ah... now we get some actual info about the bug...

The issue is makepkg.conf is not sourced by makechrootpkg so CARCH is unset at the point the PKGBUILD is sourced and so the source array appears to be empty.

Adding:
CARCH=$(grep '^CARCH=' /etc/makepkg.conf | cut -d= -f2)

should fix that.
Comment by Andreas (drschwalbenmann) - Wednesday, 21 April 2010, 16:33 GMT
With this line the problem is not solved completely.
It still didn't copy the file.
Comment by Andreas (drschwalbenmann) - Wednesday, 21 April 2010, 16:44 GMT
this solved the problem for me:

CARCH=$(grep '^CARCH=' "$copydir/etc/makepkg.conf" | cut -d= -f2 | sed 's|"||g')
Comment by Pierre Schmitz (Pierre) - Wednesday, 21 April 2010, 16:50 GMT
Why not just CARCH=$(eval $(grep '^CARCH=' "$copydir/etc/makepkg.conf")) then? This should catch all cases with ', " or without them.
Comment by Andreas (drschwalbenmann) - Wednesday, 21 April 2010, 16:54 GMT
don't know why but i always had "i686" (with quotation marks) as value of $CARCH

Loading...