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!
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!
FS#12677 - [klibc] provides line fails if built using makepkg -L
Attached to Project:
Arch Linux
Opened by Baho Utot (baho-utot) - Sunday, 04 January 2009, 23:21 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 21 October 2009, 16:51 GMT
Opened by Baho Utot (baho-utot) - Sunday, 04 January 2009, 23:21 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 21 October 2009, 16:51 GMT
|
DetailsDescription:
When building klibc with "makepkg -L", the provides variable that is defined within the build function does not get written into the .PKGINFO file. This is due to the use of the tee functions, which means any variables defined within the build function become cleared once it has finished. Original report: Failed dependency this fails: depends=('coreutils' 'klibc' $(basename /lib/klibc-*.so .so)) this works: depends=('coreutils' 'klibc') Additional info: * package version: current abs Steps to reproduce: makepkg -c |
This task depends upon
PKGBUILD.patch
My guess is that klibc needs to be built twice, or something of the sort.
Thomas, can you explain and/or document this in the PKGBUILDs?
It always fails.
For exmaple I updated abs
copy klibc* to /var/abs/local
removed the basname trick
compiled klibc*
install klibc* with pacman -S kilbc*
remove local klibc*
copy klibc from abs to local
makepkg -c
Compile fails on dependency.
Remove basename trick
makpkg -c
Compile succeeds.
$ basename /lib/klibc-*.so .so
$ pacman -Qi klibc | grep Provides
?
klibc-088J8A5xVqZqloQrhjNKyTEVhY8
$ pacman -Qi klibc | grep Provides
Provides : klibc-088J8A5xVqZqloQrhjNKyTEVhY8
Seems like it'd work for me, but I don't have time to build it at the moment.
basename /lib/klibc-*.so .so
klibc-jfflyAahxqaliwAofrf_fdf5upI
$ pacman -Qi klibc | grep Provides
Provides : None
sudo pacman -Scc
sudo pacman -Syy
sudo pacman -S klibc*
warning: klibc-1.5.14-1 is up to date -- reinstalling
warning: klibc-extras-2.5-1 is up to date -- reinstalling
warning: klibc-kbd-1.15.20080312-7 is up to date -- reinstalling
warning: klibc-module-init-tools-3.4-2 is up to date -- reinstalling
warning: klibc-udev-135-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (5): klibc-1.5.14-1 klibc-extras-2.5-1 klibc-kbd-1.15.20080312-7
klibc-module-init-tools-3.4-2 klibc-udev-135-1
Total Download Size: 2.72 MB
Total Installed Size: 14.76 MB
Proceed with installation? [Y/n] y
:: Retrieving packages from i686...
klibc-1.5.14-1-i686 2.5M 56.7M/s 00:00:00 [######################] 100%
klibc-extras-2.5-1-i686 10.6K 8.3M/s 00:00:00 [######################] 100%
klibc-kbd-1.15.2008... 39.3K 26.7M/s 00:00:00 [######################] 100%
klibc-module-init-t... 27.9K 20.5M/s 00:00:00 [######################] 100%
klibc-udev-135-1-i686 101.3K 42.2M/s 00:00:00 [######################] 100%
checking package integrity...
(5/5) checking for file conflicts [######################] 100%
(1/5) upgrading klibc [######################] 100%
(2/5) upgrading klibc-extras [######################] 100%
(3/5) upgrading klibc-kbd [######################] 100%
(4/5) upgrading klibc-module-init-tools [######################] 100%
(5/5) upgrading klibc-udev [######################] 100%
basename /lib/klibc-*.so .so
klibc-jfflyAahxqaliwAofrf_fdf5upI
pacman -Qi klibc | grep Provides
Provides : None
What about:
$ pacman -Qip /var/cache/pacman/pkg/klibc-1.5.14-1-i686.pkg.tar.gz | grep Provides
?
Do you have an older makepkg, by chance?
pacman 3.2.1-2
pacman-mirrorlist 20081213-1
This line in the PKGBUILD must be failing for some reason:
provides[${#provides[@]}]="$(basename $startdir/pkg/lib/klibc-*.so .so)"
export provides
echo "$(basename $startdir/pkg/lib/klibc-*.so .so)"
for p in ${provides[@]}; do echo "provide => $p"; done
1 .makepkg -cf --log
2. makeworld --clean --noconfirm --log --syncdeps --rmdeps ${I686_PKG_REPOS} .
3. makepkg -cf
Look at the .PKGINFO files, the only one that has the provides line is the one without the --log parameter
can some one else test this as well?
makepkg -cf --log
klibc-jfflyAahxqaliwAofrf_fdf5upI
provide => klibc-jfflyAahxqaliwAofrf_fdf5upI
.PKGINFO lists:
# Generated by makepkg 3.2.1
# using fakeroot version 1.10.1
# Tue Jan 6 23:26:18 UTC 2009
pkgname = klibc
pkgver = 1.5.14-1
pkgdesc = A minimal libc made for early-userspace
url = http://www.kernel.org/pub/linux/libs/klibc/
builddate = 1231284378
packager = Baho Utot <baho-utot@bildanet.com>
size = 14983168
arch = i686
license = BSD
group = base
makeworld --clean --noconfirm --log --syncdeps --rmdeps ${I686_PKG_REPOS} .
klibc-jfflyAahxqaliwAofrf_fdf5upI
provide => klibc-jfflyAahxqaliwAofrf_fdf5upI
.PKGINFO lists:
# Generated by makepkg 3.2.1
# using fakeroot version 1.10.1
# Tue Jan 6 23:37:21 UTC 2009
pkgname = klibc
pkgver = 1.5.14-1
pkgdesc = A minimal libc made for early-userspace
url = http://www.kernel.org/pub/linux/libs/klibc/
builddate = 1231285041
packager = Baho Utot <baho-utot@bildanet.com>
size = 14983168
arch = i686
license = BSD
group = base
makepkg -cf
klibc-jfflyAahxqaliwAofrf_fdf5upI
provide => klibc-jfflyAahxqaliwAofrf_fdf5
# Generated by makepkg 3.2.1
# using fakeroot version 1.10.1
# Tue Jan 6 23:45:19 UTC 2009
pkgname = klibc
pkgver = 1.5.14-1
pkgdesc = A minimal libc made for early-userspace
url = http://www.kernel.org/pub/linux/libs/klibc/
builddate = 1231285518
packager = Baho Utot <baho-utot@bildanet.com>
size = 14983168
arch = i686
license = BSD
group = base
provides = klibc-jfflyAahxqaliwAofrf_fdf5upI
tpowa, do you use --log as well?
makepkg -cf works, proper provides line in the .PKGINFO
makepkg -cf --log doesn't, improper provides line in the .PKGINFO
makepkg -cf 2>&1 | tee water.logged works, proper provides line in the .PKGINFO
How is logging done in makepkg, I have not had a look at the source
Maybe some one to look into pacmans --log parameter
####
FOO=a
test() {
export FOO=b
}
test
echo $FOO #should be b
FOO=a
test | tee /dev/null
echo $FOO #should be a
####
due to this, the exporting in the build function fails.... Dan, didn't we fix something similar somewhere?
I have looked at the resulting log files from successfull and unsuccessfull builds and noticed that all the log file are truncated or not flushed upon closing.
This the tail from the log file from makepkg -cf 2>&1 | tee water.logged
usr/utils/shared/poweroff
==> Tidying install...
-> Removing info/doc files...
==> Creating package...
-> Generating .PKGINFO file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: klibc 1.5.14-1 i686 (Tue Jan 6 19:21:39 EST 2009)
==> Cleaning up...
This the tail from the log file from makepkg -cf --log
INSTALL usr/utils/shared/chroot usr/utils/shared/dd usr/utils/shared/mkdir usr/utils/shared/mkfifo usr/utils/shared/mknod usr/utils/shared/mount usr/utils/shared/pivot_root usr/utils/shared/umount usr/utils/shared/true usr/utils/shared/false usr/utils/shared/sleep usr/utils/shared/ln usr/utils/shared/nuke usr/utils/shared/minips usr/utils/shared/cat usr/utils/shared/uname usr/utils/shared/halt usr/utils/shared/readlink usr/utils/shared/sync usr/utils/shared/dmesg usr/utils/shared/reboot usr/utils/shared/poweroff
klibc-jfflyAahxqaliwAofrf_fdf5upI
provide => klibc-jfflyAahxqaliwAofrf_fdf5upI
Notice it did not finish no tidy/compressing etc.
But the provide test that Aaron had me add to the end of the build section in the PKGBUILD file is there.
The mystery deepens
We at least have a workaround for this bug- don't build with "makepkg --log", so I don't think this is critical to fix.
Cover your eyes, but here is the beautiful hack Aaron was thinking of: http://dev.archlinux.org/~allan/gitweb/gitweb.cgi?p=pacman.git;a=commitdiff;h=626c75097b75be4e64890b65a4145b391d76f91f
I have patched makeworld to leave the makepkg.log file so that you get log files into the package build subdirectory
by removing "a $toplevel/" from this
PKGDEST="$dest" makepkg $MAKEPKG_OPTS -m 2>&1 1>&2 | tee a $toplevel/makepkg.log
to
PKGDEST="$dest" makepkg $MAKEPKG_OPTS -m 2>&1 1>&2 | tee makepkg.log
That gives you a log file to mimic makepkg -c --log
This will not be fixed in pacman trunk as the ugly (but working!) hack mentioned above is only used in the makepkg run_package() function and not the run_build() one. Once pacman-3.3 is out, I am going to look into merging these together so that adding a check() function to the PKGBUILD does not duplicate more code.
But... the build currently fails:
The 'linux' symlink is missing; it should point to a kernel tree
configured for the i386 architecture.
make: *** [linux] Error 1
Edit: fixed attachement
So, can I just push the PKGBUILD to SVN to fix _this_ bug or should we rebuild all that klibc packages to have a working build with the updated _kver?
http://repos.archlinux.org/wsvn/packages/?compare[]=%2Fklibc%2Ftrunk%2F%4056331&compare[]=%2Fklibc%2Ftrunk%2F%4041787&comparesubmit=Compare+Revisions&op=comp