Imported Upstream version 17.1.0 upstream/17.1.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:14:27 +0000 (16:14 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:14:27 +0000 (16:14 +0900)
15 files changed:
VERSION.cmake
doc/autoinclude/FeatureTest.doc
libzypp.spec.cmake
package/libzypp.changes
po/ar.po
po/de.po
po/it.po
po/pl.po
po/ru.po
zypp/Locks.cc
zypp/PluginFrame.cc
zypp/PoolQuery.cc
zypp/PoolQuery.h
zypp/base/Exception.cc
zypp/base/Exception.h

index 3aa5001..118ceb1 100644 (file)
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "17")
 SET(LIBZYPP_COMPATMINOR "0")
-SET(LIBZYPP_MINOR "0")
-SET(LIBZYPP_PATCH "5")
+SET(LIBZYPP_MINOR "1")
+SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 17.0.5 (0)
+# LAST RELEASED: 17.1.0 (0)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index 1ed7b82..318dce5 100644 (file)
@@ -25,6 +25,8 @@ Packages requiring a feature may use the corresponding \c Requires: in their .sp
   <DD><DL>
     <DT>version 0</DT>
     <DD>General ability to provide and handle plugins.</DD>
+    <DT>version 0.1</DT>
+    <DD>Bugfix: don't reject header values containing a ':'.</DD>
   </DL></DD>
 
   <DT>plugin:commit</DT>
index 1add5c8..9b34c4d 100644 (file)
@@ -32,7 +32,7 @@ Provides:       yast2-packagemanager
 Obsoletes:      yast2-packagemanager
 
 # Features we provide (update doc/autoinclude/FeatureTest.doc):
-Provides:       libzypp(plugin) = 0
+Provides:       libzypp(plugin) = 0.1
 Provides:       libzypp(plugin:appdata) = 0
 Provides:       libzypp(plugin:commit) = 1
 Provides:       libzypp(plugin:services) = 1
index b88a549..abf28cb 100644 (file)
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Jan  4 17:49:06 CET 2018 - ma@suse.de
+
+- plugin: don't reject header values containing a ':' (bsc#1074687)
+- Locks: Don't store duplicate locks (bsc#969569)
+- version 17.1.0 (0)
+
+-------------------------------------------------------------------
 Wed Dec  6 13:29:42 CET 2017 - ma@suse.de
 
 - Fix default for solver.allowNameChange (bsc#1071466)
index 48be412..eecc23b 100644 (file)
--- a/po/ar.po
+++ b/po/ar.po
@@ -13,17 +13,17 @@ msgstr ""
 "Project-Id-Version: YaST (@memory@)\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-12-01 07:26+0100\n"
-"PO-Revision-Date: 2017-04-16 11:00+0000\n"
-"Last-Translator: George Yacoub <george.yacoub@arabize.com>\n"
-"Language-Team: Arabic <https://l10n.opensuse.org/projects/libzypp/master/ar/"
-">\n"
+"PO-Revision-Date: 2017-12-18 07:15+0000\n"
+"Last-Translator: mohammad alhargan <malham1@gmail.com>\n"
+"Language-Team: Arabic <https://l10n.opensuse.org/projects/libzypp/master/ar/>"
+"\n"
 "Language: ar\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
 "&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Weblate 2.6\n"
+"X-Generator: Weblate 2.17.1\n"
 "X-Language-English: Arabic\n"
 "X-Language-Local: Arabic*\n"
 
@@ -1364,9 +1364,8 @@ msgid "Tried to import not existent key %s into keyring %s"
 msgstr "جرت محاولة استيراد المفتاح غير الموجود %s إلى حلقة المفاتيح %s"
 
 #: zypp/KeyRing.cc:583
-#, fuzzy
 msgid "Failed to import key."
-msgstr "Ù\81Ø´Ù\84 Ø­Ø°Ù\81 المفتاح."
+msgstr "Ù\81Ø´Ù\84 Ø§Ø³ØªÙ\8aراد المفتاح."
 
 #: zypp/KeyRing.cc:606
 msgid "Failed to delete key."
@@ -3739,21 +3738,20 @@ msgstr "سيتم تنفيذ الإجراءات التالية:"
 
 #. translators: an annotation to a gpg keys expiry date
 #: zypp/PublicKey.cc:60
-#, fuzzy
 msgid "does not expire"
-msgstr "(الصلاحية غير منتهية)"
+msgstr "الصلاحية غير منتهية"
 
 #. translators: an annotation to a gpg keys expiry date: "expired: 1999-04-12"
 #: zypp/PublicKey.cc:65
 #, boost-format
 msgid "expired: %1%"
-msgstr ""
+msgstr "نهاية الصلاحية:: %1%"
 
 #. translators: an annotation to a gpg keys expiry date: "expires: 2111-04-12"
 #: zypp/PublicKey.cc:70
 #, boost-format
 msgid "expires: %1%"
-msgstr ""
+msgstr "تنتهي: %1%"
 
 #. translators: an annotation to a gpg keys expiry date
 #: zypp/PublicKey.cc:79
@@ -4708,17 +4706,17 @@ msgstr "فشل RPM: "
 #: zypp/target/rpm/RpmDb.cc:1147
 #, boost-format
 msgid "Failed to import public key %1%"
-msgstr ""
+msgstr "فشل استيراد المفتاح العمومي %1%"
 
 #. Translator: %1% is a gpg public key
 #: zypp/target/rpm/RpmDb.cc:1217
 #, boost-format
 msgid "Failed to remove public key %1%"
-msgstr ""
+msgstr "أخفقت إزالة المفتاح العام %1%"
 
 #: zypp/target/rpm/RpmDb.cc:1596
 msgid "Package is not signed!"
-msgstr ""
+msgstr "لم يتم توقيع الحزمة!"
 
 #. Translator: %s = name of an rpm package. A list of diffs follows
 #. this message.
@@ -4803,7 +4801,7 @@ msgstr "الملف غير موجود أو لا يمكن التحقق من توق
 #. translators: possible rpm package signature check result [brief]
 #: zypp/target/rpm/RpmDb.cc:2424
 msgid "File is unsigned"
-msgstr ""
+msgstr "الملف غير موقع"
 
 #: zypp/thread/Mutex.cc:33
 msgid "Can't initialize mutex attributes"
index 1b15af6..6b1051f 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -18,16 +18,16 @@ msgstr ""
 "Project-Id-Version: zypp.de\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-12-01 07:26+0100\n"
-"PO-Revision-Date: 2017-11-09 15:28+0000\n"
+"PO-Revision-Date: 2017-12-08 11:02+0000\n"
 "Last-Translator: Sarah Kriesch <ada.lovelace@gmx.de>\n"
-"Language-Team: German <https://l10n.opensuse.org/projects/libzypp/master/de/"
-">\n"
+"Language-Team: German <https://l10n.opensuse.org/projects/libzypp/master/de/>"
+"\n"
 "Language: de\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 2.13.1\n"
+"X-Generator: Weblate 2.17.1\n"
 
 #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
 #: zypp/target/hal/HalException.h:64
@@ -1366,9 +1366,8 @@ msgstr ""
 "Versuch, nicht existierenden Schlüssel %s in Schlüsselbund %s zu importieren"
 
 #: zypp/KeyRing.cc:583
-#, fuzzy
 msgid "Failed to import key."
-msgstr "Importieren des öffentlichen Schlüssels %1% fehlgeschlagen"
+msgstr "Importieren des Schlüssels  fehlgeschlagen."
 
 #: zypp/KeyRing.cc:606
 msgid "Failed to delete key."
index 161e028..2de7ec9 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -15,16 +15,16 @@ msgstr ""
 "Project-Id-Version: zypp\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-12-01 07:26+0100\n"
-"PO-Revision-Date: 2017-09-27 07:32+0000\n"
+"PO-Revision-Date: 2017-12-12 20:13+0000\n"
 "Last-Translator: Alessio Adamo <alessio.adamo@gmail.com>\n"
-"Language-Team: Italian <https://l10n.opensuse.org/projects/libzypp/master/it/"
-">\n"
+"Language-Team: Italian "
+"<https://l10n.opensuse.org/projects/libzypp/master/it/>\n"
 "Language: it\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 2.13.1\n"
+"X-Generator: Weblate 2.17.1\n"
 "X-Poedit-Bookmarks: 370,-1,-1,-1,-1,-1,-1,-1,-1,-1\n"
 
 #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
@@ -1365,9 +1365,8 @@ msgid "Tried to import not existent key %s into keyring %s"
 msgstr "Tentativo di importare la chiave inesistente %s nel portachiavi %s"
 
 #: zypp/KeyRing.cc:583
-#, fuzzy
 msgid "Failed to import key."
-msgstr "Errore importazione della chiave pubblica %1%"
+msgstr "Impossibile importare la chiave."
 
 #: zypp/KeyRing.cc:606
 msgid "Failed to delete key."
index 1b13c9f..e73d6fe 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,17 +8,17 @@ msgstr ""
 "Project-Id-Version: zypp\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-12-01 07:26+0100\n"
-"PO-Revision-Date: 2017-11-16 22:31+0000\n"
+"PO-Revision-Date: 2018-01-03 17:22+0000\n"
 "Last-Translator: Mariusz Fik <fisiu@opensuse.org>\n"
-"Language-Team: Polish <https://l10n.opensuse.org/projects/libzypp/master/pl/"
-">\n"
+"Language-Team: Polish <https://l10n.opensuse.org/projects/libzypp/master/pl/>"
+"\n"
 "Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 2.13.1\n"
+"X-Generator: Weblate 2.17.1\n"
 
 #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
 #: zypp/target/hal/HalException.h:64
@@ -1358,9 +1358,8 @@ msgid "Tried to import not existent key %s into keyring %s"
 msgstr "Próbowano zaimportować nieistniejący klucz %s do bazy kluczy %s"
 
 #: zypp/KeyRing.cc:583
-#, fuzzy
 msgid "Failed to import key."
-msgstr "Nie udało się zaimportować klucza publicznego z pliku %1%"
+msgstr "Nie udało się zaimportować klucza."
 
 #: zypp/KeyRing.cc:606
 msgid "Failed to delete key."
index 4963007..dc0de7d 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -14,17 +14,17 @@ msgstr ""
 "Project-Id-Version: zypp.ru\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-12-01 07:26+0100\n"
-"PO-Revision-Date: 2017-10-09 20:13+0000\n"
-"Last-Translator: Alex Minton <alex239@gmail.com>\n"
-"Language-Team: Russian <https://l10n.opensuse.org/projects/libzypp/master/ru/"
-">\n"
+"PO-Revision-Date: 2017-12-20 18:05+0000\n"
+"Last-Translator: Nikita Maynagashev <maynagashev@palex.ru>\n"
+"Language-Team: Russian "
+"<https://l10n.opensuse.org/projects/libzypp/master/ru/>\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 2.13.1\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
+"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Weblate 2.17.1\n"
 
 #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
 #: zypp/target/hal/HalException.h:64
@@ -35,7 +35,7 @@ msgstr "Исключение Hal"
 #: zypp/CheckSum.cc:136
 #, c-format, boost-format
 msgid "Dubious type '%s' for %u byte checksum '%s'"
-msgstr "Подозрительный тип '%s' байта номер %u контрольной суммы '%s'"
+msgstr "Подозрительный тип \"%s\" байта номер %u контрольной суммы \"%s\""
 
 #: zypp/CountryCode.cc:50
 msgid "Unknown country: "
@@ -54,7 +54,7 @@ msgstr "Андорра"
 #. :AND:020:
 #: zypp/CountryCode.cc:159
 msgid "United Arab Emirates"
-msgstr "Объединённые Арабские Эмираты"
+msgstr "Объединенные Арабские Эмираты"
 
 #. :ARE:784:
 #: zypp/CountryCode.cc:160
@@ -255,7 +255,7 @@ msgstr "Швейцария"
 #. :CHE:756:
 #: zypp/CountryCode.cc:200
 msgid "Cote D'Ivoire"
-msgstr "Кот-д'Ивуар"
+msgstr "Кот-д\"Ивуар"
 
 #. :CIV:384:
 #: zypp/CountryCode.cc:201
@@ -1090,7 +1090,7 @@ msgstr "Свазиленд"
 #. :SWZ:748:
 #: zypp/CountryCode.cc:368
 msgid "Turks and Caicos Islands"
-msgstr "Тёркс и Кайкос"
+msgstr "Теркс и Кайкос"
 
 #. :TCA:796:
 #: zypp/CountryCode.cc:369
@@ -1362,9 +1362,8 @@ msgid "Tried to import not existent key %s into keyring %s"
 msgstr "Попытка импорта несуществующего ключа %s в хранилище ключей %s"
 
 #: zypp/KeyRing.cc:583
-#, fuzzy
 msgid "Failed to import key."
-msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ð¸Ð¼Ð¿Ð¾Ñ\80Ñ\82иÑ\80оваÑ\82Ñ\8c Ð¿Ñ\83блиÑ\87нÑ\8bй ÐºÐ»Ñ\8eÑ\87 %1%"
+msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ð¸Ð¼Ð¿Ð¾Ñ\80Ñ\82иÑ\80оваÑ\82Ñ\8c ÐºÐ»Ñ\8eÑ\87 %1%."
 
 #: zypp/KeyRing.cc:606
 msgid "Failed to delete key."
@@ -3587,7 +3586,7 @@ msgstr "Умбунду"
 #. language code: und
 #: zypp/LanguageCode.cc:1091
 msgid "Undetermined"
-msgstr "Неопределённый"
+msgstr "Неопределенный"
 
 #. language code: urd ur
 #: zypp/LanguageCode.cc:1093
@@ -3742,7 +3741,7 @@ msgstr "не истекает"
 #: zypp/PublicKey.cc:65
 #, boost-format
 msgid "expired: %1%"
-msgstr "истёк: %1%"
+msgstr "истек: %1%"
 
 #. translators: an annotation to a gpg keys expiry date: "expires: 2111-04-12"
 #: zypp/PublicKey.cc:70
@@ -3797,7 +3796,7 @@ msgstr "Псевдоним репозитория не может начинат
 
 #: zypp/RepoManager.cc:364
 msgid "Service alias cannot start with dot."
-msgstr "Ð\9fÑ\81евдоним Ñ\81лÑ\83жбÑ\8b не может начинаться с точки."
+msgstr "Ð\9fÑ\81евдоним Ñ\81еÑ\80виÑ\81 не может начинаться с точки."
 
 #. TranslatorExplanation '%s' is a filename
 #: zypp/RepoManager.cc:744 zypp/RepoManager.cc:1659 zypp/RepoManager.cc:1725
@@ -3820,9 +3819,9 @@ msgstr ""
 #: zypp/RepoManager.cc:1098
 msgid "Valid metadata not found at specified URL"
 msgid_plural "Valid metadata not found at specified URLs"
-msgstr[0] "Ð\9fо Ñ\83казанномÑ\83 URL-адÑ\80еÑ\81Ñ\83 Ð½Ðµ Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾ Ð´ÐµÐ¹Ñ\81Ñ\82виÑ\82елÑ\8cных метаданных"
-msgstr[1] "Ð\9fо Ñ\83казаннÑ\8bм URL-адÑ\80еÑ\81ам Ð½Ðµ Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾ Ð´ÐµÐ¹Ñ\81Ñ\82виÑ\82елÑ\8cных метаданных"
-msgstr[2] "Ð\9fо Ñ\83казаннÑ\8bм URL-адÑ\80еÑ\81ам Ð½Ðµ Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾ Ð´ÐµÐ¹Ñ\81Ñ\82виÑ\82елÑ\8cных метаданных"
+msgstr[0] "Ð\9fо Ñ\83казанномÑ\83 URL-адÑ\80еÑ\81Ñ\83 Ð½Ðµ Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾ Ð´Ð¾Ð¿Ñ\83Ñ\81Ñ\82имых метаданных"
+msgstr[1] "Ð\9fо Ñ\83казаннÑ\8bм URL-адÑ\80еÑ\81ам Ð½Ðµ Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾ Ð´Ð¾Ð¿Ñ\83Ñ\81Ñ\82имых метаданных"
+msgstr[2] "Ð\9fо Ñ\83казаннÑ\8bм URL-адÑ\80еÑ\81ам Ð½Ðµ Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾ Ð´Ð¾Ð¿Ñ\83Ñ\81Ñ\82имых метаданных"
 
 #: zypp/RepoManager.cc:1146 zypp/RepoManager.cc:1258 zypp/RepoManager.cc:1314
 #, c-format, boost-format
@@ -3878,7 +3877,7 @@ msgstr "Добавление репозитория \"%s\""
 #: zypp/RepoManager.cc:1711
 #, c-format, boost-format
 msgid "Invalid repo file name at '%s'"
-msgstr "Ð\9dевеÑ\80ное имя файла репозитория в \"%s\""
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имое имя файла репозитория в \"%s\""
 
 #: zypp/RepoManager.cc:1752
 #, c-format, boost-format
@@ -3906,7 +3905,7 @@ msgstr "Недопустимая строка запроса LDAP в URL-адр
 #: zypp/Url.cc:153
 #, c-format, boost-format
 msgid "Invalid LDAP URL query parameter '%s'"
-msgstr "Недопустимый параметр запроса LDAP в URL-адресе: '%s'"
+msgstr "Недопустимый параметр запроса LDAP в URL-адресе: \"%s\""
 
 #: zypp/Url.cc:300
 msgid "Unable to clone Url object"
@@ -3918,7 +3917,7 @@ msgstr "Недопустимая ссылка на пустой объект URL
 
 #: zypp/Url.cc:326 zypp/Url.cc:340
 msgid "Unable to parse Url components"
-msgstr "Не удалось выполнить анализ компонентов URL-адреса"
+msgstr "Не удалось выполнить анализ синтаксиса компонентов URL-адреса"
 
 #: zypp/VendorSupportOptions.cc:14
 msgid "unknown"
@@ -3950,7 +3949,7 @@ msgstr "неверно"
 
 #: zypp/VendorSupportOptions.cc:39
 msgid "The level of support is unspecified"
-msgstr "Уровень поддержки не определён"
+msgstr "Уровень поддержки не определен"
 
 #: zypp/VendorSupportOptions.cc:42
 msgid "The vendor does not provide support."
@@ -4023,28 +4022,28 @@ msgstr "Это действие уже выполняется другой пр
 #: zypp/base/StrMatcher.cc:152
 #, c-format, boost-format
 msgid "Unknown match mode '%s'"
-msgstr "Неизвестный режим сопоставления '%s'"
+msgstr "Неизвестный режим сопоставления \"%s\""
 
 #: zypp/base/StrMatcher.cc:153
 #, c-format, boost-format
 msgid "Unknown match mode '%s' for pattern '%s'"
-msgstr "Неизвестный режим сопоставления '%s' для шаблона '%s'"
+msgstr "Неизвестный режим сопоставления \"%s\" для шаблона \"%s\""
 
 #: zypp/base/StrMatcher.cc:157
 #, c-format, boost-format
 msgid "Invalid regular expression '%s': regcomp returned %d"
-msgstr "Ð\9dевеÑ\80ное Ñ\80егÑ\83лÑ\8fÑ\80ное Ð²Ñ\8bÑ\80ажение '%s': regcomp вернул %d"
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имое Ñ\80егÑ\83лÑ\8fÑ\80ное Ð²Ñ\8bÑ\80ажение \"%s\": regcomp вернул %d"
 
 #: zypp/base/StrMatcher.cc:158
 #, c-format, boost-format
 msgid "Invalid regular expression '%s'"
-msgstr "Ð\9dевеÑ\80ное Ñ\80егÑ\83лÑ\8fÑ\80ное Ð²Ñ\8bÑ\80ажение '%s'"
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имое Ñ\80егÑ\83лÑ\8fÑ\80ное Ð²Ñ\8bÑ\80ажение \"%s\""
 
 #. !\todo add comma to the message for the next release
 #: zypp/media/MediaCIFS.cc:427 zypp/media/MediaCurl.cc:1726
 #, c-format, boost-format
 msgid "Authentication required for '%s'"
-msgstr "Необходима аутентификация для '%s'"
+msgstr "Необходима аутентификация для \"%s\""
 
 #: zypp/media/MediaCurl.cc:1109
 msgid ""
@@ -4072,21 +4071,21 @@ msgstr "Некорректное имя файла: %s"
 #: zypp/media/MediaException.cc:51
 #, c-format, boost-format
 msgid "Medium not opened when trying to perform action '%s'."
-msgstr "При попытке произведения действия '%s' не был открыт носитель."
+msgstr "При попытке произведения действия \"%s\" не был открыт носитель."
 
 #: zypp/media/MediaException.cc:56
 #, c-format, boost-format
 msgid "File '%s' not found on medium '%s'"
-msgstr "Файл '%s' не найден на носителе '%s'"
+msgstr "Файл \"%s\" не найден на носителе \"%s\""
 
 #: zypp/media/MediaException.cc:61
 #, c-format, boost-format
 msgid "Cannot write file '%s'."
-msgstr "Невозможно записать файл '%s'."
+msgstr "Невозможно записать файл \"%s\"."
 
 #: zypp/media/MediaException.cc:66
 msgid "Medium not attached"
-msgstr "Носитель не присоединён"
+msgstr "Носитель не присоединен"
 
 #: zypp/media/MediaException.cc:71
 msgid "Bad media attach point"
@@ -4096,22 +4095,22 @@ msgstr "Некорректная точка присоединения носи
 #: zypp/media/MediaException.cc:77
 #, c-format, boost-format
 msgid "Download (curl) initialization failed for '%s'"
-msgstr "Сбой инициализации загрузки (curl) для '%s'"
+msgstr "Сбой инициализации загрузки (curl) для \"%s\""
 
 #: zypp/media/MediaException.cc:82
 #, c-format, boost-format
 msgid "System exception '%s' on medium '%s'."
-msgstr "Системное исключение '%s' на носителе '%s'."
+msgstr "Системное исключение \"%s\" на носителе \"%s\"."
 
 #: zypp/media/MediaException.cc:87
 #, c-format, boost-format
 msgid "Path '%s' on medium '%s' is not a file."
-msgstr "Путь '%s' на носителе '%s' не является файлом."
+msgstr "Путь \"%s\" на носителе \"%s\" не является файлом."
 
 #: zypp/media/MediaException.cc:92
 #, c-format, boost-format
 msgid "Path '%s' on medium '%s' is not a directory."
-msgstr "Путь '%s' на носителе '%s' не является каталогом."
+msgstr "Путь \"%s\" на носителе \"%s\" не является каталогом."
 
 #: zypp/media/MediaException.cc:99
 msgid "Malformed URI"
@@ -4119,7 +4118,7 @@ msgstr "Неправильно сформированный URI-адрес"
 
 #: zypp/media/MediaException.cc:109
 msgid "Empty host name in URI"
-msgstr "Ð\9fÑ\83Ñ\81Ñ\82ое Ð¸Ð¼Ñ\8f Ñ\83зла в URI-адресе"
+msgstr "Ð\9fÑ\83Ñ\81Ñ\82ое Ð¸Ð¼Ñ\8f Ñ\85оÑ\81Ñ\82а в URI-адресе"
 
 #: zypp/media/MediaException.cc:114
 msgid "Empty filesystem in URI"
@@ -4132,7 +4131,7 @@ msgstr "Пустой пункт назначения в URI-адресе"
 #: zypp/media/MediaException.cc:124
 #, c-format, boost-format
 msgid "Unsupported URI scheme in '%s'."
-msgstr "Неподдерживаемая схема URI-адреса в '%s'."
+msgstr "Неподдерживаемая схема URI-адреса в \"%s\"."
 
 #: zypp/media/MediaException.cc:129
 msgid "Operation not supported by medium"
@@ -4145,7 +4144,7 @@ msgid ""
 "Error code: %s\n"
 "Error message: %s\n"
 msgstr ""
-"Ошибка загрузки (curl) '%s':\n"
+"Ошибка загрузки (curl) \"%s\":\n"
 "Код ошибки: %s\n"
 "Сообщение об ошибке: %s\n"
 
@@ -4153,17 +4152,17 @@ msgstr ""
 #: zypp/media/MediaException.cc:144
 #, c-format, boost-format
 msgid "Error occurred while setting download (curl) options for '%s':"
-msgstr "Произошла ошибка при установке параметров загрузки (curl) для '%s':"
+msgstr "Произошла ошибка при установке параметров загрузки (curl) для \"%s\":"
 
 #: zypp/media/MediaException.cc:151
 #, c-format, boost-format
 msgid "Media source '%s' does not contain the desired medium"
-msgstr "Источник носителей '%s' не содержит желаемого носителя"
+msgstr "Источник носителей \"%s\" не содержит желаемого носителя"
 
 #: zypp/media/MediaException.cc:156
 #, c-format, boost-format
 msgid "Medium '%s' is in use by another instance"
-msgstr "Носитель'%s' используется другим экземпляром"
+msgstr "Носитель\"%s\" используется другим экземпляром"
 
 #: zypp/media/MediaException.cc:162
 msgid "Cannot eject any media"
@@ -4172,29 +4171,29 @@ msgstr "Невозможно извлечь ни один носитель"
 #: zypp/media/MediaException.cc:164
 #, c-format, boost-format
 msgid "Cannot eject media '%s'"
-msgstr "Невозможно извлечь носитель '%s'"
+msgstr "Невозможно извлечь носитель \"%s\""
 
 #: zypp/media/MediaException.cc:179
 #, c-format, boost-format
 msgid "Permission to access '%s' denied."
-msgstr "Доступ к '%s' запрещён."
+msgstr "Доступ к \"%s\" запрещен."
 
 #: zypp/media/MediaException.cc:187
 #, c-format, boost-format
 msgid "Timeout exceeded when accessing '%s'."
-msgstr "Превышено время ожидания при попытке доступа к '%s'."
+msgstr "Превышено время ожидания при попытке доступа к \"%s\"."
 
 #: zypp/media/MediaException.cc:195
 #, c-format, boost-format
 msgid "Location '%s' is temporarily unaccessible."
-msgstr "Расположение '%s' временно недоступно."
+msgstr "Расположение \"%s\" временно недоступно."
 
 #: zypp/media/MediaException.cc:203
 #, c-format, boost-format
 msgid " SSL certificate problem, verify that the CA cert is OK for '%s'."
 msgstr ""
-" Проблема с сертификатом SSL, проверьте, всё ли в порядке с удостоверяющим "
-"центром сертификата '%s'."
+" Проблема с сертификатом SSL, проверьте, все ли в порядке с удостоверяющим "
+"центром сертификата \"%s\"."
 
 #: zypp/media/MediaHandler.cc:370
 msgid ""
@@ -4207,21 +4206,21 @@ msgstr ""
 #: zypp/media/MediaUserAuth.cc:136
 #, c-format, boost-format
 msgid "Unsupported HTTP authentication method '%s'"
-msgstr "Неподдерживаемый метод HTTP-аутентификации '%s'"
+msgstr "Неподдерживаемый метод HTTP-аутентификации \"%s\""
 
 #: zypp/misc/CheckAccessDeleted.cc:281
 msgid "Please install package 'lsof' first."
-msgstr "Сначала установите пакет 'lsof'."
+msgstr "Сначала установите пакет \"lsof\"."
 
 #: zypp/parser/RepoindexFileReader.cc:197
 #, c-format, boost-format
 msgid "Required attribute '%s' is missing."
-msgstr "Необходимый атрибут '%s' отсутствует."
+msgstr "Необходимый атрибут \"%s\" отсутствует."
 
 #: zypp/parser/RepoindexFileReader.cc:209
 #, c-format, boost-format
 msgid "One or both of '%s' or '%s' attributes is required."
-msgstr "Требуются один или оба атрибута '%s' или '%s'."
+msgstr "Требуются один или оба атрибута \"%s\" или \"%s\"."
 
 #: zypp/repo/PackageProvider.cc:216
 msgid "Signature verification failed"
@@ -4234,13 +4233,13 @@ msgid ""
 "Package %s seems to be corrupted during transfer. Do you want to retry "
 "retrieval?"
 msgstr ""
-"Похоже, что пакет %s повреждён при передаче. Попробовать получить ещё раз?"
+"Похоже, что пакет %s поврежден при передаче. Попробовать получить еще раз?"
 
 #. TranslatorExplanation %s = name of the package being processed.
 #: zypp/repo/PackageProvider.cc:413
 #, c-format, boost-format
 msgid "Failed to provide Package %s. Do you want to retry retrieval?"
-msgstr "Не удалось предоставить пакет %s. Попробовать получить ещё раз?"
+msgstr "Не удалось предоставить пакет %s. Попробовать получить еще раз?"
 
 #: zypp/repo/PackageProvider.cc:549
 msgid "applydeltarpm check failed."
@@ -4252,12 +4251,12 @@ msgstr "сбой в applydeltarpm."
 
 #: zypp/repo/RepoException.cc:129
 msgid "Service plugin does not support changing an attribute."
-msgstr "Ð\9cодÑ\83лÑ\8c Ñ\81лÑ\83жбÑ\8b не поддерживает изменение атрибута."
+msgstr "Ð\9cодÑ\83лÑ\8c Ñ\81еÑ\80виÑ\81а не поддерживает изменение атрибута."
 
 #: zypp/repo/RepoProvideFile.cc:261
 #, c-format, boost-format
 msgid "Can't provide file '%s' from repository '%s'"
-msgstr "Невозможно предоставить файл '%s' из репозитория '%s'"
+msgstr "Невозможно предоставить файл \"%s\" из репозитория \"%s\""
 
 #: zypp/repo/RepoProvideFile.cc:267
 msgid "No url in repository."
@@ -4467,7 +4466,7 @@ msgstr "запрос не поддерживается"
 #: zypp/solver/detail/SATResolver.cc:1007
 #, c-format, boost-format
 msgid "%s is provided by the system and cannot be erased"
-msgstr "%s предоставляется системой и не может быть удалён"
+msgstr "%s предоставляется системой и не может быть удален"
 
 #: zypp/solver/detail/SATResolver.cc:1011
 #, c-format, boost-format
@@ -4482,7 +4481,7 @@ msgstr "ничто не предоставляет %s, необходимый д
 #: zypp/solver/detail/SATResolver.cc:1021
 #, c-format, boost-format
 msgid "cannot install both %s and %s"
-msgstr "Не удаётся установить оба %s и %s"
+msgstr "Не удается установить оба %s и %s"
 
 #: zypp/solver/detail/SATResolver.cc:1026
 #, c-format, boost-format
@@ -4513,7 +4512,7 @@ msgstr "%s требует %s, но это требование не может 
 
 #: zypp/solver/detail/SATResolver.cc:1074
 msgid "deleted providers: "
-msgstr "удалённые поставщики: "
+msgstr "удаленные поставщики: "
 
 #. translators: 'uninstallable' == 'not installable'
 #: zypp/solver/detail/SATResolver.cc:1085
@@ -4596,7 +4595,7 @@ msgstr "оставить устаревший %s"
 #: zypp/solver/detail/SATResolver.cc:1302
 #, c-format, boost-format
 msgid "install %s from excluded repository"
-msgstr "установить %s из исключённого репозитория"
+msgstr "установить %s из исключенного репозитория"
 
 #: zypp/solver/detail/SATResolver.cc:1322
 #, c-format, boost-format
@@ -4681,7 +4680,7 @@ msgstr "HalVolume не инициализирован"
 
 #: zypp/target/hal/HalContext.cc:229
 msgid "Unable to create dbus connection"
-msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ñ\81оздаÑ\82Ñ\8c Ð¿Ð¾Ð´ÐºÐ»Ñ\8eÑ\87ение Ðº dbus"
+msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ñ\83Ñ\81Ñ\82ановиÑ\82Ñ\8c Ñ\81оединение Ñ\81 dbus"
 
 #: zypp/target/hal/HalContext.cc:242
 msgid "libhal_ctx_new: Can't create libhal context"
@@ -4689,7 +4688,7 @@ msgstr "libhal_ctx_new: не удается создать контекст libh
 
 #: zypp/target/hal/HalContext.cc:257
 msgid "libhal_set_dbus_connection: Can't set dbus connection"
-msgstr "libhal_set_dbus_connection: не удалось установить подключение к dbus"
+msgstr "libhal_set_dbus_connection: не удалось установить соединение с dbus"
 
 #: zypp/target/hal/HalContext.cc:272
 msgid "Unable to initalize HAL context -- hald not running?"
@@ -4710,13 +4709,13 @@ msgstr "Сбой RPM: "
 #: zypp/target/rpm/RpmDb.cc:1147
 #, boost-format
 msgid "Failed to import public key %1%"
-msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ð¸Ð¼Ð¿Ð¾Ñ\80Ñ\82иÑ\80оваÑ\82Ñ\8c Ð¿Ñ\83блиÑ\87ный ключ %1%"
+msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ð¸Ð¼Ð¿Ð¾Ñ\80Ñ\82иÑ\80оваÑ\82Ñ\8c Ð¾Ñ\82кÑ\80Ñ\8bÑ\82ый ключ %1%"
 
 #. Translator: %1% is a gpg public key
 #: zypp/target/rpm/RpmDb.cc:1217
 #, boost-format
 msgid "Failed to remove public key %1%"
-msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ñ\83далиÑ\82Ñ\8c Ð¿Ñ\83блиÑ\87ный ключ %1%"
+msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c Ñ\83далиÑ\82Ñ\8c Ð¾Ñ\82кÑ\80Ñ\8bÑ\82ый ключ %1%"
 
 #: zypp/target/rpm/RpmDb.cc:1596
 msgid "Package is not signed!"
@@ -4727,7 +4726,7 @@ msgstr "Пакет не подписан!"
 #: zypp/target/rpm/RpmDb.cc:1896
 #, c-format, boost-format
 msgid "Changed configuration files for %s:"
-msgstr "Измененные файлы конфигурации для %s:"
+msgstr "Измененные конфигурационные файлы для %s:"
 
 #. %s = filenames
 #: zypp/target/rpm/RpmDb.cc:2071
@@ -4853,7 +4852,7 @@ msgstr "Схема URL-адреса является необходимым ко
 #: zypp/url/UrlBase.cc:830
 #, c-format, boost-format
 msgid "Invalid Url scheme '%s'"
-msgstr "Ð\9dевеÑ\80наÑ\8f Ñ\81Ñ\85ема URL-адÑ\80еÑ\81а '%s'"
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имаÑ\8f Ñ\81Ñ\85ема URL-адÑ\80еÑ\81а \"%s\""
 
 #: zypp/url/UrlBase.cc:949
 msgid "Url scheme does not allow a username"
@@ -4865,16 +4864,16 @@ msgstr "Схема URL-адреса не позволяет использова
 
 #: zypp/url/UrlBase.cc:1012
 msgid "Url scheme requires a host component"
-msgstr "СÑ\85ема URL-адÑ\80еÑ\81а Ñ\82Ñ\80ебÑ\83еÑ\82 Ñ\83казаниÑ\8f ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82а Ñ\83зла"
+msgstr "СÑ\85ема URL-адÑ\80еÑ\81а Ñ\82Ñ\80ебÑ\83еÑ\82 Ñ\83казаниÑ\8f ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82а Ñ\85оÑ\81Ñ\82а"
 
 #: zypp/url/UrlBase.cc:1022
 msgid "Url scheme does not allow a host component"
-msgstr "СÑ\85ема URL-адÑ\80еÑ\81а Ð½Ðµ Ð¿Ð¾Ð·Ð²Ð¾Ð»Ñ\8fеÑ\82 Ð¸Ñ\81полÑ\8cзоваÑ\82Ñ\8c ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82 Ñ\83зла"
+msgstr "СÑ\85ема URL-адÑ\80еÑ\81а Ð½Ðµ Ð¿Ð¾Ð·Ð²Ð¾Ð»Ñ\8fеÑ\82 Ð¸Ñ\81полÑ\8cзоваÑ\82Ñ\8c ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82 Ñ\85оÑ\81Ñ\82а"
 
 #: zypp/url/UrlBase.cc:1049
 #, c-format, boost-format
 msgid "Invalid host component '%s'"
-msgstr "Ð\9dевеÑ\80нÑ\8bй ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82 Ñ\83зла \"%s\""
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имÑ\8bй ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82 Ñ\85оÑ\81Ñ\82а \"%s\""
 
 #: zypp/url/UrlBase.cc:1070
 msgid "Url scheme does not allow a port"
@@ -4883,7 +4882,7 @@ msgstr "Схема URL-адреса не позволяет использова
 #: zypp/url/UrlBase.cc:1081
 #, c-format, boost-format
 msgid "Invalid port component '%s'"
-msgstr "Ð\9dевеÑ\80нÑ\8bй ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82 Ð¿Ð¾Ñ\80Ñ\82а '%s'"
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имÑ\8bй ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñ\82 Ð¿Ð¾Ñ\80Ñ\82а \"%s\""
 
 #: zypp/url/UrlBase.cc:1098
 msgid "Url scheme requires path name"
@@ -4900,15 +4899,15 @@ msgstr "Зашифрованная строка содержит байт со 
 
 #: zypp/url/UrlUtils.cc:173
 msgid "Invalid parameter array split separator character"
-msgstr "Ð\9dевеÑ\80ный символ разделителя для разбиения массива параметров"
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имый символ разделителя для разбиения массива параметров"
 
 #: zypp/url/UrlUtils.cc:213
 msgid "Invalid parameter map split separator character"
-msgstr "Ð\9dевеÑ\80ный символ разделителя для разбиения отображения параметров"
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имый символ разделителя для разбиения отображения параметров"
 
 #: zypp/url/UrlUtils.cc:283
 msgid "Invalid parameter array join separator character"
-msgstr "Ð\9dевеÑ\80ный символ разделителя для объединения массива параметров"
+msgstr "Ð\9dедопÑ\83Ñ\81Ñ\82имый символ разделителя для объединения массива параметров"
 
 #~ msgid "Failed to import public key from file %s: %s"
 #~ msgstr "Не удалось импортировать публичный ключ из файла %s: %s"
index b4ff9d5..fef0658 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "zypp/base/Regex.h"
 #include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
+#include "zypp/base/LogTools.h"
 #include "zypp/base/IOStream.h"
 #include "zypp/PoolItem.h"
 #include "zypp/PoolQueryUtil.tcc"
@@ -40,32 +40,77 @@ Locks& Locks::instance()
   return _instance;
 }
 
+typedef std::set<PoolQuery> LockSet;
+
+template <typename TPredicate>
+void remove_if( LockSet & lockset_r, TPredicate pred_r )
+{
+  LockSet::iterator first = lockset_r.begin();
+  LockSet::iterator last = lockset_r.end();
+  while ( first != last )
+  {
+    LockSet::iterator next = first;
+    ++next;
+    if ( pred_r( *first ) )
+      lockset_r.erase( first );
+    first = next;
+  }
+}
+
 class Locks::Impl
 {
 public:
-  LockList locks;
-  LockList toAdd;
-  LockList toRemove;
+  LockSet toAdd;
+  LockSet toRemove;
   bool     locksDirty;
 
   bool mergeList(callback::SendReport<SavingLocksReport>& report);
   
-  Impl():locksDirty(false){}
+  Impl()
+  : locksDirty( false )
+  , _APIdirty( false )
+  {}
+
+
+  // need to control manip locks _locks to maintain the legacy API LockList::iterator begin/end
+
+  const LockSet & locks() const
+  { return _locks; }
+
+  LockSet & MANIPlocks()
+  { if ( !_APIdirty ) _APIdirty = true; return _locks; }
+
+  const LockList & APIlocks() const
+  {
+    if ( _APIdirty )
+    {
+      _APIlocks.clear();
+      _APIlocks.insert( _APIlocks.end(), _locks.begin(), _locks.end() );
+      _APIdirty = false;
+    }
+    return _APIlocks;
+  }
+
+private:
+  // need to control manip in ordert to maintain the legacy API LockList::iterator begin/end
+  LockSet _locks;
+  mutable LockList _APIlocks;
+  mutable bool _APIdirty;
 };
 
 Locks::Locks() : _pimpl(new Impl){}
 
 Locks::const_iterator Locks::begin() const
-{ return _pimpl->locks.begin(); }
+{ return _pimpl->APIlocks().begin(); }
 
 Locks::const_iterator Locks::end() const
-{ return _pimpl->locks.end(); }
+{ return _pimpl->APIlocks().end(); }
 
 Locks::LockList::size_type Locks::size() const
-{ return _pimpl->locks.size(); }
+{ return _pimpl->locks().size(); }
 
 bool Locks::empty() const
-{ return _pimpl->locks.empty(); }
+{ return _pimpl->locks().empty(); }
 
 struct ApplyLock
 {
@@ -106,12 +151,12 @@ void Locks::readAndApply( const Pathname& file )
   PathInfo pinfo(file);
   if ( pinfo.isExist() )
   {
-    std::insert_iterator<LockList> ii( _pimpl->locks, _pimpl->locks.end() );
-    LockingOutputIterator<std::insert_iterator<LockList> > lout(ii);
+    std::insert_iterator<LockSet> ii( _pimpl->MANIPlocks(), _pimpl->MANIPlocks().end() );
+    LockingOutputIterator<std::insert_iterator<LockSet> > lout(ii);
     readPoolQueriesFromFile( file, boost::make_function_output_iterator(lout) );
   }
   else
-    MIL << "file not exist(or cannot be stat), no lock added." << endl;
+    MIL << "file does not exist(or cannot be stat), no lock added." << endl;
 
 }
 
