Compare commits

...

2 Commits

Author SHA1 Message Date
Ariadne Conill 95086643fa cli: remove package count restriction from --modversion
ci/woodpecker/push/woodpecker Pipeline was successful Details
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
2023-08-11 13:48:02 -07:00
Ariadne Conill fe69ccc6b9 Revert "main: explicitly error with --modversion and more than 1 package being queried"
This reverts commit a97b75ab2c.
2023-08-11 13:41:20 -07:00
1 changed files with 4 additions and 10 deletions

View File

@ -1119,7 +1119,6 @@ main(int argc, char *argv[])
(want_flags & PKG_REQUIRES_PRIVATE) == PKG_REQUIRES_PRIVATE ||
(want_flags & PKG_PROVIDES) == PKG_PROVIDES ||
(want_flags & PKG_VARIABLES) == PKG_VARIABLES ||
(want_flags & PKG_MODVERSION) == PKG_MODVERSION ||
(want_flags & PKG_PATH) == PKG_PATH ||
want_variable != NULL))
{
@ -1127,6 +1126,10 @@ main(int argc, char *argv[])
maximum_traverse_depth = 1;
}
/* we also want to walk only the flattened dependencies if we are requesting --modversion. */
if ((want_flags & PKG_MODVERSION) == PKG_MODVERSION)
maximum_traverse_depth = 1;
if (getenv("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS") != NULL)
want_flags |= PKG_KEEP_SYSTEM_CFLAGS;
@ -1326,16 +1329,7 @@ cleanup3:
* the limit, stop adding packages to the queue.
*/
if (maximum_package_count > 0 && pkgq.length >= maximum_package_count)
{
if ((want_flags & PKG_MODVERSION) == PKG_MODVERSION)
{
fprintf(stderr, "pkgconf: --modversion requested with multiple packages, output would be ambiguous\n");
ret = EXIT_FAILURE;
goto out;
}
break;
}
while (isspace((unsigned char)package[0]))
package++;