<?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>48072</bug_id>
          
          <creation_ts>2004-04-16 14:24 0000</creation_ts>
          <short_desc>aspell needs a dict, but there is no dependency - leads to a depclean inconsistency</short_desc>
          <delta_ts>2007-03-04 23:31:17 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>Ebuilds</component>
          <version>2004.0</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>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mike@nerone.org</reporter>
          <assigned_to>app-dicts@gentoo.org</assigned_to>
          <cc>consume.noize@googlemail.com</cc>
    
    <cc>denilsonsa@gmail.com</cc>
    
    <cc>ted@allgoodbits.org</cc>
    
    <cc>vapier@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>mike@nerone.org</who>
            <bug_when>2004-04-16 14:24:41 0000</bug_when>
            <thetext>I would like to suggest that a dependency be added so that aspell requires virtual/aspell-dict (a default of aspell-en seems reasonable). This would accomplish two things: first, it would simply help people who don&apos;t know they need to install one (e.g. if they missed the message when aspell was being emerged as dependency).

The second benefit is more important. Consider this situation:
  1. User emerges a package that depends on aspell - suppose app-text/enchant (also suppose that this remains the only app on his system that wants aspell).
  2. User emerges aspell-en, for example.
  3. User later decides he doesn&apos;t want enchant anymore, and unmerges it.
  4. User then does an &quot;emerge depclean&quot; to remove unneeded packages.

Because aspell-en is in the world file, and it depends on aspell, the depclean will not unmerge aspell and aspell-en even though they are no longer needed.

First thought on how to fix this was to do a oneshot emerge on aspell-en in step 2. The problem with that is that any depclean (even while enchant is still installed) will want to remove aspell-en, because nothing depends on it and it&apos;s not in the world file.

So if the dict is in the world file, you&apos;ve got the first problem. If not, and nothing has a dependency on it, then you&apos;ve got the second problem. Ideally, you could have the dict not be in the world file, but a dependency holds it on the system, so that when nothing requires aspell, aspell and any dicts which we installed as dependencies or oneshot will be unmerged by depclean. Adding the virtual/aspell-dict dependency to aspell does that (and is a lot cleaner than adding the virtual/aspell-dict dependency to all ebuilds which need aspell). It also doesn&apos;t impede anybody&apos;s ability to put a dict in the world file if they wish, thereby gauranteeing that it will remain updated. Personally, I regularly check --deep, so I don&apos;t care about that. It should be our option.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>consume.noize@googlemail.com</who>
            <bug_when>2006-07-09 13:13:28 0000</bug_when>
            <thetext>Looks like a forgotten or ignored bug.

Anyway, the idea of installing a dictionary, while installing aspell is fine.

But, I would suggest a mechanism like in kde-base/kde-i18n. Which means, watching the LINGUAS variable for reasonable things and setting another variable for dependencies. PDEPEND seams to be the best one for aspell and dictionaries. Because, aspell doesn&apos;t need them for compiling nor for running (but, it&apos;s really useless without one).

If you don&apos;t get what I mean, think about adding this to an aspell ebuild:
---8&lt;---
LANGS=&quot;af be bg br ca cs cy da de el en eo es et fi fo fr ga gl he hr is it nl no pl pt ro ru sk sl sr sv uk vi&quot;

for X in ${LANGS} ; do
    PDEPEND=&quot;${PDEPEND} linguas_${X}? ( app-dicts/aspell-${X} )&quot;
    IUSE=&quot;${IUSE} linguas_${X}&quot;
done
---&gt;8---
It doesn&apos;t work well, i.e. for things like en_GB there should be a mapping,
but I think it would be really helpfull.

(This is the first additional commit after more than 2 years. ;)
And I would change the version and set the severity to enhancement.)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-07-09 14:26:31 0000</bug_when>
            <thetext>I don&apos;t think we should do any of the proposals.

1) Always installing the English dictionary is not a good idea; many people only have their native language dictionaries installed.  Creating a dependency between the tools and a dictionary is just wrong.

