mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-04-14 20:30:44 +02:00
Move --print-variables handling after --exists for consistency
The --print-variables output is inconsistent with other printing options when --exists is supplied or not. Move the handling after --exists like --print-requires and others requiring a valid package list so that --exists is given it takes priority and exits early. Freedesktop #54384 (https://bugs.freedesktop.org/show_bug.cgi?id=54384)
This commit is contained in:
parent
90e0ec0f6f
commit
d6a14488db
1 changed files with 15 additions and 16 deletions
31
main.c
31
main.c
|
|
@ -572,6 +572,21 @@ main (int argc, char **argv)
|
|||
if (failed) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
g_string_free (str, TRUE);
|
||||
|
||||
packages = g_slist_reverse (packages);
|
||||
|
||||
if (packages == NULL)
|
||||
{
|
||||
fprintf (stderr, "Must specify package names on the command line\n");
|
||||
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (want_exists)
|
||||
return 0; /* if we got here, all the packages existed. */
|
||||
|
||||
if (want_variable_list)
|
||||
{
|
||||
|
|
@ -590,22 +605,6 @@ main (int argc, char **argv)
|
|||
need_newline = FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
g_string_free (str, TRUE);
|
||||
|
||||
packages = g_slist_reverse (packages);
|
||||
|
||||
if (packages == NULL)
|
||||
{
|
||||
fprintf (stderr, "Must specify package names on the command line\n");
|
||||
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (want_exists)
|
||||
return 0; /* if we got here, all the packages existed. */
|
||||
|
||||
if (want_uninstalled)
|
||||
{
|
||||
/* See if > 0 pkgs (including dependencies recursively) were uninstalled */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue