print-provides ? #95
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ariadne/pkgconf#95
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Hi,
i'm experimenting with replacing pkg-config on OpenMandriva Lx.
Our RPM development libraries contains autogenerated requires based on pkg-config --print-provides i.e.
pkgconfig(foobar)
https://github.com/rpm-software-management/rpm/blob/master/scripts/pkgconfigdeps.sh
Output message when building rpm with pkgconf:
DEBUG util.py:265: Processing files: phonon-devel-4.9.0-3.x86_64
DEBUG util.py:265: pkgconf: warning: --print-provides requested which is intentionally unimplemented, along with
DEBUG util.py:265: the rest of the Provides system. The Provides system is broken by design and requires loading every
DEBUG util.py:265: package module to calculate the dependency graph. In practice, there are no consumers of this system
DEBUG util.py:265: so it will remain unimplemented until such time that something actually uses it.
Question. Do you have any idea for a workaround for this issue ?
yeah you don't need it, just scan for the .pc files instead
@kaniini
Sorry i do not understand :)
pkgconfigdeps.sh generates provides in RPM files like pkgconfig(foo), so others rpm packages which are dependant on foo.
@berolinux Have added a patch that provides support for print-provides
https://github.com/OpenMandrivaAssociation/pkgconf/blob/master/pkgconf-0.9.12-print-provides.patch
Can you please take a look on it, so i can prepare a pull request.
To clairfy, my patch is not a complete implementation of --print-provides -- it just prints
pkg->realname = pkg->version (or pkg->realname if no version set).
But for every single .pc file on my box, that's actually what pkg-config --print-provides does -- looks like the dependency system was never used beyond that, and implementing that "print-provides lite" keeps the rpm dependency detector working.
Right, that's why we never implemented it until now, nothing as far as we could tell actually uses it. :)
What I was saying earlier is that FreeBSD and Alpine (the main projects from which pkgconf came) just scan the pkg-config dirs and drop the names of the .pc files (with .pc stripped) to accomplish this.
Anyway, after talking with one of the RPM devs about this issue, they provided a reasonable usecase for the feature so we're going to revisit implementing it (with some changes in how it works so the overhead of supporting it is less severe).
@bapt took a look at freedesktop's implementation and discovered they actually don't implement the Provides system at all, other than
--print-provides
. The parser doesn't even readProvides:
header at all!That would explain why nobody is using it, it doesn't actually work.
So given that, we're going to roll a 1.0.1 with a stub
--print-provides
(same as pkg-config now), and roll 1.1 in a few weeks with an actual Provides support so people can actually use the functionality as intended.4a1b88fcc4
adds support for--print-provides
.@kaniini Thanks.
First RPM builds with pkgconf looks fine on x86_64, i586, armv7hl and aarch64 environments.
Soon we will start some mass rebuild of couple of tousand of packages so hopefully there will be no regression 👍
There's a few issues with your specfile in Mandriva. Where should I report them?
@kaniini You can report them here https://github.com/OpenMandrivaAssociation/pkgconf or https://issues.openmandriva.org
Cool, lets move the mandriva-specific details over to OpenMandrivaAssociation/pkgconf#1 for now.
Although I think there's probably elements of that specfile that should be documented for other RPM distributions once we figure out the details.
So, as an update this bug moves onto actually implementing Provides since pkg-config didn't actually do it. That will be done in the 1.1 series.
A basic implementation of Provides rules has been implemented, which only works with
PKGCONF_CMP_ANY
dependency nodes.Implementing support for versioning is mostly simple enough, but there is a question of what to do with Provides rules which only provide a
PKGCONF_CMP_ANY
comparison op and no version to match against. Should we interpret that as being compatible with any version, or should those Provides rules be ignored in a versioned comparison?@kaniini I guess we can't make the assumption to use the native .pc version for the alternate Provides if the version isn't specified for versioned checks? If not that, matching to any version makes sense, as ignoring it is probably not a good idea.
I thought of that, but don't think it is a good idea. Consider OpenSSL vs LibreSSL where the version numbers are completely different. If LibreSSL uses a
Provides
entry, then the comparison may be incorrect if we use a version fallback.@kaniini Wouldn't it make more sense for LibreSSL to ensure the OpenSSL Provides to match the version of the OpenSSL API they support?
Sure. And of course, I would assume they would do so. I am more talking about edge cases where people don't really understand how the
Provides
rules should work.