client/rhel
by Milan Zazrivec
client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 6ba24293db19d5675de87c0c6e05f03d22e5afad
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Aug 1 17:40:39 2011 +0200
702084 - rhn-channel: meaningful message when wrong username / password
diff --git a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
index 68c1095..22a120a 100644
--- a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
+++ b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
@@ -89,7 +89,12 @@ def get_available_channels(user, password):
scheme, netloc, path, query, fragment = urlparse.urlsplit(satellite_url)
satellite_url = urlparse.urlunsplit((scheme, netloc, '/rpc/api', query, fragment))
client = xmlrpclib.Server(satellite_url, verbose=0)
- key = client.auth.login(user, password)
+ try:
+ key = client.auth.login(user, password)
+ except xmlrpclib.Fault, exc:
+ sys.stderr.write("Error during client authentication: %s" % exc.faultString)
+ sys.exit(1)
+
system_id = re.sub('^ID-', '', rpclib.xmlrpclib.loads(up2dateAuth.getSystemId())[0][0]['system_id'])
result = []
for channel in client.system.listChildChannels(key, int(system_id)):
12 years, 9 months
Changes to 'refs/tags/yum-rhn-plugin-1.6.1-1'
by Michael Mraka
Tag 'yum-rhn-plugin-1.6.1-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-08-01 13:51 +0000
Tagging package [yum-rhn-plugin] version [1.6.1-1] in directory [client/rhel/yum-rhn-plugin/].
Changes since spacewalk-java-1.6.7-1:
Michael Mraka (28):
Revert "703169 - Search for cached repomd.xml in a correct path"
Revert "Fixing sloppy coding."
Revert "707241 - create progressbar even during groupinstall and do not delete rhnplugin.repos during groupinstall command"
Revert "W:202: Bad indentation."
Revert "691283 - create persistdir in _repos_persistdir instead of PWD"
Revert "remove dead code"
Revert "690190 - yumdownloader set callbacks soon, save it to new repo"
Revert "there not opts when called from rhn_check"
Revert "688870 - resolve --enablerepo/--disablerepo for RHN repos"
Revert "690234 - do not re-create repo if it exist and is type of RhnRepo"
Revert "fix variable typo"
Revert "add repo name in case you have old format of rhnplugin.repos"
Revert "688870 - also check whether cached repo is valid"
Revert "684342 - beside repo.id, cache even repo.name"
Revert "repopulate package sack after initial setup"
Revert "switch off network communication in cache only mode"
Revert "cache list of rhn channels so we can correctly clean our stuff"
Revert "627525 - moved communication with satellite server from init_hook to prereposetup_hook"
627525 - disable network communication with certain commands/options
cache list of last seen channels so we can correctly clean them
disable network in cache only mode
684342 - beside repo.id, cache even repo.name
add repo name in case you have old format of rhnplugin.repos
fix variable typo
691283 - create persistdir in _repos_persistdir instead of PWD
call conduit.getConf() only once
W:278: Bad indentation.
Automatic commit of package [yum-rhn-plugin] release [1.6.1-1].
---
client/rhel/yum-rhn-plugin/actions/packages.py | 1
client/rhel/yum-rhn-plugin/rhnplugin.py | 151 ++++++++++++-------------
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 12 +
rel-eng/packages/yum-rhn-plugin | 2
4 files changed, 85 insertions(+), 81 deletions(-)
---
12 years, 9 months
client/rhel rel-eng/packages
by Michael Mraka
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 12 +++++++++++-
rel-eng/packages/yum-rhn-plugin | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 1072adcbb8d5aa19c53218b6a5c9130d9b86c313
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 1 15:51:15 2011 +0200
Automatic commit of package [yum-rhn-plugin] release [1.6.1-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index dddb1c5..067d10e 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -1,6 +1,6 @@
Summary: RHN support for yum
Name: yum-rhn-plugin
-Version: 1.6.0
+Version: 1.6.1
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -72,6 +72,16 @@ fi
%doc LICENSE
%changelog
+* Mon Aug 01 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.1-1
+- call conduit.getConf() only once
+- 691283 - create persistdir in _repos_persistdir instead of PWD
+- 684342 - beside repo.id, cache even repo.name
+- disable network in cache only mode
+- cache list of last seen channels so we can correctly clean them
+- 627525 - disable network communication with certain commands/options
+- reverted init_hook -> prereposetup_hook move
+- Bumping package versions for 1.6.
+
* Tue Jul 19 2011 Jan Pazdziora 1.5.11-1
- Merging Transifex changes for yum-rhn-plugin.
- New translations from Transifex for yum-rhn-plugin.
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index 5865a70..a33799d 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-1.5.11-1 client/rhel/yum-rhn-plugin/
+1.6.1-1 client/rhel/yum-rhn-plugin/
12 years, 9 months
27 commits - client/rhel
by Michael Mraka
client/rhel/yum-rhn-plugin/actions/packages.py | 1
client/rhel/yum-rhn-plugin/rhnplugin.py | 151 ++++++++++++-------------
2 files changed, 73 insertions(+), 79 deletions(-)
New commits:
commit 8094faa255ffde5e2c5261eb6c1ceb208b2990fc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 1 13:49:03 2011 +0200
W:278: Bad indentation.
fixing
W:278: Bad indentation. Found 10 spaces, expected 12
W:279: Bad indentation. Found 12 spaces, expected 16
W:281: Bad indentation. Found 10 spaces, expected 12
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 52ef32e..9ed2edc 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -276,10 +276,10 @@ class RhnRepo(YumRepository):
# support failover urls, #232567
urls = []
if type(channel['url']) == list:
- for url in channel['url']:
- urls.append(url + '/GET-REQ/' + self.id)
+ for url in channel['url']:
+ urls.append(url + '/GET-REQ/' + self.id)
else: # type will be always list since Spacewalk 1.4, in future this will be dead coed
- urls.append(channel['url'] + '/GET-REQ/' + self.id)
+ urls.append(channel['url'] + '/GET-REQ/' + self.id)
self.baseurl = urls
self.urls = self.baseurl
commit 45d1ab84b373f0d0216bbbb51c5a32078e36bce6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 1 13:45:03 2011 +0200
call conduit.getConf() only once
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index c8d61f8..52ef32e 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -148,12 +148,13 @@ def init_hook(conduit):
return
repos = conduit.getRepos()
- cachedir = conduit.getConf().cachedir
- default_gpgcheck = conduit.getConf().gpgcheck
+ conduit_conf = conduit.getConf()
+ cachedir = conduit_conf.cachedir
+ default_gpgcheck = conduit_conf.gpgcheck
gpgcheck = conduit.confBool('main', 'gpgcheck', default_gpgcheck)
sslcacert = get_ssl_ca_cert(up2date_cfg)
- enablegroups = conduit.getConf().enablegroups
- metadata_expire = conduit.getConf().metadata_expire
+ enablegroups = conduit_conf.enablegroups
+ metadata_expire = conduit_conf.metadata_expire
cachefilename = os.path.join(cachedir, cachedRHNReposFile)
try:
@@ -170,8 +171,8 @@ def init_hook(conduit):
repo.enablegroups = enablegroups
repo.metadata_expire = metadata_expire
repo._proxy_dict = proxy_dict
- if hasattr(conduit.getConf(), '_repos_persistdir'):
- repo.base_persistdir = conduit.getConf()._repos_persistdir
+ if hasattr(conduit_conf, '_repos_persistdir'):
+ repo.base_persistdir = conduit_conf._repos_persistdir
repoOptions = getRHNRepoOptions(conduit, repo.id)
if repoOptions:
for o in repoOptions:
commit 0f503061d78c99ba1704094928107e011468c594
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 1 12:15:52 2011 +0200
691283 - create persistdir in _repos_persistdir instead of PWD
reimplemented a50a4746bfd801e5765dfcff4577261cf63fdd60
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 0480a0d..c8d61f8 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -209,6 +209,8 @@ def addCachedRepos(conduit):
repo.baseurl = urls
repo.urls = repo.baseurl
repo.name = reponame
+ if hasattr(conduit.getConf(), '_repos_persistdir'):
+ repo.base_persistdir = conduit.getConf()._repos_persistdir
repo.enable()
if not repos.findRepos(repo.id):
repos.add(repo)
commit 3d53676183ab2a488ec07b928ccbdca5dd3cbbda
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 1 11:48:53 2011 +0200
fix variable typo
reimplmented 0daa72c1a285e1daab1ecaf08e8b2cac457728c1
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index f8b0740..0480a0d 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -198,7 +198,7 @@ def addCachedRepos(conduit):
repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
cachefile.close()
urls = ["http://dummyvalue"]
- for repoitem in repolist:
+ for repo_item in repolist:
if len(repo_item) == 1:
repo_item.append('')
(repoid, reponame) = repo_item
commit 485ddb9090c3550d2c6dfffc9c3d0baecc5cb632
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 1 11:45:11 2011 +0200
add repo name in case you have old format of rhnplugin.repos
reimplemented b12837c8d1e45a6de46bd02fff10ed4fefac5bc7
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 94f4460..f8b0740 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -198,7 +198,10 @@ def addCachedRepos(conduit):
repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
cachefile.close()
urls = ["http://dummyvalue"]
- for (repoid, reponame) in repolist:
+ for repoitem in repolist:
+ if len(repo_item) == 1:
+ repo_item.append('')
+ (repoid, reponame) = repo_item
repodir = os.path.join(cachedir, repoid)
if os.path.isdir(repodir):
repo = YumRepository(repoid)
commit 3a47899d842b2db14bafc2d1539ddef45b85f216
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jul 29 17:07:07 2011 +0200
684342 - beside repo.id, cache even repo.name
reimplemented 6da41679b8fe50538f108111fabe5b5cfc46e636
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 870a374..94f4460 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -180,7 +180,7 @@ def init_hook(conduit):
(repo.id, o[0], o[1]))
repos.add(repo)
if cachefile:
- cachefile.write(repo.id + "\n")
+ cachefile.write("%s %s\n" % (repo.id, repo.name))
if cachefile:
cachefile.close()
@@ -195,16 +195,17 @@ def addCachedRepos(conduit):
if not os.access(cachefilename, os.R_OK):
return
cachefile = open(cachefilename, 'r')
- repolist = [ line.rstrip() for line in cachefile.readlines()]
+ repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
cachefile.close()
urls = ["http://dummyvalue"]
- for reponame in repolist:
- repodir = os.path.join(cachedir, reponame)
+ for (repoid, reponame) in repolist:
+ repodir = os.path.join(cachedir, repoid)
if os.path.isdir(repodir):
- repo = YumRepository(reponame)
+ repo = YumRepository(repoid)
repo.basecachedir = cachedir
repo.baseurl = urls
repo.urls = repo.baseurl
+ repo.name = reponame
repo.enable()
if not repos.findRepos(repo.id):
repos.add(repo)
commit b41f07124fa6c02a725bf867d149f0132e23c6ba
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jul 29 15:38:02 2011 +0200
disable network in cache only mode
reimplemented 1154ea771d908c8181d974483178ad9ac32074d3
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 5924985..870a374 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -94,6 +94,7 @@ def init_hook(conduit):
filt_parser = FilterOptionParser(add_help_option=False)
filt_parser.add_option('', '--version', action="store_true")
filt_parser.add_option('', '--help', action="store_true")
+ filt_parser.add_option('-C', '--cacheonly', action="store_true")
(filt_opts, filt_commands) = filt_parser.parse_args()
if filt_opts.version or filt_opts.help or filt_commands == []:
rhn_enabled = False
@@ -107,6 +108,12 @@ def init_hook(conduit):
if os.path.exists(pcklAuthFileName):
os.unlink(pcklAuthFileName)
return
+ if filt_opts.cacheonly:
+ rhn_enabled = False
+ addCachedRepos(conduit)
+ conduit.info(10, _("Using list of RHN repos from cache") +
+ "\n" + RHN_DISABLED)
+ return
try:
login_info = up2dateAuth.getLoginInfo()
commit 3354df996f8ee4279386686fe9425e191c96904a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jul 29 15:32:18 2011 +0200
cache list of last seen channels so we can correctly clean them
reimplemented 605255c555e375b2a52d4b64cca7716904d228c5
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index eaf10b7..5924985 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -44,6 +44,7 @@ __revision__ = "$Rev$"
requires_api_version = '2.5'
plugin_type = TYPE_CORE
pcklAuthFileName = "/var/spool/up2date/loginAuth.pkl"
+cachedRHNReposFile = 'rhnplugin.repos'
rhn_enabled = True
@@ -100,8 +101,11 @@ def init_hook(conduit):
"\n" + RHN_DISABLED)
return
if filt_commands[0] == 'clean':
- formReposForClean(conduit)
+ addCachedRepos(conduit)
conduit.info(10, _("Cleaning") + "\n" + RHN_DISABLED)
+ # cleanup cached login info
+ if os.path.exists(pcklAuthFileName):
+ os.unlink(pcklAuthFileName)
return
try:
@@ -144,6 +148,11 @@ def init_hook(conduit):
enablegroups = conduit.getConf().enablegroups
metadata_expire = conduit.getConf().metadata_expire
+ cachefilename = os.path.join(cachedir, cachedRHNReposFile)
+ try:
+ cachefile = open(cachefilename, 'w')
+ except:
+ cachefile = None
for channel in svrChannels:
if channel['version']:
repo = RhnRepo(channel)
@@ -163,35 +172,35 @@ def init_hook(conduit):
conduit.info(5, "Repo '%s' setting option '%s' = '%s'" %
(repo.id, o[0], o[1]))
repos.add(repo)
+ if cachefile:
+ cachefile.write(repo.id + "\n")
+ if cachefile:
+ cachefile.close()
-#bz226151,441265
-#Allows a "yum clean all" to succeed without communicating
-#to backend. Creating a set of dummy repos which mimic the dirs stored locally
-#This gives yum the dir info it needs to peform a clean
-#
-def formReposForClean(conduit):
+def addCachedRepos(conduit):
+ """
+ Add list of repos we've seen last time (from cache file)
+ """
repos = conduit.getRepos()
cachedir = conduit.getConf().cachedir
- try:
- dir_list = os.listdir(cachedir)
- except Exception, e:
- raise yum.Errors.RepoError(str(e))
+ cachefilename = os.path.join(cachedir, cachedRHNReposFile)
+ if not os.access(cachefilename, os.R_OK):
+ return
+ cachefile = open(cachefilename, 'r')
+ repolist = [ line.rstrip() for line in cachefile.readlines()]
+ cachefile.close()
urls = ["http://dummyvalue"]
- for dir in dir_list:
- if dir[0] == ".":
- continue
- if os.path.isdir(os.path.join(cachedir,dir)):
- repo = YumRepository(dir)
+ for reponame in repolist:
+ repodir = os.path.join(cachedir, reponame)
+ if os.path.isdir(repodir):
+ repo = YumRepository(reponame)
repo.basecachedir = cachedir
repo.baseurl = urls
repo.urls = repo.baseurl
repo.enable()
if not repos.findRepos(repo.id):
repos.add(repo)
- # cleanup cached login info
- if os.path.exists(pcklAuthFileName):
- os.unlink(pcklAuthFileName)
def posttrans_hook(conduit):
""" Post rpm transaction hook. We update the RHN profile here. """
commit 49ef4e4319fa12732d918aced2329e010b280b2f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jul 29 14:56:38 2011 +0200
627525 - disable network communication with certain commands/options
reimplemented code dropped in 19366c54f6494af3364b6df557be0183a14365e5
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 18f1cbf..eaf10b7 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -22,6 +22,8 @@ except ImportError:
pycurl = None
from iniparse import INIConfig
+from optparse import OptionParser
+
import gettext
t = gettext.translation('yum-rhn-plugin', fallback=True)
_ = t.ugettext
@@ -49,6 +51,10 @@ COMMUNICATION_ERROR = _("There was an error communicating with RHN.")
from M2Crypto.SSL import SSLError
+class FilterOptionParser(OptionParser):
+ def error(self, msg):
+ pass
+
def init_hook(conduit):
"""
Plugin initialization hook. We setup the RHN channels here.
@@ -83,6 +89,21 @@ def init_hook(conduit):
conduit.error(0, PROXY_ERROR + "\n" + RHN_DISABLED)
return
+ # check commands and options which don't need network communication
+ filt_parser = FilterOptionParser(add_help_option=False)
+ filt_parser.add_option('', '--version', action="store_true")
+ filt_parser.add_option('', '--help', action="store_true")
+ (filt_opts, filt_commands) = filt_parser.parse_args()
+ if filt_opts.version or filt_opts.help or filt_commands == []:
+ rhn_enabled = False
+ conduit.info(10, _("Either --version, --help or no commands entered") +
+ "\n" + RHN_DISABLED)
+ return
+ if filt_commands[0] == 'clean':
+ formReposForClean(conduit)
+ conduit.info(10, _("Cleaning") + "\n" + RHN_DISABLED)
+ return
+
try:
login_info = up2dateAuth.getLoginInfo()
except up2dateErrors.RhnServerException, e:
commit 2588ef445b877d3ac21bafaa0e8a60aa3f78729a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:33:09 2011 +0200
Revert "627525 - moved communication with satellite server from init_hook to prereposetup_hook"
This reverts commit aaf678dd476833ea50f68a20e739e8842a74f708.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 3915cdb..18f1cbf 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -49,9 +49,9 @@ COMMUNICATION_ERROR = _("There was an error communicating with RHN.")
from M2Crypto.SSL import SSLError
-def prereposetup_hook(conduit):
- """
- Plugin initialization hook. We setup the RHN channels here.
+def init_hook(conduit):
+ """
+ Plugin initialization hook. We setup the RHN channels here.
We get a list of RHN channels from the server, then make a repo object for
each one. This list of repos is then added to yum's list of repos via the
commit 081263f602c841c9d92f7b0702982e71a3a134c6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:33:06 2011 +0200
Revert "cache list of rhn channels so we can correctly clean our stuff"
This reverts commit 605255c555e375b2a52d4b64cca7716904d228c5.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 9b09a0d..3915cdb 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -42,7 +42,6 @@ __revision__ = "$Rev$"
requires_api_version = '2.5'
plugin_type = TYPE_CORE
pcklAuthFileName = "/var/spool/up2date/loginAuth.pkl"
-cachedRHNReposFile = 'rhnplugin.repos'
rhn_enabled = True
@@ -50,32 +49,10 @@ COMMUNICATION_ERROR = _("There was an error communicating with RHN.")
from M2Crypto.SSL import SSLError
-def init_hook(conduit):
+def prereposetup_hook(conduit):
"""
Plugin initialization hook. We setup the RHN channels here.
- Read list of repos we've seen last time (from cache file)
- """
- cachedir = conduit.getConf().cachedir
- repos = conduit.getRepos()
- cachefilename = os.path.join(cachedir, cachedRHNReposFile)
- if os.access(cachefilename, os.R_OK):
- cachefile = open(cachefilename, 'r')
- repolist = [ line.rstrip() for line in cachefile.readlines()]
- cachefile.close()
- for reponame in repolist:
- repodir = os.path.join(cachedir, reponame)
- if os.path.isdir(repodir):
- repo = YumRepository(reponame)
- repo.basecachedir = cachedir
- repo.baseurl = ['file:///' + repodir ]
- repo.urls = repo.baseurl
- repo.enable()
- if not repos.findRepos(repo.id):
- repos.add(repo)
-
-def prereposetup_hook(conduit):
- """
We get a list of RHN channels from the server, then make a repo object for
each one. This list of repos is then added to yum's list of repos via the
conduit.
@@ -146,11 +123,6 @@ def prereposetup_hook(conduit):
enablegroups = conduit.getConf().enablegroups
metadata_expire = conduit.getConf().metadata_expire
- cachefilename = os.path.join(cachedir, cachedRHNReposFile)
- try:
- cachefile = open(cachefilename, 'w')
- except:
- cachefile = None
for channel in svrChannels:
if channel['version']:
repo = RhnRepo(channel)
@@ -169,13 +141,36 @@ def prereposetup_hook(conduit):
setattr(repo, o[0], o[1])
conduit.info(5, "Repo '%s' setting option '%s' = '%s'" %
(repo.id, o[0], o[1]))
- if repos.findRepos(repo.id):
- repos.delete(repo.id)
repos.add(repo)
- if cachefile:
- cachefile.write(repo.id + "\n")
- if cachefile:
- cachefile.close()
+
+
+#bz226151,441265
+#Allows a "yum clean all" to succeed without communicating
+#to backend. Creating a set of dummy repos which mimic the dirs stored locally
+#This gives yum the dir info it needs to peform a clean
+#
+def formReposForClean(conduit):
+ repos = conduit.getRepos()
+ cachedir = conduit.getConf().cachedir
+ try:
+ dir_list = os.listdir(cachedir)
+ except Exception, e:
+ raise yum.Errors.RepoError(str(e))
+ urls = ["http://dummyvalue"]
+ for dir in dir_list:
+ if dir[0] == ".":
+ continue
+ if os.path.isdir(os.path.join(cachedir,dir)):
+ repo = YumRepository(dir)
+ repo.basecachedir = cachedir
+ repo.baseurl = urls
+ repo.urls = repo.baseurl
+ repo.enable()
+ if not repos.findRepos(repo.id):
+ repos.add(repo)
+ # cleanup cached login info
+ if os.path.exists(pcklAuthFileName):
+ os.unlink(pcklAuthFileName)
def posttrans_hook(conduit):
""" Post rpm transaction hook. We update the RHN profile here. """
commit cbc61c1f30dc6a2ca876ca4c7f642a6af94bc434
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:33:03 2011 +0200
Revert "switch off network communication in cache only mode"
This reverts commit 1154ea771d908c8181d974483178ad9ac32074d3.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index d87dd72..9b09a0d 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -82,11 +82,6 @@ def prereposetup_hook(conduit):
"""
global rhn_enabled
-
- if '-C' in sys.argv:
- # don't communicate with RHN server but use cached repos
- rhn_enabled = False
- return
RHN_DISABLED = _("RHN Satellite or RHN Classic support will be disabled.")
commit e5b1f92999511078c98578efbd3666e9c3d3fa53
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:29:55 2011 +0200
Revert "repopulate package sack after initial setup"
This reverts commit 103100a26ed7fb6e6aba71a76c07b964bd0f7a06.
diff --git a/client/rhel/yum-rhn-plugin/actions/packages.py b/client/rhel/yum-rhn-plugin/actions/packages.py
index 07b6a54..fd539cf 100644
--- a/client/rhel/yum-rhn-plugin/actions/packages.py
+++ b/client/rhel/yum-rhn-plugin/actions/packages.py
@@ -64,7 +64,6 @@ class YumAction(yum.YumBase):
self.doRpmDBSetup()
self.doRepoSetup()
self.doSackSetup()
- self.repos.populateSack(mdtype='all')
# Copied from yum/cli.py, more or less
def doTransaction(self):
commit b806e0c3e31ae68fccc68c36be338f548908c868
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:27:14 2011 +0200
Revert "684342 - beside repo.id, cache even repo.name"
This reverts commit 6da41679b8fe50538f108111fabe5b5cfc46e636.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index ab397ec..d87dd72 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -61,16 +61,15 @@ def init_hook(conduit):
cachefilename = os.path.join(cachedir, cachedRHNReposFile)
if os.access(cachefilename, os.R_OK):
cachefile = open(cachefilename, 'r')
- repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
+ repolist = [ line.rstrip() for line in cachefile.readlines()]
cachefile.close()
- for (repoid, reponame) in repolist:
- repodir = os.path.join(cachedir, repoid)
+ for reponame in repolist:
+ repodir = os.path.join(cachedir, reponame)
if os.path.isdir(repodir):
- repo = YumRepository(repoid)
+ repo = YumRepository(reponame)
repo.basecachedir = cachedir
repo.baseurl = ['file:///' + repodir ]
repo.urls = repo.baseurl
- repo.name = reponame
repo.enable()
if not repos.findRepos(repo.id):
repos.add(repo)
@@ -179,7 +178,7 @@ def prereposetup_hook(conduit):
repos.delete(repo.id)
repos.add(repo)
if cachefile:
- cachefile.write("%s %s\n" % (repo.id, repo.name))
+ cachefile.write(repo.id + "\n")
if cachefile:
cachefile.close()
commit 1f87d811f30e7483ea9244ec89cdd1d3604c46f1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:27:04 2011 +0200
Revert "688870 - also check whether cached repo is valid"
This reverts commit 44955186189e3a60afa07e6e4d1b5c9710b2e61c.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 9ace084..ab397ec 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -65,8 +65,7 @@ def init_hook(conduit):
cachefile.close()
for (repoid, reponame) in repolist:
repodir = os.path.join(cachedir, repoid)
- if os.path.isdir(repodir) and os.path.isfile(
- os.path.join(repodir, 'repodata', 'repomd.xml')):
+ if os.path.isdir(repodir):
repo = YumRepository(repoid)
repo.basecachedir = cachedir
repo.baseurl = ['file:///' + repodir ]
commit 380b854b049a0abe47029754f348ac5e168052bd
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:27:00 2011 +0200
Revert "add repo name in case you have old format of rhnplugin.repos"
This reverts commit b12837c8d1e45a6de46bd02fff10ed4fefac5bc7.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index c0e04fc..9ace084 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -63,10 +63,7 @@ def init_hook(conduit):
cachefile = open(cachefilename, 'r')
repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
cachefile.close()
- for repoitem in repolist:
- if len(repo_item) == 1:
- repo_item.append('')
- (repoid, reponame) = repo_item
+ for (repoid, reponame) in repolist:
repodir = os.path.join(cachedir, repoid)
if os.path.isdir(repodir) and os.path.isfile(
os.path.join(repodir, 'repodata', 'repomd.xml')):
commit 046d40e8460c3c5e87be6b6f1f1f257a7c9b9a0d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:26:48 2011 +0200
Revert "fix variable typo"
This reverts commit 0daa72c1a285e1daab1ecaf08e8b2cac457728c1.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 6422ebd..c0e04fc 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -63,7 +63,7 @@ def init_hook(conduit):
cachefile = open(cachefilename, 'r')
repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
cachefile.close()
- for repo_item in repolist:
+ for repoitem in repolist:
if len(repo_item) == 1:
repo_item.append('')
(repoid, reponame) = repo_item
commit b21dedf3c288d54cbba727eed1581af2bae1f013
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:26:33 2011 +0200
Revert "690234 - do not re-create repo if it exist and is type of RhnRepo"
This reverts commit 9193b78abe2333e353488e9f38d6ed3eacc7ed7c.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 1c8a873..6422ebd 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -164,14 +164,6 @@ def prereposetup_hook(conduit):
for channel in svrChannels:
if channel['version']:
repo = RhnRepo(channel)
- already_exists_repos = repos.findRepos(repo.id)
- if already_exists_repos:
- # there will be nearly always only one, and even if there is more
- # repos, we can ignore them
- if type(already_exists_repos[0]) == type(repo): # repo is type of RhnRepo
- continue # repo has been already initialized
- else: # YumRepository from _init, made for caching
- repos.delete(repo.id)
repo.basecachedir = cachedir
repo.gpgcheck = gpgcheck
repo.proxy = proxy_url
commit f66aead9ab263e953b8cd72b93b02f40dcdcef8d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:26:28 2011 +0200
Revert "688870 - resolve --enablerepo/--disablerepo for RHN repos"
This reverts commit 1147d9d704d797483e0f30f086125468d91b9f1a.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index aa4acb3..1c8a873 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -195,15 +195,6 @@ def prereposetup_hook(conduit):
if cachefile:
cachefile.close()
- # resolve --enablerepo/--disablerepo for RHN repos
- opts = conduit.getCmdLine()[0]
- for opt, repoexp in opts.repos:
- if opt == '--enablerepo':
- conduit._base.repos.enableRepo(repoexp)
- elif opt == '--disablerepo':
- conduit._base.repos.disableRepo(repoexp)
-
-
def posttrans_hook(conduit):
""" Post rpm transaction hook. We update the RHN profile here. """
global rhn_enabled
commit 2f7cc446d3a7ca11acf00bf21a88f1951f8035a6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:26:24 2011 +0200
Revert "there not opts when called from rhn_check"
This reverts commit fc582aee3a0f3e563ae6cfbfc5ead05f2a3b9298.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 546aaa7..aa4acb3 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -197,8 +197,7 @@ def prereposetup_hook(conduit):
# resolve --enablerepo/--disablerepo for RHN repos
opts = conduit.getCmdLine()[0]
- if opts:
- for opt, repoexp in opts.repos:
+ for opt, repoexp in opts.repos:
if opt == '--enablerepo':
conduit._base.repos.enableRepo(repoexp)
elif opt == '--disablerepo':
commit 6a27d62698bf7e07615accfd7f688ee5a524943b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:24:40 2011 +0200
Revert "690190 - yumdownloader set callbacks soon, save it to new repo"
This reverts commit db2e9e9a901b4cd975a19b18ff99ca702360d7d3.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index a3a7e69..546aaa7 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -171,8 +171,6 @@ def prereposetup_hook(conduit):
if type(already_exists_repos[0]) == type(repo): # repo is type of RhnRepo
continue # repo has been already initialized
else: # YumRepository from _init, made for caching
- callback = already_exists_repos[0].callback
- repo.setCallback(callback)
repos.delete(repo.id)
repo.basecachedir = cachedir
repo.gpgcheck = gpgcheck
commit ec5c355f7a02978ee858ea533d83ceab06eba967
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:24:39 2011 +0200
Revert "remove dead code"
This reverts commit 618a8016f76f10c4bbf10715924bd1fbb138a737.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 99f9834..a3a7e69 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -189,6 +189,8 @@ def prereposetup_hook(conduit):
setattr(repo, o[0], o[1])
conduit.info(5, "Repo '%s' setting option '%s' = '%s'" %
(repo.id, o[0], o[1]))
+ if repos.findRepos(repo.id):
+ repos.delete(repo.id)
repos.add(repo)
if cachefile:
cachefile.write("%s %s\n" % (repo.id, repo.name))
commit b85aa7f15985b803c15411a259cb3d86ff8679e5
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:24:07 2011 +0200
Revert "691283 - create persistdir in _repos_persistdir instead of PWD"
This reverts commit a50a4746bfd801e5765dfcff4577261cf63fdd60.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index d27aa2a..99f9834 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -75,8 +75,6 @@ def init_hook(conduit):
repo.baseurl = ['file:///' + repodir ]
repo.urls = repo.baseurl
repo.name = reponame
- if hasattr(conduit.getConf(), '_repos_persistdir'):
- repo.base_persistdir = conduit.getConf()._repos_persistdir
repo.enable()
if not repos.findRepos(repo.id):
repos.add(repo)
commit 289ece08b09b9b83e5e3371018f4cd35993a2ebd
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:24:06 2011 +0200
Revert "W:202: Bad indentation."
This reverts commit 43c91a286bed81fdd92156021aee0c729376e7ab.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index f7c99b6..d27aa2a 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -60,26 +60,26 @@ def init_hook(conduit):
repos = conduit.getRepos()
cachefilename = os.path.join(cachedir, cachedRHNReposFile)
if os.access(cachefilename, os.R_OK):
- cachefile = open(cachefilename, 'r')
- repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
- cachefile.close()
- for repo_item in repolist:
- if len(repo_item) == 1:
- repo_item.append('')
- (repoid, reponame) = repo_item
- repodir = os.path.join(cachedir, repoid)
- if os.path.isdir(repodir) and os.path.isfile(
+ cachefile = open(cachefilename, 'r')
+ repolist = [ line.rstrip().split(' ', 1) for line in cachefile.readlines()]
+ cachefile.close()
+ for repo_item in repolist:
+ if len(repo_item) == 1:
+ repo_item.append('')
+ (repoid, reponame) = repo_item
+ repodir = os.path.join(cachedir, repoid)
+ if os.path.isdir(repodir) and os.path.isfile(
os.path.join(repodir, 'repodata', 'repomd.xml')):
- repo = YumRepository(repoid)
- repo.basecachedir = cachedir
- repo.baseurl = ['file:///' + repodir ]
- repo.urls = repo.baseurl
- repo.name = reponame
- if hasattr(conduit.getConf(), '_repos_persistdir'):
- repo.base_persistdir = conduit.getConf()._repos_persistdir
- repo.enable()
- if not repos.findRepos(repo.id):
- repos.add(repo)
+ repo = YumRepository(repoid)
+ repo.basecachedir = cachedir
+ repo.baseurl = ['file:///' + repodir ]
+ repo.urls = repo.baseurl
+ repo.name = reponame
+ if hasattr(conduit.getConf(), '_repos_persistdir'):
+ repo.base_persistdir = conduit.getConf()._repos_persistdir
+ repo.enable()
+ if not repos.findRepos(repo.id):
+ repos.add(repo)
def prereposetup_hook(conduit):
"""
@@ -201,10 +201,10 @@ def prereposetup_hook(conduit):
opts = conduit.getCmdLine()[0]
if opts:
for opt, repoexp in opts.repos:
- if opt == '--enablerepo':
- conduit._base.repos.enableRepo(repoexp)
- elif opt == '--disablerepo':
- conduit._base.repos.disableRepo(repoexp)
+ if opt == '--enablerepo':
+ conduit._base.repos.enableRepo(repoexp)
+ elif opt == '--disablerepo':
+ conduit._base.repos.disableRepo(repoexp)
def posttrans_hook(conduit):
@@ -267,10 +267,10 @@ class RhnRepo(YumRepository):
# support failover urls, #232567
urls = []
if type(channel['url']) == list:
- for url in channel['url']:
- urls.append(url + '/GET-REQ/' + self.id)
+ for url in channel['url']:
+ urls.append(url + '/GET-REQ/' + self.id)
else: # type will be always list since Spacewalk 1.4, in future this will be dead coed
- urls.append(channel['url'] + '/GET-REQ/' + self.id)
+ urls.append(channel['url'] + '/GET-REQ/' + self.id)
self.baseurl = urls
self.urls = self.baseurl
commit 0c8b9d43a96a1cc566f50fc6f4017bf7617b5302
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:23:23 2011 +0200
Revert "707241 - create progressbar even during groupinstall and do not delete rhnplugin.repos during groupinstall command"
This reverts commit 83fc936f50812b72e40c3cd64b866bd462a5d53f.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 8660cf5..f7c99b6 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -26,9 +26,6 @@ import gettext
t = gettext.translation('yum-rhn-plugin', fallback=True)
_ = t.ugettext
-sys.path.append('/usr/share/yum-cli')
-from output import YumTextMeter, CacheProgressCallback
-
# TODO: Get the up2date stuff that we need in a better place,
# so we don't have to do path magic.
sys.path.append("/usr/share/rhn/")
@@ -154,17 +151,18 @@ def prereposetup_hook(conduit):
return
repos = conduit.getRepos()
- conduit_conf = conduit.getConf()
- cachedir = conduit_conf.cachedir
- default_gpgcheck = conduit_conf.gpgcheck
+ cachedir = conduit.getConf().cachedir
+ default_gpgcheck = conduit.getConf().gpgcheck
gpgcheck = conduit.confBool('main', 'gpgcheck', default_gpgcheck)
sslcacert = get_ssl_ca_cert(up2date_cfg)
- enablegroups = conduit_conf.enablegroups
- metadata_expire = conduit_conf.metadata_expire
+ enablegroups = conduit.getConf().enablegroups
+ metadata_expire = conduit.getConf().metadata_expire
cachefilename = os.path.join(cachedir, cachedRHNReposFile)
- cachefile_content = ''
- create_cache_even_second_time = not (os.path.exists(cachefilename) and os.path.getsize(cachefilename))
+ try:
+ cachefile = open(cachefilename, 'w')
+ except:
+ cachefile = None
for channel in svrChannels:
if channel['version']:
repo = RhnRepo(channel)
@@ -173,18 +171,11 @@ def prereposetup_hook(conduit):
# there will be nearly always only one, and even if there is more
# repos, we can ignore them
if type(already_exists_repos[0]) == type(repo): # repo is type of RhnRepo
- # repo has been already initialized
- if create_cache_even_second_time:
- cachefile_content += already_exists_repos.id + "\n"
- continue
+ continue # repo has been already initialized
else: # YumRepository from _init, made for caching
callback = already_exists_repos[0].callback
repo.setCallback(callback)
repos.delete(repo.id)
- else: # no repo created in init - setup progressbar
- if (not (conduit_conf.debuglevel < 2 or not sys.stdout.isatty())):
- progressbar = YumTextMeter(fo=sys.stdout)
- repo.setCallback(progressbar)
repo.basecachedir = cachedir
repo.gpgcheck = gpgcheck
repo.proxy = proxy_url
@@ -201,15 +192,10 @@ def prereposetup_hook(conduit):
conduit.info(5, "Repo '%s' setting option '%s' = '%s'" %
(repo.id, o[0], o[1]))
repos.add(repo)
- cachefile_content += "%s %s\n" % (repo.id, repo.name)
- if cachefile_content:
- try:
- cachefile = open(cachefilename, 'w')
- except IOError:
- cachefile = None # this is not fatal, we can live without cache
- if cachefile:
- cachefile.write(cachefile_content)
- cachefile.close()
+ if cachefile:
+ cachefile.write("%s %s\n" % (repo.id, repo.name))
+ if cachefile:
+ cachefile.close()
# resolve --enablerepo/--disablerepo for RHN repos
opts = conduit.getCmdLine()[0]
commit e679a6cf4f0c6733524ae95dc077bd95bbd13da9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:23:17 2011 +0200
Revert "Fixing sloppy coding."
This reverts commit 61548de7b576703ffea3a03998eca3a00ada0e6f.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 66e7a0e..8660cf5 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -175,7 +175,7 @@ def prereposetup_hook(conduit):
if type(already_exists_repos[0]) == type(repo): # repo is type of RhnRepo
# repo has been already initialized
if create_cache_even_second_time:
- cachefile_content += already_exists_repos[0].id + "\n"
+ cachefile_content += already_exists_repos.id + "\n"
continue
else: # YumRepository from _init, made for caching
callback = already_exists_repos[0].callback
commit 6f6d7fa3dba0252c6cd25a5f3abbb7ba487a6172
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 28 16:21:55 2011 +0200
Revert "703169 - Search for cached repomd.xml in a correct path"
This reverts commit 731bde5f9d0506300e7722294258a8d3b0e689ba.
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 9fd658f..66e7a0e 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -72,7 +72,7 @@ def init_hook(conduit):
(repoid, reponame) = repo_item
repodir = os.path.join(cachedir, repoid)
if os.path.isdir(repodir) and os.path.isfile(
- os.path.join(repodir, 'repomd.xml')):
+ os.path.join(repodir, 'repodata', 'repomd.xml')):
repo = YumRepository(repoid)
repo.basecachedir = cachedir
repo.baseurl = ['file:///' + repodir ]
12 years, 9 months
Changes to 'refs/tags/spacewalk-java-1.6.7-1'
by Jan Pazdziora
Tag 'spacewalk-java-1.6.7-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2011-08-01 13:44 +0000
Tagging package [spacewalk-java] version [1.6.7-1] in directory [java/].
Changes since spacewalk-setup-jabberd-1.6.1-1:
Jan Pazdziora (1):
Automatic commit of package [spacewalk-java] release [1.6.7-1].
---
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
12 years, 9 months
java/spacewalk-java.spec rel-eng/packages
by Jan Pazdziora
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 5bf2c533b2f56e693f330e52e0c8d3fb11530608
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 1 15:44:37 2011 +0200
Automatic commit of package [spacewalk-java] release [1.6.7-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 4f28357..300bcb4 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -17,7 +17,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.6.6
+Version: 1.6.7
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -546,6 +546,9 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Mon Aug 01 2011 Jan Pazdziora 1.6.7-1
+- Fix software rollback to profiles (jrenner(a)suse.de)
+
* Thu Jul 28 2011 Tomas Lestach <tlestach(a)redhat.com> 1.6.6-1
- 658533,722455 - sort systems according to currency score
(tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 32c68af..1d50525 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.6.6-1 java/
+1.6.7-1 java/
12 years, 9 months
Changes to 'refs/tags/spacewalk-setup-jabberd-1.6.1-1'
by Jan Pazdziora
Tag 'spacewalk-setup-jabberd-1.6.1-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2011-08-01 12:56 +0000
Tagging package [spacewalk-setup-jabberd] version [1.6.1-1] in directory [spacewalk/spacewalk-setup-jabberd/].
Changes since rhncfg-5.10.10-1:
Jan Pazdziora (1):
Automatic commit of package [spacewalk-setup-jabberd] release [1.6.1-1].
---
rel-eng/packages/spacewalk-setup-jabberd | 2 +-
spacewalk/spacewalk-setup-jabberd/spacewalk-setup-jabberd.spec | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
12 years, 9 months
rel-eng/packages spacewalk/spacewalk-setup-jabberd
by Jan Pazdziora
rel-eng/packages/spacewalk-setup-jabberd | 2 +-
spacewalk/spacewalk-setup-jabberd/spacewalk-setup-jabberd.spec | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 74f1ec2bd690aaab3aaf0fff265263ddd92535ec
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 1 14:56:27 2011 +0200
Automatic commit of package [spacewalk-setup-jabberd] release [1.6.1-1].
diff --git a/rel-eng/packages/spacewalk-setup-jabberd b/rel-eng/packages/spacewalk-setup-jabberd
index 4cefb40..a8c242b 100644
--- a/rel-eng/packages/spacewalk-setup-jabberd
+++ b/rel-eng/packages/spacewalk-setup-jabberd
@@ -1 +1 @@
-1.3.2-1 spacewalk/spacewalk-setup-jabberd/
+1.6.1-1 spacewalk/spacewalk-setup-jabberd/
diff --git a/spacewalk/spacewalk-setup-jabberd/spacewalk-setup-jabberd.spec b/spacewalk/spacewalk-setup-jabberd/spacewalk-setup-jabberd.spec
index 03bf356..31db631 100644
--- a/spacewalk/spacewalk-setup-jabberd/spacewalk-setup-jabberd.spec
+++ b/spacewalk/spacewalk-setup-jabberd/spacewalk-setup-jabberd.spec
@@ -1,5 +1,5 @@
Name: spacewalk-setup-jabberd
-Version: 1.6.0
+Version: 1.6.1
Release: 1%{?dist}
Summary: Tools to setup jabberd for Spacewalk
Group: Applications/System
@@ -59,6 +59,11 @@ rm -rf %{buildroot}
%dir %{_sysconfdir}/pki/spacewalk/jabberd
%changelog
+* Mon Aug 01 2011 Jan Pazdziora 1.6.1-1
+- 726708 - change interval & keepalive only when different from default values
+ (mzazrivec(a)redhat.com)
+- 726708 - jabberd: set keepalive and interval to 60 (mzazrivec(a)redhat.com)
+
* Tue Dec 14 2010 Jan Pazdziora 1.3.2-1
- We need to check the return value of GetOptions and die if the parameters
were not correct.
12 years, 9 months
Changes to 'refs/tags/rhncfg-5.10.10-1'
by Miroslav Suchý
Tag 'rhncfg-5.10.10-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-08-01 12:37 +0000
Tagging package [rhncfg] version [5.10.10-1] in directory [client/tools/rhncfg/].
Changes since spacewalk-schema-1.6.2-1:
Milan Zazrivec (2):
726708 - jabberd: set keepalive and interval to 60
726708 - change interval & keepalive only when different from default values
Miroslav Suchý (3):
remove rhn_rpc.py
get server_name from config only if it was not set on command line
Automatic commit of package [rhncfg] release [5.10.10-1].
---
client/tools/rhncfg/config_common/Makefile | 2 -
client/tools/rhncfg/config_common/rhn_main.py | 5 ++-
client/tools/rhncfg/config_common/rhn_rpc.py | 26 ----------------
client/tools/rhncfg/config_common/rpc_wrapper.py | 2 -
client/tools/rhncfg/rhncfg.spec | 6 +++
rel-eng/packages/rhncfg | 2 -
spacewalk/spacewalk-setup-jabberd/share/jabberd/c2s.xsl | 12 +++++++
7 files changed, 24 insertions(+), 31 deletions(-)
---
12 years, 9 months
3 commits - client/tools rel-eng/packages
by Miroslav Suchý
client/tools/rhncfg/config_common/Makefile | 2 -
client/tools/rhncfg/config_common/rhn_main.py | 5 +++-
client/tools/rhncfg/config_common/rhn_rpc.py | 26 -----------------------
client/tools/rhncfg/config_common/rpc_wrapper.py | 2 -
client/tools/rhncfg/rhncfg.spec | 6 ++++-
rel-eng/packages/rhncfg | 2 -
6 files changed, 12 insertions(+), 31 deletions(-)
New commits:
commit 7d24516b55c49967f231182af7620219af6d118b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 1 14:37:14 2011 +0200
Automatic commit of package [rhncfg] release [5.10.10-1].
diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index b632568..31c942d 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -8,7 +8,7 @@ Group: Applications/System
License: GPLv2 and Python
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.10.9
+Version: 5.10.10
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -106,6 +106,10 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Mon Aug 01 2011 Miroslav Suchý 5.10.10-1
+- get server_name from config only if it was not set on command line
+- remove rhn_rpc.py
+
* Fri Jul 15 2011 Miroslav Suchý 5.10.9-1
- optparse is here since python 2.3 - remove optik (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/rhncfg b/rel-eng/packages/rhncfg
index 330a4a1..00ba391 100644
--- a/rel-eng/packages/rhncfg
+++ b/rel-eng/packages/rhncfg
@@ -1 +1 @@
-5.10.9-1 client/tools/rhncfg/
+5.10.10-1 client/tools/rhncfg/
commit ade5bad7b02032d32f8e62f4c16dbc6c86f670e0
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 1 12:06:05 2011 +0200
get server_name from config only if it was not set on command line
diff --git a/client/tools/rhncfg/config_common/rhn_main.py b/client/tools/rhncfg/config_common/rhn_main.py
index bf3edd5..f500e46 100644
--- a/client/tools/rhncfg/config_common/rhn_main.py
+++ b/client/tools/rhncfg/config_common/rhn_main.py
@@ -131,7 +131,10 @@ class BaseMain:
cfg = config.initUp2dateConfig()
up2date_cfg = dict(cfg.items())
- server_name = config.getServerlURL()
+ if server_name:
+ server_name = [server_name]
+ else:
+ server_name = config.getServerlURL()
up2date_cfg['proto'] = urlsplit(server_name[0])[0]
up2date_cfg['server_list'] = map(lambda x: urlsplit(x)[1], server_name)
if server_name:
commit 615ecea82bb815467ecce7b6383b1659b439ebd5
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Aug 1 11:59:52 2011 +0200
remove rhn_rpc.py
addressing:
Traceback (most recent call last):
File "/usr/bin/rhncfg-manager", line 46, in ?
sys.exit(Main().main() or 0)
File "/usr/share/rhn/config_common/rhn_main.py", line 167, in main
repo = getattr(repo_module, self.repository_class_name)()
File "/usr/share/rhn/config_management/rpc_repository.py", line 27, in __init__
repository.RPC_Repository.__init__(self, setup_network)
File "/usr/share/rhn/config_common/repository.py", line 296, in __init__
rpc_handler="/XMLRPC")
File "/usr/share/rhn/config_common/rpc_wrapper.py", line 88, in __init__
progressCallback=progressCallback)
TypeError: __init__() got an unexpected keyword argument 'username'
Using server name hp-xw6600-01.rhts.eng.bos.redhat.com
Traceback (most recent call last):
File "/usr/bin/rhncfg-client", line 34, in ?
sys.exit(Main().main() or 0)
File "/usr/share/rhn/config_common/rhn_main.py", line 167, in main
repo = getattr(repo_module, self.repository_class_name)()
File "/usr/share/rhn/config_client/rpc_cli_repository.py", line 32, in __init__
repository.RPC_Repository.__init__(self, setup_network)
File "/usr/share/rhn/config_common/repository.py", line 296, in __init__
rpc_handler="/XMLRPC")
File "/usr/share/rhn/config_common/rpc_wrapper.py", line 88, in __init__
progressCallback=progressCallback)
TypeError: __init__() got an unexpected keyword argument 'username'
diff --git a/client/tools/rhncfg/config_common/Makefile b/client/tools/rhncfg/config_common/Makefile
index 8c9345e..f8ad18c 100644
--- a/client/tools/rhncfg/config_common/Makefile
+++ b/client/tools/rhncfg/config_common/Makefile
@@ -10,7 +10,7 @@ SUBDIR = config_common
FILES = __init__ cfg_exceptions \
file_utils deploy \
handler_base local_config \
- repository rhn_log rhn_main rhn_rpc \
+ repository rhn_log rhn_main \
utils transactions rpc_wrapper
diff --git a/client/tools/rhncfg/config_common/rhn_rpc.py b/client/tools/rhncfg/config_common/rhn_rpc.py
deleted file mode 100644
index 4cecf00..0000000
--- a/client/tools/rhncfg/config_common/rhn_rpc.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 2008--2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-"""
-This module exposes rpclib
-"""
-
-try:
- from rhn import rpclib
- from rhn import xmlrpclib
-except ImportError:
- import xmlrpclib
- rpclib = xmlrpclib
-
diff --git a/client/tools/rhncfg/config_common/rpc_wrapper.py b/client/tools/rhncfg/config_common/rpc_wrapper.py
index 66e902f..07a9916 100644
--- a/client/tools/rhncfg/config_common/rpc_wrapper.py
+++ b/client/tools/rhncfg/config_common/rpc_wrapper.py
@@ -15,7 +15,7 @@
import sys
import string
-from rhn_rpc import rpclib
+from rhn import rpclib
import xmlrpclib
try:
from socket import error, sslerror, herror, gaierror, timeout
12 years, 9 months