Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2017-07-17 09:08:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Mon Jul 17 09:08:22 2017 rev:383 rq:509809 version:16.14.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2017-07-08 12:25:49.894965719 +0200 +++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2017-07-17 09:08:24.527171922 +0200 @@ -1,0 +2,11 @@ +Wed Jul 12 17:06:14 CEST 2017 - [email protected] + +- repo refresh: Re-probe if the repository type changes (bsc#1048315) +- MediaCurl: Propagate proper error code to DownloadProgressReport + (bsc#1047785) +- Allow to trigger an appdata refresh unconditionally (bsc#1009745) +- Support custom repo variables defined in /etc/zypp/vars.d (fixes #68) +- rename: handle EXDEV error on OverlayFS +- version 16.14.0 (0) + +------------------------------------------------------------------- Old: ---- libzypp-16.13.0.tar.bz2 New: ---- libzypp-16.14.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.7QoYQl/_old 2017-07-17 09:08:25.131086866 +0200 +++ /var/tmp/diff_new_pack.7QoYQl/_new 2017-07-17 09:08:25.131086866 +0200 @@ -19,7 +19,7 @@ %define force_gcc_46 0 Name: libzypp -Version: 16.13.0 +Version: 16.14.0 Release: 0 Url: git://gitorious.org/opensuse/libzypp.git Summary: Package, Patch, Pattern, and Product Management @@ -38,7 +38,7 @@ Provides: libzypp(plugin:services) = 1 Provides: libzypp(plugin:system) = 1 Provides: libzypp(plugin:urlresolver) = 0 -Provides: libzypp(repovarexpand) = 0 +Provides: libzypp(repovarexpand) = 1 %if 0%{?suse_version} Recommends: logrotate @@ -233,6 +233,7 @@ %endif mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/services.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/systemCheck.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vars.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vendors.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/multiversion.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/credentials.d @@ -336,6 +337,7 @@ %endif %dir %{_sysconfdir}/zypp/services.d %dir %{_sysconfdir}/zypp/systemCheck.d +%dir %{_sysconfdir}/zypp/vars.d %dir %{_sysconfdir}/zypp/vendors.d %dir %{_sysconfdir}/zypp/multiversion.d %dir %{_sysconfdir}/zypp/credentials.d ++++++ libzypp-16.13.0.tar.bz2 -> libzypp-16.14.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/VERSION.cmake new/libzypp-16.14.0/VERSION.cmake --- old/libzypp-16.13.0/VERSION.cmake 2017-06-30 14:42:36.000000000 +0200 +++ new/libzypp-16.14.0/VERSION.cmake 2017-07-12 17:11:07.000000000 +0200 @@ -60,9 +60,9 @@ # SET(LIBZYPP_MAJOR "16") SET(LIBZYPP_COMPATMINOR "0") -SET(LIBZYPP_MINOR "13") +SET(LIBZYPP_MINOR "14") SET(LIBZYPP_PATCH "0") # -# LAST RELEASED: 16.13.0 (0) +# LAST RELEASED: 16.14.0 (0) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/doc/autoinclude/EnvironmentVariables.doc new/libzypp-16.14.0/doc/autoinclude/EnvironmentVariables.doc --- old/libzypp-16.13.0/doc/autoinclude/EnvironmentVariables.doc 2017-03-08 12:51:07.000000000 +0100 +++ new/libzypp-16.14.0/doc/autoinclude/EnvironmentVariables.doc 2017-07-07 10:31:06.000000000 +0200 @@ -38,10 +38,12 @@ \subsection zypp-envars-plugin Variables related to plugins -\li \c PLUGIN_DEBUG=1 Verbose logging from plugin framework. -\li \c PLUGIN_TIMEOUT=<sec> Send/receive timeout for plugin communication. -\li \c PLUGIN_SEND_TIMEOUT=<sec> Send timeout for plugin communication. -\li \c PLUGIN_RECEIVE_TIMEOUT=<sec> Receive timeout for plugin communication. +\li \c ZYPP_PLUGIN_DEBUG=1 Verbose logging from plugin framework. +\li \c ZYPP_PLUGIN_TIMEOUT=<sec> Send/receive timeout for plugin communication. +\li \c ZYPP_PLUGIN_SEND_TIMEOUT=<sec> Send timeout for plugin communication. +\li \c ZYPP_PLUGIN_RECEIVE_TIMEOUT=<sec> Receive timeout for plugin communication. + +\li \c ZYPP_PLUGIN_APPDATA_FORCE_COLLECT=1 Make RepoManager trigger the appdata collector plugin unconditionally. Can be used with \c 'zypper \c lr' (as root) to trigger an initial collect rather than calling \c 'zypper \c ref \c -f' or waiting for some repo to be refreshed. \subsection zypp-envars-misc Variables not for common use (test and debug) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/doc/autoinclude/FeatureTest.doc new/libzypp-16.14.0/doc/autoinclude/FeatureTest.doc --- old/libzypp-16.13.0/doc/autoinclude/FeatureTest.doc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/doc/autoinclude/FeatureTest.doc 2017-07-06 15:41:07.000000000 +0200 @@ -66,6 +66,8 @@ <DT>\ref zypp-repovars </DT> <DT>version 0</DT> <DD>Also support braced variables, shell like default and alternate values.</DD> + <DT>version 1</DT> + <DD>Also support user defined repo variables in /etc/zypp/vars.d.</DD> </DL></DD> </DL> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/doc/autoinclude/RepoVariables.doc new/libzypp-16.14.0/doc/autoinclude/RepoVariables.doc --- old/libzypp-16.13.0/doc/autoinclude/RepoVariables.doc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/doc/autoinclude/RepoVariables.doc 2017-07-06 16:11:07.000000000 +0200 @@ -8,7 +8,7 @@ Within a \c .repo or \c .serivce file, the name and URLs are subject to variable substitution. -Variables are e.g. usefull for related repositories like packman (<tt>http://ftp.gwdg.de/pub/linux/packman/suse/$releasever<\tt>), which shall always fit the installed distribution, even after a distribution upgrade. To help performing a distribution upgrade, the value of \c $releasever can be overwritten in zypper using the \c --releasever global option. This way you can easily switch all repositories using \c $releasever to the new version (provided the server layouts did not change and new repos are already available). +Variables are e.g. usefull for related repositories like packman (<tt>http://ftp.gwdg.de/pub/linux/packman/suse/$releasever</tt>), which shall always fit the installed distribution, even after a distribution upgrade. To help performing a distribution upgrade, the value of \c $releasever can be overwritten in zypper using the \c --releasever global option. This way you can easily switch all repositories using \c $releasever to the new version (provided the server layouts did not change and new repos are already available). The variable expander also supports shell like definition of default and alternate values. @@ -30,4 +30,9 @@ \li \c $releasever_major - \c $releasever_major will be set to the leading portion up to (but not including) the 1st dot; \c $releasever_minor to the trailing portion after the 1st dot. If there's no dot in \c $releasever, \c $releasever_major is the same as \c $releasever and \c $releasever_minor is empty. + +\subsection zypp-repoars-userdefined User defined repository variables [requires 'libzypp(repovarexpand) >= 1'] + +A custom repository variable is defined by creating a file in \c /etc/zypp/vars.d. The variable name equals the file name. The files first line (up to but not including the newline character) defines the variables value. + */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/libzypp.spec.cmake new/libzypp-16.14.0/libzypp.spec.cmake --- old/libzypp-16.13.0/libzypp.spec.cmake 2017-06-30 14:42:36.000000000 +0200 +++ new/libzypp-16.14.0/libzypp.spec.cmake 2017-07-06 15:41:07.000000000 +0200 @@ -38,7 +38,7 @@ Provides: libzypp(plugin:services) = 1 Provides: libzypp(plugin:system) = 1 Provides: libzypp(plugin:urlresolver) = 0 -Provides: libzypp(repovarexpand) = 0 +Provides: libzypp(repovarexpand) = 1 %if 0%{?suse_version} Recommends: logrotate @@ -233,6 +233,7 @@ %endif mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/services.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/systemCheck.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vars.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vendors.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/multiversion.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/credentials.d @@ -336,6 +337,7 @@ %endif %dir %{_sysconfdir}/zypp/services.d %dir %{_sysconfdir}/zypp/systemCheck.d +%dir %{_sysconfdir}/zypp/vars.d %dir %{_sysconfdir}/zypp/vendors.d %dir %{_sysconfdir}/zypp/multiversion.d %dir %{_sysconfdir}/zypp/credentials.d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/package/libzypp.changes new/libzypp-16.14.0/package/libzypp.changes --- old/libzypp-16.13.0/package/libzypp.changes 2017-06-30 14:42:36.000000000 +0200 +++ new/libzypp-16.14.0/package/libzypp.changes 2017-07-12 17:11:07.000000000 +0200 @@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Wed Jul 12 17:06:14 CEST 2017 - [email protected] + +- repo refresh: Re-probe if the repository type changes (bsc#1048315) +- MediaCurl: Propagate proper error code to DownloadProgressReport + (bsc#1047785) +- Allow to trigger an appdata refresh unconditionally (bsc#1009745) +- Support custom repo variables defined in /etc/zypp/vars.d (fixes #68) +- rename: handle EXDEV error on OverlayFS +- version 16.14.0 (0) + +------------------------------------------------------------------- Fri Jun 30 14:25:29 CEST 2017 - [email protected] - Adapt loop mounting of iso images (bsc#1038132, bsc#1033236) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/po/es.po new/libzypp-16.14.0/po/es.po --- old/libzypp-16.13.0/po/es.po 2017-04-18 14:16:10.000000000 +0200 +++ new/libzypp-16.14.0/po/es.po 2017-07-04 12:11:07.000000000 +0200 @@ -17,8 +17,8 @@ "Project-Id-Version: zypp\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-21 15:07+0100\n" -"PO-Revision-Date: 2017-04-18 12:12+0000\n" -"Last-Translator: Juan Sarria <[email protected]>\n" +"PO-Revision-Date: 2017-07-03 14:53+0000\n" +"Last-Translator: Javier Llorente <[email protected]>\n" "Language-Team: Spanish " "<https://l10n.opensuse.org/projects/libzypp/master/es/>\n" "Language: es\n" @@ -26,7 +26,7 @@ "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.13.1\n" #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55 #: zypp/target/hal/HalException.h:64 @@ -138,7 +138,7 @@ #: zypp/target/TargetImpl.cc:459 msgid " execution skipped while aborting" -msgstr " ejecución omitida mientras se aborta" +msgstr " ejecución omitida mientras se cancela" #: zypp/target/TargetImpl.cc:514 zypp/target/TargetImpl.cc:534 #: zypp/target/TargetImpl.cc:562 zypp/target/TargetImpl.cc:599 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/po/fi.po new/libzypp-16.14.0/po/fi.po --- old/libzypp-16.13.0/po/fi.po 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/po/fi.po 2017-07-11 05:06:10.000000000 +0200 @@ -20,15 +20,16 @@ "Project-Id-Version: zypp.fi\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-21 15:07+0100\n" -"PO-Revision-Date: 2014-09-28 11:11+0300\n" -"Last-Translator: Jyri Palokangas <[email protected]>\n" -"Language-Team: American English <[email protected]>\n" -"Language: en_US\n" +"PO-Revision-Date: 2017-07-10 15:05+0000\n" +"Last-Translator: Jyri Palokangas <[email protected]>\n" +"Language-Team: Finnish " +"<https://l10n.opensuse.org/projects/libzypp/master/fi/>\n" +"Language: fi\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 1.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.13.1\n" #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55 #: zypp/target/hal/HalException.h:64 @@ -221,7 +222,7 @@ #, c-format, boost-format msgid "rpm saved %s as %s, but it was impossible to determine the difference" msgstr "" -"rpm tallensi tiedoston %s niemellä %s. Erojen selvittäminen ei onnistunut." +"rpm tallensi tiedoston %s nimellä %s. Erojen selvittäminen ei onnistunut" #. %s = filenames #: zypp/target/rpm/RpmDb.cc:2026 @@ -237,7 +238,7 @@ #: zypp/target/rpm/RpmDb.cc:2029 #, c-format, boost-format msgid "rpm created %s as %s, but it was impossible to determine the difference" -msgstr "rpm loi tiedoston %s nimellä %s. Erojen selvittäminen ei onnistunut." +msgstr "rpm loi tiedoston %s nimellä %s, erojen selvittäminen ei onnistunut" #. %s = filenames #: zypp/target/rpm/RpmDb.cc:2031 @@ -269,7 +270,7 @@ #. translators: possible rpm package signature check result [brief] #: zypp/target/rpm/RpmDb.cc:2367 msgid "Unknown type of signature" -msgstr "" +msgstr "Tuntematon allekirjoituksen tyyppi" #. translators: possible rpm package signature check result [brief] #: zypp/target/rpm/RpmDb.cc:2369 @@ -286,12 +287,12 @@ #. translators: possible rpm package signature check result [brief] #: zypp/target/rpm/RpmDb.cc:2373 msgid "Signatures public key is not available" -msgstr "" +msgstr "Allekirjoituksen julkinen avain ei ole saatavilla" #. translators: possible rpm package signature check result [brief] #: zypp/target/rpm/RpmDb.cc:2375 msgid "File does not exist or signature can't be checked" -msgstr "" +msgstr "Tiedostoa ei ole tai allekirjoitusta ei voi tarkistaa" #: zypp/ProblemSolution.cc:114 msgid "Following actions will be done:" @@ -300,7 +301,7 @@ #: zypp/RepoManager.cc:299 #, boost-format msgid "Cannot read repo directory '%1%': Permission denied" -msgstr "" +msgstr "repo hakemiston lukeminen ei onnistu '%1%': Pääsy estetty" #. TranslatorExplanation '%s' is a pathname #: zypp/RepoManager.cc:307 zypp/RepoManager.cc:769 zypp/RepoManager.cc:1528 @@ -312,7 +313,7 @@ #: zypp/RepoManager.cc:317 #, boost-format msgid "Cannot read repo file '%1%': Permission denied" -msgstr "" +msgstr "repo-tiedostoa '%1%' ei voitu lukea: Pääsy estetty" #: zypp/RepoManager.cc:340 msgid "Repository alias cannot start with dot." @@ -651,7 +652,7 @@ #: zypp/VendorSupportOptions.cc:56 msgid "Unknown support option. Description not available" -msgstr "Tuntematon tukivaihtoehto. Kuvausta ei ole saatavilla." +msgstr "Tuntematon tukivaihtoehto. Kuvausta ei ole saatavilla" #: zypp/CountryCode.cc:50 msgid "Unknown country: " @@ -2106,7 +2107,7 @@ #. language code: apa #: zypp/LanguageCode.cc:199 msgid "Apache Languages" -msgstr "apaššikielet " +msgstr "apaššikielet" #. language code: ara ar #: zypp/LanguageCode.cc:201 @@ -4610,7 +4611,7 @@ #: zypp/solver/detail/SATResolver.cc:1141 #, c-format, boost-format msgid "remove lock to allow removal of %s" -msgstr "" +msgstr "poista lukitus salliaksesi %s poiston" #: zypp/solver/detail/SATResolver.cc:1146 #: zypp/solver/detail/SATResolver.cc:1182 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/po/gl.po new/libzypp-16.14.0/po/gl.po --- old/libzypp-16.13.0/po/gl.po 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/po/gl.po 2017-07-04 01:06:06.000000000 +0200 @@ -15,15 +15,16 @@ "Project-Id-Version: YaST (@memory@)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-21 15:07+0100\n" -"PO-Revision-Date: 2013-03-17 12:01+0100\n" -"Last-Translator: Manuel A. Vazquez <xixireiATyahooDOTes>\n" -"Language-Team: Galician <[email protected]>\n" +"PO-Revision-Date: 2017-07-01 14:53+0000\n" +"Last-Translator: Manuel Vazquez <[email protected]>\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: Lokalize 1.4\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 2.13.1\n" #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55 #: zypp/target/hal/HalException.h:64 @@ -61,7 +62,7 @@ #: zypp/thread/Mutex.cc:47 msgid "Can't initialize recursive mutex" -msgstr "Non é posible iniciar mutex recursivo" +msgstr "Non é posíbel inicializar mutex recursivo" #: zypp/thread/Mutex.cc:77 msgid "Can't acquire the mutex lock" @@ -77,7 +78,7 @@ #: zypp/Dep.cc:97 msgid "Prerequires" -msgstr "" +msgstr "Requisitos previos" #: zypp/Dep.cc:98 msgid "Requires" @@ -257,12 +258,12 @@ #. translators: possible rpm package signature check result [brief] #: zypp/target/rpm/RpmDb.cc:2365 msgid "Signature is OK" -msgstr "" +msgstr "A sinatura é correcta" #. translators: possible rpm package signature check result [brief] #: zypp/target/rpm/RpmDb.cc:2367 msgid "Unknown type of signature" -msgstr "" +msgstr "Tipo de sinatura descoñecido" #. translators: possible rpm package signature check result [brief] #: zypp/target/rpm/RpmDb.cc:2369 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/po/id.po new/libzypp-16.14.0/po/id.po --- old/libzypp-16.13.0/po/id.po 2017-04-17 09:06:11.000000000 +0200 +++ new/libzypp-16.14.0/po/id.po 2017-07-05 06:06:08.000000000 +0200 @@ -8,8 +8,8 @@ "Project-Id-Version: YaST (@memory@)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-21 15:07+0100\n" -"PO-Revision-Date: 2017-04-17 04:29+0000\n" -"Last-Translator: Kukuh Syafaat <[email protected]>\n" +"PO-Revision-Date: 2017-07-05 01:44+0000\n" +"Last-Translator: Hanhan Hahn <[email protected]>\n" "Language-Team: Indonesian " "<https://l10n.opensuse.org/projects/libzypp/master/id/>\n" "Language: id\n" @@ -17,7 +17,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 2.6\n" +"X-Generator: Weblate 2.13.1\n" #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55 #: zypp/target/hal/HalException.h:64 @@ -428,7 +428,7 @@ #: zypp/url/UrlBase.cc:786 zypp/url/UrlBase.cc:1231 msgid "Query string parsing not supported for this URL" -msgstr "Penguraian string query tidak didukung untuk url ini" +msgstr "Pemrosesan string kueri tidak didukung untuk URL ini" #: zypp/url/UrlBase.cc:824 msgid "Url scheme is a required component" @@ -859,7 +859,7 @@ #. :BWA:072: #: zypp/CountryCode.cc:192 msgid "Belarus" -msgstr "Belarus" +msgstr "Belarusia" # BZ #. :BLR:112: @@ -933,13 +933,13 @@ #. :CHN:156: #: zypp/CountryCode.cc:205 msgid "Colombia" -msgstr "Colombia" +msgstr "Kolombia" # CR #. :COL:170: #: zypp/CountryCode.cc:206 msgid "Costa Rica" -msgstr "Costa Rica" +msgstr "Kosta Rica" # CU #. :CRI:188: @@ -963,7 +963,7 @@ #. :CXR:162: #: zypp/CountryCode.cc:210 msgid "Cyprus" -msgstr "Cyprus" +msgstr "Siprus" # CZ #. :CYP:196: @@ -1401,7 +1401,7 @@ #. :LAO:418: #: zypp/CountryCode.cc:283 msgid "Lebanon" -msgstr "Lebanon" +msgstr "Libanon" # LC # fuzzy @@ -1481,7 +1481,7 @@ #. :MDA:498: #: zypp/CountryCode.cc:296 msgid "Montenegro" -msgstr "Kongo" +msgstr "Montenegro" # SM #: zypp/CountryCode.cc:297 @@ -1699,7 +1699,7 @@ #. :PYF:258: #: zypp/CountryCode.cc:332 msgid "Papua New Guinea" -msgstr "Papua New Guinea" +msgstr "Papua Nugini" # PH #. :PNG:598: @@ -1778,7 +1778,7 @@ #. :REU:638: #: zypp/CountryCode.cc:345 msgid "Romania" -msgstr "Romania" +msgstr "Rumania" #. :ROU:642: #: zypp/CountryCode.cc:346 @@ -2175,7 +2175,7 @@ #. language code: afa #: zypp/LanguageCode.cc:173 msgid "Afro-Asiatic (Other)" -msgstr "Afro-Asiatic (Other)" +msgstr "Afro-Asiatic (Lainnya)" #. language code: afh #: zypp/LanguageCode.cc:175 @@ -3266,7 +3266,7 @@ #. language code: kaw #: zypp/LanguageCode.cc:607 msgid "Kawi" -msgstr "Malawi" +msgstr "Kawi" # KZ # fuzzy @@ -4074,7 +4074,7 @@ #. language code: san sa #: zypp/LanguageCode.cc:917 msgid "Sanskrit" -msgstr "Sanskrit" +msgstr "Sanskerta" # WS #. language code: sas @@ -4185,7 +4185,7 @@ #. language code: smi #: zypp/LanguageCode.cc:965 msgid "Sami Languages (Other)" -msgstr "Bahasa Sami" +msgstr "Bahasa Sami (Lainnya)" #. language code: smj #: zypp/LanguageCode.cc:967 @@ -4676,7 +4676,7 @@ #: zypp/KeyRing.cc:566 msgid "Failed to delete key." -msgstr "Gagal untuk menghapus key." +msgstr "Gagal menghapus kunci." #: zypp/KeyRing.cc:575 #, c-format, boost-format @@ -5011,7 +5011,7 @@ #: zypp/media/MediaCIFS.cc:427 zypp/media/MediaCurl.cc:1687 #, c-format, boost-format msgid "Authentication required for '%s'" -msgstr "Autentikasikan dibutuhkan untuk '%s'" +msgstr "Autentikasi dibutuhkan untuk '%s'" #: zypp/media/MediaException.cc:31 #, boost-format, boost-format, c-format, c-format @@ -5108,8 +5108,8 @@ "Error message: %s\n" msgstr "" "Unduh (curl) gagal untuk '%s':\n" -"Kode Kesalahan: %s\n" -"Pesan Kesalahan: %s\n" +"Kode kesalahan: %s\n" +"Pesan kesalahan: %s\n" #. TranslatorExplanation: curl is the name of a library, don't translate #: zypp/media/MediaException.cc:161 @@ -5259,10 +5259,10 @@ " from package\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 paket\n" " %4%" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/po/nn.po new/libzypp-16.14.0/po/nn.po --- old/libzypp-16.13.0/po/nn.po 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/po/nn.po 2017-07-05 05:11:06.000000000 +0200 @@ -1,22 +1,20 @@ # @TITLE@ # Copyright (C) 2011, SUSE Linux GmbH, Nuremberg # This file is distributed under the same license as @PACKAGE@ package. FIRST -# Karl Ove Hufthammer <[email protected]>, 2015. -# -# +# Karl Ove Hufthammer <[email protected]>, 2015, 2017. msgid "" msgstr "" "Project-Id-Version: @PACKAGE@\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-21 15:07+0100\n" -"PO-Revision-Date: 2015-10-16 16:31+0100\n" +"PO-Revision-Date: 2017-07-04 15:11+0100\n" "Last-Translator: Karl Ove Hufthammer <[email protected]>\n" "Language-Team: NorwegianNynorsk <[email protected]>\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" +"Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 2.0\n" #: zypp/target/hal/HalException.h:46 zypp/target/hal/HalException.h:55 @@ -337,7 +335,7 @@ #: zypp/RepoManager.cc:1287 #, c-format, boost-format msgid "Building repository '%s' cache" -msgstr "Byggjer pakkebrønnmellomlager for «%s»" +msgstr "Byggjer mellomlager for pakkebrønnen «%s»" #: zypp/RepoManager.cc:1307 #, c-format, boost-format @@ -4520,7 +4518,7 @@ #: zypp/misc/CheckAccessDeleted.cc:243 msgid "Please install package 'lsof' first." -msgstr "" +msgstr "Installer pakken «lsof» først." #: zypp/media/MediaHandler.cc:370 msgid "" @@ -4595,7 +4593,7 @@ #: zypp/media/MediaException.cc:115 msgid "Malformed URI" -msgstr "" +msgstr "Ugyldig URI" #: zypp/media/MediaException.cc:125 msgid "Empty host name in URI" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/PathInfo.cc new/libzypp-16.14.0/zypp/PathInfo.cc --- old/libzypp-16.13.0/zypp/PathInfo.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/PathInfo.cc 2017-07-04 15:04:31.000000000 +0200 @@ -660,6 +660,34 @@ } /////////////////////////////////////////////////////////////////// + namespace + { + int safe_rename( const Pathname & oldpath, const Pathname & newpath ) + { + int ret = ::rename( oldpath.asString().c_str(), newpath.asString().c_str() ); + + // rename(2) can fail on OverlayFS. Fallback to using mv(1), which is + // explicitly mentioned in the kernel docs to deal correctly with OverlayFS. + if ( ret == -1 && errno == EXDEV ) { + const char *const argv[] = { + "/usr/bin/mv", + oldpath.asString().c_str(), + newpath.asString().c_str(), + NULL + }; + ExternalProgram prog( argv, ExternalProgram::Stderr_To_Stdout ); + for ( string output( prog.receiveLine() ); output.length(); output = prog.receiveLine() ) { + MIL << " " << output; + } + ret = prog.close(); + } + + return ret; + } + } // namespace + /////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////// // // METHOD NAME : rename // METHOD TYPE : int @@ -667,7 +695,7 @@ int rename( const Pathname & oldpath, const Pathname & newpath ) { MIL << "rename " << oldpath << " -> " << newpath; - if ( ::rename( oldpath.asString().c_str(), newpath.asString().c_str() ) == -1 ) { + if ( safe_rename( oldpath.asString().c_str(), newpath.asString().c_str() ) == -1 ) { return logResult( errno ); } return logResult( 0 ); @@ -696,7 +724,7 @@ int ret = assert_dir( lpath.dirname() ); if ( ret != 0 ) return logResult( ret ); - if ( ::rename( rpath.c_str(), lpath.c_str() ) == -1 ) { + if ( safe_rename( rpath.c_str(), lpath.c_str() ) == -1 ) { return logResult( errno ); } return logResult( 0 ); @@ -709,7 +737,7 @@ int ret = assert_dir( rpath.dirname() ); if ( ret != 0 ) return logResult( ret ); - if ( ::rename( lpath.c_str(), rpath.c_str() ) == -1 ) { + if ( safe_rename( lpath.c_str(), rpath.c_str() ) == -1 ) { return logResult( errno ); } return logResult( 0 ); @@ -722,16 +750,16 @@ Pathname tmp( tmpfile.path() ); ::unlink( tmp.c_str() ); - if ( ::rename( lpath.c_str(), tmp.c_str() ) == -1 ) { + if ( safe_rename( lpath.c_str(), tmp.c_str() ) == -1 ) { return logResult( errno ); } - if ( ::rename( rpath.c_str(), lpath.c_str() ) == -1 ) { - ::rename( tmp.c_str(), lpath.c_str() ); + if ( safe_rename( rpath.c_str(), lpath.c_str() ) == -1 ) { + safe_rename( tmp.c_str(), lpath.c_str() ); return logResult( errno ); } - if ( ::rename( tmp.c_str(), rpath.c_str() ) == -1 ) { - ::rename( lpath.c_str(), rpath.c_str() ); - ::rename( tmp.c_str(), lpath.c_str() ); + if ( safe_rename( tmp.c_str(), rpath.c_str() ) == -1 ) { + safe_rename( lpath.c_str(), rpath.c_str() ); + safe_rename( tmp.c_str(), lpath.c_str() ); return logResult( errno ); } return logResult( 0 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/PathInfo.h new/libzypp-16.14.0/zypp/PathInfo.h --- old/libzypp-16.13.0/zypp/PathInfo.h 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/PathInfo.h 2017-07-04 15:04:31.000000000 +0200 @@ -598,7 +598,10 @@ int unlink( const Pathname & path ); /** - * Like '::rename'. Renames a file, moving it between directories if required. + * Like '::rename'. Renames a file, moving it between directories if + * required. It falls back to using mv(1) in case errno is set to + * EXDEV, indicating a cross-device rename, which is likely to happen when + * oldpath and newpath are not on the same OverlayFS layer. * * @return 0 on success, errno on failure **/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/RepoManager.cc new/libzypp-16.14.0/zypp/RepoManager.cc --- old/libzypp-16.13.0/zypp/RepoManager.cc 2017-06-30 14:42:36.000000000 +0200 +++ new/libzypp-16.14.0/zypp/RepoManager.cc 2017-07-12 17:11:07.000000000 +0200 @@ -63,6 +63,19 @@ /////////////////////////////////////////////////////////////////// namespace zypp { + + /////////////////////////////////////////////////////////////////// + namespace env + { + /** To trigger appdata refresh unconditionally */ + inline bool ZYPP_PLUGIN_APPDATA_FORCE_COLLECT() + { + const char * env = getenv("ZYPP_PLUGIN_APPDATA_FORCE_COLLECT"); + return( env && str::strToBool( env, true ) ); + } + } // namespace env + /////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////// namespace { @@ -523,7 +536,8 @@ ~Impl() { // trigger appdata refresh if some repos change - if ( _reposDirty && geteuid() == 0 && ( _options.rootDir.empty() || _options.rootDir == "/" ) ) + if ( ( _reposDirty || env::ZYPP_PLUGIN_APPDATA_FORCE_COLLECT() ) + && geteuid() == 0 && ( _options.rootDir.empty() || _options.rootDir == "/" ) ) { try { std::list<Pathname> entries; @@ -960,7 +974,7 @@ assert_alias(info); try { - MIL << "Going to try to check whether refresh is needed for " << url << endl; + MIL << "Going to try to check whether refresh is needed for " << url << " (" << info.type() << ")" << endl; // first check old (cached) metadata Pathname mediarootpath = rawcache_path_for_repoinfo( _options, info ); @@ -1058,7 +1072,7 @@ touchIndexFile( info ); return REPO_UP_TO_DATE; } - else + else // includes newstatus.empty() if e.g. repo format changed { MIL << "repo has changed, going to refresh" << endl; return REFRESH_NEEDED; @@ -1087,7 +1101,6 @@ // Suppress (interactive) media::MediaChangeReport if we in have multiple basurls (>1) media::ScopedDisableMediaChangeReport guard( info.baseUrlsSize() > 1 ); - // try urls one by one for ( RepoInfo::urls_const_iterator it = info.baseUrlsBegin(); it != info.baseUrlsEnd(); ++it ) { @@ -1102,16 +1115,15 @@ MIL << "Going to refresh metadata from " << url << endl; + // bsc#1048315: Always re-probe in case of repo format change. + // TODO: Would be sufficient to verify the type and re-probe + // if verification failed (or type is RepoType::NONE) repo::RepoType repokind = info.type(); - - // if the type is unknown, try probing. - if ( repokind == RepoType::NONE ) { - // unknown, probe it - repokind = probe( *it, info.path() ); - - if (repokind.toEnum() != RepoType::NONE_e) + repo::RepoType probed = probe( *it, info.path() ); + if ( repokind != probed ) { + repokind = probed; // Adjust the probed type in RepoInfo info.setProbedType( repokind ); // lazy init! //save probed type only for repos in system diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/ZConfig.cc new/libzypp-16.14.0/zypp/ZConfig.cc --- old/libzypp-16.13.0/zypp/ZConfig.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/ZConfig.cc 2017-07-06 15:41:07.000000000 +0200 @@ -407,6 +407,10 @@ { cfg_known_services_path = Pathname(value); } + else if ( entry == "varsdir" ) + { + cfg_vars_path = Pathname(value); + } else if ( entry == "repo.add.probe" ) { repo_add_probe = str::strToBool( value, repo_add_probe ); @@ -623,6 +627,7 @@ Pathname cfg_config_path; Pathname cfg_known_repos_path; Pathname cfg_known_services_path; + Pathname cfg_vars_path; Pathname cfg_vendor_path; Pathname cfg_multiversion_path; @@ -934,6 +939,12 @@ ? (configPath()/"services.d") : _pimpl->cfg_known_services_path ); } + Pathname ZConfig::varsPath() const + { + return ( _pimpl->cfg_vars_path.empty() + ? (configPath()/"vars.d") : _pimpl->cfg_vars_path ); + } + Pathname ZConfig::vendorPath() const { return ( _pimpl->cfg_vendor_path.empty() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/ZConfig.h new/libzypp-16.14.0/zypp/ZConfig.h --- old/libzypp-16.13.0/zypp/ZConfig.h 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/ZConfig.h 2017-07-06 15:41:07.000000000 +0200 @@ -171,6 +171,13 @@ Pathname knownServicesPath() const; /** + * Path containing custom repo variable definitions (configPath()/vars.d). + * \see \ref zypp::repo::RepoVarExpand Repo variable expander + * \ingroup g_ZC_CONFIGFILES + */ + Pathname varsPath() const; + + /** * Whether repository urls should be probed. / config option * repo.add.probe diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/ZYppFactory.cc new/libzypp-16.14.0/zypp/ZYppFactory.cc --- old/libzypp-16.13.0/zypp/ZYppFactory.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/ZYppFactory.cc 2017-07-06 15:41:07.000000000 +0200 @@ -38,6 +38,8 @@ using std::endl; +namespace zyppintern { void repoVariablesReset(); } // upon re-acquiring the lock... + /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// @@ -306,11 +308,14 @@ ZYpp::ZYpp( const Impl_Ptr & impl_r ) : _pimpl( impl_r ) { + ::zyppintern::repoVariablesReset(); // upon re-acquiring the lock... + MIL << "ZYpp is on..." << endl; } ZYpp::~ZYpp() { _theGlobalLock.reset(); + MIL << "ZYpp is off..." << endl; } /////////////////////////////////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/media/MediaCurl.cc new/libzypp-16.14.0/zypp/media/MediaCurl.cc --- old/libzypp-16.13.0/zypp/media/MediaCurl.cc 2017-03-21 13:41:10.000000000 +0100 +++ new/libzypp-16.14.0/zypp/media/MediaCurl.cc 2017-07-10 13:31:11.000000000 +0200 @@ -1003,8 +1003,13 @@ // unexpected exception catch (MediaException & excpt_r) { - // FIXME: error number fix - report->finish(fileurl, zypp::media::DownloadProgressReport::ERROR, excpt_r.asUserHistory()); + media::DownloadProgressReport::Error reason = media::DownloadProgressReport::ERROR; + if( typeid(excpt_r) == typeid( media::MediaFileNotFoundException ) || + typeid(excpt_r) == typeid( media::MediaNotAFileException ) ) + { + reason = media::DownloadProgressReport::NOT_FOUND; + } + report->finish(fileurl, reason, excpt_r.asUserHistory()); ZYPP_RETHROW(excpt_r); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/repo/RepoVariables.cc new/libzypp-16.14.0/zypp/repo/RepoVariables.cc --- old/libzypp-16.13.0/zypp/repo/RepoVariables.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/repo/RepoVariables.cc 2017-07-10 09:26:10.000000000 +0200 @@ -6,16 +6,8 @@ | /_____||_| |_| |_| | | | \---------------------------------------------------------------------*/ -#include <cstring> - -#define ZYPP_DBG_VAREXPAND 0 -#if ( ZYPP_DBG_VAREXPAND ) -#warning ZYPP_DBG_VAREXPAND is on #include <iostream> -#include <sstream> -using std::cout; -using std::endl; -#endif // ZYPP_DBG_VAREXPAND +#include <fstream> #include "zypp/base/LogTools.h" #include "zypp/base/String.h" @@ -28,6 +20,12 @@ #include "zypp/repo/RepoVariables.h" #include "zypp/base/NonCopyable.h" +#define ZYPP_DBG_VAREXPAND 0 +#if ( ZYPP_DBG_VAREXPAND ) +#warning ZYPP_DBG_VAREXPAND is on +using std::cout; +#endif // ZYPP_DBG_VAREXPAND + /////////////////////////////////////////////////////////////////// namespace zypp { @@ -390,144 +388,183 @@ /////////////////////////////////////////////////////////////////// namespace { - inline std::string getReleaseverString() + class RepoVarsMap : public std::map<std::string,std::string> { - std::string ret( env::ZYPP_REPO_RELEASEVER() ); - if( ret.empty() ) - { - Target_Ptr trg( getZYpp()->getTarget() ); - if ( trg ) - ret = trg->distributionVersion(); - else - ret = Target::distributionVersion( Pathname()/*guess*/ ); - } - else - WAR << "ENV overwrites $releasever=" << ret << endl; + public: + static RepoVarsMap & instance() + { static RepoVarsMap _instance; return _instance; } - return ret; - } + static const std::string * lookup( const std::string & name_r ) + { return instance()._lookup( name_r ); } - /** \brief Provide lazy initialized repo variables - */ - struct RepoVars : private zypp::base::NonCopyable - { - typedef const std::string & (RepoVars::*Getter)() const; - - const std::string & arch() const + private: + const std::string * _lookup( const std::string & name_r ) { - assertArchStr(); - return _arch; - } + if ( empty() ) // at init / after reset + { + // load user definitions from vars.d + filesystem::dirForEach( ZConfig::instance().systemRoot() / ZConfig::instance().varsPath(), + filesystem::matchNoDots(), bind( &RepoVarsMap::parse, this, _1, _2 ) ); + // releasever_major/_minor are per default derived from releasever. + // If releasever is userdefined, inject missing _major/_minor too. + deriveFromReleasever( "releasever", /*dont't overwrite user defined values*/false ); - const std::string & basearch() const - { - assertArchStr(); - return _basearch; - } + dumpOn( DBG ); + // add builtin vars except for releasever{,_major,_minor} (see checkOverride) + { + const Arch & arch( ZConfig::instance().systemArchitecture() ); + { + std::string & var( operator[]( "arch" ) ); + if ( var.empty() ) var = arch.asString(); + } + { + std::string & var( operator[]( "basearch" ) ); + if ( var.empty() ) var = arch.baseArch().asString(); + } + } + } - const std::string & releasever() const - { - assertReleaseverStr(); - return _releasever; + const std::string * ret = checkOverride( name_r ); + if ( !ret ) + { + // get value from map + iterator it = find( name_r ); + if ( it != end() ) + ret = &(it->second); + } + + return ret; } - const std::string & releaseverMajor() const + std::ostream & dumpOn( std::ostream & str ) const { - assertReleaseverStr(); - return _releaseverMajor; + for ( auto && kv : *this ) + { + str << '{' << kv.first << '=' << kv.second << '}' << endl; + } + return str; } - const std::string & releaseverMinor() const + private: + /** Get first line from file */ + bool parse( const Pathname & dir_r, const std::string & str_r ) { - assertReleaseverStr(); - return _releaseverMinor; + std::ifstream file( (dir_r/str_r).c_str() ); + operator[]( str_r ) = str::getline( file, /*trim*/false ); + return true; } - private: - void assertArchStr() const + /** Derive \c releasever_major/_minor from \c releasever, keeping or overwrititing existing values. */ + void deriveFromReleasever( const std::string & stem_r, bool overwrite_r ) { - if ( _arch.empty() ) + if ( count( stem_r ) ) // releasever is defined.. { - Arch arch( ZConfig::instance().systemArchitecture() ); - _arch = arch.asString(); - _basearch = arch.baseArch().asString(); + const std::string & stem_major( stem_r+"_major" ); + const std::string & stem_minor( stem_r+"_minor" ); + if ( overwrite_r ) + splitReleaseverTo( operator[]( stem_r ), &operator[]( stem_major ), &operator[]( stem_minor ) ); + else + splitReleaseverTo( operator[]( stem_r ), + count( stem_major ) ? nullptr : &operator[]( stem_major ), + count( stem_minor ) ? nullptr : &operator[]( stem_minor ) ); } } - void assertReleaseverStr() const + /** Split \c releasever at \c '.' and store major/minor parts as requested. */ + void splitReleaseverTo( const std::string & releasever_r, std::string * major_r, std::string * minor_r ) const { - // check for changing releasever (bnc#943563) - std::string check( getReleaseverString() ); - if ( check != _releasever ) + if ( major_r || minor_r ) { - _releasever = std::move(check); - // split major/minor for SLE - std::string::size_type pos = _releasever.find( "." ); + std::string::size_type pos = releasever_r.find( "." ); if ( pos == std::string::npos ) { - _releaseverMajor = _releasever; - _releaseverMinor.clear(); + if ( major_r ) *major_r = releasever_r; + if ( minor_r ) minor_r->clear(); } else { - _releaseverMajor = _releasever.substr( 0, pos ); - _releaseverMinor = _releasever.substr( pos+1 ) ; + if ( major_r ) *major_r = releasever_r.substr( 0, pos ); + if ( minor_r ) *minor_r = releasever_r.substr( pos+1 ) ; } } } - private: - mutable std::string _arch; - mutable std::string _basearch; - mutable std::string _releasever; - mutable std::string _releaseverMajor; - mutable std::string _releaseverMinor; - }; - /** \brief */ - const std::string * repoVarLookup( const std::string & name_r ) - { - RepoVars::Getter getter = nullptr; - switch ( name_r.size() ) + /** Check for conditions overwriting the (user) defined values. */ + const std::string * checkOverride( const std::string & name_r ) { -#define ASSIGN_IF(NAME,GETTER) if ( name_r == NAME ) getter = GETTER - case 4: ASSIGN_IF( "arch", &RepoVars::arch ); break; - case 8: ASSIGN_IF( "basearch", &RepoVars::basearch ); break; - case 10: ASSIGN_IF( "releasever", &RepoVars::releasever ); break; - case 16: ASSIGN_IF( "releasever_major", &RepoVars::releaseverMajor ); - else ASSIGN_IF( "releasever_minor", &RepoVars::releaseverMinor ); break; -#undef ASSIGN_IF - } + /////////////////////////////////////////////////////////////////// + // Always check for changing releasever{,_major,_minor} (bnc#943563) + if ( str::startsWith( name_r, "releasever" ) + && ( name_r.size() == 10 + || strcmp( name_r.c_str()+10, "_minor" ) == 0 + || strcmp( name_r.c_str()+10, "_major" ) == 0 ) ) + { + std::string val( env::ZYPP_REPO_RELEASEVER() ); + if ( !val.empty() ) + { + // $ZYPP_REPO_RELEASEVER always overwrites any defined value + if ( val != operator[]( "$releasever" ) ) + { + operator[]( "$releasever" ) = std::move(val); + deriveFromReleasever( "$releasever", /*overwrite previous values*/true ); + } + return &operator[]( "$"+name_r ); + } + else if ( !count( name_r ) ) + { + // No user defined value, so we follow the target + Target_Ptr trg( getZYpp()->getTarget() ); + if ( trg ) + val = trg->distributionVersion(); + else + val = Target::distributionVersion( Pathname()/*guess*/ ); - const std::string * ret = nullptr; - if ( getter ) // known var - { - static const RepoVars _repoVars; - ret = &(_repoVars.*getter)(); + if ( val != operator[]( "$_releasever" ) ) + { + operator[]( "$_releasever" ) = std::move(val); + deriveFromReleasever( "$_releasever", /*overwrite previous values*/true ); + } + return &operator[]( "$_"+name_r ); + } + // else: + return nullptr; // get user value from map + } + /////////////////////////////////////////////////////////////////// + + return nullptr; // get user value from map } - return ret; - } + }; } // namespace /////////////////////////////////////////////////////////////////// std::string RepoVariablesStringReplacer::operator()( const std::string & value ) const { - return RepoVarExpand()( value, repoVarLookup ); + return RepoVarExpand()( value, RepoVarsMap::lookup ); } std::string RepoVariablesStringReplacer::operator()( std::string && value ) const { - return RepoVarExpand()( value, repoVarLookup ); + return RepoVarExpand()( value, RepoVarsMap::lookup ); } Url RepoVariablesUrlReplacer::operator()( const Url & value ) const { RepoVarExpand expand; Url newurl( value ); - newurl.setPathData( expand( value.getPathData(), repoVarLookup ) ); - newurl.setQueryString( expand( value.getQueryString(), repoVarLookup ) ); + newurl.setPathData( expand( value.getPathData(), RepoVarsMap::lookup ) ); + newurl.setQueryString( expand( value.getQueryString(), RepoVarsMap::lookup ) ); return newurl; } - } // namespace repo /////////////////////////////////////////////////////////////////// } // namespace zypp /////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////// +namespace zyppintern +{ + using namespace zypp; + // internal helper called when re-acquiring the lock + void repoVariablesReset() + { repo::RepoVarsMap::instance().clear(); } + +} // namespace zyppintern +/////////////////////////////////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/repo/RepoVariables.h new/libzypp-16.14.0/zypp/repo/RepoVariables.h --- old/libzypp-16.13.0/zypp/repo/RepoVariables.h 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/repo/RepoVariables.h 2017-07-06 15:41:07.000000000 +0200 @@ -70,8 +70,9 @@ /** * \short Functor replacing repository variables * - * Replaces '$arch', '$basearch' and $releasever in a string - * with the global ZYpp values. + * Replaces the built-in '$arch', '$basearch' and '$releasever' ans also + * custom repo variables (\see \ref zypp-repovars) in a string with the + * assigned values. * * Additionally $releasever_major and $releasever_minor can be used * to refer to $releasever major number (everything up to the 1st \c '.' ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/repo/SUSEMediaVerifier.cc new/libzypp-16.14.0/zypp/repo/SUSEMediaVerifier.cc --- old/libzypp-16.13.0/zypp/repo/SUSEMediaVerifier.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/repo/SUSEMediaVerifier.cc 2017-07-04 14:21:07.000000000 +0200 @@ -8,6 +8,7 @@ \---------------------------------------------------------------------*/ #include <fstream> +#include "zypp/base/Logger.h" #include "zypp/repo/SUSEMediaVerifier.h" using namespace std; @@ -31,7 +32,7 @@ std::ifstream str(path_r.asString().c_str()); std::string vendor; std::string id; - + if ( str ) { getline(str, _media_vendor); @@ -55,11 +56,17 @@ std::ifstream str(media_file.asString().c_str()); std::string vendor; std::string id; -#warning check the stream status getline(str, vendor); getline(str, id); - return (vendor == _media_vendor && id == _media_id ); + bool ret = ( vendor == _media_vendor && id == _media_id ); + if ( !ret ) { + DBG << "cached vendor: " << _media_vendor << endl; + DBG << "repo vendor: " << vendor << endl; + DBG << "cached id: " << _media_id << endl; + DBG << "repo id: " << id << endl; + } + return ret; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/repo/susetags/Downloader.cc new/libzypp-16.14.0/zypp/repo/susetags/Downloader.cc --- old/libzypp-16.13.0/zypp/repo/susetags/Downloader.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.14.0/zypp/repo/susetags/Downloader.cc 2017-07-12 17:11:07.000000000 +0200 @@ -35,12 +35,11 @@ RepoStatus Downloader::status( MediaSetAccess &media ) { - Pathname content = media.provideFile( repoInfo().path() + "/content"); - // the media.1 is always in the root of the media, not like the content - // file which is in the path() location - Pathname mediafile = media.provideFile( "/media.1/media" ); - - return RepoStatus(content) && RepoStatus(mediafile); + RepoStatus ret( media.provideOptionalFile( repoInfo().path() + "/content") ); + if ( !ret.empty() ) // else: mandatory master index is missing + ret = ret && RepoStatus( media.provideOptionalFile( "/media.1/media" ) ); + // else: mandatory master index is missing -> stay empty + return ret; } // search old repository file file to run the delta algorithm on diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp/repo/yum/Downloader.cc new/libzypp-16.14.0/zypp/repo/yum/Downloader.cc --- old/libzypp-16.13.0/zypp/repo/yum/Downloader.cc 2017-03-17 12:26:07.000000000 +0100 +++ new/libzypp-16.14.0/zypp/repo/yum/Downloader.cc 2017-07-12 17:11:07.000000000 +0200 @@ -37,8 +37,11 @@ RepoStatus Downloader::status( MediaSetAccess &media ) { - return RepoStatus( media.provideFile( repoInfo().path() / "/repodata/repomd.xml" ) ) - && RepoStatus( media.provideOptionalFile( "/media.1/media" ) ); + RepoStatus ret( media.provideFile( repoInfo().path() / "/repodata/repomd.xml" ) ); + if ( !ret.empty() ) // else: mandatory master index is missing + ret = ret && RepoStatus( media.provideOptionalFile( "/media.1/media" ) ); + // else: mandatory master index is missing -> stay empty + return ret; } static OnMediaLocation loc_with_path_prefix( const OnMediaLocation & loc, const Pathname & prefix ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.13.0/zypp.conf new/libzypp-16.14.0/zypp.conf --- old/libzypp-16.13.0/zypp.conf 2017-04-21 14:41:07.000000000 +0200 +++ new/libzypp-16.14.0/zypp.conf 2017-07-06 15:41:07.000000000 +0200 @@ -86,6 +86,22 @@ ## # servicesdir = /etc/zypp/services.d +## +## Path where custom repo variable definitions are kept +## +## Valid values: A directory +## Default value: {configdir}/vars.d +## +## Changing this undefines all custom repo variables. Built-in +## variables (like '$arch', '$basearch' or $releasever) are not +## affected, but reset to their default values. +## +## A custom repo variable is defined by creating a file inside the +## directory. The variable name equals the file name. The files fist +## line (up to but not including the newline character) defines the +## variables value. +## +# varsdir = /etc/zypp/vars.d ## ## Whether repository urls should be probed when added
