Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 623254 - dev-java/ant-core-1.9.2: installs /usr/bin/complete-ant-cmd.pl that 'breaks' app-shells/bash-completion
Summary: dev-java/ant-core-1.9.2: installs /usr/bin/complete-ant-cmd.pl that 'breaks' ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-01 12:42 UTC by Michał Górny
Modified: 2019-04-30 08:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-07-01 12:42:52 UTC
The 'ant' completion script installed by app-shells/bash-completion has a special case that runs completions via /usr/bin/complete-ant-cmd.pl if it is installed. However, it seems that the built-in completion module is actually superior to the perl script, e.g. by supporting ANT_ARGS. As a result, bash-completion tests fail when complete-ant-cmd.pl is installed [1].

Could you advise on how to deal with it? I think it'd be best not to test 'ant' completion when it's using the external script. However, if the external script is indeed worse than the built-in, then maybe it'd be better to just stop installing it, so I wouldn't have to patch anything ;-).

[1]:https://github.com/scop/bash-completion/issues/129
Comment 1 James Le Cuirot gentoo-dev 2017-07-15 20:13:58 UTC
You seem better informed about this than I do. I removed complete-ant-cmd.pl and couldn't tell the difference though I only did a very quick test. If you think removing it is best then by all means go ahead.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-04-28 06:21:01 UTC
Some 'new' data from upstream:

> Looking at its source, it appears that it doesn't support ANT_ARGS, and thus ends up parsing targets from build.xml in addition to named-build.xml which is incorrect and thus fails the test. In any case, complete-and-cmd.pl should be fixed to pay attention to ANT_ARGS.

and:

> Looking at the source, it invokes ant -projecthelp and parses targets from that, and caches the results. So it's potentially more robust, slower sometimes, and when being faster, leaves annoying cache files behind. Advantage or disadvantage, you be the judge :)


So, we have two options:

1. Fix complete-ant-cmd.pl to support ANT_ARGS.

2. Remove it.

I don't really have a strong opinion, except that 2. is easier ;-).
Comment 3 Larry the Git Cow gentoo-dev 2019-04-30 08:40:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e5a585127d65ab1e607938609fe7de81df16309

commit 1e5a585127d65ab1e607938609fe7de81df16309
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-04-30 06:35:26 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-04-30 08:40:09 +0000

    dev-java/ant-core: Stop installing complete-ant-cmd.pl
    
    The completion script is apparently buggy and conflicts with built-in
    bash-completion support.  Remove it.
    
    Closes: https://bugs.gentoo.org/623254
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 .../ant-core/{ant-core-1.10.5-r1.ebuild => ant-core-1.10.5-r2.ebuild}   | 2 +-
 .../ant-core/{ant-core-1.9.13-r1.ebuild => ant-core-1.9.13-r2.ebuild}   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)