# See './mkChangelog -h' for help.
#
SET(LIBZYPP_MAJOR "17")
-SET(LIBZYPP_COMPATMINOR "9")
-SET(LIBZYPP_MINOR "11")
-SET(LIBZYPP_PATCH "4")
+SET(LIBZYPP_COMPATMINOR "12")
+SET(LIBZYPP_MINOR "12")
+SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 17.11.4 (9)
+# LAST RELEASED: 17.12.0 (12)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
-------------------------------------------------------------------
+Tue May 28 16:50:14 CEST 2019 - ma@suse.de
+
+- Drop unused InterProcessMutex class and test
+- Drop unused WebpinResult class and test
+- Give posttrans script a parameter of 0 (issue #168)
+- Use CURL_HTTP_VERSION_2TLS if available (fixes #141)
+- version 17.12.0 (12)
+
+-------------------------------------------------------------------
Thu Apr 4 13:24:40 CEST 2019 - ma@suse.de
- Enhance scanning /sys for modaliases (bsc#1130161)
"Project-Id-Version: opensuse-i 18n\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-27 13:31+0100\n"
-"PO-Revision-Date: 2018-02-28 13:09+0000\n"
+"PO-Revision-Date: 2019-05-21 15:55+0000\n"
"Last-Translator: Mohammad Rezaei Seresht <m_rezaei_seresht@hotmail.com>\n"
"Language-Team: Persian <https://l10n.opensuse.org/projects/libzypp/master/fa/"
">\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.18\n"
+"X-Generator: Weblate 3.3\n"
#. dubious: Throw on malformed known types, otherwise log a warning.
#: zypp/CheckSum.cc:136
#: zypp/RepoInfo.cc:517
#, boost-format
msgid "Looking for gpg key ID %1% in cache %2%."
-msgstr ""
+msgstr "در جستجوی کلید gpg %1% در کش %2% ."
#. translator: %1% is a gpg key ID like 3DBDC284
#. %2% is a repositories name
#: zypp/RepoInfo.cc:545
#, boost-format
msgid "Looking for gpg key ID %1% in repository %2%."
-msgstr ""
+msgstr "در جستجوی شناسه کلید gpg %1% در مخزن %2%."
#. translator: %1% is a repositories name
#: zypp/RepoInfo.cc:569
"Project-Id-Version: zypp.fi\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-27 13:31+0100\n"
-"PO-Revision-Date: 2018-02-15 11:35+0000\n"
+"PO-Revision-Date: 2019-04-09 16:45+0000\n"
"Last-Translator: Tommi Nieminen <software@legisign.org>\n"
"Language-Team: Finnish <https://l10n.opensuse.org/projects/libzypp/master/fi/"
">\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.18\n"
+"X-Generator: Weblate 3.3\n"
#. dubious: Throw on malformed known types, otherwise log a warning.
#: zypp/CheckSum.cc:136
#. :FRA:250:
#: zypp/CountryCode.cc:231
msgid "Metropolitan France"
-msgstr "Metropolitan France"
+msgstr "Ranskan suurkaupungit"
# GH
#. :FXX:249:
#: zypp/RepoInfo.cc:517
#, boost-format
msgid "Looking for gpg key ID %1% in cache %2%."
-msgstr ""
+msgstr "Etsitään GPG-avainta %1% välimuistista %2%."
#. translator: %1% is a gpg key ID like 3DBDC284
#. %2% is a repositories name
#: zypp/RepoInfo.cc:545
#, boost-format
msgid "Looking for gpg key ID %1% in repository %2%."
-msgstr ""
+msgstr "Etsitään GPG-avainta %1% asennuslähteestä %2%."
#. translator: %1% is a repositories name
#: zypp/RepoInfo.cc:569
#, boost-format
msgid "Repository %1% does not define additional 'gpgkey=' URLs."
-msgstr ""
+msgstr "Asennuslähde %1% ei ole asettanut ”gpgkey=”-lisäverkko-osoitteita."
#: zypp/RepoManager.cc:314
#, boost-format
"Visit the SUSE Customer Center to check whether your registration is valid "
"and has not expired."
msgstr ""
+"Tarkista SUSEn asiakaskeskuksessa käymällä, onko rekisteröitymisesi voimassa."
#: zypp/media/MediaCurl.cc:1141
msgid ""
#: zypp/media/MediaException.cc:195
#, c-format, boost-format
msgid "Downloaded data exceeded the expected filesize '%s' of '%s'."
-msgstr ""
+msgstr "Ladattu tieto ylittää odotetun tiedostokoon ”%s”/”%s”."
#: zypp/media/MediaException.cc:203
#, c-format, boost-format
#: zypp/target/RpmPostTransCollector.cc:103
#, boost-format
msgid "Executing %%posttrans script '%1%'"
-msgstr ""
+msgstr "Suoritetaan %%posttrans-skriptiä ”%1%”"
#. show a final message
#: zypp/target/RpmPostTransCollector.cc:161
#, c-format, boost-format
msgid "Executing %posttrans scripts"
-msgstr ""
+msgstr "Suoritetaan %posttrans-skriptejä"
#: zypp/target/TargetException.cc:28
msgid "Installation has been aborted as directed."
"Project-Id-Version: YaST (@memory@)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-27 13:31+0100\n"
-"PO-Revision-Date: 2018-10-05 13:06+0000\n"
+"PO-Revision-Date: 2019-04-18 16:03+0000\n"
"Last-Translator: Kukuh Syafaat <syafaatkukuh@gmail.com>\n"
"Language-Team: Indonesian <https://l10n.opensuse.org/projects/libzypp/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 2.18\n"
+"X-Generator: Weblate 3.3\n"
#. dubious: Throw on malformed known types, otherwise log a warning.
#: zypp/CheckSum.cc:136
#: zypp/KeyRing.cc:633
#, c-format, boost-format
msgid "Signature file %s not found"
-msgstr "Tanda tangan file %s tidak ditemukan"
+msgstr "Berkas tanda tangan %s tidak ditemukan"
#: zypp/LanguageCode.cc:49
msgid "Unknown language: "
#: zypp/RepoManager.cc:1094
msgid "Valid metadata not found at specified URL"
msgid_plural "Valid metadata not found at specified URLs"
-msgstr[0] "Metadata yang sah tidak ditemukan pada URL yang ditentukan"
+msgstr[0] "Metadata yang valid tidak ditemukan pada URL yang ditentukan"
#: zypp/RepoManager.cc:1142 zypp/RepoManager.cc:1254 zypp/RepoManager.cc:1310
#, c-format, boost-format
#: zypp/RepoManager.cc:1708
#, c-format, boost-format
msgid "Invalid repo file name at '%s'"
-msgstr "Nama berkas repo tidak sah di '%s'"
+msgstr "Nama berkas repo tidak valid di '%s'"
#: zypp/RepoManager.cc:1749
#, c-format, boost-format
#: zypp/Url.cc:114
msgid "Invalid LDAP URL query string"
-msgstr "Permintaan String LDAP URL tidak sahih"
+msgstr "String kueri URL LDAP tidak valid"
#: zypp/Url.cc:153
#, c-format, boost-format
msgid "Invalid LDAP URL query parameter '%s'"
-msgstr "Parameter '%s’ query LDAP URL tidak valid"
+msgstr "Parameter kueri LDAP URL '%s’ tidak valid"
#: zypp/Url.cc:301
msgid "Unable to clone Url object"
#: zypp/VendorSupportOptions.cc:17
msgid "unsupported"
-msgstr "Tidak didukung"
+msgstr "tidak didukung"
#: zypp/VendorSupportOptions.cc:20
msgid "Level 1"
#: zypp/VendorSupportOptions.cc:31
msgid "invalid"
-msgstr "Tidak sah"
+msgstr "tidak valid"
#: zypp/VendorSupportOptions.cc:39
msgid "The level of support is unspecified"
#: zypp/VendorSupportOptions.cc:56
msgid "Unknown support option. Description not available"
-msgstr "Opsi support tidak diketahui. Deskripsi tidak ditemukan"
+msgstr "Opsi dukungan tidak diketahui. Deskripsi tidak ditemukan"
#: zypp/ZYppFactory.cc:399
#, c-format, boost-format
#: zypp/base/InterProcessMutex.cc:83
#, c-format, boost-format
msgid "Can't open lock file: %s"
-msgstr "Ttidak dapat membuka file kunci: %s"
+msgstr "Tidak dapat membuka berkas kunci: %s"
#: zypp/base/InterProcessMutex.cc:143
msgid "This action is being run by another program already."
#: zypp/base/StrMatcher.cc:157
#, c-format, boost-format
msgid "Invalid regular expression '%s': regcomp returned %d"
-msgstr "Expresi reguler '%s' tidak valid: regcomp kembali %d"
+msgstr "Ekspresi reguler '%s' tidak valid: regcomp kembali %d"
#: zypp/base/StrMatcher.cc:158
#, c-format, boost-format
msgid "Invalid regular expression '%s'"
-msgstr "Expresi reguler '%s' tidak valid"
+msgstr "Ekspresi reguler '%s' tidak valid"
#. !\todo add comma to the message for the next release
#: zypp/media/MediaCIFS.cc:427 zypp/media/MediaCurl.cc:1775
"Visit the SUSE Customer Center to check whether your registration is valid "
"and has not expired."
msgstr ""
+"Kunjungi Pusat Pelanggan SUSE untuk memeriksa apakah pendaftaran Anda valid "
+"dan belum kedaluwarsa."
#: zypp/media/MediaCurl.cc:1141
msgid ""
"Visit the Novell Customer Center to check whether your registration is valid "
"and has not expired."
msgstr ""
-"Kunjungi pusat pelanggan Novell untuk memeriksa apakah pendaftaran anda "
-"valid dan tidak kadaluarsa."
+"Kunjungi Pusat Pelanggan Novell untuk memeriksa apakah pendaftaran Anda "
+"valid dan tidak kedaluwarsa."
#: zypp/media/MediaException.cc:31
#, c-format, boost-format
msgid "Failed to mount %s on %s"
-msgstr "Gagal untuk mengaitkan%s pada %s"
+msgstr "Gagal untuk mengaitkan %s pada %s"
#: zypp/media/MediaException.cc:41
#, c-format, boost-format
#: zypp/media/MediaException.cc:46
#, c-format, boost-format
msgid "Bad file name: %s"
-msgstr "Nama file yang buruk: %s"
+msgstr "Nama berkas yang buruk: %s"
#: zypp/media/MediaException.cc:51
#, c-format, boost-format
#: zypp/media/MediaException.cc:56
#, c-format, boost-format
msgid "File '%s' not found on medium '%s'"
-msgstr "File '%s' tidak ditemukan pada medium '%s'"
+msgstr "Berkas '%s' tidak ditemukan pada medium '%s'"
#: zypp/media/MediaException.cc:61
#, c-format, boost-format
msgid "Cannot write file '%s'."
-msgstr "Tidak dapat menulis file '%s'."
+msgstr "Tidak dapat menulis berkas '%s'."
#: zypp/media/MediaException.cc:66
msgid "Medium not attached"
#: zypp/media/MediaException.cc:87
#, c-format, boost-format
msgid "Path '%s' on medium '%s' is not a file."
-msgstr "Lokasi '%s' pada medium '%s' bukan sebuah file."
+msgstr "Lokasi '%s' pada medium '%s' bukan sebuah berkas."
#: zypp/media/MediaException.cc:92
#, c-format, boost-format
#: zypp/media/MediaException.cc:114
msgid "Empty filesystem in URI"
-msgstr "Filesistem kosong pada URI"
+msgstr "Sistem berkas kosong pada URI"
#: zypp/media/MediaException.cc:119
msgid "Empty destination in URI"
#: zypp/repo/RepoProvideFile.cc:261
#, c-format, boost-format
msgid "Can't provide file '%s' from repository '%s'"
-msgstr "Tidak dapat meyediakan file '%s' dari repositori '%s'"
+msgstr "Tidak dapat meyediakan berkas '%s' dari repositori '%s'"
#: zypp/repo/RepoProvideFile.cc:267
msgid "No url in repository."
" conflicts with file from package\n"
" %3%"
msgstr ""
-"File %1%\n"
+"Berkas %1%\n"
" dari paket\n"
" %2%\n"
-" konflik dengan file dari paket\n"
+" konflik dengan berkas dari paket\n"
" %3%"
#. TranslatorExplanation %1%(filename) %2%(package1) %3%(package2)
" conflicts with file from install of\n"
" %3%"
msgstr ""
-"File %1%\n"
+"Berkas %1%\n"
" dari paket\n"
" %2%\n"
-" konflik dengan file dari pemasangan\n"
+" konflik dengan berkas dari pemasangan\n"
" %3%"
#. TranslatorExplanation %1%(filename) %2%(package1) %3%(package2)
" conflicts with file from package\n"
" %3%"
msgstr ""
-"File %1%\n"
+"Berkas %1%\n"
" dari pemasangan\n"
" %2%\n"
-" konflik dengan file dari paket\n"
+" konflik dengan berkas dari paket\n"
" %3%"
#. TranslatorExplanation %1%(filename) %2%(package1) %3%(package2)
" conflicts with file from install of\n"
" %3%"
msgstr ""
-"File %1%\n"
+"Berkas %1%\n"
" dari pemasangan\n"
" %2%\n"
-" konflik dengan file dari pemasangan\n"
+" konflik dengan berkas dari pemasangan\n"
" %3%"
#. [lhs][rhs] 0 = installed; 1 = to be installed
" from install of\n"
" %4%"
msgstr ""
-"File %1%\n"
+"Berkas %1%\n"
" dari paket\n"
" %2%\n"
-" konflik dengan file\n"
+" konflik dengan berkas\n"
" %3%\n"
" dari pemasangan\n"
" %4%"
" from package\n"
" %4%"
msgstr ""
-"File %1%\n"
+"Berkas %1%\n"
" dari pemasangan\n"
" %2%\n"
-" konflik dengan file\n"
+" konflik dengan berkas\n"
" %3%\n"
" dari paket\n"
" %4%"
" from install of\n"
" %4%"
msgstr ""
-"File %1%\n"
+"Berkas %1%\n"
" dari pemasangan\n"
" %2%\n"
-" konflik dengan FIle\n"
+" konflik dengan berkas\n"
" %3%\n"
" dari pemasangan\n"
" %4%"
#: zypp/target/rpm/RpmDb.cc:1925
#, c-format, boost-format
msgid "Changed configuration files for %s:"
-msgstr "Mengubah konfigurasi berkas untuk %s:"
+msgstr "Mengubah berkas konfigurasi untuk %s:"
#. %s = filenames
#: zypp/target/rpm/RpmDb.cc:2100
#. translators: possible rpm package signature check result [brief]
#: zypp/target/rpm/RpmDb.cc:2451
msgid "File does not exist or signature can't be checked"
-msgstr "File tidak ada atau tanda tangan tidak dapat diperiksa"
+msgstr "Berkas tidak ada atau tanda tangan tidak dapat diperiksa"
#. translators: possible rpm package signature check result [brief]
#: zypp/target/rpm/RpmDb.cc:2453
#: zypp/url/UrlBase.cc:173
#, c-format, boost-format
msgid "Invalid %s component '%s'"
-msgstr "Komponen '%s' tidak sah %s"
+msgstr "Komponen '%s' tidak valid %s"
#: zypp/url/UrlBase.cc:180
#, c-format, boost-format
"Project-Id-Version: zypp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-27 13:31+0100\n"
-"PO-Revision-Date: 2019-03-23 20:19+0000\n"
-"Last-Translator: Emily Dong <Emily.Dong@excel-gits.com>\n"
+"PO-Revision-Date: 2019-05-03 09:49+0000\n"
+"Last-Translator: Ramax Lo <ramaxlo@gmail.com>\n"
"Language-Team: Chinese (Taiwan) <https://l10n.opensuse.org/projects/libzypp/"
"master/zh_TW/>\n"
"Language: zh_TW\n"
#: zypp/RepoInfo.cc:545
#, boost-format
msgid "Looking for gpg key ID %1% in repository %2%."
-msgstr "尋找軟體庫 %2% 中的 gpg 金鑰 ID %1%。"
+msgstr "尋找套件庫 %2% 中的 gpg 金鑰 ID %1%。"
#. translator: %1% is a repositories name
#: zypp/RepoInfo.cc:569
#, boost-format
msgid "Repository %1% does not define additional 'gpgkey=' URLs."
-msgstr "軟體庫 %1% 未定義額外的 'gpgkey=' URL。"
+msgstr "套件庫 %1% 未定義額外的 'gpgkey=' URL。"
#: zypp/RepoManager.cc:314
#, boost-format
msgid "Cannot read repo directory '%1%': Permission denied"
-msgstr "無法讀取軟體庫目錄 '%1%'︰權限遭拒"
+msgstr "無法讀取套件庫目錄 '%1%'︰權限遭拒"
#. TranslatorExplanation '%s' is a pathname
#: zypp/RepoManager.cc:322 zypp/RepoManager.cc:785 zypp/RepoManager.cc:1538
#: zypp/RepoManager.cc:332
#, boost-format
msgid "Cannot read repo file '%1%': Permission denied"
-msgstr "無法讀取軟體庫檔案 '%1%'︰權限遭拒"
+msgstr "無法讀取套件庫檔案 '%1%'︰權限遭拒"
#: zypp/RepoManager.cc:355
msgid "Repository alias cannot start with dot."
-msgstr "軟體庫別名不能以點開始。"
+msgstr "套件庫別名不能以點開始。"
#: zypp/RepoManager.cc:366
msgid "Service alias cannot start with dot."
#: zypp/RepoManager.cc:1296
#, c-format, boost-format
msgid "Building repository '%s' cache"
-msgstr "正在建立軟體庫 '%s' 的快取"
+msgstr "正在建立套件庫 '%s' 的快取"
#: zypp/RepoManager.cc:1316
#, c-format, boost-format
#: zypp/RepoManager.cc:1381
#, c-format, boost-format
msgid "Failed to cache repo (%d)."
-msgstr "快取軟體庫失敗 (%d)。"
+msgstr "快取套件庫失敗 (%d)。"
#: zypp/RepoManager.cc:1392
msgid "Unhandled repository type"
-msgstr "無法處理的軟體庫類型"
+msgstr "無法處理的套件庫類型"
#. prepare exception to be thrown if the type could not be determined
#. due to a media exception. We can't throw right away, because of some
#: zypp/RepoManager.cc:1620
#, c-format, boost-format
msgid "Adding repository '%s'"
-msgstr "正在新增軟體庫 '%s'"
+msgstr "正在新增套件庫 '%s'"
#. TranslatorExplanation '%s' is an URL
#: zypp/RepoManager.cc:1708
#, c-format, boost-format
msgid "Invalid repo file name at '%s'"
-msgstr "'%s' 處的軟體庫檔案名稱無效"
+msgstr "'%s' 處的套件庫檔案名稱無效"
#: zypp/RepoManager.cc:1749
#, c-format, boost-format
msgid "Removing repository '%s'"
-msgstr "正在移除軟體庫 '%s'"
+msgstr "正在移除套件庫 '%s'"
#: zypp/RepoManager.cc:1768 zypp/RepoManager.cc:1846
msgid "Can't figure out where the repo is stored."
-msgstr "無法找到軟體庫儲存的位置。"
+msgstr "無法找到套件庫儲存的位置。"
#. TranslatorExplanation '%s' is a filename
#: zypp/RepoManager.cc:1782 zypp/RepoManager.cc:1984
#: zypp/misc/CheckAccessDeleted.cc:357
msgid "Please install package 'lsof' first."
-msgstr "請先安裝軟體包 'lsof'。"
+msgstr "請先安裝套件 'lsof'。"
#: zypp/parser/RepoindexFileReader.cc:197
#, c-format, boost-format
msgid ""
"Package %s seems to be corrupted during transfer. Do you want to retry "
"retrieval?"
-msgstr "軟體包 %s 可能在傳輸期間已毀損。是否要重試取回操作?"
+msgstr "套件 %s 可能在傳輸期間已毀損。是否要重試取回操作?"
#. TranslatorExplanation %s = name of the package being processed.
#: zypp/repo/PackageProvider.cc:486
#, c-format, boost-format
msgid "Failed to provide Package %s. Do you want to retry retrieval?"
-msgstr "無法提供軟體包 %s。是否要重試取回操作?"
+msgstr "無法提供套件 %s。是否要重試取回操作?"
#: zypp/repo/PackageProvider.cc:609
msgid "applydeltarpm check failed."
#: 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."
-msgstr "軟體庫中沒有 url。"
+msgstr "套件庫中沒有 url。"
#. [lhs][rhs] 0 = installed; 1 = to be installed
#. TranslatorExplanation %1%(filename) %2%(package1) %3%(package2)
" %3%"
msgstr ""
"檔案 %1%\n"
-" (來自以下軟體包\n"
+" (來自以下套件\n"
" %2%)\n"
-" 與來自下列軟體包的檔案相衝突\n"
+" 與來自下列套件的檔案相衝突\n"
" %3%"
#. TranslatorExplanation %1%(filename) %2%(package1) %3%(package2)
" %3%"
msgstr ""
"檔案 %1%\n"
-" (來自以下軟體包\n"
+" (來自以下套件\n"
" %2%)\n"
" 與來自下列安裝的檔案相衝突\n"
" %3%"
"檔案 %1%\n"
" (來自以下安裝\n"
" %2%)\n"
-" 與來自下列軟體包的檔案相衝突\n"
+" 與來自下列套件的檔案相衝突\n"
" %3%"
#. TranslatorExplanation %1%(filename) %2%(package1) %3%(package2)
" %4%"
msgstr ""
"檔案 %1%\n"
-" (來自以下軟體包\n"
+" (來自以下套件\n"
" %2%)\n"
" 與下列檔案相衝突\n"
" %3%\n"
-" (來自以下軟體包\n"
+" (來自以下套件\n"
" %4%)"
#. TranslatorExplanation %1%(filename1) %2%(package1) %3%(filename2) %4%(package2)
" %4%"
msgstr ""
"檔案 %1%\n"
-" (來自以下軟體包\n"
+" (來自以下套件\n"
" %2%)\n"
" 與下列檔案相衝突\n"
" %3%\n"
" %2%)\n"
" 與下列檔案發生衝突\n"
" %3%\n"
-" (來自以下軟體包\n"
+" (來自以下套件\n"
" %4%)"
#. TranslatorExplanation %1%(filename1) %2%(package1) %3%(filename2) %4%(package2)
#: zypp/solver/detail/SATResolver.cc:988
#, c-format, boost-format
msgid "%s does not belong to a distupgrade repository"
-msgstr "%s 不屬於版本升級軟體庫"
+msgstr "%s 不屬於版本升級套件庫"
#: zypp/solver/detail/SATResolver.cc:992
#, c-format, boost-format
#: zypp/solver/detail/SATResolver.cc:996
#, c-format, boost-format
msgid "problem with installed package %s"
-msgstr "已安裝的軟體包 %s 發生問題"
+msgstr "已安裝的套件 %s 發生問題"
#: zypp/solver/detail/SATResolver.cc:999
msgid "conflicting requests"
#: zypp/solver/detail/SATResolver.cc:1006
#: zypp/solver/detail/SATResolver.cc:1010
msgid "Have you enabled all requested repositories?"
-msgstr "是否已啟用所有需要的軟體庫?"
+msgstr "是否已啟用所有需要的套件庫?"
#: zypp/solver/detail/SATResolver.cc:1009
#, c-format, boost-format
msgid "package %s does not exist"
-msgstr "軟體包 %s 不存在"
+msgstr "套件 %s 不存在"
#: zypp/solver/detail/SATResolver.cc:1013
msgid "unsupported request"
#: zypp/solver/detail/SATResolver.cc:1309
#, c-format, boost-format
msgid "install %s from excluded repository"
-msgstr "自排除的軟體庫中安裝 %s"
+msgstr "自排除的套件庫中安裝 %s"
#: zypp/solver/detail/SATResolver.cc:1329
#, c-format, boost-format
#: zypp/target/rpm/RpmDb.cc:1625
msgid "Package is not signed!"
-msgstr "軟體包未簽章!"
+msgstr "套件未簽章!"
#. Translator: %s = name of an rpm package. A list of diffs follows
#. this message.
ADD_SUBDIRECTORY( yum )
ADD_SUBDIRECTORY( inifile )
-ADD_SUBDIRECTORY(ws)
ADD_TESTS( ProductFileReader )
ADD_TESTS( RepoFileReader )
+++ /dev/null
-ADD_TESTS(WebpinResultFileReader)
+++ /dev/null
-#include <stdio.h>
-#include <iostream>
-#include <fstream>
-#include <vector>
-#include <list>
-#include <boost/test/auto_unit_test.hpp>
-
-#include "zypp/parser/ws/WebpinResultFileReader.h"
-#include "zypp/ws/WebpinResult.h"
-
-#include "zypp/Url.h"
-#include "zypp/PathInfo.h"
-
-using namespace std;
-using namespace zypp;
-using namespace boost::unit_test;
-
-using namespace zypp::ws;
-using namespace zypp::parser::ws;
-
-#define DATADIR (Pathname(TESTS_SRC_DIR) + "parser/ws/data")
-
-class Collector
-{
-public:
- Collector()
- {}
-
- bool callback( const WebpinResult &result )
- {
- items.push_back(result);
- //items.push_back(loc);
- //cout << items.size() << endl;
- return true;
- }
-
- vector<WebpinResult> items;
-};
-
-BOOST_AUTO_TEST_CASE(result_read)
-{
- Collector collect;
- Pathname file;
-
- // this testcase represents this search:
- // http://api.opensuse-community.org/searchservice/Search/Simple/openSUSE_103/kopete
-
- file = DATADIR + "/search-kopete.xml";
-
- WebpinResultFileReader reader( file, bind( &Collector::callback, &collect, _1));
- BOOST_CHECK_EQUAL( collect.items.size(), 17);
-
- WebpinResult first = collect.items[0];
- BOOST_CHECK_EQUAL( first.name(), "kopete-otr");
- BOOST_CHECK_EQUAL( first.edition(), "0.6");
- BOOST_CHECK_EQUAL( first.repositoryUrl(), Url("http://download.opensuse.org/repositories/home:/burnickl_andreas/openSUSE_10.3"));
- BOOST_CHECK_EQUAL( first.distribution(), "openSUSE_103");
- BOOST_CHECK_EQUAL( first.checksum(), CheckSum::sha1("2a4d9e95f87abe16c28e4aefa0b3a0ae52220429"));
- BOOST_CHECK_EQUAL( first.priority(), 0);
- BOOST_CHECK_EQUAL( first.summary(), "OTR Plugin for Kopete");
-}
-
-
-// vim: set ts=2 sts=2 sw=2 ai et:
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<ns2:packages xmlns:ns2="http://datastructures.pkgsearch.benjiweber.co.uk">
- <package>
- <name>kopete-otr</name>
- <version>0.6</version>
- <repoURL>http://download.opensuse.org/repositories/home:/burnickl_andreas/openSUSE_10.3</repoURL>
- <archs>
- <arch>src</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>2a4d9e95f87abe16c28e4aefa0b3a0ae52220429</checksum>
- <summary>OTR Plugin for Kopete</summary>
- </package>
- <package>
- <name>kopete-otr</name>
- <version>0.7</version>
- <repoURL>http://download.opensuse.org/repositories/home:/burnickl_andreas/openSUSE_10.3</repoURL>
- <archs>
- <arch>src</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>b413eb994360c8285f021e69aab2fa006adfcd1e</checksum>
- <summary>OTR Plugin for Kopete</summary>
- </package>
- <package>
- <name>kopete-floor</name>
- <version>0.1.0</version>
- <repoURL>http://download.opensuse.org/repositories/home:/dmacvicar/openSUSE_10.3</repoURL>
- <archs>
- <arch>src</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>3c2a1f903106e4f804b811b8f22cb407225a93dd</checksum>
- <summary>Send your Kopete status to SUSE Floor tool</summary>
- </package>
- <package>
- <name>kopete-anyremote</name>
- <version>0.4</version>
- <repoURL>http://download.opensuse.org/repositories/home:/dsbhayangkara/openSUSE_10.3</repoURL>
- <archs>
- <arch>src</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>f6d0db3322d75ff51628d59897d5a895d00b2e95</checksum>
- <summary>anyRemote Plugin for Kopete</summary>
- </package>
- <package>
- <name>kopete-anyremote-debuginfo</name>
- <version>0.4</version>
- <repoURL>http://download.opensuse.org/repositories/home:/dsbhayangkara/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>6716db855c2e6f13436b1f1bc3ac2d9c807da8f8</checksum>
- <summary>Debug information for package kopete-anyremote</summary>
- </package>
- <package>
- <name>kopete-anyremote</name>
- <version>0.4</version>
- <repoURL>http://download.opensuse.org/repositories/home:/dsbhayangkara/openSUSE_10.3_Update</repoURL>
- <archs>
- <arch>src</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>8d5210aa7cd048ff572edf5c68687ddc06e08cda</checksum>
- <summary>anyRemote Plugin for Kopete</summary>
- </package>
- <package>
- <name>kopete-anyremote-debuginfo</name>
- <version>0.4</version>
- <repoURL>http://download.opensuse.org/repositories/home:/dsbhayangkara/openSUSE_10.3_Update</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>87a6b154f660b8eb91539f932c7567fabd2bf914</checksum>
- <summary>Debug information for package kopete-anyremote</summary>
- </package>
- <package>
- <name>extragear-network-kopete</name>
- <version>4.0.81.svn816196</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/KDE4:/UNSTABLE:/Extra-Apps/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>7297c1ab95569bc2db635ea046390d3eba43f510</checksum>
- <summary>Instant Messenger</summary>
- </package>
- <package>
- <name>kopete-anyremote</name>
- <version>0.4</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/Community/openSUSE_10.3</repoURL>
- <archs>
- <arch>src</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>edb649f5ff1908cbc5fb33c96c19994ca6375e90</checksum>
- <summary>anyRemote Plugin for Kopete</summary>
- </package>
- <package>
- <name>kopete-otr</name>
- <version>0.6</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/Community/openSUSE_10.3</repoURL>
- <archs>
- <arch>src</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>48f011d09d2f5d06d570383106f7ea630a04f704</checksum>
- <summary>OTR Plugin for Kopete</summary>
- </package>
- <package>
- <name>kopete-anyremote-debuginfo</name>
- <version>0.4</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/Community/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>ba9a0a3e438b7a032514db2abbe1235e5511fdc9</checksum>
- <summary>Debug information for package kopete-anyremote</summary>
- </package>
- <package>
- <name>kde4-kopete-devel</name>
- <version>4.0.83</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/KDE4:/UNSTABLE:/Desktop/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>a42adacc32abbb0af41620f1aed1cb071ca20406</checksum>
- <summary>Instant Messenger - Development Files</summary>
- </package>
- <package>
- <name>kde4-kopete</name>
- <version>4.0.83</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/KDE4:/UNSTABLE:/Desktop/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>e6a3481e960ebd4400fc6783774a1553ffc83f13</checksum>
- <summary>Instant Messenger</summary>
- </package>
- <package>
- <name>kde4-kopete</name>
- <version>4.0.84</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/KDE4:/Factory:/Desktop/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>11f952a8c8f72fa96507509a9c15e1a322729f7d</checksum>
- <summary>Instant Messenger</summary>
- </package>
- <package>
- <name>kde4-kopete-devel</name>
- <version>4.0.84</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/KDE4:/Factory:/Desktop/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>f213abb894d16d76c3598a54bc55ca58e88c1483</checksum>
- <summary>Instant Messenger - Development Files</summary>
- </package>
- <package>
- <name>kde4-kopete-devel</name>
- <version>4.0.4</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/KDE4:/STABLE:/Desktop/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>71b6461f35fe255cb70881d415577a5cd573e096</checksum>
- <summary>Instant Messenger - Development Files</summary>
- </package>
- <package>
- <name>kde4-kopete</name>
- <version>4.0.4</version>
- <repoURL>http://download.opensuse.org/repositories/KDE:/KDE4:/STABLE:/Desktop/openSUSE_10.3</repoURL>
- <archs>
- <arch>i586</arch>
- </archs>
- <distro>openSUSE_103</distro>
- <priority>10</priority>
- <checksum>c761db2406163ab025cfb4005fe5b05e83bbb78a</checksum>
- <summary>Instant Messenger</summary>
- </package>
-</ns2:packages>
ADD_TESTS(Glob )
ADD_TESTS(Sysconfig )
ADD_TESTS(String )
-ADD_TESTS( InterProcessMutex InterProcessMutex2 )
ADD_TESTS(CleanerThread )
+++ /dev/null
-
-#include <sys/wait.h>
-
-#include <iostream>
-#include <fstream>
-#include <map>
-#include <string>
-#include <cstdio>
-
-#include <boost/test/auto_unit_test.hpp>
-
-#include "zypp/base/Logger.h"
-#include "zypp/base/Exception.h"
-#include "zypp/TmpPath.h"
-#include "zypp/PathInfo.h"
-
-#include "zypp/base/Sysconfig.h"
-#include "zypp/base/InterProcessMutex.h"
-
-
-using boost::unit_test::test_suite;
-using boost::unit_test::test_case;
-using namespace boost::unit_test;
-
-using namespace std;
-using namespace zypp;
-using namespace zypp::base;
-
-
-BOOST_AUTO_TEST_CASE(Abort)
-{
- int r = 0;
- {
- MIL << "ready to fork" << endl;
-
- r = fork();
-
- if ( r < 0 )
- {
- BOOST_ERROR("Can't fork process");
- return;
- }
- else if ( r == 0 )
- {
- MIL << "child, PID: " << getpid() << endl;
- // child
- sleep(3);
- BOOST_REQUIRE_THROW( InterProcessMutex( InterProcessMutex::Options(InterProcessMutex::Reader,"testcase", 0)), ZYppLockedException);
- //InterProcessMutex mutex2("testcase");
- }
- else
- {
- MIL << "parent: " << getpid() << endl;
- InterProcessMutex mutex( InterProcessMutex::Options(InterProcessMutex::Writer, "testcase"));
- // parent
- sleep(6);
- wait(NULL);
- MIL << "first lock will go out of scope" << endl;
-
- }
- }
-}
-
-
-
+++ /dev/null
-
-#include <sys/wait.h>
-
-#include <iostream>
-#include <fstream>
-#include <map>
-#include <string>
-#include <cstdio>
-
-#include <boost/test/auto_unit_test.hpp>
-
-#include "zypp/base/Logger.h"
-#include "zypp/base/Exception.h"
-#include "zypp/TmpPath.h"
-#include "zypp/PathInfo.h"
-
-#include "zypp/base/Sysconfig.h"
-#include "zypp/base/InterProcessMutex.h"
-
-
-using boost::unit_test::test_suite;
-using boost::unit_test::test_case;
-using namespace boost::unit_test;
-
-using namespace std;
-using namespace zypp;
-using namespace zypp::base;
-
-BOOST_AUTO_TEST_CASE(WaitForTheOther)
-{
- int r = 0;
- {
- MIL << "ready to fork" << endl;
-
- r = fork();
-
- if ( r < 0 )
- {
- BOOST_ERROR("Can't fork process");
- return;
- }
- else if ( r == 0 )
- {
- MIL << "child, PID: " << getpid() << endl;
- sleep(3);
- InterProcessMutex mutex2(InterProcessMutex::Options(InterProcessMutex::Reader,"testcase"));
- }
- else
- {
- MIL << "parent: " << getpid() << endl;
- InterProcessMutex mutex(InterProcessMutex::Options(InterProcessMutex::Writer,"testcase"));
- // parent
- sleep(6);
- }
- }
-}
-
-
-
-
INSTALL( FILES ${zypp_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/zypp" )
SET( zypp_base_SRCS
- base/InterProcessMutex.cc
base/Backtrace.cc
base/CleanerThread.cc
base/DrunkenBishop.cc
)
SET( zypp_base_HEADERS
- base/InterProcessMutex.h
base/Backtrace.h
base/Collector.h
base/DrunkenBishop.h
DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/yum
)
-SET( zypp_parser_ws_SRCS
- parser/ws/WebpinResultFileReader.cc
-)
-
-SET( zypp_parser_ws_HEADERS
- parser/ws/WebpinResultFileReader.h
-)
-
-INSTALL( FILES
- ${zypp_parser_ws_HEADERS}
- DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/ws
-)
-
-
SET( zypp_pool_SRCS
pool/PoolImpl.cc
pool/PoolStats.cc
repo/susetags/Downloader.h
)
-SET( zypp_ws_SRCS
- ws/WebpinResult.cc
-)
-
-SET( zypp_ws_HEADERS
- ws/WebpinResult.h
-)
-
####################################################################
SET( zypp_misc_HEADERS
${zypp_parser_susetags_SRCS}
${zypp_parser_xml_SRCS}
${zypp_parser_yum_SRCS}
-${zypp_parser_ws_SRCS}
${zypp_parser_SRCS}
${zypp_media_proxyinfo_SRCS}
${zypp_media_SRCS}
${zypp_solver_detail_SRCS}
${zypp_ui_SRCS}
${zypp_thread_SRCS}
-${zypp_ws_SRCS}
${zypp_SRCS}
${zypp_zypp_detail_SRCS}
${zypp_sat_SRCS}
${zypp_parser_susetags_HEADERS}
${zypp_parser_yum_HEADERS}
${zypp_parser_xml_HEADERS}
-${zypp_parser_ws_HEADERS}
${zypp_parser_HEADERS}
${zypp_ui_HEADERS}
${zypp_media_HEADERS}
${zypp_sat_HEADERS}
${zypp_sat_detail_HEADERS}
${zypp_url_HEADERS}
-${zypp_ws_HEADERS}
${zypp_HEADERS}
${zypp_zypp_detail_HEADERS}
${zypp_thread_HEADERS}
+++ /dev/null
-
-extern "C"
-{
-#include <sys/file.h>
-}
-#include <iostream>
-#include <fstream>
-
-#include "zypp/base/Logger.h"
-#include "zypp/base/Gettext.h"
-#include "zypp/base/IOStream.h"
-#include "zypp/base/InterProcessMutex.h"
-#include "zypp/base/String.h"
-
-#include "zypp/TmpPath.h"
-#include "zypp/Pathname.h"
-#include "zypp/PathInfo.h"
-
-#define LMIL MIL << "LOCK [" << _options.name << "] "
-
-using namespace std;
-
-namespace zypp
-{
-namespace base
-{
-
-ZYppLockedException::ZYppLockedException( const std::string & msg_r,
- const std::string &name,
- pid_t locker_pid )
- : Exception(msg_r)
- , _locker_pid (locker_pid)
- , _name(name)
-{}
-
-ZYppLockedException::~ZYppLockedException() throw()
-{}
-
-
-InterProcessMutex::Options::Options( ConsumerType ptype,
- const std::string &pname,
- int ptimeout )
- : name(pname)
- , timeout(ptimeout)
- , type(ptype)
-{
- if ( geteuid() == 0 )
- base = "/var/run";
- else
- base = filesystem::TmpPath::defaultLocation() + ( string("zypp-") + getenv("USER") );
-}
-
-
-
-InterProcessMutex::InterProcessMutex( const Options &poptions )
- : _options(poptions)
-{
- // get the current pid
- pid_t curr_pid = getpid();
- Pathname lock_file = lockFilePath();
- int totalslept = 0;
- int k = 0;
-
- while (1)
- {
- k++;
-
- // try to create the lock file atomically, this will fail if
- // the lock exists
- try {
- _fd.reset( new Fd( lock_file, O_RDWR | O_CREAT | O_EXCL, 0666) );
- } catch (...) {
- _fd.reset();
- }
- if ( !_fd || !_fd->isOpen() )
- {
- struct flock lock;
-
- // the file exists, lets see if someone has it locked exclusively
- _fd.reset( new Fd( lock_file, O_RDWR ) );
- if ( !_fd->isOpen() )
- {
- ZYPP_THROW(Exception(str::form(_("Can't open lock file: %s"), strerror(errno))));
- }
-
- memset(&lock, 0, sizeof(struct flock));
- lock.l_whence = SEEK_SET;
-
- // GETLK tells you the conflicting lock as if the lock you pass
- // would have been set. So set the lock type depending on whether
- // we are a writer or a reader.
- lock.l_type = ( ( _options.type == Writer ) ? F_WRLCK : F_RDLCK );
-
-
- // get lock information
- if (fcntl(_fd->fd(), F_GETLK, &lock) < 0)
- {
- ZYPP_THROW(Exception(string("Error getting lock info: ") + strerror(errno)));
- }
-
-
- MIL << lock_file << " : ";
- switch ( lock.l_type )
- {
- case F_WRLCK:
- MIL << " Write-Lock conflicts" << endl;
- break;
- case F_RDLCK:
- MIL << " Read-Lock conflicts" << endl;
- break;
- case F_UNLCK:
- MIL << " No lock conflicts" << endl;
- break;
- default:
- break;
-
- }
-
- // F_GETLK is confusing
- // http://groups.google.com/group/comp.unix.solaris/tree/browse_frm/month/2005-09/123fae2c774bceed?rnum=61&_done=%2Fgroup%2Fcomp.unix.solaris%2Fbrowse_frm%2Fmonth%2F2005-09%3F
- // new table of access
- // F_WRLCK Reader Wait or abort
- // F_WRLCK Writer Wait or abort
- // F_RDLCK Writer Wait or abort
- // F_RDLCK Reader Can't happen, anyway, wait or abort
- // F_UNLCK Reader Take reader lock
- // F_UNLCK Writer Take writer lock
-
-
-
- // wait or abort
- if ( lock.l_type != F_UNLCK )
- {
- // some lock conflicts with us.
- LMIL << "pid " << lock.l_pid << " is running and has a lock that conflicts with us." << std::endl;
-
- // abort if we have slept more or equal than the timeout, but
- // not for the case where timeout is negative which means no
- // timeout and therefore we never abort.
- if ( (totalslept >= _options.timeout) && (_options.timeout >= 0 ) )
- {
- ZYPP_THROW(ZYppLockedException(
- _("This action is being run by another program already."),
- _options.name, lock.l_pid));
- }
-
- // if not, let sleep one second and count it
- LMIL << "waiting 1 second..." << endl;
- sleep(1);
- ++totalslept;
- continue;
- }
- else if ( ( lock.l_type == F_UNLCK ) && ( _options.type == Reader ) )
- {
- // either there is no lock or a reader has it so we just
- // acquire a reader lock.
-
- // try to get more lock info
- lock.l_type = F_WRLCK;
-
- if (fcntl(_fd->fd(), F_GETLK, &lock) < 0)
- {
- ZYPP_THROW(Exception(string("Error getting lock info: ") + strerror(errno)));
- }
-
- if ( lock.l_type == F_UNLCK )
- {
- LMIL << "no previous readers, unlinking lock file and retrying." << endl;
-
- // actually there are no readers
- // lets delete it and break, so the next loop will
- // probably succeed in creating it. The worst thing that can
- // happen is that another process will take it first, but
- // we are not aiming at such level of correctness. Otherwise
- // the code path will complicate too much.
- memset(&lock, 0, sizeof(struct flock));
- lock.l_type = F_WRLCK;
- lock.l_whence = SEEK_SET;
- lock.l_pid = getpid();
-
- if (fcntl(_fd->fd(), F_SETLK, &lock) < 0)
- {
- ZYPP_THROW (Exception( "Can't lock file to unlink it."));
- }
- filesystem::unlink(lock_file.c_str());
- continue;
- }
- else if ( lock.l_type == F_RDLCK )
- {
- // there is another reader.
- LMIL << "previous readers on lock file. taking lock as a reader." << std::endl;
- memset(&lock, 0, sizeof(struct flock));
- lock.l_type = F_RDLCK;
- lock.l_whence = SEEK_SET;
- lock.l_pid = getpid();
-
- if (fcntl(_fd->fd(), F_SETLK, &lock) < 0)
- {
- ZYPP_THROW (Exception( "Can't lock file for reader"));
- }
- // and keep the lock open.
- break;
- }
- else
- {
- // cant happen!
- ERR << "impossible condition" << endl;
-
- break;
- }
- }
- else if ( ( lock.l_type == F_UNLCK ) && ( _options.type == Writer ) )
- {
- LMIL << "stale lock found" << endl;
- // Nobody conflicts with a writer lock so nobody is actually
- // locking.
- // lets delete it and break, so the next loop will
- // probably succeed in creating it. The worst thing that can
- // happen is that another process will take it first, but
- // we are not aiming at such level of correctness. Otherwise
- // the code path will complicate too much.
- memset(&lock, 0, sizeof(struct flock));
- lock.l_type = F_WRLCK;
- lock.l_whence = SEEK_SET;
- lock.l_pid = getpid();
-
- if (fcntl(_fd->fd(), F_SETLK, &lock) < 0)
- {
- ZYPP_THROW (Exception( "Can't lock file to unlink it."));
- }
- filesystem::unlink(lock_file.c_str());
- continue;
- }
- else
- {
- // undefined case, just get out of the loop
- LMIL << "undefined case!" << endl;
-
- break;
- }
-
- }
- else
- {
- // exclusive file creation succeeded. So may be we are the
- // first writer or first reader
-
- // try to lock it exclusively
- // if it fails, someone won us, so we just go for another try
- // or just abort
- LMIL << "no lock found, taking ownership of it as a " << ( (_options.type == Reader ) ? "reader" : "writer" ) << endl;
- struct flock lock;
- memset(&lock, 0, sizeof(struct flock));
- lock.l_whence = SEEK_SET;
- lock.l_type = F_WRLCK;
- lock.l_pid = getpid();
-
- if (fcntl(_fd->fd(), F_SETLK, &lock) < 0)
- ZYPP_THROW (Exception( "Can't lock file to write pid."));
-
- char buffer[100];
- sprintf( buffer, "%d\n", curr_pid);
- write( _fd->fd(), buffer, strlen(buffer));
-
- // by now the pid is written and the file locked.
- // If we are a reader, just downgrade the lock to
- // read shared lock.
- if ( _options.type == Reader )
- {
- lock.l_type = F_RDLCK;
-
- if (fcntl(_fd->fd(), F_SETLK, &lock) < 0)
- ZYPP_THROW (Exception( "Can't set lock file to shared"));
- }
-
- break;
- }
- } // end loop
-
- LMIL << "Lock intialized" << endl;
-
-}
-
-InterProcessMutex::~InterProcessMutex()
-{
- try
- {
- Pathname lock_file = lockFilePath();
- LMIL << "dropping "
- << ( (_options.type == Reader ) ? "reader" : "writer" )
- << " lock on " << lock_file << endl;
-
- switch ( _options.type )
- {
- case Reader:
-
- break;
-
- case Writer:
- // we are the only writer, so unlink the file
- filesystem::unlink(lock_file.c_str());
- break;
-
- }
- // and finally close the file and release the lock
- // (happens automatically)
- }
- catch(...) {} // let no exception escape.
-}
-
-
-Pathname InterProcessMutex::lockFilePath() const
-{
- filesystem::assert_dir(_options.base);
- return _options.base + ("zypp-" + _options.name + ".lock");
-}
-
-bool InterProcessMutex::isProcessRunning(pid_t pid_r)
-{
- // it is another program, not me, see if it is still running
- Pathname procdir( Pathname("/proc") / str::numstring(pid_r) );
-
- PathInfo status( procdir/"status" );
- XXX << "Checking " << status << endl;
- bool still_running = status.isExist();
-
- if ( still_running )
- {
- Pathname p( procdir/"exe" );
- XXX << p << " -> " << filesystem::readlink( p ) << endl;
-
- p = procdir/"cmdline";
- XXX << p << ": ";
- std::ifstream infile( p.c_str() );
- for( iostr::EachLine in( infile ); in; in.next() )
- {
- XXX << *in << endl;
- }
- }
-
- return still_running;
-}
-
-
-}
-}
-
-
+++ /dev/null
-
-#ifndef ZYPP_BASE_INTER_PROCESS_MUTEX_H
-#define ZYPP_BASE_INTER_PROCESS_MUTEX_H
-
-#include <string>
-#include "zypp/base/Fd.h"
-#include "zypp/base/Exception.h"
-#include "zypp/base/NonCopyable.h"
-#include "zypp/Pathname.h"
-
-namespace zypp
-{
-namespace base
-{
-
-class ZYppLockedException : public Exception
-{
-public:
- ZYppLockedException( const std::string & msg_r,
- const std::string &name,
- pid_t locker_pid );
- virtual ~ZYppLockedException() throw();
- pid_t locker_pid() const { return _locker_pid; }
- std::string name() const { return _name; }
-private:
- pid_t _locker_pid;
- std::string _name;
-};
-
-/**
- *
- * Inter process scoped lock implementation
- *
- * This mutex will allow only one writer process to
- * reach a critical region protected by a mutex
- * of the same name, if there are no readers
- * at the same time.
- *
- * Multiple readers are allowed if there is no
- * currently a writer.
- *
- */
-class InterProcessMutex : private base::NonCopyable
-{
-public:
- /**
- * Processes can be of two types
- * Reader or Writer
- */
- enum ConsumerType
- {
- Reader,
- Writer
- };
-
- /**
- * options to alter the mutex behavor
- */
- class Options
- {
- public:
- /**
- * Options for a mutex of type \ref ptype
- * with a given name and timeout.
- * Default is name "zypp" and no timeout
- * (wait till resource is free)
- *
- * The mutex type, Writer or Reader must be
- * given explictly.
- *
- * The mutex will be handled using a lock file
- * located on default library path if the
- * library is running as root, and in users home
- * directory if not.
- *
- */
- Options( ConsumerType ptype,
- const std::string &pname = "zypp",
- int ptimeout = -1 );
-
- /**
- * set the path where the lockfile is
- * created.
- */
- void setPath( const Pathname &base );
-
- std::string name;
- int timeout;
- ConsumerType type;
- Pathname base;
- };
-
- /**
- * Creates a mutex with a name and a timeout.
- *
- * default timeout is -1 which means no timeout
- * at all, and the mutex will wait forever if
- * other process is accessing the critical region
- * for a mutex in with the same name.
- *
- * If the timeout is 0, then if the lock is acquired
- * an exception will be thrown inmediately.
- *
- * Otherwise, the timeout exception will come after
- * the timeout is reached.
- *
- */
- InterProcessMutex( const Options &poptions );
-
- /**
- * Destructor, gives up the lock on the named
- * resource.
- */
- ~InterProcessMutex();
-
-private:
- bool isProcessRunning(pid_t pid_r);
- Pathname lockFilePath() const;
-private:
- shared_ptr<Fd> _fd;
- Options _options;
-};
-
-
-} }
-
-
-#endif
-
// restrict following of redirections from https to https only
SET_OPTION( CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS );
#endif
+#if CURLVERSION_AT_LEAST(7,60,0) // SLE15+
+ SET_OPTION( CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS );
+#endif
if( _settings.verifyPeerEnabled() ||
_settings.verifyHostEnabled() )
+++ /dev/null
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ V /| _/ _/ |
-| / /__ | | | | | | |
-| /_____||_| |_| |_| |
-| |
-\---------------------------------------------------------------------*/
-/** \file zypp/parser/WebpinResultFileReader.cc
- *
-*/
-#include <iostream>
-#include "zypp/base/Logger.h"
-#include "zypp/base/String.h"
-#include "zypp/base/InputStream.h"
-#include "zypp/base/UserRequestException.h"
-
-#include "zypp/parser/xml/Reader.h"
-#include "zypp/parser/ws/WebpinResultFileReader.h"
-#include "zypp/ws/WebpinResult.h"
-
-using std::endl;
-using namespace zypp::xml;
-using namespace zypp::ws;
-
-namespace zypp
-{
-namespace parser
-{
-namespace ws
-{
-
-class WebpinResultFileReader::Impl
-{
-public:
- Impl( const Pathname &result_file,
- const ProcessWebpinResult &callback );
-
- /**
- * Callback provided to the XML parser.
- */
- bool consumeNode( Reader & reader_r );
-private:
- shared_ptr<WebpinResult> _result;
- ProcessWebpinResult _callback;
-};
-
-bool WebpinResultFileReader::Impl::consumeNode(Reader & reader_r)
-{
- if ( reader_r->nodeType() == XML_READER_TYPE_ELEMENT )
- {
- // xpath: /packages
- if ( reader_r->name() == "packages" )
- {
- return true;
- }
-
- // xpath: /packages/package (+)
- if ( reader_r->name() == "package" )
- { _result.reset( new WebpinResult() ); }
-
- // xpath: /packages/name
- if ( reader_r->name() == "name" )
- { _result->setName(reader_r.nodeText().asString());}
-
- // xpath: /packages/version
- if ( reader_r->name() == "version" )
- { _result->setEdition(Edition(reader_r.nodeText().asString())); }
-
- // xpath: /packages/summary
- if ( reader_r->name() == "summary" )
- { _result->setSummary(reader_r.nodeText().asString()); }
-
- // xpath: /packages/repoURL
- if ( reader_r->name() == "repoURL" )
- { _result->setRepositoryUrl(Url(reader_r.nodeText().asString())); }
-
- // xpath: /packages/checksum
- if ( reader_r->name() == "checksum" )
- { _result->setChecksum(CheckSum::sha1(reader_r.nodeText().asString())); }
- // xpath: /packages/distro
- if ( reader_r->name() == "distro" )
- { _result->setDistribution(reader_r.nodeText().asString());}
-
- return true;
- }
- else if ( reader_r->nodeType() == XML_READER_TYPE_END_ELEMENT )
- {
- // xpath: /packages/package (+)
- if ( reader_r->name() == "package" )
- {
- _callback(*_result);
- }
- }
-
- return true;
-}
-
-
-WebpinResultFileReader::Impl::Impl( const Pathname &result_file,
- const ProcessWebpinResult &callback )
- : _callback(callback)
-{
- Reader reader( result_file );
- MIL << "Reading " << result_file << endl;
- reader.foreachNode( bind( &WebpinResultFileReader::Impl::consumeNode, this, _1 ) );
-}
-
-
-WebpinResultFileReader::WebpinResultFileReader( const Pathname & result_file,
- const ProcessWebpinResult & callback )
- : _pimpl(new WebpinResultFileReader::Impl(result_file, callback))
-{
-}
-
-WebpinResultFileReader::~WebpinResultFileReader()
-{}
-
-std::ostream & operator<<( std::ostream & str, const WebpinResultFileReader & obj )
-{
- return str;
-}
-
-
-} // namespace ws
-} // namespace parser
-} // namespace zypp
-
+++ /dev/null
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ V /| _/ _/ |
-| / /__ | | | | | | |
-| /_____||_| |_| |_| |
-| |
-\---------------------------------------------------------------------*/
-/** \file zypp/parser/WebpinResultFileReader.h
- *
-*/
-#ifndef ZYPP_PARSER_WEBPINRESULTFILEREADER_H
-#define ZYPP_PARSER_WEBPINRESULTFILEREADER_H
-
-#include <iosfwd>
-
-#include "zypp/base/PtrTypes.h"
-#include "zypp/ProgressData.h"
-#include "zypp/Pathname.h"
-#include "zypp/ws/WebpinResult.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
- namespace parser
- { /////////////////////////////////////////////////////////////////
-
- namespace ws
- {
-
- /**
- * \short Read packages and repository search result data from
- * from webpin web search results.
- *
- * For each result, a \ref WebpinResult is prepared and \ref _callback
- * is called with the object passed in.
- *
- * The \ref _callback is provided on construction.
- *
- * \code
- * WebpinResultFileReader reader(repo_file,
- * bind( &SomeClass::callbackfunc, &SomeClassInstance, _1, _2 ) );
- * \endcode
- */
- class WebpinResultFileReader
- {
- friend std::ostream & operator<<( std::ostream & str, const WebpinResultFileReader & obj );
- public:
-
- /**
- * Callback definition.
- * First parameter is a \ref WebpinResult object.
- *
- * Return false from the callback to get a \ref AbortRequestException
- * to be thrown and the processing to be cancelled.
- */
- typedef function< bool( const zypp::ws::WebpinResult & )> ProcessWebpinResult;
-
- public:
- /**
- * \short Constructor. Creates the reader and start reading.
- *
- * \param result_file Valid result XML file from Webpin
- * \param callback Callback that will be called for each repository.
- * \param progress Optional progress function. \see ProgressData
- *
- * \throws AbortRequestException If the callback returns false
- * \throws Exception If a error occurs at reading / parsing
- *
- */
- WebpinResultFileReader( const Pathname &result_file,
- const ProcessWebpinResult & callback/*,
- const ProgressData::ReceiverFnc &progress = ProgressData::ReceiverFnc()*/);
-
- /**
- * Dtor
- */
- ~WebpinResultFileReader();
- private:
- class Impl;
- RW_pointer<Impl,rw_pointer::Scoped<Impl> > _pimpl;
- };
- ///////////////////////////////////////////////////////////////////
-
- /** \relates WebpinResultFileReader Stream output */
- std::ostream & operator<<( std::ostream & str, const WebpinResultFileReader & obj );
-
- } //namespace ws
- /////////////////////////////////////////////////////////////////
- } // namespace parser
- ///////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_PARSER_WEBPINRESULTFILEREADER_H
}
MIL << "EXECUTE posttrans: " << script << endl;
- ExternalProgram prog( (noRootScriptDir/script).asString(), ExternalProgram::Stderr_To_Stdout, false, -1, true, _root );
+ ExternalProgram prog( (noRootScriptDir/script).asString() + " 0", ExternalProgram::Stderr_To_Stdout, false, -1, true, _root );
str::Str collect;
for( std::string line = prog.receiveLine(); ! line.empty(); line = prog.receiveLine() )
+++ /dev/null
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ V /| _/ _/ |
-| / /__ | | | | | | |
-| /_____||_| |_| |_| |
-| |
-\---------------------------------------------------------------------*/
-/** \file zypp/WebpinResult.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Logger.h"
-#include "zypp/ws/WebpinResult.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace ws
-{
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : WebpinResult::Impl
- //
- /** WebpinResult implementation. */
- struct WebpinResult::Impl
- {
- Impl()
- : priority(0)
- {}
-
- ~Impl()
- {
- //MIL << std::endl;
- }
- public:
- std::string name;
- Edition edition;
- CheckSum checksum;
- Url repourl;
- string summary;
- string distro;
- int priority;
-
- private:
- friend Impl * rwcowClone<Impl>( const Impl * rhs );
- /** clone for RWCOW_pointer */
- Impl * clone() const
- { return new Impl( *this ); }
- };
-
- /** \relates WebpinResult::Impl Stream output */
- inline std::ostream & operator<<( std::ostream & str, const WebpinResult::Impl & obj )
- {
- return str << "WebpinResult::Impl";
- }
-
- WebpinResult::WebpinResult()
- : _pimpl( new Impl() )
- {}
-
- WebpinResult::~WebpinResult()
- {
- //MIL << std::endl;
- }
-
- WebpinResult & WebpinResult::setName( const std::string &name )
- {
- _pimpl->name = name;
- return *this;
- }
-
- std::string WebpinResult::name() const
- {
- return _pimpl->name;
- }
-
-
- zypp::Url WebpinResult::repositoryUrl() const
- {
- return _pimpl->repourl;
- }
-
- WebpinResult & WebpinResult::setRepositoryUrl( const zypp::Url &url )
- {
- _pimpl->repourl = url;
- return *this;
- }
-
- WebpinResult & WebpinResult::setDistribution( const std::string &distro )
- {
- _pimpl->distro = distro;
- return *this;
- }
-
- std::string WebpinResult::distribution() const
- {
- return _pimpl->distro;
- }
-
- WebpinResult & WebpinResult::setSummary( const std::string &summary )
- {
- _pimpl->summary = summary;
- return *this;
- }
-
- std::string WebpinResult::summary() const
- {
- return _pimpl->summary;
- }
-
- WebpinResult & WebpinResult::setPriority( int priority )
- {
- _pimpl->priority = priority;
- return *this;
- }
-
- int WebpinResult::priority() const
- {
- return _pimpl->priority;
- }
-
-
- WebpinResult & WebpinResult::setEdition( const Edition &edition )
- {
- _pimpl->edition = edition;
- return *this;
- }
-
- Edition WebpinResult::edition() const
- {
- return _pimpl->edition;
- }
-
- WebpinResult & WebpinResult::setChecksum( const CheckSum &checksum )
- {
- _pimpl->checksum = checksum;
- return *this;
- }
-
- CheckSum WebpinResult::checksum() const
- {
- return _pimpl->checksum;
- }
-
-
- std::ostream & WebpinResult::dumpOn( std::ostream & str ) const
- {
- str << "- name : " << name() << std::endl;
- return str;
- }
-
- std::ostream & operator<<( std::ostream & str, const WebpinResult & obj )
- {
- return obj.dumpOn(str);
- }
-
-} // namespace ws
-
- /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
+++ /dev/null
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ V /| _/ _/ |
-| / /__ | | | | | | |
-| /_____||_| |_| |_| |
-| |
-\---------------------------------------------------------------------*/
-/** \file zypp/WebpinResult.h
- *
-*/
-#ifndef ZYPP_WEBPINRESULT_H
-#define ZYPP_WEBPINRESULT_H
-
-#include <iosfwd>
-#include <list>
-#include <set>
-#include "zypp/base/PtrTypes.h"
-#include "zypp/base/Iterator.h"
-#include "zypp/APIConfig.h"
-
-#include "zypp/CheckSum.h"
-#include "zypp/Edition.h"
-#include "zypp/Pathname.h"
-#include "zypp/Url.h"
-#include "zypp/repo/RepoType.h"
-#include "zypp/repo/RepoVariables.h"
-
-namespace zypp
-{
-namespace ws
-{
- /**
- * \short Represents a result from
- * http://api.opensuse-community.org/searchservice/Search
- * web service
- *
- */
- class WebpinResult
- {
- friend std::ostream & operator<<( std::ostream & str, const WebpinResult & obj );
-
- public:
- WebpinResult();
- ~WebpinResult();
-
- /**
- * package name
- */
- std::string name() const;
-
- /**
- * set the package name \see name
- * \param name
- */
- WebpinResult & setName( const std::string &name );
-
- /**
- * package edition
- */
- zypp::Edition edition() const;
-
- /**
- * set the package edition \see edition
- * \param edition
- */
- WebpinResult & setEdition( const zypp::Edition &name );
-
- /**
- * repository's url
- * The url of the repository where this package
- * is located
- */
- zypp::Url repositoryUrl() const;
-
- /**
- * set the repository url where this package comes from
- * \see repositoryUrl
- * \param url
- */
- WebpinResult & setRepositoryUrl( const zypp::Url &url );
-
- /**
- * package priority
- */
- int priority() const;
-
- /**
- * set the package priority \see priority
- * \param priority
- */
- WebpinResult & setPriority( int priority );
-
-
- /**
- * package summary
- */
- std::string summary() const;
-
- /**
- * set the package summary \see summary
- * \param summary
- */
- WebpinResult & setSummary( const std::string &summary );
-
- /**
- * package distribution
- * Example: openSUSE 10.3
- */
- std::string distribution() const;
-
- /**
- * set the package distribution \see distribution
- * \param distribution
- */
- WebpinResult & setDistribution( const std::string &distribution );
-
- /**
- * package checksum
- * Example: a md5sum or sha1sum
- */
- zypp::CheckSum checksum() const;
-
- /**
- * set the package checksum \see checksum
- * \param checksum
- */
- WebpinResult & setChecksum( const zypp::CheckSum &checksum );
-
-
- std::ostream & dumpOn( std::ostream & str ) const;
-
- class Impl;
- private:
- /** Pointer to implementation */
- RWCOW_pointer<Impl> _pimpl;
- };
- ///////////////////////////////////////////////////////////////////
-
- /** \relates RepoInfo Stream output */
- std::ostream & operator<<( std::ostream & str, const WebpinResult & obj );
-
-} // namespace ws
-} // namespace zypp
-
-
-#endif // ZYPP_WEBPINRESULT_H