Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634840 - dev-libs/libbytesize-1.2 creates a top-level directory
Summary: dev-libs/libbytesize-1.2 creates a top-level directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-20 00:27 UTC by Ștefan Talpalaru
Modified: 2018-04-23 07:30 UTC (History)
0 users

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


Attachments
emerge --info libbytesize (libbytesize-emerge-info.txt,9.63 KB, text/plain)
2017-11-06 14:34 UTC, Ștefan Talpalaru
Details
support for multiple python versions (libbytesize-python.patch,1.02 KB, patch)
2017-12-10 09:38 UTC, Sven Wegener
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ștefan Talpalaru 2017-10-20 00:27:21 UTC
root# qlist -e libbytesize
/usr/include/bytesize/bs_size.h
/usr/lib64/libbytesize.so.1
/usr/lib64/libbytesize.so.1.0.0
/usr/lib64/python2.7/site-packages/bytesize/__init__.py
/usr/lib64/python2.7/site-packages/bytesize/bytesize.py
/usr/lib64/pkgconfig/bytesize.pc
/usr/lib64/libbytesize.la
/usr/lib64/libbytesize.so
/usr/share/doc/libbytesize-1.2/README.md.bz2
/bytesize/__init__.py
/bytesize/bytesize.py
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-11-06 10:05:44 UTC
I cannot reproduce this issue. Can you please post the output of

  emerge --info libbytesize

to this bug?
Comment 2 Ștefan Talpalaru 2017-11-06 14:34:05 UTC
Created attachment 502810 [details]
emerge --info libbytesize

Attaching the output of "emerge --info libbytesize".
Comment 3 Sven Wegener gentoo-dev 2017-12-10 08:45:47 UTC
The issue here is that src/python/Makefile.am calls both the python and python3 binaries to support python2 and python3, but the ebuild uses python-single-r1.eclass.

When python_single_target USE flags are set to python3 all is fine, because both python and python3 calls will resolve to the same install path and the package will just install the files twice to the same location.

When the USE flags are set to python2 the python call will install to python2 library path. Calling the python3 binary will result in an error, because python-single-r1.eclass has set up a wrapper script, and the install prefix will be an empty string, i.e. the root prefix.
Comment 4 Sven Wegener gentoo-dev 2017-12-10 09:38:16 UTC
Created attachment 509206 [details, diff]
support for multiple python versions

Just sticking in --without-python3 should be enough, although it is irritating as python3 is still supported.
Installation for multiple python versions is also easy as it just installs the .py files multiple times.
Comment 5 Ștefan Talpalaru 2017-12-12 17:02:20 UTC
I added a patched libbytesize-1.2-r1 to my overlay: https://github.com/stefantalpalaru/gentoo-overlay

I fixed Python3 support by using python_is_python3() and python_foreach_impl() in src_configure().
Comment 6 Sven Wegener gentoo-dev 2017-12-13 08:56:26 UTC
The logic in your ebuild does not work the way you assume.

When configuring the package for multiple interpreter versions you need to use python_copy_sources to copy the source tree, else you're just re-configuring the same source tree all over again and the last one gets used effectively. And as the package does not perform any specific python discovery during configure, there is no need to configure for multiple python versions.

Also using python_is_python3 does not provide any benefit, because for the python3 implementation both the python and the python3 binary will point to python3. Just always using --without-python3 and having the package use the main python binary during installation of the python libraries is better.
Comment 7 Larry the Git Cow gentoo-dev 2017-12-13 13:42:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e6e3f74766d67f12a6d1edbf317133545c214c7

commit 7e6e3f74766d67f12a6d1edbf317133545c214c7
Author:     Sven Wegener <swegener@gentoo.org>
AuthorDate: 2017-12-13 13:40:06 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2017-12-13 13:40:51 +0000

    dev-libs/libbytesize: Revbump to fix creation of top-level directory.
    
    Closes: https://bugs.gentoo.org/634840
    Package-Manager: Portage-2.3.18, Repoman-2.3.6

 .../{libbytesize-1.2.ebuild => libbytesize-1.2-r1.ebuild}      | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Comment 8 Per Pomsel 2018-04-23 05:17:25 UTC
It happens again with version 1.3.
Comment 9 Larry the Git Cow gentoo-dev 2018-04-23 07:30:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ce3ae1f3b1d4eac5c2b1b737256fbc60cfa93e8

commit 5ce3ae1f3b1d4eac5c2b1b737256fbc60cfa93e8
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-04-23 07:30:27 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-04-23 07:30:42 +0000

    dev-libs/libbytesize: Revbump to not create top-lvel directory (again).
    
    Bug: https://bugs.gentoo.org/634840
    Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../{libbytesize-1.3.ebuild => libbytesize-1.3-r1.ebuild}          | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)}