I think this explains it: <code> h6635 ~ # qpkg -nc -l courier | egrep -e '^/usr/sbin/(courier|pop3d|imap)' /usr/sbin/courier /usr/sbin/courieresmtpd -> /usr/lib/courier/courier/modules/esmtp/courieresmtpd 1083079384 /usr/sbin/courierfilter /usr/sbin/courierlogger /usr/sbin/couriertcpd /usr/sbin/imapd -> /usr/share/courier/imapd 1083079385 /usr/sbin/pop3d -> /usr/share/courier/pop3d 1083079385 /usr/sbin/pop3d-ssl -> /usr/share/courier/pop3d-ssl 1083079385 /usr/sbin/imapd-ssl -> /usr/share/courier/imapd-ssl 1083079385 h6635 ~ # egrep -e '((imapd|pop3d)(-ssl)? start)|(sbindir=)' /etc/init.d/courier sbindir="/usr/sbin" ${sbindir}/courier-pop3d start ${sbindir}/courier-pop3d-ssl start ${sbindir}/courier-imapd start ${sbindir}/courier-imapd-ssl start </code> Either the init script should be changed or the links should be named /usr/sbin/courier-* which I would prefer.
The init script has been calling ${sbindir}/courier-pop3d start (and the others named like it) for some 9 months now. I rolled back to 0.45.2 on my own system and it still makes the proper symlinks, as does 0.45.4 (~x86). What architecture and USE flags are you using? Blue All # emerge -pv courier ; qpkg -nc -l courier | egrep -e '^/usr/sbin/(courier|pop3d|imap)' These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] net-mail/courier-0.45.4 [0.45.2] +crypt -fax +ipv6 -ldap +mysql -nls +norewrite +pam -postgres +spell 0 kB Total size of downloads: 0 kB /usr/sbin/courier-imapd -> /usr/share/courier/imapd 1083109335 /usr/sbin/courier-pop3d -> /usr/share/courier/pop3d 1083109335 /usr/sbin/courier /usr/sbin/courier-imapd-ssl -> /usr/share/courier/imapd-ssl 1083109335 /usr/sbin/courieresmtpd -> /usr/lib/courier/courier/modules/esmtp/courieresmtpd 1083109335 /usr/sbin/courierfilter /usr/sbin/courierlogger /usr/sbin/courier-pop3d-ssl -> /usr/share/courier/pop3d-ssl 1083109335 /usr/sbin/couriertcpd Blue All # emerge -p courier ; qpkg -nc -l courier | egrep -e '^/usr/sbin/(courier|pop3d|imap)' These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] net-mail/courier-0.45.4 /usr/sbin/courier-imapd -> /usr/share/courier/imapd 1082584018 /usr/sbin/courier-pop3d -> /usr/share/courier/pop3d 1082584018 /usr/sbin/courier /usr/sbin/courier-imapd-ssl -> /usr/share/courier/imapd-ssl 1082584018 /usr/sbin/courieresmtpd -> /usr/lib/courier/courier/modules/esmtp/courieresmtpd 1082584018 /usr/sbin/courierfilter /usr/sbin/courierlogger /usr/sbin/courier-pop3d-ssl -> /usr/share/courier/pop3d-ssl 1082584018 /usr/sbin/couriertcpd
First system: Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.25) ================================================================= System uname: 2.4.25 i686 Intel(R) Celeron(R) CPU 2.40GHz Gentoo Base System version 1.4.9 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=i686 -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox" GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages/i686" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.entoo.org/gentoo-portage" USE="aalib acpi acpi4linux apache2 apm arts avi berkdb cgi crypt cups devfs djbfft dnsdb foomaticdb gdbm gif gtk gtk2 imlib jpeg kde libg++ libwww mad maildir mbox md5sum mikmod mmx mpeg ncurses nls oav odbc offensive oggvorbis oss pam pdflib perl pic png postgres python readline regexp roundrobin serial slang snmp spell sqlite sse ssl svg svga tcpd threads tiff truetype x86 xml xml2 zlib" Second system: Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-mm1) ================================================================= System uname: 2.6.5-mm1 i686 VIA C3 Ezra Gentoo Base System version 1.4.9 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=i586 -Os -pipe" CHOST="i586-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=i586 -Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox" GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://gentoo.oregonstate.edu http://www.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.de.gentoo.org/gentoo-portage" USE="3dnow X Xaw3d aalib acl acpi acpi4linux alsa apache2 apm avi berkdb cle266 crypt cups devfs dga dillo directfb dvd encode esd fam fbcon fbdev foomaticdb freetype fs gd gdbm ggi gif gimpprint gtk gtk2 ieee1394 imap imlib ipv6 jack java javascript jikes jpeg jython lesstif libg++ libwww mad mbox mikmod mmx motif mpeg mpeg4 mysql nas ncurses nls oav offensive oggvorbis openal opengl oss pam pdflib perl php pic png postgres ppds python quicktime readline samba sdl slang speedo speex spell ssl svga tcltk tcpd theora truetype type1 unicode usb v4l v4l2 vhosts x86 xface xfs xine xml2 xmms xv xvid zlib"
This piece of code in the ebuild should be taking care of renaming the files to what you were expecting. Perhaps if you try emerge -d courier, or even just adding a "set -v -x" right after the pkg_preinst() line in the ebuild to see whats happening right there. When I build this as a binary on my system, it seems to build the .tbz2 before doing the renaming, and i do see the buildpkg feature set on your systems. Could you maybe take out the FEATURE="buildpkg" and try emerging this again? pkg_preinst() { cd ${D}/usr/sbin for y in imapd imapd-ssl pop3d pop3d-ssl do mv ${y} courier-${y} done
I made the same discovery just before reading your post: <code> h6635 ~ # ebuild /usr/portage/net-mail/courier/courier-0.45.2.ebuild install [...] >>> Completed installing into /var/tmp/portage/courier-0.45.2/image/ h6635 /var/tmp/portage/courier-0.45.2/image # cd /var/tmp/portage/courier-0.45.2/image/usr/sbin/ h6635 /var/tmp/portage/courier-0.45.2/image/usr/sbin # ls -o courier* imap* pop* -r-xr-xr-x 1 mail 15152 Apr 28 08:04 courier lrwxrwxrwx 1 root 52 Apr 28 08:04 courieresmtpd -> /usr/lib/courier/courier/modules/esmtp/courieresmtpd -r-x------ 1 root 14912 Apr 28 08:04 courierfilter -r-xr-xr-x 1 mail 4128 Apr 28 08:04 courierlogger -r-xr-xr-x 1 mail 54464 Apr 28 08:04 couriertcpd lrwxrwxrwx 1 root 24 Apr 28 08:04 imapd -> /usr/share/courier/imapd lrwxrwxrwx 1 root 28 Apr 28 08:04 imapd-ssl -> /usr/share/courier/imapd-ssl lrwxrwxrwx 1 root 24 Apr 28 08:04 pop3d -> /usr/share/courier/pop3d lrwxrwxrwx 1 root 28 Apr 28 08:04 pop3d-ssl -> /usr/share/courier/pop3d-ssl </code> <code> pkg_preinst() { [...] cd ${D}/usr/sbin for y in imapd imapd-ssl pop3d pop3d-ssl do mv ${y} courier-${y} done [...] } </code> Is this in the right place? Shouldn't this be at the end of src_install?
Do you install things with "emerge courier" or do you normally try to single-step through the ebuild process? The emerge command *should* be calling the pkg_preinst for you each time, before calling the install routine.
moved file renaming to the src_compile function. checked into cvs.
> Do you install things with "emerge courier" or do you normally try to > single-step through the ebuild process? No I normally use emerge. (But single stepping through the process is equivalent to emerge, isn't it?) > The emerge command *should* be calling the pkg_preinst > for you each time, before calling the install routine. Yes and I think this is the problem here. Could it be that pkg_preinst tries to move the files before they are there? > moved file renaming to the src_compile function. checked into cvs. I test as soon as possible and then report back.