2) Dictionaries are often used by more than one application, and it&apos;s not always necessary to have the &quot;natural&quot; parent application (aspell in this case) installed in order to use the dictionaries.

With that in mind, I think it&apos;s best to keep the language dictionaries independent.  If that&apos;s the case, then there&apos;s no depclean issue as users will have had to install the dictionaries directly, so should expect to remove them directly if they no longer want them.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mike@nerone.org</who>
            <bug_when>2006-07-12 18:05:07 0000</bug_when>
            <thetext>I certainly see benefits to Daniel&apos;s idea (LINGUAS, or at least my notice of it, came around after I posted this bug). But, I&apos;ll address Kevin&apos;s points (mostly) from the point of view of my original suggestions, simply having a virtual/aspell-dict:

1. (In reply to comment #2)

&gt; 1) Always installing the English dictionary is not a good idea; many people
&gt; only have their native language dictionaries installed.  Creating a dependency
&gt; between the tools and a dictionary is just wrong.

English is just a default (much like sun-jdk is the default for virtual/jdk, but ibm-jdk and jrockit-jdk will satisfy it, as well). If the user installs an alternate dictionary, aspell-en won&apos;t be required. I do see your point about how defaulting to en might be seen by some in a negative way, though. Daniel&apos;s idea for consulting LINGUAS (or perhaps locale output) addresses that.

&gt; 2) Dictionaries are often used by more than one application, and it&apos;s not
&gt; always necessary to have the &quot;natural&quot; parent application (aspell in this case)
&gt; installed in order to use the dictionaries.

I never suggested that the dict packages should depend on aspell. aspell requires a dictionary (for usefulness), not the other way around. A dict can be installed without the parent aspell package.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-07-16 06:50:45 0000</bug_when>
            <thetext>*** Bug 140629 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-11-28 01:29:33 0000</bug_when>
            <thetext>*** Bug 156465 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-11-30 13:02:47 0000</bug_when>
            <thetext>Unfortunately, we cannot have aspell depend on any of the languages, as the languages depend on aspell for installation (aspell provides the utilities needed to unpack the dictionaries).  This would create a circular dependency, which we simply can&apos;t have.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mike@nerone.org</who>
            <bug_when>2006-11-30 18:32:22 0000</bug_when>
            <thetext>Ummm...isn&apos;t that what PDEPEND is for?

(note: reopening bug to make sure this comment gets noticed - close again if you must)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-12-01 00:07:31 0000</bug_when>
            <thetext>You&apos;re right - &apos;twas rather late ;)

I&apos;ll look into the LINGUAS thing - did something along those lines recently for acrobat-reader, so should be able to do a similar thing.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-12-01 01:59:53 0000</bug_when>
            <thetext>ok; here we go :)  I&apos;ve put 0.60.4-r2 into CVS with the PDEPEND setup so that it&apos;ll install all matching languages listed in LINGUAS. It&apos;s masked for the moment - please unmask in /etc/portage/packages.unmask, try it out and report back.


Regarding the en vs. en_GB etc issue - since the dictionaries themselves are the generic language, installing all variations, the PDEPEND only looks at the parent language codes.

For example, if LINGUAS=&quot;en_GB de&quot;, you&apos;ll only get the German dictionary - set LINGUAS=&quot;en_GB en de&quot; to get both English and German.  One reason is that I think it would be misleading to support the sub-codes.  Supporting LINGUAS=&quot;en_GB&quot; would imply only the GB English would be installed, not the US or CA variants - which is not the case.  For the moment at least I don&apos;t think it&apos;s worth the extra complexity.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>arfrever@gentoo.org</who>
            <bug_when>2007-03-03 21:48:39 0000</bug_when>
            <thetext>(In reply to comment #9)
&gt; ok; here we go :)  I&apos;ve put 0.60.4-r2 into CVS with the PDEPEND setup so that
&gt; it&apos;ll install all matching languages listed in LINGUAS. It&apos;s masked for the
&gt; moment - please unmask in /etc/portage/packages.unmask, try it out and report
&gt; back.
I tried modified aspell-0.60.5 ebuild and it works correctly.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>arfrever@gentoo.org</who>
            <bug_when>2007-03-03 21:53:25 0000</bug_when>
            <thetext>Created an attachment (id=111972)
