On 14/12/21 22:28, Emil Velikov wrote:
On Tue, 14 Dec 2021 at 11:28, Allan McRae <[email protected]> wrote:
On 14/12/21 20:40, Emil Velikov wrote:
Hey Allan,
I really like the idea, although I might have spotted some gotchas.
On Sun, 12 Dec 2021 at 10:54, Allan McRae <[email protected]> wrote:
This patch series replaces the old libdepends/libprovides system into
something akin to that used by APK. In short, makepkg.conf will have
a variable like:
LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32')
Considering your examples (below) also handle "cmd" and "pc" the
LIB_DIRS name is misleading. Alas no better suggestion comes to mind
ATM.
Not really... This is the path for adding library dependencies &
provides. If other autodeps get added, they may need their own
configuration option.
This sounds great.
[snip]
Are we going to continue or error out - is the error message going to
be meaningful or rather cryptic?
As above, nothing will happen. The usr/lib23 directory will (I guess)
never occur in a package, so never be searched for files with an soname.
We might want to have a simple check in makepkg, to high-light those.
If PKGBUILD has "provides" to a non-existant file, we could error out IMHO.
>
This will catch both typos on the packaging side as well as buggy
upstream - say they dropped/renamed the library, or a particular
configure combination no longer builds one of the dozen+ DSOs.
I don't understand this suggestion. There would be no non-existent
provide, as makepkg would not add one unless it finds one in the
configured path. This is a complete change from the current system
where the name of the library needed to be in the PKGBUILD. Now makepkg
will automatically detect and add these values.
And we can't distinguish between a package that has no libraries to be
provided and a makepkg.conf with a typo pointing to the wrong directory.
This is not a blocking suggestion, but I can see it as quite beneficial.
[snip]
Although at this point one might as well have the defaults hardcoded in makepkg?
This needs to be configurable. e.g. some distros will have:
LIB_DIRS=('so:lib' 'so:usr/lib')
when they have not done a /usr merge.
Agreed. When I said hard-coded I was thinking of a default, which can
be overwritten during build time. Say something like:
meson -D lib_dirs="lib:lib64/, lib32:lib/" ...
I'm going to suggest the default is not to have this feature running at
all. So blank is a good default! Or course each distro will provide a
suitable makepkg.conf with their opinionated configuration.
A