Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117902 - maven-bin-2.0.1 /usr/bin/mvn symlink issue.
Summary: maven-bin-2.0.1 /usr/bin/mvn symlink issue.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Java team
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-05 08:09 UTC by Joe Suhre
Modified: 2006-01-05 18:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
output of a faild build with current e-build (emerge_failed.txt,3.83 KB, text/plain)
2006-01-05 08:12 UTC, Joe Suhre
Details
Successful build with new ebuild (emerge_success.txt,3.43 KB, text/plain)
2006-01-05 08:13 UTC, Joe Suhre
Details
ebuild which corrects the issue. (maven-bin-2.0.1.ebuild,920 bytes, text/plain)
2006-01-05 08:14 UTC, Joe Suhre
Details
maven-bin-2.0.1.ebuild.patch (maven-bin-2.0.1.ebuild.patch,312 bytes, patch)
2006-01-05 09:09 UTC, Joe Suhre
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Suhre 2006-01-05 08:09:06 UTC
When meregeing maven-bin-2.0.1 it was failing to create a symlink from /usr/share/[maven_dir]/bin/mvn to /usr/bin/mvn. I looked over the e-build and found the problem to be with the use of the dosym durring the src_install function. I believe the cause is that dosym prepends ${D} to the paths. insted i moved the linking to a pgk_postinst function and used 'ln' instead of dosym.

I'll attach a log of a faild e-build, my updated e-build and a successful run as well as my emerge info.
Comment 1 Joe Suhre 2006-01-05 08:12:44 UTC
Created attachment 76245 [details]
output of a faild build with current e-build
Comment 2 Joe Suhre 2006-01-05 08:13:21 UTC
Created attachment 76246 [details]
Successful build with new ebuild
Comment 3 Joe Suhre 2006-01-05 08:14:19 UTC
Created attachment 76247 [details]
ebuild which corrects the issue.
Comment 4 Joe Suhre 2006-01-05 08:19:13 UTC
hammer maven-bin # emerge info
Portage 2.0.53 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.12-gentoo-r10 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r10 x86_64 AMD Athlon(tm) 64 Processor 4000+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac acpi aim alsa apache2arts audiofile avi bash-completion berkdb bitmap-fonts bmp bzip2 calendar cdparanoia cdr crypt cups curl curlwrappers dga dio divx4linux dri dts dv dvb dvd dvdr dvdread eds emboss encode ethereal exif expat fam fastcgi fbcon ffmpeg flac foomaticdb fortran ftp gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 icq idn ieee1394 imagemagick imap imlib ipv6 jabber java jpeg junit kde kdeenablefinal lcms ldap libwww logitech-mouse lzw lzw-tiff mad mhash mime mng motif mozilla mp3 mpeg msn mysql ncurses nls ogg oggvorbis openal opengl oscar pam pcre pdflib perl png python qt quicktime rdesktop readline ruby samba sdl snmp spell sqlite ssl svg tcltk tcpd tidy tiff truetype truetype-fonts type1-fonts udev usb userlocales vhosts vorbis xine xinerama xml xml2 xmms xpm xscreensaver xv yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 5 Josh Nichols (RETIRED) gentoo-dev 2006-01-05 08:46:44 UTC
I think the issue is that the ebuild needs to 'dodir /usr/bin' before making the symlink. I would avoid making the symlink during postinst because, if I'm not mistaken, the symlink wouldn't be considered as belonging to the package.

Aside from that, in the future, please post diffs against existing ebuilds instead of entire ebuilds. Diffs make it a lot easier to figure out what was changes were made.
Comment 6 Joe Suhre 2006-01-05 09:09:22 UTC
Created attachment 76249 [details, diff]
maven-bin-2.0.1.ebuild.patch

Patch to correct sym linking issue.
Comment 7 Joe Suhre 2006-01-05 09:21:21 UTC
I just confirmed all your assumptions. creating the linke in pgk_postinst caues the link to not be part of the package. also using the dodir just before creating the link resolved the issue. 

Can you let me know if i'm understanding this correctly. the dodir /usr/bin causes ${D}/usr/bin to be created then when it's time to install everything in ${D} is then concidered to be the "package" and is installed from ${D} to / ? This my first stab at working with an ebuild. 
Comment 8 Josh Nichols (RETIRED) gentoo-dev 2006-01-05 10:12:34 UTC
(In reply to comment #7)
> Can you let me know if i'm understanding this correctly. the dodir /usr/bin
> causes ${D}/usr/bin to be created then when it's time to install everything in
> ${D} is then concidered to be the "package" and is installed from ${D} to / ?
> This my first stab at working with an ebuild. 
That's exactly right. ${D} is the directory where things actually get installed during src_install. The advantage of this is that you don't muck up your / if something goes wrong during src_install. Once src_install is done, this gets merged onto /.

Here are some suggested readings:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml
http://dev.gentoo.org/~plasmaroo/devmanual/
Comment 9 Josh Nichols (RETIRED) gentoo-dev 2006-01-05 18:35:04 UTC
Fixed in CVS, thanks for reporting!

Wait a few hours, emerge sync, and a new revision should be available.