Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149431 - sys-devel/gettext-0.16.1 with USE=emacs misses dependency on virtual/emacs
Summary: sys-devel/gettext-0.16.1 with USE=emacs misses dependency on virtual/emacs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 184166
  Show dependency tree
 
Reported: 2006-09-28 10:00 UTC by Erik Wallin
Modified: 2007-07-06 23:38 UTC (History)
2 users (show)

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


Attachments
Patch for gettext-0.16.1.ebuild (gettext-0.16.1.diff,1.51 KB, patch)
2007-06-30 17:25 UTC, Ulrich Müller
Details | Diff
po-mode-0.16.1.ebuild (po-mode-0.16.1.ebuild,500 bytes, text/plain)
2007-06-30 17:26 UTC, Ulrich Müller
Details
files/51po-mode-gentoo.el (51po-mode-gentoo.el,372 bytes, text/plain)
2007-06-30 17:28 UTC, Ulrich Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Wallin 2006-09-28 10:00:26 UTC
When setting the emacs USE-flag, gettext should depend on emacs.

I ran into this problem when I resolved a dependency conflict. I unmerged xorg-x11. Of course, emacs stopped working since it didn't find it's X11 libraries. Thus, building gettext failed. With a dependency on emacs it would have made sure emacs was properly installed, and that in turn would have pulled in the correct X11-libraries.

Of course the workaround is trivial. Simply emerge emacs, and it will continue.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-09-28 10:04:38 UTC
Reopen with some errors and emerge --info, I don't see what you mean, sorry.
Comment 2 Erik Wallin 2006-09-28 14:59:08 UTC
My fault, I was to involved in this. To me it was obvious by just looking at the ebuild. I realize now that was because I saw the error when building.

Building gettext (with USE=emacs) requires running emacs at one point. However the ebuild does not require emacs to be installed first. Example 1:
---------

ew-home ~ # emerge -C emacs
...
ew-home ~ # emerge -av gettext

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-devel/gettext-0.14.5  USE="emacs nls -doc -nocxx" 0 kB

Total size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]

-------------------

Shouldn't it require that emacs be installed? After all, that was what we said in the USE flags.

This actually does install gettext without errors, but I don't think it produces what was intended. The reason is that the installer avoids using emacs if it is not available and thus avoids the error.

I didn't originally trigger the bug that way. I rather removed X11. Thus running emacs failed because it couldn't find the X11 libraries.

Here is my original example. This describes the situation where emacs is broken because some of the requred packages were removed.

--------

asterisk2 ~ # emerge -C x11-libs/libX11
...
asterisk2 ~ # emacs
emacs: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

asterisk2 ~ # emerge -av gettext

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-devel/gettext-0.14.5 [0.14.4] USE="emacs nls -doc -nocxx%" 0 kB

Total size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]

...

make[3]: Entering directory `/var/tmp/portage/gettext-0.14.5/work/gettext-0.14.5/gettext-tools/misc'
WARNING: Warnings can be ignored. :-)
if test "emacs" != no; then \
  set x; \
  list='start-po.el po-mode.el po-compat.el'; for p in $list; do \
    if test -f "$p"; then d=; else d="./"; fi; \
    set x "$@" "$d$p"; shift; \
  done; \
  shift; \
  EMACS="emacs" /bin/sh ../../build-aux/elisp-comp "$@" || exit 1; \
else : ; fi
emacs: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
make[3]: *** [elc-stamp] Error 1
make[3]: Leaving directory `/var/tmp/portage/gettext-0.14.5/work/gettext-0.14.5/gettext-tools/misc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gettext-0.14.5/work/gettext-0.14.5/gettext-tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/gettext-0.14.5/work/gettext-0.14.5/gettext-tools'
make: *** [all-recursive] Error 1

!!! ERROR: sys-devel/gettext-0.14.5 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  gettext-0.14.5.ebuild, line 72:   Called die

------------------

Shouldn't the gettext.ebuild have a line like this. I'm not a fluent ebuild-programmer, this is just to illustrate what I think is wrong:

DEPEND="emacs? (app-editor/emacs)"

Actually I realize now that the emerge line should have been:

emerge -av --deep --update gettext

However that doesn't work either.

emerge -av --deep --update emacs

does repair things - i.e. - reinstalls x11-libs/libX11

Hope this clears things up. I'm attaching the output of

emerge --info

Portage 2.1.1 (default-linux/x86/2006.1, gcc-3.4.6, glibc-2.3.6-r3, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.6.14
Last Sync: Thu, 28 Sep 2006 00:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.3.4, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
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-r3
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.du.se/pub/os/gentoo/"
LINGUAS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.sizeit.dmz/gentoo-portage"
USE="x86 3dnow 3dnowext acl alsa apache2 berkdb bitmap-fonts cdr cli crypt cups dlloader dri elibc_glibc emacs fortran gdbm gpm input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog kernel_linux libg++ mmx ncurses nls nptl nptlonly pam pcre perl ppds pppd python readline reflection session spl sse sse2 ssl tcpd threads truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-09-28 15:05:21 UTC
Kindly run revdep-rebuild, none of gettext business here that you've unmerged stuff without any thinking... 
Comment 4 Erik Wallin 2006-09-28 15:22:45 UTC
Not without thinking. To illustrate that the dependency is broken.

I'm only trying to help here.

The point is that the dependency information in the gettext ebuild is not sufficient. If you don't want to fix it - fine.

I can certainely get past this. I'm simply trying to improve things so others don't have to spend time on this.

I removed my X11 because it was outdated (6.9 or whatever) and conflicted with a newer version. I expected a good behaving dependency system to pull in the necessary things in the correct order. It didn't.

Thats why I thinkk it's a bug, but I'm not going to fight over it. Go ahead and leave it broken. I can fix it myself if I need it fixed. Just thought I should help out a bit.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-09-29 00:14:35 UTC

*** This bug has been marked as a duplicate of 101089 ***
Comment 6 Ulrich Müller gentoo-dev 2007-04-30 08:58:19 UTC
(In reply to comment #5)
> *** This bug has been marked as a duplicate of 101089 ***

Definitely not a duplicate, but a valid issue (although I would use a different approach to demonstrate the problem).
Comment 7 Ulrich Müller gentoo-dev 2007-04-30 09:01:44 UTC
DEPEND should include "emacs? ( virtual/emacs )".

Without emacs being available, the build system of the package will not install the Emacs modes (po-mode.el and po-compat.el).

To reproduce:
1. emerge -C emacs
2. emerge gettext
3. emerge emacs
4. emacs foo.po

Will result in error message: "Wrong type argument: stringp, nil" or "Cannot open load-file: po-mode".
Comment 8 Ulrich Müller gentoo-dev 2007-05-14 10:13:22 UTC
We need keywording for the new emacs{,-cvs} ebuilds first, otherwise we will get a circular dependency (since the old ones depend on gettext themselves). 
Comment 9 Ulrich Müller gentoo-dev 2007-06-30 17:25:32 UTC
Created attachment 123470 [details, diff]
Patch for gettext-0.16.1.ebuild

Another, maybe cleaner, solution would be to move the Emacs part to a separate package and PDEPEND on it, as in the attachment.

base-system, could you please comment?
Comment 10 Ulrich Müller gentoo-dev 2007-06-30 17:26:49 UTC
Created attachment 123472 [details]
po-mode-0.16.1.ebuild
Comment 11 Ulrich Müller gentoo-dev 2007-06-30 17:28:24 UTC
Created attachment 123474 [details]
files/51po-mode-gentoo.el
Comment 12 Christian Faulhammer (RETIRED) gentoo-dev 2007-07-02 06:47:11 UTC
(In reply to comment #8)
> We need keywording for the new emacs{,-cvs} ebuilds first, otherwise we will
> get a circular dependency (since the old ones depend on gettext themselves). 

 As this is mostly done, we (Emacs team) will take care of the changes.  If there are any objections from base-system, please raise them now.
Comment 13 Ulrich Müller gentoo-dev 2007-07-06 23:38:19 UTC
(In reply to comment #9)
> Another, maybe cleaner, solution would be to move the Emacs part to a separate
> package and PDEPEND on it

Fixed in this way.