--- rpms/yum-plugin-installonlyn/sme7/yum-plugin-installonlyn-sme_fix.patch 2008/03/29 19:52:31 1.1 +++ rpms/yum-plugin-installonlyn/sme7/yum-plugin-installonlyn-sme_fix.patch 2008/03/29 20:33:06 1.2 @@ -6,24 +6,17 @@ diff -uNr yum-plugin-installonlyn-0.91/i enabled=1 -tokeep=2 +tokeep=5 -diff -uNr yum-plugin-installonlyn-0.91/installonlyn.py yum-plugin-installonlyn-0.91.patch/installonlyn.py ---- yum-plugin-installonlyn-0.91/installonlyn.py 2007-05-23 14:29:34.000000000 -0600 -+++ yum-plugin-installonlyn-0.91.patch/installonlyn.py 2008-03-26 22:57:48.000000000 -0600 -@@ -14,7 +14,7 @@ - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # --# version 0.90 -+# version 0.91 By Paul Floor for SME integration - - import os - from rpmUtils import miscutils -@@ -56,7 +56,7 @@ - if (m.name == instpkg or instpkg in m.po.getProvidesNames()) \ - and m.ts_state in ('i', 'u'): - installed = rpmdb.returnTupleByKeyword(name=m.name) -- if len(installed) >= num_tokeep - 1: # since we're adding one -+ if len(installed) > num_tokeep - 1: # since we're adding one - numleft = len(installed) - num_tokeep + 1 - (curv, curr) = get_running_kernel_version_release() - +--- yum-plugin-installonlyn-0.91/installonlyn.py.sme 2007-05-23 14:29:34.000000000 -0600 ++++ yum-plugin-installonlyn-0.91/installonlyn.py 2008-03-29 14:25:17.000000000 -0600 +@@ -64,9 +64,9 @@ + for (n, a, e, v, r) in installed: + if (v, r) == (curv, curr): # don't remove running + continue +- toremove.append(YumInstalledPackage(rpmdb.returnHeaderByTuple((n,a,e,v,r))[0])) +- numleft -= 1 + if numleft == 0: + break ++ toremove.append(YumInstalledPackage(rpmdb.returnHeaderByTuple((n,a,e,v,r))[0])) ++ numleft -= 1 + + map(lambda x: ts.addErase(x), toremove)