@@ -120,16 +165,16 @@ void Locks::read( const Pathname& file )
   MIL << "read locks from "<<file << endl;
   PathInfo pinfo(file);
   if ( pinfo.isExist() )
-    readPoolQueriesFromFile( file, std::insert_iterator<LockList>(_pimpl->locks, _pimpl->locks.end()) );
+    readPoolQueriesFromFile( file, std::insert_iterator<LockSet>(_pimpl->MANIPlocks(), _pimpl->MANIPlocks().end()) );
   else 
-    MIL << "file not exist(or cannot be stat), no lock added." << endl;
+    MIL << "file does not exist(or cannot be stat), no lock added." << endl;
 }
 
 
 void Locks::apply() const
 { 
   DBG << "apply locks" << endl;
-  for_each(begin(), end(), ApplyLock());
+  for_each(_pimpl->locks().begin(), _pimpl->locks().end(), ApplyLock());
 }
 
 
@@ -141,17 +186,14 @@ void Locks::addLock( const PoolQuery& query )
     PoolItem item(*it);
     item.status().setLock(true,ResStatus::USER);
   }
-  LockList::iterator i = find(_pimpl->toRemove.begin(),
-    _pimpl->toRemove.end(), query);
-  if ( i != _pimpl->toRemove.end() )
+  if ( _pimpl->toRemove.erase( query ) )
   {
     DBG << "query removed from toRemove" << endl;
-    _pimpl->toRemove.erase(i);
   }
   else
   {
     DBG << "query added as new" << endl;
-    _pimpl->toAdd.push_back( query );
+    _pimpl->toAdd.insert( query );
   }
 }
 
