Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ebuild: Testing ARCH?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3638

PostPosted: Sat Jun 12, 2021 2:00 pm    Post subject: ebuild: Testing ARCH? Reply with quote

A config file is installed here with hard coded paths:
Code:
/usr/lib/<pkg_name>
which is incorrect on [~]amd64 where it should be:
Code:
/usr/lib64/<pkg_name>
.
I'd like to change ebuild to patch the config file only when required.
I don't know how to test... :oops:
Any idea?
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2727

PostPosted: Sat Jun 12, 2021 2:09 pm    Post subject: Reply with quote

Not sure what package you're referring to but using /usr/lib/<pkgname> on amd64 is normal, it's the standard location that offers better compatibility, and it's also fine to even have both 32bit and 64bit libraries in that sub-directory (this is done by several packages, llvm has /usr/lib/llvm/lib64 for example)

A real problem would be if /usr/lib contained 64bit libraries without a sub-directory.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sat Jun 12, 2021 2:41 pm    Post subject: Reply with quote

latest openrc tests for 17.1 witj:
Code:
        if [[ ! -h "${EROOT}"/lib ]]; then
                if [[ -d "${EROOT}/$(get_libdir)"/rc ]]; then
                        cp -RPp "${EROOT}/$(get_libdir)/rc" "${EROOT}"/lib
                fi
        fi
in pkg_postinst. Personally, I would prefer a symlink to a copy.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6749

PostPosted: Sat Jun 12, 2021 3:02 pm    Post subject: Reply with quote

In an ebuild, you get the correct path for all arches with
Code:
/usr/$(get_libdir)
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2727

PostPosted: Sat Jun 12, 2021 3:02 pm    Post subject: Reply with quote

Tony0945 wrote:
latest openrc tests for 17.1 witj:
Code:
        if [[ ! -h "${EROOT}"/lib ]]; then
                if [[ -d "${EROOT}/$(get_libdir)"/rc ]]; then
                        cp -RPp "${EROOT}/$(get_libdir)/rc" "${EROOT}"/lib
                fi
        fi
in pkg_postinst. Personally, I would prefer a symlink to a copy.
Is it really testing for 17.1? I'd imagine it's intended to handle old locations or something (maybe special profiles).

All my 17.1 systems are using /lib/rc, nothing in lib64 for openrc.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sat Jun 12, 2021 3:29 pm    Post subject: Reply with quote

Ionen wrote:
Is it really testing for 17.1? I'd imagine it's intended to handle old locations or something (maybe special profiles).

All my 17.1 systems are using /lib/rc, nothing in lib64 for openrc.

That's what it looks like to me. Does absolutely nothing for <17.1 because /lib is symlinked to /lib64 or /lib32.
But in 17.1 the aren't and without the copy (or a link), gentoo fails to boot.

BTW, the copied files are not listed in equery so if one moves to another init systenm, the copied files are left behind as orphans. I'd rather have a dead symlink than a mess of orphaned files.

Anyway the purpose is peripheral. it's just an example of using get_libdir.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum