On Wed, Apr 03, 2013 at 05:04:58PM -0400, Chris Lumens wrote:
> + log.info("Running anaconda-yum to install
packages")
> + # Watch output for progress, debug and error information
> + install_errors = []
> + try:
> + for line in execReadlines("anaconda-yum", args):
> + if line.startswith("PROGRESS_"):
> + key, text = line.split(":", 2)
> + msg = progress_map[key] + text
> + progress.send_message(msg)
> + log.debug(msg)
> + elif line.startswith("DEBUG:"):
> + log.debug(line[6:])
> + elif line.startswith("INFO:"):
> + log.info(line[5:])
> + elif line.startswith("WARN:"):
> + log.warn(line[5:])
> + elif line.startswith("ERROR:"):
> + log.error(line[6:])
> + install_errors.append(line[6:])
> + else:
> + log.debug(line)
> + except IOError as e:
> + log.error("Error running anaconda-yum: %s" % e)
> + exn = PayloadInstallError(str(e))
> + if errorHandler.cb(exn) == ERROR_RAISE:
> + raise exn
> + finally:
> + # log the contents of the scriptlet logfile if any
> + if os.path.exists(script_log):
> log.info("==== start rpm scriptlet logs ====")
> - with open(script_log.name) as f:
> + with open(script_log) as f:
> for l in f:
> log.info(l)
> log.info("==== end rpm scriptlet logs ====")
> - os.unlink(script_log.name)
> + os.unlink(script_log)
> +
> + if install_errors:
> + exn = PayloadInstallError("\n".join(install_errors))
> + if errorHandler.cb(exn) == ERROR_RAISE:
> + raise exn
>
> def writeMultiLibConfig(self):
> if not self.data.packages.multiLib:
This section is most concerning to me, from a translation perspective.
I'm not sure how good of a job we are doing right now with displaying
correctly translated messages and yum errors but if we're not doing a
good job of it, we could easily fix it given everything is in the same
process.
Do you have any idea what shape it's in given these patches?
It looks like yum is translated, but I am not sure what's going to
happen to those translations when they get passed through the
stdout|stdin link to the main process. I wanted to keep our translations
out of the anaconda-yum script because of this so that's why I made the
PROGRESS_* mapping.
If they do get mangled I'm not sure what we can do about it.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)