@@ -186,17 +228,14 @@ void Locks::removeLock( const PoolQuery& query )
     item.status().setLock(false,ResStatus::USER);
   }
   
-  LockList::iterator i = find(_pimpl->toAdd.begin(),
-    _pimpl->toAdd.end(), query);
-  if ( i != _pimpl->toAdd.end() )
+  if ( _pimpl->toAdd.erase( query ) )
   {
     DBG << "query removed from added" << endl;
-    _pimpl->toAdd.erase(i);
   }
   else
   {
-    DBG << "needed remove some old lock" << endl;
-    _pimpl->toRemove.push_back( query );
+    DBG << "need to remove some old lock" << endl;
+    _pimpl->toRemove.insert( query );
   }
 }
 
@@ -219,13 +258,13 @@ void Locks::removeLock( const ResKind &kind_r, const IdString &name_r )
   q.setMatchExact();
   q.setCaseSensitive(true);
   q.requireAll();
-  DBG << "remove lock by selectactable" << endl;
+  DBG << "remove lock by Selectable" << endl;
   removeLock(q);
 }
 
 bool Locks::existEmpty() const
 {
-  for_( it, _pimpl->locks.begin(), _pimpl->locks.end() )
+  for_( it, _pimpl->locks().begin(), _pimpl->locks().end() )
   {
     if( it->empty() )
       return true;
@@ -247,7 +286,7 @@ public:
 
   bool aborted(){ return skip_rest; }
 
-  bool operator()(PoolQuery& q)
+  bool operator()( const PoolQuery & q )
   {
     if( skip_rest )
       return false;
@@ -272,8 +311,7 @@ public:
     case CleanEmptyLocksReport::IGNORE:
       return false;
     default:
-      WAR << "Unknown returned value. Callback have more value then"
-          << " this switch. Need correct handle all enum values." << std::endl;
+      INT << "Unexpected return value from callback. Need to adapt switch statement." << std::endl;
     }
 
     return false;
@@ -283,13 +321,13 @@ public:
 
 void Locks::removeEmpty()
 {
-  MIL << "cleaning of locks" << endl;
+  MIL << "clean of locks" << endl;
   callback::SendReport<CleanEmptyLocksReport> report;
   report->start();
-  size_t sum = _pimpl->locks.size();
+  size_t sum = _pimpl->locks().size();
   LocksCleanPredicate p(sum, report);
 
-  _pimpl->locks.remove_if(p);
+  remove_if( _pimpl->MANIPlocks(), p );
 
   if( p.aborted() )
   {
@@ -302,7 +340,7 @@ void Locks::removeEmpty()
 
   }
 
-  if ( sum != _pimpl->locks.size() ) //some locks has been removed
+  if ( sum != _pimpl->locks().size() ) //some locks has been removed
     _pimpl->locksDirty = true;
 }
 
@@ -376,7 +414,7 @@ public:
       DBG << "skip lock" << endl;
       return false;
     }
-    WAR << "should not reached, some state is missing" << endl;
+    INT << "Unexpected return value from callback. Need to adapt switch statement." << std::endl;
     return false;
   }
 
@@ -385,22 +423,18 @@ public:
 
 bool Locks::Impl::mergeList(callback::SendReport<SavingLocksReport>& report)
 {
-  MIL << "merging list old: " << locks.size()
+  MIL << "merge list old: " << locks().size()
     << " to add: " << toAdd.size() << "to remove: " << toRemove.size() << endl;
   for_(it,toRemove.begin(),toRemove.end())
   {
     std::set<sat::Solvable> s(it->begin(),it->end());
-    locks.remove_if(LocksRemovePredicate(s,*it, report));
+    remove_if( MANIPlocks(), LocksRemovePredicate(s,*it, report) );
   }
 
   if (!report->progress())
     return false;
 
-  for_( it, toAdd.begin(), toAdd.end() )
-  {
-    if( std::find( locks.begin(), locks.end(), *it ) == locks.end() )
-      locks.push_back( *it );
-  }
+  MANIPlocks().insert( toAdd.begin(), toAdd.end() );
 
   toAdd.clear();
   toRemove.clear();
@@ -448,22 +482,12 @@ void Locks::save( const Pathname& file )
     }
   }
 
-  DBG << "writed "<< _pimpl->locks.size() << "locks" << endl;
-  writePoolQueriesToFile( file, _pimpl->locks.begin(), _pimpl->locks.end() );
+  DBG << "wrote "<< _pimpl->locks().size() << "locks" << endl;
+  writePoolQueriesToFile( file, _pimpl->locks().begin(), _pimpl->locks().end() );
   report->finish(SavingLocksReport::NO_ERROR);
 }
 
 void Locks::removeDuplicates()
