client/rhel/rhn-client-tools/rhn-client-tools.spec | 1
client/rhel/rhn-client-tools/src/up2date_client/Makefile | 2
client/rhel/rhn-client-tools/src/up2date_client/rhnErrata.py | 55 -----------
client/rhel/rhn-client-tools/test/alltests.py | 2
client/rhel/rhn-client-tools/test/testRhnErrata.py | 39 -------
5 files changed, 1 insertion(+), 98 deletions(-)
New commits:
commit 3a4916b64e8558a1b29bda99fba65a92797822d4
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Feb 17 10:09:25 2010 +0100
getAdvisoryInfo not called from anywhere, the whole rhnErrata is thus unused,
removing.
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index b1d5475..3956084 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -161,7 +161,6 @@ make -f Makefile.rhn-client-tools test
%{_datadir}/rhn/up2date_client/rpmUtils.*
%{_datadir}/rhn/up2date_client/rhnPackageInfo.*
%{_datadir}/rhn/up2date_client/rhnChannel.*
-%{_datadir}/rhn/up2date_client/rhnErrata.*
%{_datadir}/rhn/up2date_client/rhnHardware.*
%{_datadir}/rhn/up2date_client/transaction.*
%{_datadir}/rhn/up2date_client/clientCaps.*
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/Makefile
b/client/rhel/rhn-client-tools/src/up2date_client/Makefile
index 7b2689c..b38fa90 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/Makefile
+++ b/client/rhel/rhn-client-tools/src/up2date_client/Makefile
@@ -9,7 +9,7 @@ FILES := config gui hardware progress \
up2dateLog rpmUtils rhnreg transaction \
up2dateErrors rpcServer up2dateAuth \
rhnPackageInfo rhnChannel \
- rhnErrata rhnHardware \
+ rhnHardware \
clientCaps capabilities \
rhnregGui rhnserver \
messageWindow rhncli \
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnErrata.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnErrata.py
deleted file mode 100644
index 7c9e822..0000000
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnErrata.py
+++ /dev/null
@@ -1,55 +0,0 @@
-
-import up2dateAuth
-import up2dateLog
-import up2dateUtils
-import rhnserver
-import transaction
-import config
-
-
-
-def getAdvisoryInfo(pkg, warningCallback=None):
- log = up2dateLog.initLog()
- cfg = config.initUp2dateConfig()
-
- s = rhnserver.RhnServer()
-
- ts = transaction.initReadOnlyTransaction()
- mi = ts.dbMatch('Providename', pkg[0])
- if not mi:
- return None
-
- # odd,set h to last value in mi. mi has to be iterated
- # to get values from it...
- h = None
- for h in mi:
- break
-
- info = None
-
- # in case of package less errata that somehow apply
- if h:
- try:
- pkgName = "%s-%s-%s" % (h['name'],
- h['version'],
- h['release'])
- log.log_me("getAdvisoryInfo for %s" % pkgName)
- info = s.errata.getPackageErratum(up2dateAuth.getSystemId(), pkg)
- except up2dateErrors.RhnServerException, e:
- if warningCallback:
- warningCallback(e)
- return None
-
- if info:
- return info
-
- try:
- log.log_me("getAdvisoryInfo for %s-0-0" % pkg[0])
- info = s.errata.GetByPackage("%s-0-0" % pkg[0],
- up2dateUtils.getVersion())
- except up2dateErrors.RhnServerException, e:
- if warningCallback:
- warningCallback(e)
- return None
-
- return info
diff --git a/client/rhel/rhn-client-tools/test/alltests.py
b/client/rhel/rhn-client-tools/test/alltests.py
index 54930a9..a9efe67 100644
--- a/client/rhel/rhn-client-tools/test/alltests.py
+++ b/client/rhel/rhn-client-tools/test/alltests.py
@@ -24,7 +24,6 @@ import testByteRangeRpcServer
import testClientCaps
import testConfig
import testRhnChannel
-import testRhnErrata
import testRpcServer
import testRpmUtils
import testSSLSocketTimeout
@@ -43,7 +42,6 @@ def suite():
testClientCaps.suite(),
testConfig.suite(),
testRhnChannel.suite(),
- testRhnErrata.suite(),
testRpcServer.suite(),
testRpmUtils.suite(),
testSSLSocketTimeout.suite(),
diff --git a/client/rhel/rhn-client-tools/test/testRhnErrata.py
b/client/rhel/rhn-client-tools/test/testRhnErrata.py
deleted file mode 100755
index cc20d1c..0000000
--- a/client/rhel/rhn-client-tools/test/testRhnErrata.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-import settestpath
-
-from up2date_client import rhnErrata
-# lots of useful util methods for building/tearing down
-# test enviroments...
-import testutils
-
-import unittest
-
-def write(blip):
- sys.stdout.write("\n|%s|\n" % blip)
-
-class TestRhnErrata(unittest.TestCase):
- def setUp(self):
- self.__setupData()
- testutils.setupConfig("channelTest1")
-
- def __setupData(self):
- pass
-
- def tearDown(self):
- testutils.restoreConfig()
-
- def testGetAdvisoryInfo(self):
- res = rhnErrata.getAdvisoryInfo(["sendmail", "8.12.8",
"5.90", ""])
- write(res)
-
-
-def suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestRhnErrata))
- return suite
-
-if __name__ == "__main__":
- unittest.main(argv=sys.argv)
Show replies by date