<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>149431</bug_id>
          
          <creation_ts>2006-09-28 10:00 0000</creation_ts>
          <short_desc>sys-devel/gettext-0.16.1 with USE=emacs misses dependency on virtual/emacs</short_desc>
          <delta_ts>2007-07-06 23:38:19 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>2006.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>184166</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>erikw@sizeit.se</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>emacs@gentoo.org</cc>
    
    <cc>erikw@sizeit.se</cc>

      

      
          <long_desc isprivate="0">
            <who>erikw@sizeit.se</who>
            <bug_when>2006-09-28 10:00:26 0000</bug_when>
            <thetext>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&apos;t find it&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-09-28 10:04:38 0000</bug_when>
            <thetext>Reopen with some errors and emerge --info, I don&apos;t see what you mean, sorry.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>erikw@sizeit.se</who>
            <bug_when>2006-09-28 14:59:08 0000</bug_when>
            <thetext>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=&quot;emacs nls -doc -nocxx&quot; 0 kB

Total size of downloads: 0 kB

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

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

Shouldn&apos;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&apos;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&apos;t originally trigger the bug that way. I rather removed X11. Thus running emacs failed because it couldn&apos;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=&quot;emacs nls -doc -nocxx%&quot; 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&apos;
WARNING: Warnings can be ignored. :-)
if test &quot;emacs&quot; != no; then \
  set x; \
  list=&apos;start-po.el po-mode.el po-compat.el&apos;; for p in $list; do \
    if test -f &quot;$p&quot;; then d=; else d=&quot;./&quot;; fi; \
    set x &quot;$@&quot; &quot;$d$p&quot;; shift; \
  done; \
  shift; \
  EMACS=&quot;emacs&quot; /bin/sh ../../build-aux/elisp-comp &quot;$@&quot; || 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&apos;
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gettext-0.14.5/work/gettext-0.14.5/gettext-tools&apos;
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/gettext-0.14.5/work/gettext-0.14.5/gettext-tools&apos;
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&apos;t the gettext.ebuild have a line like this. I&apos;m not a fluent ebuild-programmer, this is just to illustrate what I think is wrong:

DEPEND=&quot;emacs? (app-editor/emacs)&quot;

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

emerge -av --deep --update gettext

However that doesn&apos;t work either.

emerge -av --deep --update emacs

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

Hope this clears things up. I&apos;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=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-O3 -march=athlon-xp -fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo&quot;
CXXFLAGS=&quot;-O3 -march=athlon-xp -fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks metadata-transfer sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://ftp.du.se/pub/os/gentoo/&quot;
LINGUAS=&quot;&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=&apos;/distfiles&apos; --exclude=&apos;/local&apos; --exclude=&apos;/packages&apos;&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.sizeit.dmz/gentoo-portage&quot;
USE=&quot;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&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-09-28 15:05:21 0000</bug_when>
            <thetext>Kindly run revdep-rebuild, none of gettext business here that you&apos;ve unmerged stuff without any thinking... 
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>erikw@sizeit.se</who>
            <bug_when>2006-09-28 15:22:45 0000</bug_when>
            <thetext>Not without thinking. To illustrate that the dependency is broken.

I&apos;m only trying to help here.

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

I can certainely get past this. I&apos;m simply trying to improve things so others don&apos;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&apos;t.

Thats why I thinkk it&apos;s a bug, but I&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-09-29 00:14:35 0000</bug_when>
            <thetext>

*** This bug has been marked as a duplicate of 101089 ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2007-04-30 08:58:19 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; *** 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).
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2007-04-30 09:01:44 0000</bug_when>
            <thetext>DEPEND should include &quot;emacs? ( virtual/emacs )&quot;.

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: &quot;Wrong type argument: stringp, nil&quot; or &quot;Cannot open load-file: po-mode&quot;.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2007-05-14 10:13:22 0000</bug_when>
            <thetext>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). 
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2007-06-30 17:25:32 0000</bug_when>
            <thetext>Created an attachment (id=123470)
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?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2007-06-30 17:26:49 0000</bug_when>
            <thetext>Created an attachment (id=123472)
po-mode-0.16.1.ebuild

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2007-06-30 17:28:24 0000</bug_when>
            <thetext>Created an attachment (id=123474)
files/51po-mode-gentoo.el

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fauli@gentoo.org</who>
            <bug_when>2007-07-02 06:47:11 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; We need keywording for the new emacs{,-cvs} ebuilds first, otherwise we will
&gt; 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.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulm@gentoo.org</who>
            <bug_when>2007-07-06 23:38:19 0000</bug_when>
            <thetext>(In reply to comment #9)
&gt; Another, maybe cleaner, solution would be to move the Emacs part to a separate
&gt; package and PDEPEND on it

Fixed in this way.
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>123470</attachid>
            <date>2007-06-30 17:25 0000</date>
            <desc>Patch for gettext-0.16.1.ebuild</desc>
            <filename>gettext-0.16.1.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGdldHRleHQtMC4xNi4xLmVidWlsZH4JMjAwNy0wNi0zMCAxOToxNToxNi4wMDAwMDAwMDAg
KzAyMDAKKysrIGdldHRleHQtMC4xNi4xLmVidWlsZAkyMDA3LTA2LTMwIDE5OjE4OjQ4LjAwMDAw
MDAwMCArMDIwMApAQCAtMiw3ICsyLDcgQEAKICMgRGlzdHJpYnV0ZWQgdW5kZXIgdGhlIHRlcm1z
IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgogIyAkSGVhZGVyOiAvdmFyL2N2
c3Jvb3QvZ2VudG9vLXg4Ni9zeXMtZGV2ZWwvZ2V0dGV4dC9nZXR0ZXh0LTAuMTYuMS5lYnVpbGQs
diAxLjEyIDIwMDcvMDMvMTYgMTc6MjQ6MjUgeW9zd2luayBFeHAgJAogCi1pbmhlcml0IGZsYWct
by1tYXRpYyBldXRpbHMgbXVsdGlsaWIgdG9vbGNoYWluLWZ1bmNzIG1vbm8gbGlidG9vbCBlbGlz
cC1jb21tb24KK2luaGVyaXQgZmxhZy1vLW1hdGljIGV1dGlscyBtdWx0aWxpYiB0b29sY2hhaW4t
ZnVuY3MgbW9ubyBsaWJ0b29sCiAKIERFU0NSSVBUSU9OPSJHTlUgbG9jYWxlIHV0aWxpdGllcyIK
IEhPTUVQQUdFPSJodHRwOi8vd3d3LmdudS5vcmcvc29mdHdhcmUvZ2V0dGV4dC9nZXR0ZXh0Lmh0
bWwiCkBAIC0xNSw2ICsxNSw3IEBACiAKIERFUEVORD0idmlydHVhbC9saWJpY29udgogCWRldi1s
aWJzL2V4cGF0IgorUERFUEVORD0iZW1hY3M/ICggYXBwLWVtYWNzL3BvLW1vZGU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J1aWxkIC0tbGlicmFyeSBsaWJpbnRsLnNv
LjciCiB9Ci0KLXBrZ19wb3N0cm0oKSB7Ci0JdXNlIGVtYWNzICYmIGVsaXNwLXNpdGUtcmVnZW4K
LX0K
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>123472</attachid>
            <date>2007-06-30 17:26 0000</date>
            <desc>po-mode-0.16.1.ebuild</desc>
            <filename>po-mode-0.16.1.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBDb3B5cmlnaHQgMTk5OS0yMDA3IEdlbnRvbyBGb3VuZGF0aW9uCiMgRGlzdHJpYnV0ZWQgdW5k
ZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgojICRIZWFk
ZXI6ICQKCmluaGVyaXQgZWxpc3AKCkRFU0NSSVBUSU9OPSJNYWpvciBtb2RlIGZvciBHTlUgZ2V0
dGV4dCBQTyBmaWxlcyIKSE9NRVBBR0U9Imh0dHA6Ly93d3cuZ251Lm9yZy9zb2Z0d2FyZS9nZXR0
ZXh0LyIKU1JDX1VSST0ibWlycm9yOi8vZ251L2dldHRleHQvZ2V0dGV4dC0ke1BWfS50YXIuZ3oi
CgpMSUNFTlNFPSJHUEwtMiIKU0xPVD0iMCIKS0VZV09SRFM9In54ODYiCklVU0U9IiIKClM9IiR7
V09SS0RJUn0vZ2V0dGV4dC0ke1BWfS9nZXR0ZXh0LXRvb2xzL21pc2MiClNJVEVGSUxFPTUxJHtQ
Tn0tZ2VudG9vLmVsCgpzcmNfY29tcGlsZSgpIHsKCWVsaXNwLWNvbXBpbGUgcG8tbW9kZS5lbCBw
by1jb21wYXQuZWwgfHwgZGllICJlbGlzcC1jb21waWxlIGZhaWxlZCIKfQo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>123474</attachid>
            <date>2007-06-30 17:28 0000</date>
            <desc>files/51po-mode-gentoo.el</desc>
            <filename>51po-mode-gentoo.el</filename>
            <type>text/plain</type>
            <data encoding="base64">Cjs7IHBvLW1vZGUgc2l0ZS1saXNwIGNvbmZpZ3VyYXRpb24KCihhdXRvbG9hZCAncG8tbW9kZSAi
cG8tbW9kZSIgIk1ham9yIG1vZGUgZm9yIHRyYW5zbGF0b3JzIHRvIGVkaXQgUE8gZmlsZXMiIHQp
CihvciAoZmJvdW5kcCAncG8tZmluZC1maWxlLWNvZGluZy1zeXN0ZW0pCiAgICAoYXV0b2xvYWQg
J3BvLWZpbmQtZmlsZS1jb2Rpbmctc3lzdGVtICJwby1jb21wYXQiKSkKCihhZGQtdG8tbGlzdCAn
YXV0by1tb2RlLWFsaXN0ICcoIlxcLnBvXFwnXFx8XFwucG9cXC4iIC4gcG8tbW9kZSkpCihtb2Rp
ZnktY29kaW5nLXN5c3RlbS1hbGlzdCAnZmlsZSAiXFwucG9cXCdcXHxcXC5wb1xcLiIKCQkJICAg
ICdwby1maW5kLWZpbGUtY29kaW5nLXN5c3RlbSkK
</data>        

          </attachment>
    </bug>

</bugzilla>