View previous topic :: View next topic |
Author |
Message |
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3638
|
Posted: Sat Jun 12, 2021 2:00 pm Post subject: ebuild: Testing ARCH? |
|
|
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...
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 |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2727
|
Posted: Sat Jun 12, 2021 2:09 pm Post subject: |
|
|
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 |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat Jun 12, 2021 2:41 pm Post subject: |
|
|
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 |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6749
|
Posted: Sat Jun 12, 2021 3:02 pm Post subject: |
|
|
In an ebuild, you get the correct path for all arches with
|
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2727
|
Posted: Sat Jun 12, 2021 3:02 pm Post subject: |
|
|
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 |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat Jun 12, 2021 3:29 pm Post subject: |
|
|
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 |
|
|
|