6 |
enabled=1 |
enabled=1 |
7 |
-tokeep=2 |
-tokeep=2 |
8 |
+tokeep=5 |
+tokeep=5 |
9 |
diff -uNr yum-plugin-installonlyn-0.91/installonlyn.py yum-plugin-installonlyn-0.91.patch/installonlyn.py |
--- yum-plugin-installonlyn-0.91/installonlyn.py.sme 2007-05-23 14:29:34.000000000 -0600 |
10 |
--- yum-plugin-installonlyn-0.91/installonlyn.py 2007-05-23 14:29:34.000000000 -0600 |
+++ yum-plugin-installonlyn-0.91/installonlyn.py 2008-03-29 14:25:17.000000000 -0600 |
11 |
+++ yum-plugin-installonlyn-0.91.patch/installonlyn.py 2008-03-26 22:57:48.000000000 -0600 |
@@ -64,9 +64,9 @@ |
12 |
@@ -14,7 +14,7 @@ |
for (n, a, e, v, r) in installed: |
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
if (v, r) == (curv, curr): # don't remove running |
14 |
# GNU General Public License for more details. |
continue |
15 |
# |
- toremove.append(YumInstalledPackage(rpmdb.returnHeaderByTuple((n,a,e,v,r))[0])) |
16 |
-# version 0.90 |
- numleft -= 1 |
17 |
+# version 0.91 By Paul Floor for SME integration |
if numleft == 0: |
18 |
|
break |
19 |
import os |
+ toremove.append(YumInstalledPackage(rpmdb.returnHeaderByTuple((n,a,e,v,r))[0])) |
20 |
from rpmUtils import miscutils |
+ numleft -= 1 |
21 |
@@ -56,7 +56,7 @@ |
|
22 |
if (m.name == instpkg or instpkg in m.po.getProvidesNames()) \ |
map(lambda x: ts.addErase(x), toremove) |
|
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() |
|
|
|
|