Use %{nvra} as default query format, much simpler...
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 2 Sep 2009 12:34:35 +0000 (15:34 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 2 Sep 2009 12:34:35 +0000 (15:34 +0300)
lib/query.c
macros.in

index f2a51b3..d228670 100644 (file)
@@ -626,7 +626,7 @@ int rpmcliQuery(rpmts ts, QVA_t qva, char * const * argv)
        char * fmt = rpmExpand("%{?_query_all_fmt}\n", NULL);
        if (fmt == NULL || strlen(fmt) <= 1) {
            fmt = _free(fmt);
-           fmt = xstrdup("%{name}-%{version}-%{release}.%{arch}\n");
+           fmt = xstrdup("%{nvra}\n");
        }
        qva->qva_queryFormat = fmt;
     }
index c7ca713..c4de1fa 100644 (file)
--- a/macros.in
+++ b/macros.in
@@ -753,10 +753,10 @@ print (t)\
        %{nil}
 
 #
-# Default headerSprintf() output format string for rpm -qa
+# Default output format string for rpm -qa
 #
-# XXX  Note: escaped %% for use in headerSprintf()
-%_query_all_fmt                %%{name}-%%{version}-%%{release}%%|arch?{.%%{arch}}:{}|
+# XXX  Note: escaped %% for use in headerFormat()
+%_query_all_fmt                %%{nvra}
 
 #
 # Default path to the file used for transaction fcmtl lock.