Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Get rid of the rhpl dependency

  • Loading branch information...
commit dcb75a796ff942a689818494595e45cc6dc940fb 1 parent 736c07a
@dagwieers authored
View
1  mrepo.spec
@@ -21,7 +21,6 @@ BuildRequires: /usr/bin/python2
Requires: createrepo
Requires: python >= 2.0
Requires: pyOpenSSL
-Requires: rhpl
Obsoletes: yam <= %{version}
%description
View
6 up2date_client/capabilities.py
@@ -13,8 +13,6 @@
import string
-from rhpl.translate import _, N_
-
neededCaps = {"caneatCheese": {'version':"21"},
"supportsAutoUp2dateOption": {'version': "1"},
"registration.finish_message": {'version': "1"},
@@ -89,8 +87,8 @@ def parseCapVersion(self, versionString):
def validateCap(self, cap, capvalue):
if not self.data.has_key(cap):
- errstr = _("This client requires the server to support %s, which the current " \
- "server does not support") % cap
+ errstr = "This client requires the server to support %s, which the current " \
+ "server does not support" % cap
self.missingCaps[cap] = None
else:
data = self.data[cap]
View
2  up2date_client/clientCaps.py
@@ -9,8 +9,6 @@
import string
import sys
-from rhpl.translate import _, N_
-
import capabilities
import config
import up2dateErrors
View
6 up2date_client/config.py
@@ -17,8 +17,6 @@
import string
import sys
-from rhpl.translate import _, N_
-
#cfg = None
# XXX: This could be moved in a more "static" location if it is too
@@ -188,7 +186,7 @@ def save(self):
# and fails (see #130391)
if not os.access(self.fileName, os.R_OK):
if not os.access(os.path.dirname(self.fileName), os.R_OK):
- print _("%s was not found" % os.path.dirname(self.fileName))
+ print "%s was not found" % os.path.dirname(self.fileName)
return
f = open(self.fileName, "w")
@@ -334,7 +332,7 @@ def initUp2dateConfig(file = "/etc/sysconfig/rhn/up2date"):
uuidCfg = UuidConfig()
uuidCfg.load()
if uuidCfg['rhnuuid'] == None or uuidCfg['rhnuuid'] == "UNSPECIFIED":
- print _("No rhnuuid config option found in /etc/sysconfig/rhn/up2date-uuid.")
+ print "No rhnuuid config option found in /etc/sysconfig/rhn/up2date-uuid."
sys.exit(1)
cfg['rhnuuid'] = uuidCfg['rhnuuid']
View
4 up2date_client/repoBackends/yumRepo.py
@@ -22,8 +22,6 @@
from up2date_client import rpcServer
from up2date_client import up2dateUtils
-from rhpl.translate import _, N_
-
import genericRepo
import urlUtils
import genericSolveDep
@@ -106,7 +104,7 @@ def getHeader(self, package, msgCallback = None, progressCallback = None):
hdr['release'])] = hdr
nohdr = 0
except:
- print _("There was an error downloading:"), "%s" % url
+ print "There was an error downloading:", "%s" % url
nohdr = 1
return hdr
View
3  up2date_client/rhnChannel.py
@@ -17,7 +17,6 @@
from rhn import rpclib
-from rhpl.translate import _, N_
@@ -183,7 +182,7 @@ def getChannels(force=None, label_whitelist=None):
selected_channels.addChannel(channel)
if len(selected_channels.list) == 0:
- raise up2dateErrors.NoChannelsError(_("This system may not be updated until it is associated with a channel."))
+ raise up2dateErrors.NoChannelsError("This system may not be updated until it is associated with a channel.")
return selected_channels
View
1  up2date_client/rhnErrata.py
@@ -6,7 +6,6 @@
sys.path.insert(0, "/usr/share/rhn/")
sys.path.insert(1,"/usr/share/rhn/up2date_client")
-from rhpl.translate import _, N_
import up2dateErrors
import up2dateMessages
import rpmUtils
View
10 up2date_client/rpcServer.py
@@ -22,8 +22,6 @@
#import wrapperUtils
from rhn import rpclib
-from rhpl.translate import _, N_
-
def stdoutMsgCallback(msg):
print msg
@@ -197,7 +195,7 @@ def getServer(refreshCallback=None):
# require RHNS-CA-CERT file to be able to authenticate the SSL connections
for rhns_ca_cert in rhns_ca_certs:
if not os.access(rhns_ca_cert, os.R_OK):
- msg = "%s: %s" % (_("ERROR: can not find RHNS CA file:"),
+ msg = "%s: %s" % ("ERROR: can not find RHNS CA file:",
rhns_ca_cert)
log.log_me("%s" % msg)
print msg
@@ -235,8 +233,8 @@ def doCall(method, *args, **kwargs):
try:
ret = apply(method, args, kwargs)
except KeyboardInterrupt:
- raise up2dateErrors.CommunicationError(_(
- "Connection aborted by the user"))
+ raise up2dateErrors.CommunicationError(
+ "Connection aborted by the user")
# if we get a socket error, keep tryingx2
except (socket.error, socket.sslerror), e:
log.log_me("A socket error occurred: %s, attempt #%s" % (
@@ -279,7 +277,7 @@ def doCall(method, *args, **kwargs):
# the servers are being throttle to pay users only, catch the
# exceptions and display a nice error message
if abs(errCode) == 51:
- log.log_me(_("Server has refused connection due to high load"))
+ log.log_me("Server has refused connection due to high load")
raise up2dateErrors.CommunicationError(e.errmsg)
# if we get a 404 from our server, thats pretty
# fatal... no point in retrying over and over. Note that
View
14 up2date_client/rpmSource.py
@@ -41,7 +41,6 @@
from rhn import rpclib
-from rhpl.translate import _, N_
BUFFER_SIZE = 8092
@@ -346,7 +345,7 @@ def getHeader(self, pkg, msgCallback = None, progressCallback = None):
except:
os.close(fd)
self.ts.popVSFlags()
- raise up2dateErrors.RpmError(_("Error reading header"))
+ raise up2dateErrors.RpmError("Error reading header")
self.ts.popVSFlags()
os.close(fd)
self.headerCache[up2dateUtils.pkgToStringArch(pkg)] = hdr
@@ -384,8 +383,7 @@ def getHeader(self, pkg, msgCallback = None, progressCallback = None):
hdr = self.ts.hdrFromFdno(fd)
except:
os.close(fd)
- raise up2dateErrors.RpmError(_(
- "Error reading header"))
+ raise up2dateErrors.RpmError("Error reading header")
os.close(fd)
self.log.log_me("Reading header from: %s" % fileNames)
self.headerCache[up2dateUtils.pkgToStringArch(pkg)] = hdr
@@ -457,7 +455,7 @@ def __readHeaderFromRpm(self, fileNames, pkg):
except:
os.close(fd)
self.ts.popVSFlags()
- raise up2dateErrors.RpmError(_("Error reading header"))
+ raise up2dateErrors.RpmError("Error reading header")
self.ts.popVSFlags()
os.close(fd)
self.log.log_me("Reading header from: %s" % fileNames)
@@ -640,8 +638,7 @@ def getHeader(self, pkg, lite = None,
try:
ret = self.s.up2date.header(up2dateAuth.getSystemId(), pkg)
except KeyboardInterrupt:
- raise up2dateErrors.CommunicationError(_(
- "Connection aborted by the user"))
+ raise up2dateErrors.CommunicationError("Connection aborted by the user")
except (socket.error, socket.sslerror), e:
if len(e.args) > 1:
raise up2dateErrors.CommunicationError(e.args[1])
@@ -650,8 +647,7 @@ def getHeader(self, pkg, lite = None,
except rpclib.ProtocolError, e:
raise up2dateErrors.CommunicationError(e.errmsg)
except rpclib.ResponseError:
- raise up2dateErrors.CommunicationError(
- "Broken response from the server.");
+ raise up2dateErrors.CommunicationError("Broken response from the server.");
except rpclib.Fault, f:
raise up2dateErrors.CommunicationError(f.faultString)
View
1  up2date_client/rpmSourceUtils.py
@@ -9,7 +9,6 @@
import glob
from rhn import rpclib
-from rhpl.translate import _, N_
def factory(aClass, *args, **kwargs):
View
21 up2date_client/rpmUtils.py
@@ -30,7 +30,6 @@
import string
-from rhpl.translate import _, N_
from up2date_client import up2dateLog
# mainly here to make conflicts resolution cleaner
@@ -255,7 +254,7 @@ def checkHeaderForFileConfigExcludes(h,package,ts):
if fnmatch.fnmatch(fileNames[f_i],pattern):
# got to get a better string to use here
- removedList.append((package, _("File Name/pattern")))
+ removedList.append((package, "File Name/pattern"))
fflag = 1
break
# if we found a matching file, no need to
@@ -280,7 +279,7 @@ def checkHeaderForFileConfigExcludes(h,package,ts):
# check if config file and if so, if modified
if checkModified(f_i, fileNames, fileMD5s,
installedFileNames, installedFileMD5s):
- removedList.append((package, _("Config modified")))
+ removedList.append((package, "Config modified"))
fflag = 1
break
@@ -455,7 +454,7 @@ def getInstalledPackageList(msgCallback = None, progressCallback = None,
if msgCallback != None:
- msgCallback(_("Getting list of packages installed on the system"))
+ msgCallback("Getting list of packages installed on the system")
_ts = transaction.initReadOnlyTransaction()
count = 0
@@ -505,9 +504,9 @@ def runTransaction(ts, rpmCallback, transdir=None):
transdir = cfg['storageDir']
deps = ts.check()
if deps:
- raise up2dateErrors.DependencyError(_(
+ raise up2dateErrors.DependencyError(
"Dependencies should have already been resolved, "\
- "but they are not."), deps)
+ "but they are not.", deps)
rc = ts.run(rpmCallback, transdir)
if rc:
errors = "\n"
@@ -516,13 +515,13 @@ def runTransaction(ts, rpmCallback, transdir=None):
errors = errors + e[1] + "\n"
except:
errors = errors + str(e) + "\n"
- raise up2dateErrors.TransactionError(_(
- "Failed running transaction of packages: %s") % errors, deps=rc)
+ raise up2dateErrors.TransactionError(
+ "Failed running transaction of packages: %s" % errors, deps=rc)
elif type(rc) == type([]) and not len(rc):
# let the user know whats wrong
log = up2dateLog.initLog()
log.log_me("Failed running rpm transaction - %pre %pro failure ?.")
- raise up2dateErrors.RpmError(_("Failed running rpm transaction"))
+ raise up2dateErrors.RpmError("Failed running rpm transaction")
def readHeader(filename):
if not os.access(filename, os.R_OK):
@@ -549,9 +548,9 @@ def readHeaderBlob(blob, filename=None):
hdr = rpm.headerLoad(blob)
except:
if filename:
- print _("rpm was unable to load the header: %s" % filename)
+ print "rpm was unable to load the header: %s" % filename
else:
- print _("rpm was unable to load a header")
+ print "rpm was unable to load a header"
return None
# Header successfully read
#print hdr['name']
View
8 up2date_client/sourcesConfig.py
@@ -19,8 +19,6 @@
import up2dateLog
import wrapperUtils
-from rhpl.translate import _, N_
-
# The format for sources v1 is stupid. each entry can only be one line
# each different source type has different info (aieee!) # comment stuff out (duh)
@@ -28,8 +26,8 @@
SOURCESFILE="/etc/sysconfig/rhn/sources"
def showError(line):
- print _("Error parsing %s") % SOURCESFILE
- print _("at line: %s") % line
+ print "Error parsing %s" % SOURCESFILE
+ print "at line: %s" % line
class SourcesConfigFile:
"class for parsing out the up2date/apt/yum src repo info"
@@ -223,7 +221,7 @@ def parseRepomd(self, line):
try:
from repoBackends import yumBaseRepo
except ImportError:
- self.log.log_me(_("Unable to import repomd so repomd support will not be available"))
+ self.log.log_me("Unable to import repomd so repomd support will not be available")
return
yb = yumBaseRepo.initYumRepo()
View
61 up2date_client/up2dateErrors.py
@@ -9,7 +9,6 @@
#
import up2dateLog
-from rhpl.translate import _, N_
class Error:
@@ -27,7 +26,7 @@ class FileError(Error):
error to report when we encounter file errors (missing files/dirs,
lack of permissions, quoat issues, etc"""
def __repr__(self):
- msg = _("Disk error. The message was:\n") + self.errmsg
+ msg = "Disk error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -35,7 +34,7 @@ def __repr__(self):
class RpmError(Error):
"""rpm itself raised an error condition"""
def __repr__(self):
- msg = _("RPM error. The message was:\n") + self.errmsg
+ msg = "RPM error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -46,7 +45,7 @@ def __init__(self, msg, pkg = None):
self.errmsg = msg
self.pkg = pkg
def __repr__(self):
- msg = _("There was a fatal error installing the package:\n")
+ msg = "There was a fatal error installing the package:\n"
msg = msg + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
@@ -57,7 +56,7 @@ class PasswordError(Error):
"""Raise when the server responds with that a password is incorrect"""
def __repr__(self):
log = up2dateLog.initLog()
- msg = _("Password error. The message was:\n") + self.errmsg
+ msg = "Password error. The message was:\n" + self.errmsg
log.log_me(msg)
return msg
@@ -68,7 +67,7 @@ def __init__(self, msg, rc=None, data=None):
self.errmsg = msg
self.data = data
def __repr__(self):
- msg = _("RPM package conflict error. The message was:\n")
+ msg = "RPM package conflict error. The message was:\n"
msg = msg + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
@@ -80,7 +79,7 @@ def __init__(self, msg, rc=None):
self.rc = rc
self.errmsg = msg
def __repr__(self):
- msg = _("RPM file conflict error. The message was:\n") + self.errmsg
+ msg = "RPM file conflict error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -94,7 +93,7 @@ def __init__(self, msg, deps=None):
self.deps = deps
def __repr__(self):
- msg = _("RPM dependency error. The message was:\n") + self.errmsg
+ msg = "RPM dependency error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -108,7 +107,7 @@ def __init__(self, msg, deps=None):
self.deps = deps
def __repr__(self):
- msg = _("RPM error. The message was:\n") + self.errmsg
+ msg = "RPM error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -121,7 +120,7 @@ def __init__(self, msg, dep=None, pkgs=None):
self.dep = dep
self.pkgs = pkgs
def __repr__(self):
- msg = _("RPM dependency error. The message was:\n") + self.errmsg
+ msg = "RPM dependency error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -134,7 +133,7 @@ def __init__(self, msg, sense=None):
self.errmsg = msg
self.sense = sense
def __repr__(self):
- msg = _("RPM dependency error. The message was:\n") + self.errmsg
+ msg = "RPM dependency error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -145,7 +144,7 @@ def __init__(self, msg, pkglist=None):
self.errmsg = msg
self.pkglist = pkglist
def __repr__(self):
- msg = _("Package Skip List error. The message was:\n") + self.errmsg
+ msg = "Package Skip List error. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -158,8 +157,8 @@ def __init__(self, msg, pkglist=None):
self.errmsg = msg
self.pkglist = pkglist
def __repr__(self):
- msg = _("File Skip List or config file overwrite error. "\
- "The message was:\n") + self.errmsg
+ msg = "File Skip List or config file overwrite error. "\
+ "The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -168,8 +167,8 @@ def __repr__(self):
class CommunicationError(Error):
"""Indicates a problem doing xml-rpc http communication with the server"""
def __repr__(self):
- msg = _("Error communicating with server. "\
- "The message was:\n") + self.errmsg
+ msg = "Error communicating with server. "\
+ "The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -179,7 +178,7 @@ class FileNotFoundError(Error):
Raise when a package or header that is requested returns
a 404 error code"""
def __repr__(self):
- msg = _("File Not Found: \n") + self.errmsg
+ msg = "File Not Found: \n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -190,7 +189,7 @@ class DelayError(Error):
Raise when the expected response from a xml-rpc call
exceeds a timeout"""
def __repr__(self):
- msg = _("Delay error from server. The message was:\n") + self.errmsg
+ msg = "Delay error from server. The message was:\n" + self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -198,8 +197,8 @@ def __repr__(self):
class RpmRemoveSkipListError(Error):
"""Raise when we try to remove a package on the RemoveSkipList"""
def __repr__(self):
- msg = _("Could not remove package \"%s\". "\
- "It was on the RemoveSkipList") % self.errmsg
+ msg = "Could not remove package \"%s\". "\
+ "It was on the RemoveSkipList" % self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -221,7 +220,7 @@ def __repr__(self):
class GPGInstallationError(Error):
"""Raise when we we detect that the GPG is not installed properly"""
def __repr__(self):
- msg = _("GPG is not installed properly.")
+ msg = "GPG is not installed properly."
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -231,8 +230,8 @@ class GPGKeyringError(Error):
Raise when we we detect that the gpg keyring for the user
does not have the Red Hat Key installed"""
def __repr__(self):
- msg = _("GPG keyring does not include the Red Hat, Inc. "\
- "public package-signing key")
+ msg = "GPG keyring does not include the Red Hat, Inc. "\
+ "public package-signing key"
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -243,8 +242,8 @@ def __init__(self, msg):
self.errmsg = msg
self.pkg = msg
def __repr__(self):
- msg = _("The package %s failed its gpg signature verification. "\
- "This means the package is corrupt." % self.errmsg)
+ msg = "The package %s failed its gpg signature verification. "\
+ "This means the package is corrupt." % self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -257,7 +256,7 @@ def __init__(self, msg):
self.errmsg = msg
self.pkg = msg
def __repr__(self):
- msg = _("Package %s does not have a GPG signature.\n") % self.errmsg
+ msg = "Package %s does not have a GPG signature.\n" % self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -270,7 +269,7 @@ def __init__(self, msg):
self.errmsg = msg
self.pkg = msg
def __repr__(self):
- msg = _("Package %s has a untrusted GPG signature.\n") % self.errmsg
+ msg = "Package %s has a untrusted GPG signature.\n" % self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -283,7 +282,7 @@ def __init__(self, msg):
self.errmsg = msg
self.pkg = msg
def __repr__(self):
- msg = _("Package %s has a unknown GPG signature.\n") % self.errmsg
+ msg = "Package %s has a unknown GPG signature.\n" % self.errmsg
log = up2dateLog.initLog()
log.log_me(msg)
return msg
@@ -333,7 +332,7 @@ def __init__(self, errmsg):
# indicates an error during server input validation
def __repr__(self):
- return _("Error validating data at server:\n") + self.errmsg
+ return "Error validating data at server:\n" + self.errmsg
class InvalidProductRegistrationError(Error):
def __init__(self, errmsg):
@@ -341,14 +340,14 @@ def __init__(self, errmsg):
# indicates an error during server input validation
def __repr__(self):
- return _("The subscription number is invalid") + self.errmsg
+ return "The subscription number is invalid" + self.errmsg
class OemInfoFileError(Error):
def __init__(self,errmsg):
Error.__init__(self, errmsg)
def __repr__(self):
- return _("Error parsing the oemInfo file at field:\n") + self.errmsg
+ return "Error parsing the oemInfo file at field:\n" + self.errmsg
class NoRollbacksToUndoError(Error):
"""
View
22 up2date_client/up2dateMessages.py
@@ -8,36 +8,34 @@
#
# $Id: up2dateMessages.py 87080 2005-11-04 20:49:52Z alikins $
-from rhpl.translate import _, N_
-
from up2date_client import config
#cfg = config.initUp2dateConfig()
-needToRegister = _("You need to register this system by running `up2date --register` before using this option")
+needToRegister = "You need to register this system by running `up2date --register` before using this option"
-storageDirWarningMsg = _("""The storage directory %s could not be found, or was not
-accessable.""") % "/var/spool/up2date"
+storageDirWarningMsg = """The storage directory %s could not be found, or was not
+accessable.""" % "/var/spool/up2date"
-rootWarningMsg = _("You must run the Update Agent as root.")
+rootWarningMsg = "You must run the Update Agent as root."
-registeredWarningMsg = _("""You are not registered with Red Hat Network. To use Update Agent,
+registeredWarningMsg = """You are not registered with Red Hat Network. To use Update Agent,
You must be registered.
-To register, run \"up2date --register\".""")
+To register, run \"up2date --register\"."""
-gpgWarningGuiMsg = _("""Your GPG keyring does not contain the Red Hat, Inc. public key.
+gpgWarningGuiMsg = """Your GPG keyring does not contain the Red Hat, Inc. public key.
Without it, you will be unable to verify that packages Update Agent downloads
are securely signed by Red Hat.
-Your Update Agent options specify that you want to use GPG.""")
+Your Update Agent options specify that you want to use GPG."""
-gpgWarningMsg = _("""Your GPG keyring does not contain the Red Hat, Inc. public key.
+gpgWarningMsg = """Your GPG keyring does not contain the Red Hat, Inc. public key.
Without it, you will be unable to verify that packages Update Agent downloads
are securely signed by Red Hat.
Your Update Agent options specify that you want to use GPG.
To install the key, run the following as root:
-""")
+"""
View
4 up2date_client/up2dateUtils.py
@@ -29,8 +29,6 @@
import config
-from rhpl.translate import _, N_
-
def rpmFlagsToOperator(flags):
flags = flags & 0xFF
buf = ""
@@ -74,7 +72,7 @@ def pkglistToString(pkgs):
return packages
def restartUp2date():
- print _("Restarting up2date")
+ print "Restarting up2date"
args = sys.argv[:]
return_code = os.spawnvp(os.P_WAIT, sys.argv[0], args)
sys.exit(return_code)
View
65 up2date_client/wrapperUtils.py
@@ -11,7 +11,6 @@
import rpm
-from rhpl.translate import _, N_
import up2dateErrors
import up2dateMessages
import rpmUtils
@@ -46,7 +45,7 @@ def callback(self, what, amount, total, hdr, path):
try:
self.fd = os.open(fileName, os.O_RDONLY)
except OSError:
- raise up2dateErrors.RpmError(_("Error opening %s") % fileName)
+ raise up2dateErrors.RpmError("Error opening %s" % fileName)
return self.fd
elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE:
@@ -68,12 +67,12 @@ def callback(self, what, amount, total, hdr, path):
hdr['arch'])
if self.cfg["isatty"]:
if self.progressCurrent == 0:
- printit(_("Installing"))
+ printit("Installing")
print "%4d:%-23.23s" % (self.progressCurrent + 1,
hdr['name']),
sys.stdout.flush()
else:
- printit(_("Installing %s") % fileName)
+ printit("Installing %s" % fileName)
# gets called at the start of each repackage, with a count of
@@ -87,7 +86,7 @@ def callback(self, what, amount, total, hdr, path):
# self.printRpmHash(amount, total, noInc=1)
elif what == rpm.RPMCALLBACK_REPACKAGE_START:
- printit( _("Repackaging"))
+ printit( "Repackaging")
#sys.stdout.flush()
#print "what: %s amount: %s total: %s hdr: %s path: %s" % (
# what, amount, total, hdr, path)
@@ -109,7 +108,7 @@ def callback(self, what, amount, total, hdr, path):
self.lastPercent = 0
self.progressTotal = 1
self.progressCurrent = 0
- print "%-23.23s" % _("Preparing"),
+ print "%-23.23s" % "Preparing",
sys.stdout.flush()
elif what == rpm.RPMCALLBACK_TRANS_STOP:
@@ -239,7 +238,7 @@ def printRetrieveHash(amount, total, speed = 0, secs = 0):
if cfg["isatty"]:
if amount == total:
- print "%-25s" % _(" Done.")
+ print "%-25s" % " Done."
else:
print "%4d k/sec, %02d:%02d:%02d rem." % \
(speed / 1024, secs / (60*60), (secs % 3600) / 60,
@@ -247,7 +246,7 @@ def printRetrieveHash(amount, total, speed = 0, secs = 0):
for i in range(hashesTotal + 25):
sys.stdout.write("\b")
elif amount == total:
- print _("Retrieved.")
+ print "Retrieved."
def printPkg(name, shortName = None):
if shortName:
@@ -266,17 +265,17 @@ def warningDialog(message, hasGui):
from up2date_client import gui
gui.errorWindow(message)
except:
- print _("Unable to open gui. Try `up2date --nox`")
+ print "Unable to open gui. Try `up2date --nox`"
print message
else:
print message
def printDepPackages(depPackages):
- print _("The following packages were added to your selection to satisfy dependencies:")
- print _("""
+ print "The following packages were added to your selection to satisfy dependencies:"
+ print """
Name Version Release
---------------------------------------------------------------""")
+--------------------------------------------------------------"""
for pkg in depPackages:
print "%-40s%-15s%-20s" % (pkg[0], pkg[1], pkg[2])
print
@@ -291,9 +290,9 @@ def stdoutMsgCallback(msg):
def printVerboseList(availUpdates):
cfg = config.initUp2dateConfig()
if cfg['showChannels']:
- print _("""
+ print """
Name Version Rel Channel
-----------------------------------------------------------------------""")
+----------------------------------------------------------------------"""
for pkg in availUpdates:
print "%-30s%-15s%-15s%-20s" % (pkg[0], pkg[1], pkg[2], pkg[6])
if cfg["debug"]:
@@ -304,12 +303,12 @@ def printVerboseList(availUpdates):
topic = string.join(string.split(a['topic']), ' ')
print "[%s] %s\n" % (a['advisory'], topic)
else:
- print _("No advisory information available\n")
+ print "No advisory information available\n"
print
return
- print _("""
+ print """
Name Version Rel
-----------------------------------------------------------""")
+----------------------------------------------------------"""
for pkg in availUpdates:
print "%-40s%-15s%-18s%-6s" % (pkg[0], pkg[1], pkg[2], pkg[4])
if cfg["debug"]:
@@ -320,15 +319,15 @@ def printVerboseList(availUpdates):
topic = string.join(string.split(a['topic']), ' ')
print "[%s] %s\n" % (a['advisory'], topic)
else:
- print _("No advisory information available\n")
+ print "No advisory information available\n"
print
def printSkippedPackages(skippedUpdates):
cfg = config.initUp2dateConfig()
- print _("The following Packages were marked to be skipped by your configuration:")
- print _("""
+ print "The following Packages were marked to be skipped by your configuration:"
+ print """
Name Version Rel Reason
--------------------------------------------------------------------------------""")
+-------------------------------------------------------------------------------"""
for pkg,reason in skippedUpdates:
print "%-40s%-15s%-5s%s" % (pkg[0], pkg[1], pkg[2], reason)
if cfg["debug"]:
@@ -339,24 +338,24 @@ def printSkippedPackages(skippedUpdates):
topic = string.join(string.split(a['topic']), ' ')
print "[%s] %s\n" % (a['advisory'], topic)
else:
- print _("No advisory information available\n")
+ print "No advisory information available\n"
print
def printEmptyGlobsWarning(listOfGlobs):
- print _("The following wildcards did not match any packages:")
+ print "The following wildcards did not match any packages:"
for token in listOfGlobs:
print token
def printEmptyCompsWarning(listOfComps):
- print _("The following groups did not match any packages:")
+ print "The following groups did not match any packages:"
for token in listOfComps:
print token
def printObsoletedPackages(obsoletedPackages):
- print _("The following Packages are obsoleted by newer packages:")
- print _("""
+ print "The following Packages are obsoleted by newer packages:"
+ print """
Name-Version-Release obsoleted by Name-Version-Release
--------------------------------------------------------------------------------""")
+-------------------------------------------------------------------------------"""
for (obs,newpackages) in obsoletedPackages:
obsstr = "%s-%s-%s" % (obs[0],obs[1],obs[2])
newpackage = newpackages[0]
@@ -368,10 +367,10 @@ def printObsoletedPackages(obsoletedPackages):
print "%-40s%-40s\n" % ("", newstr)
def printInstalledObsoletingPackages(installedObsoletingPackages):
- print _("The following packages were not installed because they are obsoleted by installed packages:")
- print _("""
+ print "The following packages were not installed because they are obsoleted by installed packages:"
+ print """
Name-Version-Release obsoleted by Name-Version-Release
--------------------------------------------------------------------------------""")
+-------------------------------------------------------------------------------"""
for (obsoleted, obsoleting) in installedObsoletingPackages:
obsstr = "%s-%s-%s" % (obsoleted[0],obsoleted[1],obsoleted[2])
print "%-40s%-40s" % (obsstr, obsoleting[0])
@@ -379,10 +378,10 @@ def printInstalledObsoletingPackages(installedObsoletingPackages):
print "%-40s%-40s" % (obsstr, obsoletingstr)
def printAvailablePackages(availablePackages):
- print _("The following packages are not installed but available from Red Hat Network:")
- print _("""
+ print "The following packages are not installed but available from Red Hat Network:"
+ print """
Name Version Release
---------------------------------------------------------------""")
+--------------------------------------------------------------"""
for pkg in availablePackages:
print "%-40s%-14s%-14s" % (pkg[0], pkg[1], pkg[2])
print
Please sign in to comment.
Something went wrong with that request. Please try again.