#
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "14")
-SET(VERSION_PATCH "50")
+SET(VERSION_PATCH "51")
-# LAST RELEASED: 1.14.50
+# LAST RELEASED: 1.14.51
#=======
-------------------------------------------------------------------
+Thu Dec 23 16:04:14 CET 2021 - ma@suse.de
+
+- Singletrans: handle fatal and non-fatal script errors properly.
+- Add SingleTransReportReceiver.
+- Immediately write out additional rpm output.
+- BuildRequires: libzypp-devel >= 17.29.0.
+ Need SingleTransReport and immediate rpm script output reports.
+- version 1.14.51
+
+-------------------------------------------------------------------
Mon Oct 18 12:05:45 CEST 2021 - ma@suse.de
- Fix compiler warning.
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 15:45+0200\n"
-"PO-Revision-Date: 2021-07-28 18:11+0000\n"
+"PO-Revision-Date: 2021-10-31 16:12+0000\n"
"Last-Translator: David Medina <medipas@gmail.com>\n"
-"Language-Team: Catalan <https://l10n.opensuse.org/projects/zypper/master/ca/"
-">\n"
+"Language-Team: Catalan <https://l10n.opensuse.org/projects/zypper/master/ca/>"
+"\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.7.1\n"
+"X-Generator: Weblate 4.8.1\n"
#: src/Command.cc:93
msgid "Invalid command"
"Using zypper subcommands available from elsewhere on your $PATH is disabled "
"in zypper.conf."
msgstr ""
+"L'ús de subordres zypper disponibles des d'altres llocs de $PATH està "
+"desactivat a zypper.conf."
#. translators: helptext; %1% is a zypper command
#: src/commands/subcommand.cc:485
"Lists available subcommands. Using zypper subcommands found on your $PATH is "
"disabled in zypper.conf."
msgstr ""
+"Llista les subordres disponibles. L'ús de subordres del zypper que es troben "
+"a $PATH està desactivat a zypper.conf."
#. Currently no concept how to handle global options and ZYPPlock
#: src/commands/subcommand.cc:626
"Project-Id-Version: zypper\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 15:45+0200\n"
-"PO-Revision-Date: 2021-07-29 12:11+0000\n"
+"PO-Revision-Date: 2021-10-19 20:12+0000\n"
"Last-Translator: Aleš Kastner <alkas@volny.cz>\n"
"Language-Team: Czech <https://l10n.opensuse.org/projects/zypper/master/cs/>\n"
"Language: cs\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.7.1\n"
+"X-Generator: Weblate 4.8.1\n"
#: src/Command.cc:93
msgid "Invalid command"
"Using zypper subcommands available from elsewhere on your $PATH is disabled "
"in zypper.conf."
msgstr ""
+"Používání podpříkazů zypperu dostupných z jiných míst vašeho $PATH je v "
+"souboru zypper.conf zakázáno."
#. translators: helptext; %1% is a zypper command
#: src/commands/subcommand.cc:485
"Lists available subcommands. Using zypper subcommands found on your $PATH is "
"disabled in zypper.conf."
msgstr ""
+"Zobrazí seznam dostupných podpříkazů. Používání podpříkazů zypperu "
+"nalezených na vašem $PATH je v souboru zypper.conf zakázáno."
#. Currently no concept how to handle global options and ZYPPlock
#: src/commands/subcommand.cc:626
#: src/Config.cc:377
msgid "User defined transaction id used in history and plugins."
msgstr ""
-"tBenutzerdefinierte Transaktions-ID, die in der Historie und Plugins benutzt "
+"Benutzerdefinierte Transaktions-ID, die in der Historie und Plugins benutzt "
"wird."
#. translators: --quiet, -q
"Project-Id-Version: zypper\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 15:45+0200\n"
-"PO-Revision-Date: 2021-09-04 16:12+0000\n"
+"PO-Revision-Date: 2021-10-18 11:13+0000\n"
"Last-Translator: Kukuh Syafaat <syafaatkukuh@gmail.com>\n"
"Language-Team: Indonesian <https://l10n.opensuse.org/projects/zypper/master/"
"id/>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.7.1\n"
+"X-Generator: Weblate 4.8.1\n"
#: src/Command.cc:93
msgid "Invalid command"
"Using zypper subcommands available from elsewhere on your $PATH is disabled "
"in zypper.conf."
msgstr ""
+"Menggunakan subperintah zypper yang tersedia dari tempat lain di $PATH Anda "
+"dinonaktifkan di zypper.conf."
#. translators: helptext; %1% is a zypper command
#: src/commands/subcommand.cc:485
"Lists available subcommands. Using zypper subcommands found on your $PATH is "
"disabled in zypper.conf."
msgstr ""
+"Daftar subperintah yang tersedia. Menggunakan subperintah zypper yang "
+"ditemukan di $PATH Anda dinonaktifkan di zypper.conf."
#. Currently no concept how to handle global options and ZYPPlock
#: src/commands/subcommand.cc:626
#: src/info.cc:99
msgid "automatically"
-msgstr "autometicamente"
+msgstr "automaticamente"
#: src/info.cc:171
#, boost-format
"Project-Id-Version: zypper.ko\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 15:45+0200\n"
-"PO-Revision-Date: 2019-04-04 18:36+0000\n"
-"Last-Translator: Hwajin Kim <hwajin.kim@e4net.net>\n"
-"Language-Team: Korean <https://l10n.opensuse.org/projects/zypper/master/ko/"
-">\n"
+"PO-Revision-Date: 2021-11-30 12:15+0000\n"
+"Last-Translator: Kim Tae Kyeong <kim@taekyeong.me>\n"
+"Language-Team: Korean <https://l10n.opensuse.org/projects/zypper/master/ko/>"
+"\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 3.3\n"
+"X-Generator: Weblate 4.8.1\n"
"X-Poedit-SourceCharset: utf-8\n"
#: src/Command.cc:93
#, c-format, boost-format
msgid "The following package failed to install:"
msgid_plural "The following %d packages failed to install:"
-msgstr[0] ""
+msgstr[0] "%d 패키지 설치 실패함:"
#: src/CommitSummary.cc:140
#, c-format, boost-format
msgid "The following package installation was skipped:"
msgid_plural "The following %d package installations were skipped:"
-msgstr[0] ""
+msgstr[0] "%d 패키지 설치를 건너뜀:"
#: src/CommitSummary.cc:155
#, c-format, boost-format
msgid "The following package failed to uninstall:"
msgid_plural "The following %d packages failed to uninstall:"
-msgstr[0] ""
+msgstr[0] "%d 패키지 제거를 실패함:"
#: src/CommitSummary.cc:170
#, c-format, boost-format
msgid "The following package removal was skipped:"
msgid_plural "The following %d package removal were skipped:"
-msgstr[0] ""
+msgstr[0] "%d 패키지 제거를 건너뜀:"
#. translators: Appended when clipping a long enumeration:
#. "ConsoleKit-devel ConsoleKit-doc ... and 20828 more items."
#. translators: --table-style, -s, %1% denotes the supported range of the integer argument (e.g. "1-11")
#: src/Config.cc:424
-#, fuzzy, boost-format
+#, boost-format
msgid "Table style (%1%)."
-msgstr "테이블 스타일(정수)."
+msgstr "테이블 스타일 (%1%)."
#: src/Config.cc:428 src/commands/optionsets.cc:284
msgid "Entering non-interactive mode."
#: src/RequestFeedback.cc:69
#, c-format, boost-format
msgid "Source package '%s' not found in specified repositories."
-msgstr "ì§\80ì \95ë\90\9c 리í\8f¬ì§\80í\86 리ì\97\90ì\84\9c ì\9b\90본 패키지 '%s'을(를) 찾을 수 없습니다."
+msgstr "ì§\80ì \95ë\90\9c 리í\8f¬ì§\80í\86 리ì\97\90ì\84\9c ì\86\8cì\8a¤ 패키지 '%s'을(를) 찾을 수 없습니다."
#. just in case
#: src/RequestFeedback.cc:71
#, c-format, boost-format
msgid "The following package is going to be REMOVED:"
msgid_plural "The following %d packages are going to be REMOVED:"
-msgstr[0] "다음 패키지가 제거됩니다."
+msgstr[0] "다음 %d 패키지가 제거됩니다:"
#: src/Summary.cc:641
#, c-format, boost-format
#, c-format, boost-format
msgid "The following package is going to be upgraded:"
msgid_plural "The following %d packages are going to be upgraded:"
-msgstr[0] "다음 패키지가 업그레이드됩니다."
+msgstr[0] "다음 %d 패키지가 업그레이드됩니다:"
#: src/Summary.cc:685
#, c-format, boost-format
#, c-format, boost-format
msgid "The following package is going to be downgraded:"
msgid_plural "The following %d packages are going to be downgraded:"
-msgstr[0] "다음 패키지가 다운그레이드됩니다."
+msgstr[0] "다음 %d 패키지가 다운그레이드됩니다:"
#: src/Summary.cc:731
#, c-format, boost-format
#, c-format, boost-format
msgid "The following package is going to be reinstalled:"
msgid_plural "The following %d packages are going to be reinstalled:"
-msgstr[0] "다음 패키지가 다시 설치됩니다."
+msgstr[0] "다음 %d 패키지가 재설치됩니다:"
#: src/Summary.cc:774
#, c-format, boost-format
msgid "The following recommended package was automatically selected:"
msgid_plural ""
"The following %d recommended packages were automatically selected:"
-msgstr[0] "다음 권장 패키지가 자동으로 선택되었습니다."
+msgstr[0] "다음 %d 권장 패키지가 자동으로 선택되었습니다:"
#: src/Summary.cc:939
#, c-format, boost-format
#: src/Summary.cc:1432
msgid "package to upgrade"
msgid_plural "packages to upgrade"
-msgstr[0] "꾸러미로 업그레이드"
+msgstr[0] "업그레이드할 패키지"
#. translators: this text will be preceded by a number e.g. "5 to ..."
#: src/Summary.cc:1443
#: src/Summary.cc:1446
msgid "package to downgrade"
msgid_plural "packages to downgrade"
-msgstr[0] "꾸러미로 다운그레이드"
+msgstr[0] "다운그레이드할 패키지"
#. translators: this text will be preceded by a number e.g. "5 new"
#: src/Summary.cc:1457
#: src/Summary.cc:1460
msgid "new package to install"
msgid_plural "new packages to install"
-msgstr[0] "ì\83\88ë¡\9cì\9a´ 꾸ë\9f¬ë¯¸ë¡\9c ì\84¤ì¹\98"
+msgstr[0] "ì\84¤ì¹\98í\95 ì\83\88ë¡\9cì\9a´ í\8c¨í\82¤ì§\80"
#. translators: this text will be preceded by a number e.g. "5 to ..."
#: src/Summary.cc:1471
#: src/Summary.cc:1474
msgid "package to reinstall"
msgid_plural "packages to reinstall"
-msgstr[0] "꾸러미로 재설치"
+msgstr[0] "재설치할 패키지"
#. translators: this text will be preceded by a number e.g. "5 to ..."
#: src/Summary.cc:1485
#: src/Summary.cc:1488
msgid "package to remove"
msgid_plural "packages to remove"
-msgstr[0] "꾸러미 제거됨"
+msgstr[0] "제거할 패키지"
#. translators: this text will be preceded by a number e.g. "5 to ..."
#: src/Summary.cc:1499
#: src/Summary.cc:1502
msgid "package will change vendor"
msgid_plural "packages will change vendor"
-msgstr[0] "꾸ë\9f¬ë¯¸ì\9d\98 ì \9cì¡°ì\82¬ê°\80 ë³\80ê²½ë\90¨"
+msgstr[0] "ê³µê¸\89ì\9e\90를 ë³\80ê²½í\95 í\8c¨í\82¤ì§\80"
#. translators: this text will be preceded by a number e.g. "5 to ..."
#: src/Summary.cc:1513
#: src/Summary.cc:1516
msgid "package will change arch"
msgid_plural "packages will change arch"
-msgstr[0] "개의 아키텍쳐로 변경할 꾸러미"
+msgstr[0] "아키텍쳐를 변경할 패키지"
#. translators: this text will be preceded by a number e.g. "5 new"
#: src/Summary.cc:1527
"repository provider or check his web site. Many provider maintain a web page "
"showing the fingerprints of the GPG keys they are using."
msgstr ""
+"GPG pubkey는 지문으로 명확하게 식별됩니다. 키 이름에 의존하지 마십시오. 제시된 키가 정상인지 확실하지 않은 경우 저장소 "
+"제공자에게 문의하거나 웹 사이트를 확인하십시오. 많은 공급자가 사용 중인 GPG 키의 지문을 보여주는 웹 페이지를 유지 관리합니다."
#: src/callbacks/keyring.h:37
msgid ""
#: src/callbacks/keyring.h:89
msgid "Key Algorithm:"
-msgstr ""
+msgstr "키 알고리즘:"
#: src/callbacks/keyring.h:90
msgid "Key Created:"
#, boost-format
msgid "Received %1% new package signing key from repository %2%:"
msgid_plural "Received %1% new package signing keys from repository %2%:"
-msgstr[0] ""
+msgstr[0] "%1%개의 새로운 패키지 서명 키를 저장소 %2%에서 가져옴:"
#: src/callbacks/keyring.h:494
msgid ""
"repository. In order to validate those packages upon download and "
"installation the new keys will be imported into the rpm database."
msgstr ""
+"이러한 추가 키는 일반적으로 저장소에서 제공하는 패키지에 서명하는 데 사용됩니다. 다운로드 및 설치 시 해당 패키지의 유효성을 검사하기 "
+"위해 새 키를 rpm 데이터베이스로 가져옵니다."
#: src/callbacks/keyring.h:496
msgid "New:"
#: src/callbacks/rpm.h:711 src/callbacks/rpm.h:718
#, c-format, boost-format
msgid "Executing %s script for: %s"
-msgstr ""
+msgstr "%s의 스크립트 실행 중: %s"
#. TranslatorExplanation This text is a progress display label e.g. "Installing: foo-1.1.2 [42%]"
#: src/callbacks/rpm.h:725
#, c-format, boost-format
msgid "Executing %s script"
-msgstr ""
+msgstr "%s 스크립트 실행 중"
#. TranslatorExplanation This text is a progress display label e.g. "Installing: foo-1.1.2 [42%]"
#: src/callbacks/rpm.h:857
#: src/utils/misc.cc:93
msgid "package"
msgid_plural "packages"
-msgstr[0] "꾸러미"
+msgstr[0] "패키지"
#: src/utils/misc.cc:95
msgid "pattern"
#: src/utils/misc.cc:101
msgid "srcpackage"
msgid_plural "srcpackages"
-msgstr[0] "src꾸러미"
+msgstr[0] "src패키지"
#: src/utils/misc.cc:103
msgid "application"
"Project-Id-Version: zypper\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 15:45+0200\n"
-"PO-Revision-Date: 2021-08-02 01:11+0000\n"
+"PO-Revision-Date: 2021-10-20 21:11+0000\n"
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatic4@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://l10n.opensuse.org/projects/"
"zypper/master/pt_BR/>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.7.1\n"
+"X-Generator: Weblate 4.8.1\n"
"X-Poedit-Language: Portuguese\n"
"X-Poedit-Country: BRAZIL\n"
"X-Poedit-SourceCharset: utf-8\n"
"Using zypper subcommands available from elsewhere on your $PATH is disabled "
"in zypper.conf."
msgstr ""
+"O uso de sub-comandos zypper disponíveis em qualquer outro lugar em seu $"
+"PATH está desabilitado em zypper.conf."
#. translators: helptext; %1% is a zypper command
#: src/commands/subcommand.cc:485
"Lists available subcommands. Using zypper subcommands found on your $PATH is "
"disabled in zypper.conf."
msgstr ""
+"Lista os subcomandos disponíveis. O uso de subcomandos zypper encontrados em "
+"seu $ PATH está desabilitado em zypper.conf."
#. Currently no concept how to handle global options and ZYPPlock
#: src/commands/subcommand.cc:626
"Project-Id-Version: zypper\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 15:45+0200\n"
-"PO-Revision-Date: 2021-10-13 19:11+0000\n"
+"PO-Revision-Date: 2021-11-27 14:13+0000\n"
"Last-Translator: Ferdinand Galko <galko.ferdinand@gmail.com>\n"
"Language-Team: Slovak <https://l10n.opensuse.org/projects/zypper/master/sk/>"
"\n"
#. translators: command synopsis; do not translate lowercase words
#: src/commands/installremove.cc:82
msgid "remove (rm) [OPTIONS] <CAPABILITY> ..."
-msgstr "remove (rm) [voľby] <schopnosť> ..."
+msgstr "remove (rm) [VOĽBY] <SCHOPNOSŤ> ..."
#. translators: command summary: remove, rm
#: src/commands/installremove.cc:84
#. translators: command synopsis; do not translate lowercase words
#: src/commands/installremove.cc:166
msgid "install (in) [OPTIONS] <CAPABILITY|RPM_FILE_URI> ..."
-msgstr "install (in) [voľby] <schopnosť|uri_rpm_súboru> ..."
+msgstr "install (in) [VOĽBY] <SCHOPNOSŤ|URI_SÚBORU_RPM> ..."
#. translators: command summary: install, in
#: src/commands/installremove.cc:168
#. translators: command synopsis; do not translate lowercase words
#: src/commands/nullcommands.cc:37
msgid "what-provides (wp) <CAPABILITY>"
-msgstr "what-provides (wp) <schopnosť>"
+msgstr "what-provides (wp) <SCHOPNOSŤ>"
#. translators: command summary: what-provides, wp
#: src/commands/nullcommands.cc:39
"Project-Id-Version: zypper.uk\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-13 15:45+0200\n"
-"PO-Revision-Date: 2021-10-14 01:14+0000\n"
+"PO-Revision-Date: 2021-11-04 17:13+0000\n"
"Last-Translator: Taras Panchenko <top39@ukr.net>\n"
"Language-Team: Ukrainian <https://l10n.opensuse.org/projects/zypper/master/"
"uk/>\n"
#, c-format, boost-format
msgid "The following package failed to install:"
msgid_plural "The following %d packages failed to install:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Не вдалося встановити пакунок:"
+msgstr[1] "Не вдалося встановити %d пакунки:"
+msgstr[2] "Не вдалося встановити %d пакунків:"
#: src/CommitSummary.cc:140
#, c-format, boost-format
msgid "The following package installation was skipped:"
msgid_plural "The following %d package installations were skipped:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Встановлення пакунку було пропущено:"
+msgstr[1] "Встановлення %d пакунків було пропущено:"
+msgstr[2] "Встановлення %d пакунків було пропущено:"
#: src/CommitSummary.cc:155
#, c-format, boost-format
msgid "The following package failed to uninstall:"
msgid_plural "The following %d packages failed to uninstall:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Не вдалося вилучити пакунок:"
+msgstr[1] "Не вдалося вилучити %d пакунки:"
+msgstr[2] "Не вдалося вилучити %d пакунків:"
#: src/CommitSummary.cc:170
#, c-format, boost-format
msgid "The following package removal was skipped:"
msgid_plural "The following %d package removal were skipped:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Вилучення пакунку було пропущено:"
+msgstr[1] "Вилучення %d пакунків було пропущено:"
+msgstr[2] "Вилучення %d пакунків було пропущено:"
#. translators: Appended when clipping a long enumeration:
#. "ConsoleKit-devel ConsoleKit-doc ... and 20828 more items."
"repository provider or check his web site. Many provider maintain a web page "
"showing the fingerprints of the GPG keys they are using."
msgstr ""
+"Відкритий ключ GPG чітко ідентифікується за власним відбитком. Не "
+"покладайтеся на назву ключів. Якщо ви не впевнені, чи автентичний наданий "
+"ключ, запитайте у постачальника сховища або перевірте його веб-сайт. Багато "
+"провайдерів підтримують веб-сторінки, на яких відображаються відбитки ключів "
+"GPG, які вони використовують."
#: src/callbacks/keyring.h:37
msgid ""
#: src/callbacks/keyring.h:89
msgid "Key Algorithm:"
-msgstr ""
+msgstr "Алгоритм ключа:"
#: src/callbacks/keyring.h:90
msgid "Key Created:"
#, boost-format
msgid "Received %1% new package signing key from repository %2%:"
msgid_plural "Received %1% new package signing keys from repository %2%:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Отримано %1% новий пакунок ключа підпису зі сховища %2%:"
+msgstr[1] "Отримано %1% нових пакунки ключів підпису зі сховища %2%:"
+msgstr[2] "Отримано %1% нових пакунків ключів підпису зі сховища %2%:"
#: src/callbacks/keyring.h:494
msgid ""
"repository. In order to validate those packages upon download and "
"installation the new keys will be imported into the rpm database."
msgstr ""
+"Ці додаткові ключі зазвичай використовуються для підпису пакунків, що "
+"надсилаються до сховища. Щоб перевірити ці пакунки після завантаження та "
+"встановлення, нові ключі будуть імпортовані в базу даних rpm."
#: src/callbacks/keyring.h:496
msgid "New:"
-msgstr ""
+msgstr "Новий:"
#: src/callbacks/keyring.h:502
msgid ""
"The repository metadata introducing the new keys have been signed and "
"validated by the trusted key:"
msgstr ""
+"Метадані сховища, що представляють нові ключі, були підписані та перевірені "
+"надійним ключем:"
#: src/callbacks/keyring.h:525
#, c-format, boost-format
#: src/callbacks/rpm.h:711 src/callbacks/rpm.h:718
#, c-format, boost-format
msgid "Executing %s script for: %s"
-msgstr ""
+msgstr "Виконання сценарію %s для: %s"
#. TranslatorExplanation This text is a progress display label e.g. "Installing: foo-1.1.2 [42%]"
#: src/callbacks/rpm.h:725
#, c-format, boost-format
msgid "Executing %s script"
-msgstr ""
+msgstr "Виконання сценарію %s"
#. TranslatorExplanation This text is a progress display label e.g. "Installing: foo-1.1.2 [42%]"
#: src/callbacks/rpm.h:857
#, c-format, boost-format
msgid "Cleaning up: %s"
-msgstr ""
+msgstr "Прибирання: %s"
#. translator: %s is an other command: "This is an alias for 'zypper info -t patch'."
#: src/commands/commandhelpformatter.h:94
#. translators: command synopsis; do not translate the command 'name (abbreviations)' or '-option' names
#: src/commands/locks/add.cc:29
msgid "addlock (al) [OPTIONS] <LOCKSPEC>..."
-msgstr ""
+msgstr "addlock (al) [ПАРАМЕТРИ] <LOCKSPEC>..."
#. translators: command summary
#: src/commands/locks/add.cc:31 src/commands/locks/add.cc:34
"have their KIND: string prepended (e.g. 'patch:foo') or use the commands --"
"type option."
msgstr ""
+"LOCKSPEC складається з '[ТИП:]ІМ'Я[ ОПЕРАТОР ВАРІАНТ]', де ІМ'Я може бути "
+"вказано як глобальний шаблон з використанням символів \"*\" та \"?\". Для "
+"типів, що не є пакунками можна вказати ТИП: рядок на початку (напр. "
+"'patch:foo') або використавши команду --type option."
#: src/commands/locks/add.cc:36
msgid ""
"optionally restrict the lock to match a specific edition or edition range "
"using =, <, <=, >, >= or != followed an EDITION."
msgstr ""
+"Спрощена форма заблокує всі варіанти відповідності елементів. За бажанням "
+"можна обмежити блокування відповідно до певного варіанту або діапазону "
+"варіантів за допомогою =, <, <=, >, >= або != після EDITION."
#: src/commands/locks/add.cc:46
msgid "Restrict the lock to the specified repository."
#: src/commands/locks/add.cc:48
msgid "Reason for specific lock."
-msgstr ""
+msgstr "Причина конкретного блокування."
#: src/commands/locks/add.cc:81
msgid "Specified lock has been successfully added."
#: src/commands/locks/list.cc:138
msgid "Comment"
-msgstr ""
+msgstr "Примітка"
#. translators: locks table value
#: src/commands/locks/list.cc:156 src/commands/locks/list.cc:235
"This is the recommended way for scripts to test whether a system reboot is "
"suggested."
msgstr ""
+"Це рекомендований спосіб для сценаріїв, щоб перевірити, чи пропонується "
+"перезавантаження системи."
#: src/commands/needs-rebooting.cc:38
msgid ""
"When updating the affected/vulnerable packages described by a patch, zypper "
"always aims for the latest available version."
msgstr ""
+"Під час оновлення уражених/уразливих пакунків, вказаних у латках, zypper "
+"завжди прагне до останньої з наявних версій."
#: src/commands/patch.cc:50
msgid ""
"will look in the rest of your $PATH for it. Thus, it's possible\n"
"to write local zypper extensions that don't live in system space.\n"
msgstr ""
-"Ð\9fÑ\96дкоманди zypper - Ñ\81амоÑ\81Ñ\82Ñ\96йно виконÑ\83Ñ\8eÑ\82Ñ\8cÑ\81Ñ\8f Ñ\96 живÑ\83Ñ\82Ñ\8c у\n"
-"zypper_execdir («%1%»).\n"
+"Ð\9fÑ\96дкоманди zypper - Ñ\81амоÑ\81Ñ\82Ñ\96йно виконÑ\83Ñ\8eÑ\82Ñ\8cÑ\81Ñ\8f Ñ\82а Ñ\80озÑ\82аÑ\88ованÑ\96 у\n"
+"zypper_execdir ('%1%').\n"
"\n"
"Для підкоманд zypper надає оболонку, яка знає, де вони\n"
-"живуть, і запускає їх, передаючи аргументи командного рядка.\n"
+"розташовані, запускає їх, передаючи аргументи командного\n"
+"рядка.\n"
"\n"
"Якщо підкоманду не знайдено у zypper_execdir, оболонка\n"
"буде шукати її у іншій частині вашого $PATH. Таким чином, можливо\n"
-"написати локальні розширення zypper, які не живуть у системному просторі.\n"
+"написати локальні розширення zypper, які не розташовано у системному "
+"просторі.\n"
#: src/commands/subcommand.cc:458
#, boost-format
"Using zypper subcommands available from elsewhere on your $PATH is disabled "
"in zypper.conf."
msgstr ""
+"Можливість використання підкоманд zypper з іншого місця відповідно до вашого "
+"$PATH, вимкнено у zypper.conf."
#. translators: helptext; %1% is a zypper command
#: src/commands/subcommand.cc:485
"Lists available subcommands. Using zypper subcommands found on your $PATH is "
"disabled in zypper.conf."
msgstr ""
+"Перелік наявних підкоманд. Використання підкоманд zypper, знайдених у вашому "
+"$PATH, вимкнено в zypper.conf."
#. Currently no concept how to handle global options and ZYPPlock
#: src/commands/subcommand.cc:626
"DownloadAsNeeded can not be used with ZYPP_SINGLE_RPMTRANS=1, falling back "
"to DownloadInAdvance"
msgstr ""
+"DownloadAsNeeded не можна використовувати із ZYPP_SINGLE_RPMTRANS=1, "
+"повертаємось до DownloadInAdvance"
#: src/solve-commit.cc:547
#, c-format, boost-format
label = str::form( label.c_str(), _failedInstalls.size() );
- out << endl << ( ColorContext::HIGHLIGHT << label ) << endl;
+ out << endl << ( ColorContext::MSG_ERROR << label ) << endl;
writeResolvableList( out, _failedInstalls, ColorContext::NEGATIVE );
}
label = str::form( label.c_str(), _failedInstalls.size() );
- out << endl << ( ColorContext::HIGHLIGHT << label ) << endl;
+ out << endl << ( ColorContext::MSG_WARNING << label ) << endl;
writeResolvableList( out, _skippedInstalls, ColorContext::NEGATIVE );
}
label = str::form( label.c_str(), _failedInstalls.size() );
- out << endl << ( ColorContext::HIGHLIGHT << label ) << endl;
+ out << endl << ( ColorContext::MSG_ERROR << label ) << endl;
writeResolvableList( out, _failedRemovals, ColorContext::NEGATIVE );
}
label = str::form( label.c_str(), _failedInstalls.size() );
- out << endl << ( ColorContext::HIGHLIGHT << label ) << endl;
+ out << endl << ( ColorContext::MSG_WARNING << label ) << endl;
writeResolvableList( out, _skippedRemovals, ColorContext::NEGATIVE );
}
return ret;
}
- void setColorForOut ( const bool &set )
- {
- OutNormal *currOut = dynamic_cast<OutNormal *>( Zypper::instance().outputWriter() );
- if ( currOut )
- currOut->setUseColors( set );
- }
+ void setColorForOut ( bool yesno_r )
+ { Zypper::instance().out().setUseColors( yesno_r ); }
- void setOutVerbosity ( Out::Verbosity verb )
- {
- Out *currOut = Zypper::instance().outputWriter();
- if ( currOut )
- currOut->setVerbosity( verb );
- }
+ void setOutVerbosity ( Out::Verbosity verb_r )
+ { Zypper::instance().out().setVerbosity( verb_r ); }
} // namespace
//////////////////////////////////////////////////////////////////
// PENDING SigINT? Some frequently called place to avoid exiting from within the signal handler?
immediateExitCheck();
- if ( _out_ptr )
- return *_out_ptr;
+ if ( not _out_ptr ) {
+ _out_ptr = new OutNormal( Out::QUIET );
+ }
- cerr << "uninitialized output writer" << endl;
- ZYPP_THROW( ExitRequestException("no output writer") );
+ return *_out_ptr;
}
-Out *Zypper::outputWriter()
+void Zypper::setOutputWriter( Out *out )
{
- return _out_ptr;
-}
-
-void Zypper::setOutputWriter(Out *out)
-{
- if ( _out_ptr ) {
+ if ( _out_ptr && _out_ptr != out ) // prevent self destruct
delete _out_ptr;
- _out_ptr = nullptr;
- }
_out_ptr = out;
}
MIL << "START" << endl;
//setup the default output, this could be overridden by cli values
- OutNormal * p = new OutNormal( _config.verbosity );
- p->setUseColors( _config.do_colors );
- setOutputWriter( p );
+ out().setVerbosity( _config.verbosity );
+ out().setUseColors( _config.do_colors );
std::vector<ZyppFlags::CommandGroup> globalOpts = _config.cliOptions();
int nextFlag = searchPackagesHintHack::argvCmdIdx = ZyppFlags::parseCLI( _argc, _argv, globalOpts );
out().info( str::Format(_("Verbosity: %d")) % _config.verbosity , Out::HIGH );
DBG << "Verbosity " << _config.verbosity << endl;
- DBG << "Output type " << _out_ptr->type() << endl;
+ DBG << "Output type " << out().type() << endl;
// ======== other global options ========
{
// setters & getters
Out & out();
-
- Out *outputWriter ( );
void setOutputWriter( Out * out );
const Config & config() { return _config; }
{
virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const
{
+ static const JobReport::UserData::ContentType rpmPosttrans { "cmdout", "%posttrans" };
+
Out & out( Zypper::instance().out() );
switch ( type_r.asEnum() )
{
break;
case MsgType::info:
- if ( userData_r.type().type() == "cmdout" )
+ if ( userData_r.type() == rpmPosttrans )
+ {
+ processAdditionalRpmOutput( msg_r );
+ }
+ else if ( userData_r.type().type() == "cmdout" )
{
- // Render command output (like %posttrans) highlighted
+ // Render command output highlighted
out.info( HIGHLIGHTString(msg_r).str() );
}
else
#include "utils/prompt.h"
#include <zypp/media/MediaManager.h>
+#include <zypp-curl/auth/CurlAuthData>
using std::cin;
using namespace zypp;
#include <zypp/base/Logger.h>
#include <zypp/base/IOStream.h>
-#include <zypp/base/String.h>
+#include <zypp/base/StringV.h>
#include <zypp/base/Regex.h>
#include <zypp/sat/Queue.h>
#include <zypp/sat/FileConflicts.h>
///////////////////////////////////////////////////////////////////
namespace
{
+ using loglevel = zypp::target::rpm::SingleTransReport::loglevel;
+
+ /** Print additional rpm outout line and scan for %script errors. */
+ inline void processAdditionalRpmOutputLine( const std::string & line_r, loglevel level_r = loglevel::msg, const char *const prefix_r = nullptr )
+ {
+ Out::Info info( Zypper::instance().out() );
+ ColorStream msg( info << "", ColorContext::HIGHLIGHT );
+
+ std::string_view msgline { zypp::strv::rtrim( line_r, "\n" ) };
+
+ if ( prefix_r ) {
+ // Checking for ZYPPER_EXIT_INF_RPM_SCRIPT_FAILED (like in the traditional rpv case below)
+ // is not needed here. The script callback callback handles this.
+ switch ( level_r ) {
+ case loglevel::crt: [[fallthrough]];
+ case loglevel::err:
+ msg << ( ColorContext::MSG_ERROR << prefix_r<<msgline );
+ break;
+ case loglevel::war:
+ msg << ( ColorContext::MSG_WARNING << prefix_r<<msgline );
+ break;
+ case loglevel::msg:
+ msg << prefix_r<<msgline;
+ break;
+ case loglevel::dbg:
+ msg << ( ColorContext::LOWLIGHT << prefix_r<<msgline );
+ break;
+ }
+ }
+ else {
+ // a single line with prefix (parsed from traditional rpm calls stdout/stderr)
+ static str::regex rx("^(warning|error): %.* scriptlet failed, ");
+ static str::smatch what;
+ if ( str::regex_match( line_r, what, rx ) ) {
+ Zypper::instance().setExitInfoCode( ZYPPER_EXIT_INF_RPM_SCRIPT_FAILED );
+ msg << ( (line_r[0] == 'w' ? ColorContext::MSG_WARNING : ColorContext::MSG_ERROR) << msgline );
+ }
+ else
+ msg << msgline;
+ }
+ }
+
/** Print additional rpm outout and scan for %script errors. */
- void processAdditionalRpmOutput( const std::string & output_r, const bool trainlingNewline = false )
+ void processAdditionalRpmOutput( const std::string & output_r )
{
- if ( ! output_r.empty() )
- {
- std::istringstream input( output_r );
+ if ( output_r.empty() )
+ return;
- Out::Info info( Zypper::instance().out() );
- ColorStream msg( info << "", ColorContext::HIGHLIGHT );
+ if ( output_r.find( '\n' ) == std::string::npos ) {
+ // singleline
+ processAdditionalRpmOutputLine( output_r );
+ }
+ else {
+ // multiline
+ std::istringstream input( output_r );
for ( iostr::EachLine in( input ); in; in.next() )
- {
- if ( in.lineNo() > 1 )
- msg << endl;
-
- const std::string & line( *in );
- static str::regex rx("^(warning|error): %.* scriptlet failed, ");
- static str::smatch what;
- if ( str::regex_match( line, what, rx ) )
- {
- msg << ( (line[0] == 'w' ? ColorContext::MSG_WARNING : ColorContext::MSG_ERROR) << line );
- Zypper::instance().setExitInfoCode( ZYPPER_EXIT_INF_RPM_SCRIPT_FAILED );
- }
- else
- msg << line;
- }
-
- if ( trainlingNewline )
- msg << endl;
+ processAdditionalRpmOutputLine( *in );
}
}
return !Zypper::instance().exitRequested();
}
- virtual Action problem( Resolvable::constPtr resolvable, Error error, const std::string & description )
+ virtual Action problem( Resolvable::constPtr resolvable, Error error, const std::string & description_r )
{
+ std::string description; // We just need the 1st line (exception message), the rest is additional rpm output we already reported.
+ strv::split( description_r, "\n", [&description]( std::string_view line_r, unsigned nr_r ) {
+ if ( nr_r == 0 ) description = line_r;
+ return false;
+ });
+
// finsh progress; indicate error
if ( _progress )
{
if (error != NO_ERROR)
// set proper exit code, don't write to output, the error should have been reported in problem()
Zypper::instance().setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- else
- {
- // bnc #369450: print additional rpm output
- processAdditionalRpmOutput( reason, true );
- }
+ }
+
+ void report( const UserData & userData_r ) override
+ {
+ // Any additional rpm output is printed immediately....
+ if ( userData_r.type() == ReportType::contentRpmout && userData_r.haskey("line") ) {
+ processAdditionalRpmOutput( userData_r.get<std::reference_wrapper<const std::string>>("line").get() );
+ }
}
virtual void reportend()
return !Zypper::instance().exitRequested();
}
- virtual Action problem( Resolvable::constPtr resolvable, Error error, const std::string & description, RpmLevel /*unused*/ )
+ virtual Action problem( Resolvable::constPtr resolvable, Error error, const std::string & description_r, RpmLevel /*unused*/ )
{
+ std::string description; // We just need the 1st line (exception message), the rest is additional rpm output we already reported.
+ strv::split( description_r, "\n", [&description]( std::string_view line_r, unsigned nr_r ) {
+ if ( nr_r == 0 ) description = line_r;
+ return false;
+ });
+
// finsh progress; indicate error
if ( _progress )
{
if ( error != NO_ERROR )
// don't write to output, the error should have been reported in problem() (bnc #381203)
Zypper::instance().setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- else
- {
- // bnc #369450: print additional rpm output
- processAdditionalRpmOutput( reason, true );
- }
+ }
+
+ void report( const UserData & userData_r ) override
+ {
+ // Any additional rpm output is printed immediately....
+ if ( userData_r.type() == ReportType::contentRpmout && userData_r.haskey("line") ) {
+ processAdditionalRpmOutput( userData_r.get<std::reference_wrapper<const std::string>>("line").get() );
+ }
}
virtual void reportend()
///////////////////////////////////////////////////////////////////
+/// \brief Report active throughout the whole rpm transaction.
+///////////////////////////////////////////////////////////////////
+struct SingleTransReportReceiver : public callback::ReceiveReport<target::rpm::SingleTransReport>
+{
+ void report( const UserData & userData_r ) override
+ {
+ if ( userData_r.type() == ReportType::contentLogline ) {
+ const std::string & line { userData_r.get<std::reference_wrapper<const std::string>>("line").get() };
+ ReportType::loglevel level { userData_r.get<ReportType::loglevel>("level") };
+ processAdditionalRpmOutputLine( line, level, ReportType::loglevelPrefix( level ) );
+ }
+ }
+};
+
+///////////////////////////////////////////////////////////////////
// progress for removing a resolvable during a single transaction
struct RemoveResolvableSAReportReceiver : public callback::ReceiveReport<target::rpm::RemoveResolvableReportSA>
{
if (error != NO_ERROR)
// set proper exit code, don't write to output, the error should have been reported in problem()
Zypper::instance().setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- else
- {
- // bnc #369450: print additional rpm output
- // processAdditionalRpmOutput( reason );
- }
}
void report( const UserData & userData_r ) override
{
- if ( userData_r.type() == target::rpm::RemoveResolvableReportSA::contentRpmout
+ if ( userData_r.type() == ReportType::contentRpmout
&& userData_r.haskey("line") ) {
std::string line;
if ( userData_r.get("line", line) ) {
if ( error != NO_ERROR )
// don't write to output, the error should have been reported in problem() (bnc #381203)
Zypper::instance().setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- else
- {
- // bnc #369450: print additional rpm output
- // processAdditionalRpmOutput( reason );
- }
}
void report( const UserData & userData_r ) override
{
- if ( userData_r.type() == target::rpm::InstallResolvableReportSA::contentRpmout
+ if ( userData_r.type() == ReportType::contentRpmout
&& userData_r.haskey("line") ) {
std::string line;
if ( userData_r.get("line", line) ) {
// finsh progress; indicate error
if ( _progress )
{
- (*_progress).error( error != NO_ERROR );
+ ProgressEnd donetag { error==NO_ERROR ? ProgressEnd::done : error==CRITICAL ? ProgressEnd::error : ProgressEnd::attention };
+ (*_progress).error( donetag );
_progress.reset();
}
- if ( error != NO_ERROR )
+ if ( error == WARN )
// don't write to output, the error should have been reported in problem() (bnc #381203)
- Zypper::instance().setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- else
- {
- // bnc #369450: print additional rpm output
- // processAdditionalRpmOutput( reason );
- }
+ Zypper::instance().setExitInfoCode( ZYPPER_EXIT_INF_RPM_SCRIPT_FAILED );
}
void report( const UserData & userData_r ) override
{
- if ( userData_r.type() == target::rpm::CommitScriptReportSA::contentRpmout
+ if ( userData_r.type() == ReportType::contentRpmout
&& userData_r.haskey("line") ) {
std::string line;
if ( userData_r.get("line", line) ) {
if ( error != NO_ERROR )
// don't write to output, the error should have been reported in problem() (bnc #381203)
Zypper::instance().setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- else
- {
- // bnc #369450: print additional rpm output
- // processAdditionalRpmOutput( reason );
- }
}
void report( const UserData & userData_r ) override
{
- if ( userData_r.type() == target::rpm::TransactionReportSA::contentRpmout
+ if ( userData_r.type() == ReportType::contentRpmout
&& userData_r.haskey("line") ) {
std::string line;
if ( userData_r.get("line", line) ) {
if ( error != NO_ERROR )
// don't write to output, the error should have been reported in problem() (bnc #381203)
Zypper::instance().setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- else
- {
- // bnc #369450: print additional rpm output
- // processAdditionalRpmOutput( reason );
- }
}
void report( const UserData & userData_r ) override
{
- if ( userData_r.type() == target::rpm::CleanupPackageReportSA::contentRpmout
+ if ( userData_r.type() == ReportType::contentRpmout
&& userData_r.haskey("line") ) {
std::string line;
if ( userData_r.get("line", line) ) {
ZmartRecipients::InstallResolvableReportReceiver _removeReceiver;
ZmartRecipients::FindFileConflictstReportReceiver _fileConflictsReceiver;
+ ZmartRecipients::SingleTransReportReceiver _singleTransaReceiver; // active throughout the whole rpm transaction
ZmartRecipients::RemoveResolvableSAReportReceiver _installSaReceiver;
ZmartRecipients::InstallResolvableSAReportReceiver _removeSaReceiver;
ZmartRecipients::CommitScriptReportSAReportReceiver _scriptSaReceiver;
_removeReceiver.connect();
_fileConflictsReceiver.connect();
+ _singleTransaReceiver.connect();
_installSaReceiver.connect();
_removeSaReceiver.connect();
_scriptSaReceiver.connect();
_removeReceiver.disconnect();
_fileConflictsReceiver.disconnect();
+ _singleTransaReceiver.disconnect();
_installSaReceiver.disconnect();
_removeSaReceiver.disconnect();
_scriptSaReceiver.disconnect();
MIL << "===== Hi, me zypper " VERSION << endl;
dumpRange( MIL, argv, argv+argc, (sudo ? "===== 'sudo' ": "===== "), "'", "' '", "'", " =====" ) << endl;
-
- OutNormal out( Out::QUIET );
-
+ Zypper & zypper( Zypper::instance() );
if ( ::signal( SIGINT, signal_handler ) == SIG_ERR )
- out.error("Failed to set SIGINT handler.");
+ zypper.out().error("Failed to set SIGINT handler.");
if ( ::signal (SIGTERM, signal_handler ) == SIG_ERR )
- out.error("Failed to set SIGTERM handler.");
+ zypper.out().error("Failed to set SIGTERM handler.");
if ( ::signal( SIGPIPE, signal_nopipe ) == SIG_ERR )
- out.error("Failed to set SIGPIPE handler.");
+ zypper.out().error("Failed to set SIGPIPE handler.");
try
{
catch ( const Exception & e )
{
ZYPP_CAUGHT( e );
- out.error( e, "Failed to initialize zypper callbacks." );
- report_a_bug( out );
+ zypper.out().error( e, "Failed to initialize zypper callbacks." );
+ report_a_bug( zypper.out() );
return ZYPPER_EXIT_ERR_BUG;
}
catch (...)
{
- out.error( "Failed to initialize zypper callbacks." );
+ zypper.out().error( "Failed to initialize zypper callbacks." );
ERR << "Failed to initialize zypper callbacks." << endl;
- report_a_bug( out );
+ report_a_bug( zypper.out() );
return ZYPPER_EXIT_ERR_BUG;
}
- Zypper & zypper( Zypper::instance() );
int & exitcode { say_goodbye.exitcode };
exitcode = zypper.main( argc, argv );
if ( !exitcode )
std::cout << table_r;
}
+void Out::progressEnd( const std::string & id, const std::string & label, ProgressEnd donetag_r )
+{
+ // translator: Shown as result tag in a progress bar: ............[done]
+ static const std::string done { _("done") };
+ // translator: Shown as result tag in a progress bar: .......[attention]
+ static const std::string attention { MSG_WARNINGString(_("attention")).str() };
+ // translator: Shown as result tag in a progress bar: ...........[error]
+ static const std::string error { MSG_ERRORString(_("error")).str() };
+
+ const std::string & donetag { donetag_r==ProgressEnd::done ? done : donetag_r==ProgressEnd::error ? error : attention };
+ progressEnd( id, label, donetag, donetag_r==ProgressEnd::error );
+}
+
////////////////////////////////////////////////////////////////////////////////
// class Out::Error
////////////////////////////////////////////////////////////////////////////////
#include <string>
#include <sstream>
+#include <optional>
#include <zypp/base/Xml.h>
#include <zypp/base/NonCopyable.h>
class Zypper;
+/// ProgressBars default end tags.
+enum class ProgressEnd { done, attention, error };
+
///////////////////////////////////////////////////////////////////
namespace text
{
* \param id Identifier. Any string used to match multiple overlapping
* progress reports.
* \param label Progress description.
+ * \param donetag Optional string overwriting the default [done]/[error] tags.
* \param error <tt>false</tt> if the operation finished with success,
* <tt>true</tt> otherwise.
*/
virtual void progressEnd(const std::string & id,
const std::string & label,
- bool error = false) = 0; // might be a string with error message instead
+ const std::string & donetag,
+ bool error = false) = 0;
+ /** \overload using the default [done]/[attention]/[error] tags in screen output. depending on \a donetag. */
+ void progressEnd( const std::string & id, const std::string & label, ProgressEnd donetag );
+ /** \overload using the default [done]/[error] tags in screen output depending on \a error. */
+ void progressEnd( const std::string & id, const std::string & label, bool error = false )
+ { progressEnd( id, label, error ? ProgressEnd::error : ProgressEnd::done ); }
//@}
/** \name Download progress with download rate */
return DtorReset( _verbosity, verbosity_r );
}
+ /** Hint for a handler whether config would allow to use colors. */
+ virtual void setUseColors( bool yesno ) {}
public:
/** Return the type of the instance. */
*/
ProgressBar( Out & out_r, NoStartBar, const std::string & progressId_r, const std::string & label_r, unsigned current_r = 0, unsigned total_r = 0 )
: _out( out_r )
- , _error( indeterminate )
, _progressId( progressId_r )
{
if ( total_r )
~ProgressBar()
{
_progress.noSend(); // suppress ~ProgressData final report
- if ( indeterminate( _error ) )
- _error = ( _progress.reportValue() != 100 && _progress.reportPercent() );
- _out.progressEnd( _progressId, outLabel( _progress.name() ), bool(_error) );
+ if ( not _donetag )
+ error( _progress.reportValue() != 100 && _progress.reportPercent() );
+ _out.progressEnd( _progressId, outLabel( _progress.name() ), *_donetag );
}
/** Immediately print the progress bar not waiting for a new trigger. */
{ _progress.name( label_r ); print(); }
/** Explicitly indicate the error condition for the final progress bar. */
- void error( TriBool error_r = true )
- { _error = error_r; }
+ void error( ProgressEnd donetag_r = ProgressEnd::error )
+ { _donetag = donetag_r; }
- /** \overload to disambiguate. */
+ /** \overload just done/error. */
void error( bool error_r )
- { _error = error_r; }
+ { _donetag = error_r ? ProgressEnd::error : ProgressEnd::done; }
+
+ /** Reset any error condition. */
+ void errorreset()
+ { _donetag.reset(); }
/** \overload also change the progress bar label. */
void error( const std::string & label_r )
void error( const char * label_r )
{ _progress.name( label_r ); error( true ); }
- /** \overload also change the progress bar label. */
- void error( TriBool error_r, const std::string & label_r )
- { _progress.name( label_r ); error( error_r ); }
-
public:
/** \name Access the embedded ProgressData object */
//@{
private:
Out & _out;
- TriBool _error;
+ std::optional<ProgressEnd> _donetag;
ProgressData _progress;
std::string _progressId;
std::string _labelPrefix;
return false;
}
+void OutNormal::fixupProgressNL()
+{
+ if ( !_newline ) // An active Progress bar is not NL terminated
+ cout << ansi::tty::clearLN; // Wipe it before writing out a normal line to the screen
+ // Alternative : cout << endl; to Keep the progress bar visible.
+}
+
void OutNormal::info( const std::string & msg_r, Verbosity verbosity_r, Type mask )
{
if ( infoWarningFilter( verbosity_r, mask ) )
return;
- if ( !_newline )
- cout << endl;
+ fixupProgressNL();
ColorString msg( msg_r, ColorContext::MSG_STATUS );
if ( verbosity_r == Out::QUIET )
if ( infoWarningFilter( verbosity_r, mask ) )
return;
- if ( !_newline )
- cout << endl;
+ fixupProgressNL();
cout << ( ColorContext::MSG_WARNING << _("Warning: ") ) << msg << endl;
_newline = true;
void OutNormal::error( const std::string & problem_desc, const std::string & hint )
{
- if ( !_newline )
- cout << endl;
+ fixupProgressNL();
cerr << ( ColorContext::MSG_ERROR << problem_desc );
if ( !hint.empty() && verbosity() > Out::QUIET )
void OutNormal::error( const Exception & e, const std::string & problem_desc, const std::string & hint )
{
- if ( !_newline )
- cout << endl;
+ fixupProgressNL();
// problem and cause
cerr << ( ColorContext::MSG_ERROR << problem_desc << endl << zyppExceptionReport(e) ) << endl;
_newline = false;
}
-void OutNormal::progressEnd( const std::string & id, const std::string & label, bool error )
+void OutNormal::progressEnd( const std::string & id, const std::string & label, const std::string & donetag, bool error )
{
if ( progressFilter() )
return;
outstr.lhs << label << ' ';
outstr.rhs << '[';
- if ( error )
- outstr.rhs << NEGATIVEString(_("error") );
- else
- outstr.rhs << _("done");
}
- else
- outstr.rhs << (error ? _("error") : _("done"));
+ // else: just write the donetag
- outstr.rhs << ']';
+ outstr.rhs << donetag << ']';
std::string outline( outstr.get( termwidth() ) );
cout << outline << endl << std::flush;
void OutNormal::prompt( PromptId id, const std::string & prompt, const PromptOptions & poptions, const std::string & startdesc )
{
- if ( !_newline )
- cout << endl;
+ fixupProgressNL();
if ( startdesc.empty() )
{
{
public:
OutNormal(Verbosity verbosity = NORMAL);
- virtual ~OutNormal();
+ ~OutNormal() override;
public:
- /**
- * Prints \a msg to the standard output and appends a newline.
- *
- * \see Out::info()
- */
- virtual void info(const std::string & msg, Verbosity verbosity = NORMAL, Type mask = TYPE_ALL);
-
- /**
- * Prints info message optionally trunkated or expanded.
- */
- virtual void infoLine(const TermLine & msg, Verbosity verbosity = NORMAL, Type mask = TYPE_ALL);
-
- /**
- * Prints \a msg prepended with <tt>"Warning: "</tt> to the standard output
- * and appends a newline.
- *
- * \see Out::warning
- */
- virtual void warning(const std::string & msg, Verbosity verbosity = NORMAL, Type mask = TYPE_ALL);
-
- /**
- *
- */
- virtual void error(const std::string & problem_desc, const std::string & hint = "");
- virtual void error(const Exception & e,
- const std::string & problem_desc,
- const std::string & hint = "");
+ void info( const std::string & msg, Verbosity verbosity, Type mask ) override;
+ void infoLine( const TermLine & msg, Verbosity verbosity, Type mask ) override;
+ void warning( const std::string & msg, Verbosity verbosity, Type mask ) override;
+ void error( const std::string & problem_desc, const std::string & hint ) override;
+ void error( const Exception & e, const std::string & problem_desc, const std::string & hint ) override;
// progress
- virtual void progressStart(const std::string & id,
- const std::string & label,
- bool is_tick = false);
- virtual void progress(const std::string & id,
- const std::string & label,
- int value = -1);
- virtual void progressEnd(const std::string & id,
- const std::string & label,
- bool error);
+ void progressStart( const std::string & id, const std::string & label, bool is_tick ) override;
+ void progress( const std::string & id, const std::string & label, int value ) override;
+ void progressEnd( const std::string & id, const std::string & label, const std::string & donetag, bool error) override;
// progress with download rate
- virtual void dwnldProgressStart(const Url & uri);
- virtual void dwnldProgress(const Url & uri,
- int value = -1,
- long rate = -1);
- virtual void dwnldProgressEnd(const Url & uri,
- long rate = -1,
- TriBool error = false);
+ void dwnldProgressStart( const Url & uri ) override;
+ void dwnldProgress( const Url & uri, int value, long rate ) override;
+ void dwnldProgressEnd( const Url & uri, long rate, TriBool error ) override;
- virtual void prompt(PromptId id,
- const std::string & prompt,
- const PromptOptions & poptions,
- const std::string & startdesc = "");
+ void prompt( PromptId id, const std::string & prompt, const PromptOptions & poptions, const std::string & startdesc ) override;
- virtual void promptHelp(const PromptOptions & poptions);
+ void promptHelp( const PromptOptions & poptions ) override;
- void setUseColors(bool value)
+ void setUseColors( bool value ) override
{ _use_colors = value; }
protected:
- virtual bool mine(Type type);
+ bool mine( Type type ) override;
/* Return current terminal width or 'unsigned(-1)' when failed */
- virtual unsigned termwidth() const;
+ unsigned termwidth() const override;
private:
bool infoWarningFilter(Verbosity verbosity, Type mask);
+ void fixupProgressNL(); //< Make sure we're at BOL even if a ProgressBar is active
void displayProgress(const std::string & s, int percent);
void displayTick(const std::string & s);
writeProgressTag( id, label, value, false );
}
-void OutXML::progressEnd( const std::string & id, const std::string& label, bool error )
+void OutXML::progressEnd( const std::string & id, const std::string& label, const std::string & /*donetag*/, bool error )
{
if ( progressFilter() )
return;
class OutXML : public Out
{
public:
- OutXML(Verbosity verbosity = NORMAL);
- virtual ~OutXML();
+ OutXML( Verbosity verbosity );
+ ~OutXML() override;
public:
- virtual void info(const std::string & msg, Verbosity verbosity = NORMAL, Type mask = TYPE_ALL);
- virtual void warning(const std::string & msg, Verbosity verbosity = NORMAL, Type mask = TYPE_ALL);
- virtual void error(const std::string & problem_desc, const std::string & hint = "");
- virtual void error(const Exception & e,
- const std::string & problem_desc,
- const std::string & hint = "");
+ void info( const std::string & msg, Verbosity verbosity, Type mask ) override;
+ void warning( const std::string & msg, Verbosity verbosity, Type mask ) override;
+ void error( const std::string & problem_desc, const std::string & hint ) override;
+ void error( const Exception & e, const std::string & problem_desc, const std::string & hint ) override;
// progress
- virtual void progressStart(const std::string & id,
- const std::string & label,
- bool is_tick = false);
- virtual void progress(const std::string & id,
- const std::string & label,
- int value = -1);
- virtual void progressEnd(const std::string & id,
- const std::string & label,
- bool error);
+ void progressStart( const std::string & id, const std::string & label, bool is_tick ) override;
+ void progress( const std::string & id, const std::string & label, int value ) override;
+ void progressEnd( const std::string & id, const std::string & label, const std::string & donetag, bool error ) override;
// progress with download rate
- virtual void dwnldProgressStart(const Url & uri);
- virtual void dwnldProgress(const Url & uri,
- int value = -1,
- long rate = -1);
- virtual void dwnldProgressEnd(const Url & uri,
- long rate = -1,
- TriBool error = false);
+ void dwnldProgressStart( const Url & uri ) override;
+ void dwnldProgress( const Url & uri, int value, long rate ) override;
+ void dwnldProgressEnd( const Url & uri, long rate, TriBool error ) override;
- virtual void searchResult( const Table & table_r );
+ void searchResult( const Table & table_r ) override;
- virtual void prompt(PromptId id,
- const std::string & prompt,
- const PromptOptions & poptions,
- const std::string & startdesc = "");
+ void prompt( PromptId id, const std::string & prompt, const PromptOptions & poptions, const std::string & startdesc ) override;
- virtual void promptHelp(const PromptOptions & poptions);
+ void promptHelp( const PromptOptions & poptions ) override;
protected:
- virtual bool mine(Type type);
+ bool mine( Type type ) override;
private:
- bool infoWarningFilter(Verbosity verbosity, Type mask);
- void writeProgressTag(const std::string & id,
- const std::string & label,
- int value, bool done, bool error = false);
+ bool infoWarningFilter( Verbosity verbosity, Type mask );
+ void writeProgressTag( const std::string & id, const std::string & label, int value, bool done, bool error = false );
};
#endif /*OUTXML_H_*/
BuildRequires: cmake >= 3.1
BuildRequires: gcc-c++ >= 7
BuildRequires: gettext-devel >= 0.15
-BuildRequires: libzypp-devel >= 17.28.3
+BuildRequires: libzypp-devel >= 17.29.0
BuildRequires: readline-devel >= 5.1
BuildRequires: libxml2-devel
Requires: procps