Patch to aspell-0.60.5.ebuild

Note that {R,}DEPEND shouldn&apos;t contain virtual/aspell-dict to avoid circular dependencies.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2007-03-04 11:55:13 0000</bug_when>
            <thetext>Thanks, in CVS now.

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>arfrever@gentoo.org</who>
            <bug_when>2007-03-04 17:48:04 0000</bug_when>
            <thetext>(In reply to comment #12)
&gt; Thanks, in CVS now.
&gt; 
Are you sure?

http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/aspell/
http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/aspell/aspell-0.60.5.ebuild?rev=1.100&amp;view=log</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2007-03-04 23:31:17 0000</bug_when>
            <thetext>Whoops - I am now :) Sorry about that; doing too many things at once...
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>111972</attachid>
            <date>2007-03-03 21:53 0000</date>
            <desc>Patch to aspell-0.60.5.ebuild</desc>
            <filename>aspell.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGFwcC10ZXh0L2FzcGVsbC9hc3BlbGwtMC42MC41LmVidWlsZAorKysgYXBwLXRleHQvYXNw
ZWxsL2FzcGVsbC0wLjYwLjUuZWJ1aWxkCkBAIC0xNyw2ICsxNywyNCBAQAogS0VZV09SRFM9In5h
bWQ2NCB+YXJtIH5ocHBhIH5pYTY0IH5tNjhrIH5wcGMgfnMzOTAgfnNoIH5zcGFyYyB+eDg2IH54
ODYtZmJzZCIKIElVU0U9ImdwbSBubHMiCiAKKyMgQnVpbGQgUERFUEVORCBmcm9tIGxpc3Qgb2Yg
bGFuZ3VhZ2UgY29kZXMgcHJvdmlkZWQgaW4gdGhlIHRyZWUuCisjIFRoZSBQREVQRU5EIHN0cmlu
ZyBpcyBzdGF0aWMgLSB0aGlzIGNvZGUganVzdCBtYWtlcyBpdCBlYXNpZXIgdG8gbWFpbnRhaW4u
CitkZWY9ImFwcC1kaWN0cy9hc3BlbGwtZW4iCitmb3IgbCBpbiBcCisJImFmIiAiYmUiICJiZyIg
ImJyIiAiY2EiICJjcyIgImN5IiAiZGEiICJkZSIgImVsIiBcCisJImVuIiAiZW8iICJlcyIgImV0
IiAiZmkiICJmbyIgImZyIiAiZ2EiICJnbCIgImhlIiBcCisJImhyIiAiaXMiICJpdCIgIm5sIiAi
bm8iICJwbCIgInB0IiAicm8iICJydSIgInNrIiBcCisJInNsIiAic3IiICJzdiIgInVrIiAidmki
OyBkbworCWRlcD0ibGluZ3Vhc18ke2x9PyAoIGFwcC1kaWN0cy9hc3BlbGwtJHtsfSApIgorCVtb
IC16ICR7UERFUEVORH0gXV0gJiYKKwkJUERFUEVORD0iJHtkZXB9IiB8fAorCQlQREVQRU5EPSIk
e1BERVBFTkR9Ciske2RlcH0iCisJZGVmPSIhbGluZ3Vhc18ke2x9PyAoICR7ZGVmfSApIgorZG9u
ZQorUERFUEVORD0iJHtQREVQRU5EfQorJHtkZWZ9IgorCiBSREVQRU5EPSI+PXN5cy1saWJzL25j
dXJzZXMtNS4yCiAJZ3BtPyAoIHN5cy1saWJzL2dwbSApCiAJbmxzPyAoIHZpcnR1YWwvbGliaW50
bCApIgo=
</data>        

          </attachment>
    </bug>

</bugzilla>