From 14996941672975dbbb02e8a40cc5efb7241395a9 Mon Sep 17 00:00:00 2001 From: marc Date: Thu, 4 Jun 1998 17:03:29 +0000 Subject: [PATCH] - added --last alias - fix :depflags query format CVS patchset: 2144 CVS date: 1998/06/04 17:03:29 --- CHANGES | 2 ++ lib/formats.c | 4 ++-- rpmpopt | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 5a2f647..5830579 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,8 @@ - fixed ugly i18n header bug - deal with lang paths sanely when entries are missing languages - fix bug packing /usr/doc when last file was %dir + - added --last alias + - fix :depflags query format 2.5 -> 2.5.1: - fail if sources are not regular files diff --git a/lib/formats.c b/lib/formats.c index dd9440e..48052d6 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -166,13 +166,13 @@ static char * depflagsFormat(int_32 type, const void * data, char * formatPrefix, int padding, int element) { char * val; char buf[10]; - int anint = *(((int_32 *) data) + element); + int anint = *((int_32 *) data); if (type != RPM_INT32_TYPE) { val = malloc(20); strcpy(val, _("(not a number)")); } else { - *buf = '\0'; + buf[0] = '\0'; if (anint & RPMSENSE_LESS) strcat(buf, "<"); diff --git a/rpmpopt b/rpmpopt index 2449573..5f86157 100644 --- a/rpmpopt +++ b/rpmpopt @@ -53,3 +53,6 @@ rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGE rpm alias --triggerscripts --qf '\ [trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\ %{TRIGGERSCRIPTS}\n]' + +rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %-27{NAME} %|INSTALLTIME?{%-27{INSTALLTIME:date}}:{(not installed)}|\n' \ + --pipe "sort -r -n | sed 's,^..........,,'" -- 2.7.4