Imported Upstream version 17.2.2 upstream/17.2.2
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:15:17 +0000 (16:15 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:15:17 +0000 (16:15 +0900)
.travis.yml
VERSION.cmake
doc/CMakeLists.txt
libzypp.spec.cmake
package/libzypp.changes
po/gl.po
po/nn.po
po/sv.po
zypp/RepoManager.cc
zypp/base/String.h
zypp/sat/FileConflicts.cc

index 9757e35..ff38f54 100644 (file)
@@ -13,7 +13,7 @@ before_install:
 - docker run -i -d --name test opensuse:tumbleweed bash
 - docker exec test zypper ref
 - docker exec test zypper in -y --recommends cmake openssl-devel boost-devel dejagnu doxygen gcc-c++ gettext-devel graphviz libxml2-devel libproxy-devel pkg-config libsolv-devel libsolv-tools ruby rpm-devel libcurl-devel libboost_program_options*-devel libboost_test*-devel libudev-devel xorg-x11-fonts-core xorg-x11-fonts texlive-lm-fonts libgpgme-devel gpgme libboost_thread1_*
-- docker exec test zypper in -y --no-recommends asciidoc
+- docker exec test zypper in -y "rubygem(asciidoctor)"
 
 script:
 - docker cp ../libzypp/ test:/root
index 29509be..00e3b4e 100644 (file)
@@ -61,8 +61,8 @@
 SET(LIBZYPP_MAJOR "17")
 SET(LIBZYPP_COMPATMINOR "2")
 SET(LIBZYPP_MINOR "2")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_PATCH "2")
 #
-# LAST RELEASED: 17.2.1 (2)
+# LAST RELEASED: 17.2.2 (2)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index edf42c3..41d2342 100644 (file)
@@ -5,11 +5,20 @@ ELSE ( ENABLE_BUILD_DOCS )
 ENDIF ( ENABLE_BUILD_DOCS )
 
 FIND_PROGRAM(A2X a2x)
-IF (NOT A2X)
-MESSAGE(FATAL_ERROR "Could not find a2x, please install asciidoc")
-ELSE (NOT A2X)
+IF (A2X)
 MESSAGE("a2x found: ${A2X}")
-ENDIF (NOT A2X)
+SET(ASCDOC_CMD ${A2X} -D ${CMAKE_CURRENT_BINARY_DIR} -f manpage)
+ENDIF (A2X)
+
+FIND_PROGRAM(ASCIIDOC asciidoctor)
+IF (ASCIIDOC)
+MESSAGE("asciidoctor found: ${ASCIIDOC}")
+SET(ASCDOC_CMD ${ASCIIDOC} -D ${CMAKE_CURRENT_BINARY_DIR} -b manpage -d manpage)
+ENDIF (ASCIIDOC)
+
+IF (NOT ASCDOC_CMD)
+MESSAGE(FATAL_ERROR "Could not find a2x or asciidoctor, please install either one of them.")
+ENDIF()
 
 function(ADD_A2X_MANPAGES)
     set(options)
@@ -27,7 +36,7 @@ function(ADD_A2X_MANPAGES)
         FOREACH (curr_PAGE ${A2X_MAN_PAGES${MAN_IDX}})
             ADD_CUSTOM_COMMAND (
               OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${curr_PAGE}
-              COMMAND ${A2X} -D ${CMAKE_CURRENT_BINARY_DIR} -f manpage ${CMAKE_CURRENT_SOURCE_DIR}/${curr_PAGE}.txt
+              COMMAND ${ASCDOC_CMD} ${CMAKE_CURRENT_SOURCE_DIR}/${curr_PAGE}.txt
               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${curr_PAGE}.txt
               WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
               COMMENT "Building manpage ${curr_PAGE}"
index ca097ed..c97c532 100644 (file)
@@ -126,8 +126,12 @@ Requires:       libcurl   >= %{min_curl_version}
 %endif
 
 # required for documentation
+%if 0%{?suse_version} >= 1330
+BuildRequires:  rubygem(asciidoctor)
+%else
 BuildRequires:  asciidoc
 BuildRequires:  libxslt-tools
+%endif
 
 %description
 Package, Patch, Pattern, and Product Management
index 4da53c7..1ddb5f1 100644 (file)
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Tue Mar 13 18:03:42 CET 2018 - ma@suse.de
+
+- Protect code against broken translations (bsc#1082711)
+- Fix broken translated format strings
+- Deprecate the use of asciidoc for new releases
+- version 17.2.2 (2)
+
+-------------------------------------------------------------------
 Wed Mar  7 11:22:02 CET 2018 - ma@suse.de
 
 - PoolQuery::addDependency add overload to define an individual
index 20fde02..681ca20 100644 (file)
--- a/po/gl.po
+++ b/po/gl.po
@@ -15,21 +15,21 @@ 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-11-05 10:46+0000\n"
+"PO-Revision-Date: 2018-03-08 22:02+0000\n"
 "Last-Translator: Manuel Vazquez <xixirei@yahoo.es>\n"
-"Language-Team: Galician <https://l10n.opensuse.org/projects/libzypp/master/"
-"gl/>\n"
+"Language-Team: Galician "
+"<https://l10n.opensuse.org/projects/libzypp/master/gl/>\n"
 "Language: gl\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.18\n"
 
 #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
 #: zypp/target/hal/HalException.h:64
 msgid "Hal Exception"
-msgstr "Excepción de Hal"
+msgstr "Excepción de hal"
 
 #. dubious: Throw on malformed known types, otherwise log a warning.
 #: zypp/CheckSum.cc:136
@@ -246,14 +246,14 @@ msgstr "Botswana"
 #. :BWA:072:
 #: zypp/CountryCode.cc:192
 msgid "Belarus"
-msgstr "Bielorrusia"
+msgstr "República de Belarús"
 
 # BZ
 # fuzzy
 #. :BLR:112:
 #: zypp/CountryCode.cc:193
 msgid "Belize"
-msgstr "Bélxica"
+msgstr "Belize"
 
 # CA
 #. :BLZ:084:
@@ -1501,12 +1501,12 @@ msgstr "Non se pode facer chroot a '%s' (%s)."
 #: zypp/ExternalProgram.cc:363
 #, c-format, boost-format
 msgid "Can't chdir to '%s' inside chroot '%s' (%s)."
-msgstr ""
+msgstr "Non foi posíbel executar chdir '%s' dentro de '%s' (%s)."
 
 #: zypp/ExternalProgram.cc:364
 #, c-format, boost-format
 msgid "Can't chdir to '%s' (%s)."
-msgstr ""
+msgstr "Non foi posíbel executar '%s' (%s)."
 
 #. don't want to get here
 #: zypp/ExternalProgram.cc:376
@@ -1537,12 +1537,11 @@ msgstr "A orde rematou cun erro descoñecido."
 #: zypp/KeyRing.cc:561
 #, c-format, boost-format
 msgid "Tried to import not existent key %s into keyring %s"
-msgstr ""
+msgstr "Tentouse importar unha chave que non existe %s para o chaveiro %s"
 
 #: zypp/KeyRing.cc:583
-#, fuzzy
 msgid "Failed to import key."
-msgstr "Erro ao importar a chave pública %1%"
+msgstr "Erro ao importar a chave."
 
 #: zypp/KeyRing.cc:606
 msgid "Failed to delete key."
@@ -1567,7 +1566,7 @@ msgstr "Afar"
 #. language code: abk ab
 #: zypp/LanguageCode.cc:163
 msgid "Abkhazian"
-msgstr "Abxasio "
+msgstr "Abxasio"
 
 #. language code: ace
 #: zypp/LanguageCode.cc:165
@@ -1612,7 +1611,7 @@ msgstr "Ainu"
 #. language code: aka ak
 #: zypp/LanguageCode.cc:181
 msgid "Akan"
-msgstr "Akan "
+msgstr "Akan"
 
 #. language code: akk
 #: zypp/LanguageCode.cc:183
@@ -1702,7 +1701,7 @@ msgstr "Arawak"
 #. language code: asm as
 #: zypp/LanguageCode.cc:219
 msgid "Assamese"
-msgstr "Asamés "
+msgstr "Asamés"
 
 # AT
 #. language code: ast
@@ -1730,7 +1729,7 @@ msgstr "Avaric"
 #. language code: ave ae
 #: zypp/LanguageCode.cc:229
 msgid "Avestan"
-msgstr "Avestan "
+msgstr "Avestan"
 
 #. language code: awa
 #: zypp/LanguageCode.cc:231
@@ -1764,7 +1763,7 @@ msgstr "Linguas Bamileke"
 #. language code: bak ba
 #: zypp/LanguageCode.cc:241
 msgid "Bashkir"
-msgstr "Bashkirés "
+msgstr "Bashkirés"
 
 #. language code: bal
 #: zypp/LanguageCode.cc:243
@@ -1776,12 +1775,12 @@ msgstr "Baluchi"
 #. language code: bam bm
 #: zypp/LanguageCode.cc:245
 msgid "Bambara"
-msgstr "Bambara "
+msgstr "Bambara"
 
 #. language code: ban
 #: zypp/LanguageCode.cc:247
 msgid "Balinese"
-msgstr "Balinés "
+msgstr "Balinés"
 
 #. language code: baq eus eu
 #: zypp/LanguageCode.cc:249 zypp/LanguageCode.cc:251
@@ -1801,7 +1800,7 @@ msgstr "Bálticas (Outras)"
 #. language code: bej
 #: zypp/LanguageCode.cc:257
 msgid "Beja"
-msgstr "Beja "
+msgstr "Beja"
 
 # BY
 #. language code: bel be
@@ -1829,14 +1828,14 @@ msgstr "Bereber (Outras )"
 #. language code: bho
 #: zypp/LanguageCode.cc:267
 msgid "Bhojpuri"
-msgstr "Bhojpuri "
+msgstr "Bhojpuri"
 
 # BH
 # fuzzy
 #. language code: bih bh
 #: zypp/LanguageCode.cc:269
 msgid "Bihari"
-msgstr "Biharí "
+msgstr "Bihari"
 
 #. language code: bik
 #: zypp/LanguageCode.cc:271
@@ -1851,7 +1850,7 @@ msgstr "Bini"
 #. language code: bis bi
 #: zypp/LanguageCode.cc:275
 msgid "Bislama"
-msgstr "Bislama "
+msgstr "Bislama"
 
 #. language code: bla
 #: zypp/LanguageCode.cc:277
@@ -4066,21 +4065,20 @@ msgstr "Realizaranse as seguintes accións:"
 
 #. translators: an annotation to a gpg keys expiry date
 #: zypp/PublicKey.cc:60
-#, fuzzy
 msgid "does not expire"
-msgstr "(non caduca)"
+msgstr "non caduca"
 
 #. translators: an annotation to a gpg keys expiry date: "expired: 1999-04-12"
 #: zypp/PublicKey.cc:65
 #, boost-format
 msgid "expired: %1%"
-msgstr ""
+msgstr "caducado: %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 "caduca: %1%"
 
 #. translators: an annotation to a gpg keys expiry date
 #: zypp/PublicKey.cc:79
@@ -4099,28 +4097,28 @@ msgstr "(caduca dentro de 24h)"
 
 #. translators: an annotation to a gpg keys expiry date
 #: zypp/PublicKey.cc:96
-#, fuzzy, c-format, boost-format
+#, boost-format, c-format
 msgid "(expires in %d day)"
 msgid_plural "(expires in %d days)"
-msgstr[0] "(caduca dentro de 24h)"
-msgstr[1] "(caduca dentro de 24h)"
+msgstr[0] "(caduca dentro de %d día)"
+msgstr[1] "(caduca dentro de %d días)"
 
 #: zypp/RepoManager.cc:312
 #, boost-format
 msgid "Cannot read repo directory '%1%': Permission denied"
-msgstr ""
+msgstr "Non foi posíbel ler o directorio do repositorio %1%: permiso denegado"
 
 #. TranslatorExplanation '%s' is a pathname
 #: zypp/RepoManager.cc:320 zypp/RepoManager.cc:789 zypp/RepoManager.cc:1541
 #: zypp/repo/PluginServices.cc:49
 #, c-format, boost-format
 msgid "Failed to read directory '%s'"
-msgstr "Erro ao ler o directorio '%s'."
+msgstr "Erro ao ler o directorio '%s'"
 
 #: zypp/RepoManager.cc:330
 #, boost-format
 msgid "Cannot read repo file '%1%': Permission denied"
-msgstr ""
+msgstr "Non foi posíbel ler o ficheiro de repositorio '%1%': permiso denegado"
 
 #: zypp/RepoManager.cc:353
 msgid "Repository alias cannot start with dot."
@@ -4356,7 +4354,7 @@ msgstr "Modo de coincidencias '%s' descoñecido "
 #: zypp/base/StrMatcher.cc:153
 #, c-format, boost-format
 msgid "Unknown match mode '%s' for pattern '%s'"
-msgstr "Modo de coincidencias '%s' descoñecido para o patrón '%s'."
+msgstr "Modo de coincidencias '%s' descoñecido para o patrón '%s'"
 
 #: zypp/base/StrMatcher.cc:157
 #, c-format, boost-format
@@ -4547,7 +4545,7 @@ msgstr "Falta o atributo requirido '%s'."
 #: zypp/parser/RepoindexFileReader.cc:209
 #, c-format, boost-format
 msgid "One or both of '%s' or '%s' attributes is required."
-msgstr "Necesítanse un ou ambos os dous atributos '%s' ou '%s'"
+msgstr "Necesítanse un ou ambos os dous atributos '%s' ou '%s'."
 
 #: zypp/repo/PackageProvider.cc:216
 msgid "Signature verification failed"
index 1c2fbfa..bbd8c00 100644 (file)
--- a/po/nn.po
+++ b/po/nn.po
@@ -7,20 +7,21 @@ msgstr ""
 "Project-Id-Version: @PACKAGE@\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-12-01 07:26+0100\n"
-"PO-Revision-Date: 2017-07-04 15:11+0100\n"
+"PO-Revision-Date: 2018-03-09 22:04+0000\n"
 "Last-Translator: Karl Ove Hufthammer <karl@huftis.org>\n"
-"Language-Team: NorwegianNynorsk <i18n-nn@lister.ping.uio.no>\n"
+"Language-Team: Norwegian Nynorsk "
+"<https://l10n.opensuse.org/projects/libzypp/master/nn/>\n"
 "Language: nn\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: Lokalize 2.0\n"
+"X-Generator: Weblate 2.18\n"
 
 #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
 #: zypp/target/hal/HalException.h:64
 msgid "Hal Exception"
-msgstr ""
+msgstr "Hal-unntak"
 
 #. dubious: Throw on malformed known types, otherwise log a warning.
 #: zypp/CheckSum.cc:136
@@ -36,7 +37,7 @@ msgstr "Ukjent land: "
 #. Defined LanguageCode constants
 #: zypp/CountryCode.cc:149 zypp/LanguageCode.cc:148
 msgid "No Code"
-msgstr ""
+msgstr "Ingen kode"
 
 #: zypp/CountryCode.cc:158
 msgid "Andorra"
index a8dce7b..9700088 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -14,16 +14,16 @@ msgstr ""
 "Project-Id-Version: zypp.sv\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-12-01 07:26+0100\n"
-"PO-Revision-Date: 2017-04-19 16:18+0000\n"
-"Last-Translator: Mattias Börjesson <mattias@wallacesolutions.net>\n"
-"Language-Team: Swedish <https://l10n.opensuse.org/projects/libzypp/master/sv/"
-">\n"
+"PO-Revision-Date: 2018-03-07 12:07+0000\n"
+"Last-Translator: Martin Devenney <devenneymartin@gmail.com>\n"
+"Language-Team: Swedish "
+"<https://l10n.opensuse.org/projects/libzypp/master/sv/>\n"
 "Language: sv\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.6\n"
+"X-Generator: Weblate 2.18\n"
 
 #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55
 #: zypp/target/hal/HalException.h:64
@@ -1467,9 +1467,8 @@ msgid "Tried to import not existent key %s into keyring %s"
 msgstr "Försökte importera icke existerande nyckel %s till nyckelringen %s"
 
 #: zypp/KeyRing.cc:583
-#, fuzzy
 msgid "Failed to import key."
-msgstr "Det gick inte att importera den offentliga nyckeln %1%"
+msgstr "Det gick inte att importera nyckeln."
 
 #: zypp/KeyRing.cc:606
 msgid "Failed to delete key."
@@ -3903,21 +3902,20 @@ msgstr "Följande åtgärder kommer att vidtas:"
 
 #. translators: an annotation to a gpg keys expiry date
 #: zypp/PublicKey.cc:60
-#, fuzzy
 msgid "does not expire"
-msgstr "(går inte ut)"
+msgstr "går inte ut"
 
 #. translators: an annotation to a gpg keys expiry date: "expired: 1999-04-12"
 #: zypp/PublicKey.cc:65
 #, boost-format
 msgid "expired: %1%"
-msgstr ""
+msgstr "gick ut: %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 "går ut: %1%"
 
 #. translators: an annotation to a gpg keys expiry date
 #: zypp/PublicKey.cc:79
@@ -4881,7 +4879,7 @@ msgstr "Det gick inte att ta bort den offentliga nyckeln %1%"
 
 #: zypp/target/rpm/RpmDb.cc:1596
 msgid "Package is not signed!"
-msgstr ""
+msgstr "Paketet är inte signerat!"
 
 #. Translator: %s = name of an rpm package. A list of diffs follows
 #. this message.
@@ -4966,7 +4964,7 @@ msgstr "Filen finns inte eller signaturen kan inte kontrolleras"
 #. translators: possible rpm package signature check result [brief]
 #: zypp/target/rpm/RpmDb.cc:2424
 msgid "File is unsigned"
-msgstr ""
+msgstr "Filen är inte signerad"
 
 #: zypp/thread/Mutex.cc:33
 msgid "Can't initialize mutex attributes"
index 50ddf46..0d48a86 100644 (file)
@@ -309,7 +309,7 @@ namespace zypp
       bool nonroot( geteuid() != 0 );
       if ( nonroot && ! PathInfo(dir).userMayRX() )
       {
-       JobReport::warning( str::FormatNAC(_("Cannot read repo directory '%1%': Permission denied")) % dir );
+       JobReport::warning( str::Format(_("Cannot read repo directory '%1%': Permission denied")) % dir );
       }
       else
       {
@@ -327,7 +327,7 @@ namespace zypp
          {
            if ( nonroot && ! PathInfo(*it).userMayR() )
            {
-             JobReport::warning( str::FormatNAC(_("Cannot read repo file '%1%': Permission denied")) % *it );
+             JobReport::warning( str::Format(_("Cannot read repo file '%1%': Permission denied")) % *it );
            }
            else
            {
@@ -868,7 +868,7 @@ namespace zypp
          // translators: Cleanup a repository previously owned by a meanwhile unknown (deleted) service.
          //   %1% = service name
          //   %2% = repository name
-         JobReport::warning( str::FormatNAC(_("Unknown service '%1%': Removing orphaned service repository '%2%'"))
+         JobReport::warning( str::Format(_("Unknown service '%1%': Removing orphaned service repository '%2%'"))
                              % repoInfo.service()
                              % repoInfo.alias() );
          try {
index 9214550..5477fca 100644 (file)
@@ -238,6 +238,9 @@ namespace zypp
     /// \brief Convenient building of std::string with \ref boost::format.
     /// Basically a \ref boost::format autoconvertible to \ref std::string
     /// for building string arguments.
+    /// \note It won't complain about malformed or incomplete format
+    /// strings. Usefull when dealing with translations or classes
+    /// providing a default formater.
     /// \code
     ///   void fnc( const std::string & txt_r );
     ///   fnc( str::Format("Hello %1%") % 13 );
@@ -247,8 +250,8 @@ namespace zypp
     ///////////////////////////////////////////////////////////////////
     struct Format
     {
-      Format() {}
-      Format( const std::string & format_r ) : _fmter( format_r ) {}
+      Format() { _fmter.exceptions( boost::io::no_error_bits ); }
+      Format( const std::string & format_r ) : Format() { _fmter.parse( format_r ); }
 
       template<class Tp>
       Format & operator%( Tp && arg )
@@ -269,26 +272,6 @@ namespace zypp
     inline std::ostream & operator<<( std::ostream & str, const Format & obj )
     { return str << obj.fmter(); }
 
-    ///////////////////////////////////////////////////////////////////
-    /// \class FormatNAC
-    /// \brief \ref Format with (N)o (A)rgument (C)heck.
-    /// It won't complain about missing or excess arguments. Sometimes
-    /// usefull when dealing with translations or classes providing a
-    /// default formater.
-    ///////////////////////////////////////////////////////////////////
-    struct FormatNAC : public Format
-    {
-      FormatNAC() { relax(); }
-      FormatNAC( const std::string & format_r ) : Format( format_r ) { relax(); }
-
-    private:
-      void relax()
-      {
-       using namespace boost::io;
-       _fmter.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
-      }
-    };
-    ///////////////////////////////////////////////////////////////////
     /** \name String representation of number.
      *
      * Optional second argument sets the minimal string width (' ' padded).
index 9ff56cc..ef138c7 100644 (file)
@@ -56,7 +56,7 @@ namespace zypp
                "  conflicts with file from install of\n"
                "     %3%" )
        }};
-       return str::FormatNAC( text[lhsSolvable().isSystem()?0:1][rhsSolvable().isSystem()?0:1] )
+       return str::Format( text[lhsSolvable().isSystem()?0:1][rhsSolvable().isSystem()?0:1] )
               % lhsFilename()
               % lhsSolvable().asUserString()
               % rhsSolvable().asUserString();
@@ -98,7 +98,7 @@ namespace zypp
                "  from install of\n"
                "     %4%" )
        }};
-       return str::FormatNAC( text[lhsSolvable().isSystem()?0:1][rhsSolvable().isSystem()?0:1] )
+       return str::Format( text[lhsSolvable().isSystem()?0:1][rhsSolvable().isSystem()?0:1] )
               % lhsFilename()
               % lhsSolvable().asUserString()
               % rhsFilename()