- added --last alias
authormarc <devnull@localhost>
Thu, 4 Jun 1998 17:03:29 +0000 (17:03 +0000)
committermarc <devnull@localhost>
Thu, 4 Jun 1998 17:03:29 +0000 (17:03 +0000)
        - fix :depflags query format

CVS patchset: 2144
CVS date: 1998/06/04 17:03:29

CHANGES
lib/formats.c
rpmpopt

diff --git a/CHANGES b/CHANGES
index 5a2f647..5830579 100644 (file)
--- 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
index dd9440e..48052d6 100644 (file)
@@ -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 (file)
--- 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,^..........,,'"