FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-02-2012, 07:10 PM
David Lehman
 
Default Display package name only when installing packages.

If a package's arch does not match the system's, also display that
package's arch.

The install log still contains the full NVRA for each package.
---
pyanaconda/packaging/yumpayload.py | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index a3a3b2e..73bb499 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -925,6 +925,7 @@ reposdir=%s
if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
else:
+ log.info("transaction complete")
self.install_log.write("*** FINISHED INSTALLING PACKAGES ***")
progress.send_step()
finally:
@@ -965,6 +966,7 @@ class RPMCallback(object):

self.total_actions = 0
self.completed_actions = None # will be set to 0 when starting tx
+ self.base_arch = iutil.getArch()

def _get_txmbr(self, key):
""" Return a (name, TransactionMember) tuple from cb key. """
@@ -1008,15 +1010,21 @@ class RPMCallback(object):
mode = _("Installing")

self.completed_actions += 1
- pkg = "%s-%s.%s.%s" % (txmbr.name, txmbr.version,
- txmbr.release, txmbr.arch)
- msg = "%s %s (%d/%d)" % (mode, pkg,
- self.completed_actions,
- self.total_actions)
+ msg_format = "%s %s (%d/%d)"
+ progress_package = txmbr.name
+ if txmbr.arch not in ["noarch", self.base_arch]:
+ progress_package = "%s.%s" % (txmbr.name, txmbr.arch)
+
+ progress_msg = msg_format % (mode, progress_package,
+ self.completed_actions,
+ self.total_actions)
+ log_msg = msg_format % (mode, txmbr.po,
+ self.completed_actions,
+ self.total_actions)
self.install_log.write("%s %s
" % (time.strftime("%H:%M:%S"),
- msg))
+ log_msg))
self.install_log.flush()
- progress.send_message(msg)
+ progress.send_message(progress_msg)

self.package_file = None
repo = self._yum.repos.getRepo(txmbr.po.repoid)
--
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:26 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org