Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 496320 - libtool.eclass - elibtoolize() fails at accepting directory arguments
Summary: libtool.eclass - elibtoolize() fails at accepting directory arguments
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-28 22:18 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2013-12-31 16:53 UTC (History)
0 users

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 Arfrever Frehtes Taifersar Arahesis 2013-12-28 22:18:26 UTC
elibtoolize() has this documentation:

# @FUNCTION: elibtoolize
# @USAGE: [dirs] [--portage] [--reverse-deps] [--patch-only] [--remove-internal-dep=xxx] [--shallow] [--no-uclibc]
# @DESCRIPTION:
# Apply a smorgasbord of patches to bundled libtool files.  This function
# should always be safe to run.  If no directories are specified, then
# ${S} will be searched for appropriate files.

However passing of any directory results in error due to last match in loop:

for x in "$@" ; do
    case ${x} in
        ...
        *)
            eerror "Invalid elibtoolize option: ${x}"
            die "elibtoolize called with ${x} ??"
    esac
done
Comment 1 SpanKY gentoo-dev 2013-12-30 08:06:19 UTC
pretty sure it's been this way for a very long time.  what use do you have for this when it seems no one else does ?  seems like an easier fix is to update the @USAGE line to drop the [dirs] part.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2013-12-30 08:47:35 UTC
In my ebuild, src_unpack() unpacks 2 tarballs, resulting in 2 directories (one of them is assigned to S). I want to call elibtoolize in both directories.

Currently used ugly workaround:
cd "${S}"
elibtoolize
...
cd "${WORKDIR}/another_directory"
S="$(pwd)" elibtoolize
...
Comment 3 SpanKY gentoo-dev 2013-12-30 08:58:00 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #2)

(cd "${WORKDIR}" && elibtoolize)
Comment 4 Arfrever Frehtes Taifersar Arahesis 2013-12-30 08:59:56 UTC
(In reply to SpanKY from comment #3)
> (In reply to Arfrever Frehtes Taifersar Arahesis from comment #2)
> 
> (cd "${WORKDIR}" && elibtoolize)

elibtoolize (as documented) uses ${S}, not current directory.
Comment 5 SpanKY gentoo-dev 2013-12-31 16:27:20 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #4)

then it's even easier:
S=${WORKDIR} elibtoolize