-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maximum_package_count
is off by one when limiting number of packages to consider
#295
Comments
Fixed in pending 1.9.5 release. Thanks! |
I wonder if you would consider making pkgconf fail (with a non-zero exit code) when given multiple packages (e.g. Some motivation for this:
|
I also stumbled across this today (initially with 1.9.4) and also in the context of Haskell cabal. And 1.9.5 only ever seems to print one version for me: $ pkgconf --version
1.9.5
$ pkgconf --modversion pango glib-2.0 gio-2.0 harfbuzz
1.50.14
$ Anyway I can open a new issue, since this is closed, though not fixed afaict - re-opening would also make sense. |
Ah wait you are saying that outputting one package version now is the correct behavior I see... And +1 for erroring for more than one package |
Hello!
Scenario: I have packages
atf-c
,atf-c++
,atf-sh
. (Any set of two or more packages works for this trick; I happen to have these three from the same source alphabetically early in my list of packages.)... so where did the third one go?
Spelunking the code, I see that
--modversion
(and some other flags) put us into a mode where we only consider one package at a time by settingmaximum_package_count
— perfectly reasonable (though I don't know if this behaviour is actually documented anywhere except here in the source, so surprising in that regard):pkgconf/cli/main.c
Lines 1113 to 1127 in 78f3abc
However, the logic to actually enforce this erroneously compares cardinal
pkgq.length
to ordinalmaximum_package_count
:pkgconf/cli/main.c
Lines 1324 to 1328 in 78f3abc
(I stumbled across this bug because Cabal does this wrong then fails for mysterious reasons; I'll also file a bug there about this behaviour.)
The text was updated successfully, but these errors were encountered: