166
166
names.add(item.shortdesc)
168
#TRANSLATORS: %s is a list of package names
168
# TRANSLATORS: %s is a list of package names
169
169
msg = self.transaction.ngettext("Downloading %(files)s",
170
170
"Downloading %(files)s",
171
171
len(items)) % {"files":
277
277
repos.add(item.description.split()[0].split("://")[-1])
278
278
except IndexError:
279
#TRANSLATORS: the string is used as a fallback if we cannot
279
# TRANSLATORS: the string is used as a fallback if we cannot
280
280
# get the URI of a local repository
281
281
repos.add(self.transaction.gettext("local repository"))
283
#TRANSLATORS: %s is a list of repository names
283
# TRANSLATORS: %s is a list of repository names
284
284
msg = self.transaction.ngettext("Downloading from %s",
285
285
"Downloading from %s",
286
286
len(repos)) % " ".join(repos)
316
316
host = host.split("://")[1]
317
317
except IndexError:
318
#TRANSLATORS: the string is used as a fallback if we cannot
318
# TRANSLATORS: the string is used as a fallback if we cannot
319
319
# get the URI of a local repository
320
320
desc = self.transaction.gettext("local repository")
321
321
repo = "%s %s" % (host, dist)
322
322
if item.shortdesc == "InRelease":
323
#TRANSLATORS: repo is the name of a repository
323
# TRANSLATORS: repo is the name of a repository
324
324
desc = self.transaction.gettext("Structure of %s") % repo
325
325
elif item.shortdesc == "Release":
326
#TRANSLATORS: repo is the name of a repository
326
# TRANSLATORS: repo is the name of a repository
327
327
desc = self.transaction.gettext("Description of %s") % repo
328
328
elif item.shortdesc == "Release.gpg":
329
#TRANSLATORS: repo is the name of a repository
329
# TRANSLATORS: repo is the name of a repository
330
330
desc = self.transaction.gettext("Description signature "
332
332
elif item.shortdesc.startswith("Packages"):
333
#TRANSLATORS: repo is the name of a repository
333
# TRANSLATORS: repo is the name of a repository
334
334
desc = self.transaction.gettext(
335
335
"Available packages from %s") % repo
336
336
elif item.shortdesc.startswith("Sources"):
337
#TRANSLATORS: repo is the name of a repository
337
# TRANSLATORS: repo is the name of a repository
338
338
desc = self.transaction.gettext(
339
339
"Available sources from %s") % repo
340
340
elif item.shortdesc == "TranslationIndex":
341
#TRANSLATORS: repo is the name of a repository
341
# TRANSLATORS: repo is the name of a repository
342
342
desc = self.transaction.gettext("Available translations from "
344
344
elif item.shortdesc.startswith("Translation-"):
352
352
region = self.regions.get_localised_name(region_code,
353
353
self.transaction.locale)
354
354
if lang and region:
355
#TRANSLATORS: The first %s is the name of a language. The
355
# TRANSLATORS: The first %s is the name of a language. The
356
356
# second one the name of the region/country. Th
357
357
# third %s is the name of the repository
358
358
desc = self.transaction.gettext(
359
359
"Translations for %s (%s) from %s") % (lang, region, repo)
361
#TRANSLATORS: %s is the name of a language. The second one is
361
# TRANSLATORS: %s is the name of a language. The second one is
362
362
# the name of the repository
363
363
desc = self.transaction.gettext("Translations for %s from "
364
364
"%s") % (lang, repo)
366
#TRANSLATORS: %s is the code of a language, e.g. ru_RU.
366
# TRANSLATORS: %s is the code of a language, e.g. ru_RU.
367
367
# The second one is the name of the repository
368
368
desc = self.transaction.gettext("Translations (%s) from "
369
369
"%s") % (lang_code, repo)
526
526
def _setup_child(self):
527
"""Setup the environemnt of the child process."""
527
"""Setup the environment of the child process."""
528
528
def interrupt_handler(signum, frame):
529
529
# Exit the child immediately if we receive the interrupt
530
530
# signal or a Ctrl+C - otherwise the atexit methods would
531
531
# be called, e.g. the frozen status decorator
532
532
os._exit(apt_pkg.PackageManager.RESULT_FAILED)
533
533
signal.signal(signal.SIGINT, interrupt_handler)
534
# Make sure that exceptions of the child are not catched by apport
534
# Make sure that exceptions of the child are not caught by apport
535
535
sys.excepthook = sys.__excepthook__
678
678
# silently ignore lines that can't be parsed
680
680
message = message_raw.strip()
681
#print "percent: %s %s" % (pkg, float(percent)/100.0)
681
# print "percent: %s %s" % (pkg, float(percent)/100.0)
682
682
if status == "pmerror":
683
683
self._error(pkg, message)
684
684
elif status == "pmconffile":
804
804
# - "processing: STAGE: PACKAGE" with STAGE is one of upgrade,
805
805
# install, configure, trigproc, remove, purge
806
806
if status[0] == "status":
807
#FIXME: Handle STATUS
807
# FIXME: Handle STATUS
808
808
if status[2] == "error":
809
809
self._error(status[1], status[3])
810
810
elif status[2] == "conffile":