-{
-  size_type sum = size();
-  for_(it,_pimpl->locks.begin(),_pimpl->locks.end())
-  {
-    if ( find(_pimpl->locks.begin(),it,*it) != it )
-      _pimpl->locks.erase(it--); //-- to avoid using break iterator
-  }
-  
-  if (sum!=size())
-    _pimpl->locksDirty = true;
-}
+{ /* NOP since implementation uses std::set */ }
 
 } // ns zypp
index 6e4e4ad..6397825 100644 (file)
@@ -116,7 +116,7 @@ namespace zypp
       {
        if ( key_r.find_first_of( ":\n" ) != std::string::npos )
          ZYPP_THROW( PluginFrameException( "Illegal char in header key", key_r ) );
-       if ( value_r.find_first_of( ":\n" ) != std::string::npos )
+       if ( value_r.find_first_of( "\n" ) != std::string::npos )
          ZYPP_THROW( PluginFrameException( "Illegal char in header value", value_r ) );
        return HeaderList::value_type( key_r, value_r );
       }
index 1e5c6ab..a65ca3b 100644 (file)
@@ -413,6 +413,24 @@ namespace zypp
 
   public:
 
+    bool operator<( const PoolQuery::Impl & rhs ) const
+    {
+#define OUTS(A) if ( A != rhs.A ) return A < rhs.A;
+      OUTS( _strings );
+      OUTS( _attrs );
+      OUTS( _uncompiledPredicated );
+      OUTS( _flags.get() );
+      OUTS( _match_word );
+      OUTS( _require_all );
+      OUTS( _status_flags );
+      OUTS( _edition );
+      OUTS( _op.inSwitch() );
+      OUTS( _repos );
+      OUTS( _kinds );
+#undef OUTS
+      return false;
+    }
+
     bool operator==( const PoolQuery::Impl & rhs ) const
     {
       if ( _flags == rhs._flags
@@ -1436,6 +1454,9 @@ attremptycheckend:
   bool PoolQuery::operator==( const PoolQuery & rhs ) const
   { return *_pimpl == *rhs._pimpl; }
 
+  bool PoolQuery::operator<( const PoolQuery & rhs ) const
+  { return *_pimpl < *rhs._pimpl; }
+
   ///////////////////////////////////////////////////////////////////
   namespace detail
   { /////////////////////////////////////////////////////////////////
index 132fe3e..965f199 100644 (file)
@@ -463,6 +463,7 @@ namespace zypp
     /** Return a human-readable description of the query */
     std::string asString() const;
 
+    bool operator<(const PoolQuery& b) const;
     bool operator==(const PoolQuery& b) const;
     bool operator!=(const PoolQuery& b) const { return !(*this == b ); }
 
index 9c6ddbb..0820323 100644 (file)
@@ -166,6 +166,11 @@ namespace zypp
     INT << where_r << " " << prefix_r << " " << excpt_r.asUserHistory() << endl;
   }
 
+  void Exception::log( const char * typename_r, const CodeLocation & where_r,
+                       const char *const prefix_r )
+  {
+    INT << where_r << " " << prefix_r << " exception of type " << typename_r << endl;
+  }
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index a7d0e54..0e4d090 100644 (file)
@@ -16,6 +16,8 @@
 #include <string>
 #include <list>
 #include <stdexcept>
+#include <typeinfo>
+#include <type_traits>
 
 #include "zypp/base/Errno.h"
 
@@ -286,7 +288,9 @@ namespace zypp
     */
     static void log( const Exception & excpt_r, const CodeLocation & where_r,
                      const char *const prefix_r );
-
+    /** \overrload for not-Exception types thrown via ZYPP_THROW */
+    static void log( const char * typename_r, const CodeLocation & where_r,
+                     const char *const prefix_r );
   private:
     mutable CodeLocation _where;
     std::string          _msg;
@@ -310,10 +314,19 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
   namespace exception_detail
   {
-    /** Helper for \ref ZYPP_THROW. */
+    /** SFINAE: Hide template signature unless \a TExcpt is derived from \ref Exception. */
     template<class TExcpt>
-    void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
+    using EnableIfIsException = typename std::enable_if< std::is_base_of<Exception,TExcpt>::value, int>::type;
+
+    /** SFINAE: Hide template signature if \a TExcpt is derived from  \ref Exception. */
     template<class TExcpt>
+    using EnableIfNotException = typename std::enable_if< !std::is_base_of<Exception,TExcpt>::value, int>::type;
+
+
+    /** Helper for \ref ZYPP_THROW( Exception ). */
+    template<class TExcpt, EnableIfIsException<TExcpt> = 0>
+    void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
+    template<class TExcpt, EnableIfIsException<TExcpt> = 0>
     void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       excpt_r.relocate( where_r );
@@ -321,23 +334,52 @@ namespace zypp
       throw( excpt_r );
     }
 
-    /** Helper for \ref ZYPP_THROW. */
-    template<class TExcpt>
+    /** Helper for \ref ZYPP_THROW( not Exception ). */
+    template<class TExcpt, EnableIfNotException<TExcpt> = 0>
+    void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
+    template<class TExcpt, EnableIfNotException<TExcpt> = 0>
+    void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r )
+    {
+      Exception::log( typeid(excpt_r).name(), where_r, "THROW:   " );
+      throw( excpt_r );
+    }
+
+
+    /** Helper for \ref ZYPP_THROW( Exception ). */
+    template<class TExcpt, EnableIfIsException<TExcpt> = 0>
     void do_ZYPP_CAUGHT( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       Exception::log( excpt_r, where_r, "CAUGHT:  " );
     }
 
-    /** Helper for \ref ZYPP_THROW. */
-    template<class TExcpt>
+    /** Helper for \ref ZYPP_THROW( not Exception ). */
+    template<class TExcpt, EnableIfNotException<TExcpt> = 0>
+    void do_ZYPP_CAUGHT( const TExcpt & excpt_r, const CodeLocation & where_r )
+    {
+      Exception::log( typeid(excpt_r).name(), where_r, "CAUGHT:  " );
+    }
+
+
+    /** Helper for \ref ZYPP_THROW( Exception ). */
+    template<class TExcpt, EnableIfIsException<TExcpt> = 0>
     void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
-    template<class TExcpt>
+    template<class TExcpt, EnableIfIsException<TExcpt> = 0>
     void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       Exception::log( excpt_r, where_r, "RETHROW: " );
       excpt_r.relocate( where_r );
       throw;
     }
+
+    /** Helper for \ref ZYPP_THROW( not Exception ). */
+    template<class TExcpt, EnableIfNotException<TExcpt> = 0>
+    void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
+    template<class TExcpt, EnableIfNotException<TExcpt> = 0>
+    void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r )
+    {
+      Exception::log( excpt_r, where_r, "RETHROW: " );
+      throw;
+    }
   } // namespace exception_detail
   ///////////////////////////////////////////////////////////////////