client/tools/rhnpush/rhnpush.spec | 8 ++++++--
client/tools/rhnpush/uploadLib.py | 25 +++++++++++++++----------
rel-eng/packages/rhnpush | 2 +-
3 files changed, 22 insertions(+), 13 deletions(-)
New commits:
commit f04bb708b6893f48cf4e4b626480146907af0659
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Feb 1 14:03:32 2011 +0100
Automatic commit of package [rhnpush] release [5.5.16-1].
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index b4e0fc0..7dcb30d 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -5,7 +5,7 @@ Summary: Common programs needed to be installed on the RHN
servers/proxies
Group: Applications/System
License: GPLv2
URL:
http://fedorahosted.org/spacewalk
-Version: 5.5.15
+Version: 5.5.16
Release: 1%{?dist}
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -55,6 +55,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/solaris2mpm.8*
%changelog
+* Tue Feb 01 2011 Tomas Lestach <tlestach(a)redhat.com> 5.5.16-1
+- Revert "648403 - do not create TB even on Red Hat Enterprise Linux 4"
+ (tlestach(a)redhat.com)
+
* Tue Feb 01 2011 Tomas Lestach <tlestach(a)redhat.com> 5.5.15-1
- Revert "get_server_capability() is defined twice in osad and rhncfg, merge
and move to rhnlib and make it member of rpclib.Server" (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/rhnpush b/rel-eng/packages/rhnpush
index 95a7248..e029e66 100644
--- a/rel-eng/packages/rhnpush
+++ b/rel-eng/packages/rhnpush
@@ -1 +1 @@
-5.5.15-1 client/tools/rhnpush/
+5.5.16-1 client/tools/rhnpush/
commit b86ca4b9c50a83f489ab548d8a8abc66a6ad6a44
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Feb 1 13:57:57 2011 +0100
Revert "648403 - do not create TB even on Red Hat Enterprise Linux 4"
This reverts commit 8bdb009008bf6161fb5808c8c29f5ae273cce461
we do not want rhnpush to require rhncfg
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index 81f4b34..b4e0fc0 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -10,7 +10,7 @@ Release: 1%{?dist}
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-Requires: rpm-python, rhnlib, rhncfg
+Requires: rpm-python, rhnlib
Requires: spacewalk-backend-libs >= 0.8.3
%if 0%{?rhel} && 0%{?rhel} < 5
Requires: up2date
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 7bc7e41..a6e96ee 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -15,7 +15,6 @@
# system imports
import os
-import re
import sys
import string
import fnmatch
@@ -25,8 +24,6 @@ import struct
import xmlrpclib
from spacewalk.common import rhn_mpm
from spacewalk.common.checksum import getFileChecksum
-from config_common.repository import get_server_capability
-
try:
from up2date_client import rhnserver
rhnserver_available = True
@@ -727,13 +724,21 @@ def exists_getPackageChecksumBySession(rpc_server):
server._server = rpc_server
result =
server.capabilities.hasCapability('xmlrpc.packages.extended_profile', 2)
else: # rhel4 has no rhnserver
- server_capabilities = get_server_capability(rpc_server)
- if 'xmlrpc.packages.extended_profile' in server_capabilities:
- # that capability can be '1' or '1-2', this is hackish
- result =
server_capabilities['xmlrpc.packages.extended_profile']['version'] >
'1' and \
-
server_capabilities['xmlrpc.packages.extended_profile']['value'] #
usually '1'
- else:
- result = False
+ result = True
+ try: # if server do not have this function we will create TB :(
+ raw_call(rpc_server.packages.getPackageChecksumBySession, '', {})
+ except xmlrpclib.Fault, e:
+ if e.faultCode in [-2, -33]:
+ # Fault -33: session token is invalid
+ # i.e. function exists but we supplied wrong data
+ # Fault -2 session is unknown - expected when empty
+ pass
+ elif e.faultCode == -1:
+ # Fault -1: function invalid
+ result = False
+ else:
+ # pass through anything else
+ raise
return result
# compare two package [n,v,r,e] tuples