[Yum-devel] [PATCH 1/3] Allow "last" usage in merged transactions.

James Antill james at and.org
Thu Apr 21 20:28:29 UTC 2011


---
 output.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/output.py b/output.py
index cf541f8..07c1d56 100755
--- a/output.py
+++ b/output.py
@@ -1367,6 +1367,14 @@ to exit.
         ''' Convert a user "TID" string of 2..4 into: (2, 4). '''
         def str2int(x):
             try:
+                if x == 'last' or x.startswith('last-'):
+                    tid = old.tid
+                    if x.startswith('last-'):
+                        off = int(x[len('last-'):])
+                        if off <= 0:
+                            int("z")
+                        tid -= off
+                    return tid
                 return int(x)
             except ValueError:
                 return None
-- 
1.7.3.4



More information about the Yum-devel mailing list