Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 806362 - sys-apps/pkgcore: wrong --libdir in econf (seen with dev-db/postgresql)
Summary: sys-apps/pkgcore: wrong --libdir in econf (seen with dev-db/postgresql)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2021-08-04 08:59 UTC by OzTiram
Modified: 2021-08-07 00:57 UTC (History)
2 users (show)

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


Attachments
log of emerge (emerge-log,384.86 KB, text/plain)
2021-08-04 09:00 UTC, OzTiram
Details
log of pmerge (pmerge-log,480.15 KB, text/plain)
2021-08-04 09:00 UTC, OzTiram
Details
fixed ebuild (postgresql-13.3-r1.ebuild,12.63 KB, text/plain)
2021-08-04 09:01 UTC, OzTiram
Details
log of pmerge with fixed ebuild (pmerge-log-13-3-r1,448.99 KB, text/plain)
2021-08-04 09:02 UTC, OzTiram
Details
ebd/eapi/2/src_configure.bash: Fix typo in econf --libdir logic (0001-ebd-eapi-2-src_configure.bash-Fix-typo-in-econf-libd.patch,902 bytes, patch)
2021-08-04 09:31 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description OzTiram 2021-08-04 08:59:20 UTC
When using emerge ebuild configures libdir to  --libdir=/usr/lib64/postgresql-13/lib64, but this is implicitly done.
When installing with pmerge this will be --libdir=/lib64.
This in turn, results in failure to detect libs when `postgresql-config update`  is invoked in `pkg_postinst`.

Reproducible: Always

Steps to Reproduce:
1. emerge -1 dev-db/postgresl | grep --libdir
2. emerce -C dev-db/postgresl 
3. pmerge -1 dev-db/postgresl | grep --libdir
Actual Results:  
# grep libdir emerge-log 
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/postgresql-13.3 --htmldir=/usr/share/doc/postgresql-13.3/html --libdir=/usr/lib64/postgresql-13/lib64 --prefix=/usr/lib64/postgresql-13 --datadir=/usr/share/postgresql-13 --includedir=/usr/include/postgresql-13 --mandir=/usr/share/postgresql-13/man --sysconfdir=/etc/postgresql-13 --with-system-tzdata=/usr/share/zoneinfo --disable-debug --disable-thread-safety --with-icu --without-gssapi --without-ldap --without-llvm --with-pam --without-perl --without-python --with-readline --with-openssl --without-systemd --without-tcl --without-libxml --without-libxslt --with-zlib --enable-nls --enable-spinlocks
 
# grep libdir pmerge-log 
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/postgresql-13.3 --htmldir=/usr/share/doc/postgresql-13.3/html --libdir=/lib64 --prefix=/usr/lib64/postgresql-13 --datadir=/usr/share/postgresql-13 --includedir=/usr/include/postgresql-13 --mandir=/usr/share/postgresql-13/man --sysconfdir=/etc/postgresql-13 --with-system-tzdata=/usr/share/zoneinfo --disable-debug --disable-thread-safety --with-icu --without-gssapi --without-ldap --without-llvm --with-pam --without-perl --without-python --with-readline --with-openssl --without-systemd --without-tcl --without-libxml --without-libxslt --with-zlib --enable-nls --enable-spinlocks


Expected Results:  
pmerge has the same libdir as emerge.



I was able to fix the issue with the following explicit --libdir in src_configure:

--libdir="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)"

See attached ebuild.
Comment 1 OzTiram 2021-08-04 09:00:23 UTC
Created attachment 730058 [details]
log of emerge
Comment 2 OzTiram 2021-08-04 09:00:46 UTC
Created attachment 730066 [details]
log of pmerge
Comment 3 OzTiram 2021-08-04 09:01:33 UTC
Created attachment 730076 [details]
fixed ebuild
Comment 4 OzTiram 2021-08-04 09:02:06 UTC
Created attachment 730078 [details]
log of pmerge with fixed ebuild
Comment 5 OzTiram 2021-08-04 09:06:21 UTC
See also but report in pkgcore: https://github.com/pkgcore/pkgcore/issues/318
Comment 6 Ulrich Müller gentoo-dev 2021-08-04 09:19:31 UTC
Portage is correct. --libdir should use the prefix passed by --prefix.

PMS algorithm 12.2: https://projects.gentoo.org/pms/8/pms.html#x1-128002r2
Comment 7 Ulrich Müller gentoo-dev 2021-08-04 09:31:12 UTC
Created attachment 730080 [details, diff]
ebd/eapi/2/src_configure.bash: Fix typo in econf --libdir logic

Looks like a typo in econf ("pref" instead of "prefix").
Comment 8 Larry the Git Cow gentoo-dev 2021-08-04 11:36:48 UTC
The bug has been closed via the following commit(s):

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

commit a1a0017b18cc99e4d4c4722082967abbcabdc806
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-08-04 11:32:31 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-08-04 11:35:34 +0000

    sys-apps/pkgcore: Bump to 0.12.2
    
    Closes: https://bugs.gentoo.org/806362
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-apps/pkgcore/Manifest              |  1 +
 sys-apps/pkgcore/pkgcore-0.12.2.ebuild | 50 ++++++++++++++++++++++++++++++++++
 sys-apps/pkgcore/pkgcore-9999.ebuild   |  7 +++--
 3 files changed, 56 insertions(+), 2 deletions(-)