Permalink
...
Checking mergeability…
Don’t worry, you can still create the pull request.
Comparing changes
Open a pull request
- 8 commits
- 7 files changed
- 0 commit comments
- 2 contributors
Unified
Split
Showing
with
120 additions
and 100 deletions.
- +22 −9 CMake/Documentation.cmake
- +4 −4 apt-private/private-show.cc
- +7 −1 doc/CMakeLists.txt
- +50 −72 doc/po/nl.po
- +13 −4 methods/http.cc
- +12 −10 test/integration/framework
- +12 −0 test/integration/test-apt-cli-show
View
31
CMake/Documentation.cmake
| @@ -89,12 +89,18 @@ endfunction() | ||
| # Process one document | ||
| function(po4a_one stamp_out out full_document language deps) | ||
| path_join(full_path "${CMAKE_CURRENT_SOURCE_DIR}" "${full_document}") | ||
| - po4a_components(document _ section ext "${full_document}") | ||
| + if (full_document MATCHES "\.ent$") | ||
| + set(dest "${language}/${full_document}") | ||
| + set(full_dest "${dest}") | ||
| + else() | ||
| + po4a_components(document _ section ext "${full_document}") | ||
| - # Calculate target file name | ||
| - set(dest "${language}/${document}.${language}") | ||
| - if(section) | ||
| - set(dest "${dest}.${section}") | ||
| + # Calculate target file name | ||
| + set(dest "${language}/${document}.${language}") | ||
| + if(section) | ||
| + set(dest "${dest}.${section}") | ||
| + endif() | ||
| + set(full_dest "${dest}.${ext}") | ||
| endif() | ||
| # po4a might drop files not translated enough, so build a stamp file | ||
| @@ -106,17 +112,17 @@ function(po4a_one stamp_out out full_document language deps) | ||
| --package-name='${PROJECT_NAME}-doc' | ||
| --package-version='${PACKAGE_VERSION}' | ||
| --msgid-bugs-address='${PACKAGE_MAIL}' | ||
| - --translate-only ${dest}.${ext} | ||
| + --translate-only ${full_dest} | ||
| --srcdir ${CMAKE_CURRENT_SOURCE_DIR} | ||
| --destdir ${CMAKE_CURRENT_BINARY_DIR} | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/po4a.conf | ||
| COMMAND ${CMAKE_COMMAND} -E touch ${stamp} | ||
| - COMMENT "Generating ${dest}.${ext} (or dropping it)" | ||
| + COMMENT "Generating ${full_dest} (or dropping it)" | ||
| DEPENDS ${full_document} ${deps} po/${language}.po | ||
| ) | ||
| # Return result | ||
| set(${stamp_out} ${stamp} PARENT_SCOPE) | ||
| - set(${out} ${CMAKE_CURRENT_BINARY_DIR}/${dest}.${ext} PARENT_SCOPE) | ||
| + set(${out} ${CMAKE_CURRENT_BINARY_DIR}/${full_dest} PARENT_SCOPE) | ||
| endfunction() | ||
| function(xsltproc_one) | ||
| @@ -251,7 +257,7 @@ function(add_docbook target) | ||
| set(generated "") | ||
| set(options HTML TEXT MANPAGE ALL) | ||
| set(oneValueArgs) | ||
| - set(multiValueArgs INSTALL DOCUMENTS LINGUAS DEPENDS) | ||
| + set(multiValueArgs INSTALL DOCUMENTS LINGUAS TRANSLATED_ENTITIES DEPENDS) | ||
| cmake_parse_arguments(DOC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
| if (DOC_HTML) | ||
| @@ -264,6 +270,13 @@ function(add_docbook target) | ||
| list(APPEND formats MANPAGE) | ||
| endif() | ||
| + foreach(document ${DOC_TRANSLATED_ENTITIES}) | ||
| + foreach(lang ${DOC_LINGUAS}) | ||
| + po4a_one(po4a_stamp po4a_out ${document} "${lang}" "") | ||
| + list(APPEND DOC_DEPENDS ${po4a_stamp}) | ||
| + endforeach() | ||
| + endforeach() | ||
| + | ||
| foreach(document ${DOC_DOCUMENTS}) | ||
| foreach(lang ${DOC_LINGUAS}) | ||
| po4a_one(po4a_stamp po4a_out ${document} "${lang}" "${DOC_DEPENDS}") | ||
View
8
apt-private/private-show.cc
| @@ -184,13 +184,13 @@ static bool DisplayRecordV2(pkgCacheFile &CacheFile, pkgCache::VerIterator const | ||
| // make size nice | ||
| std::string installed_size; | ||
| - if (Tags.FindI("Installed-Size") > 0) | ||
| - strprintf(installed_size, "%sB", SizeToStr(Tags.FindI("Installed-Size")*1024).c_str()); | ||
| + if (Tags.FindULL("Installed-Size") > 0) | ||
| + strprintf(installed_size, "%sB", SizeToStr(Tags.FindULL("Installed-Size") * 1024).c_str()); | ||
| else | ||
| installed_size = _("unknown"); | ||
| std::string package_size; | ||
| - if (Tags.FindI("Size") > 0) | ||
| - strprintf(package_size, "%sB", SizeToStr(Tags.FindI("Size")).c_str()); | ||
| + if (Tags.FindULL("Size") > 0) | ||
| + strprintf(package_size, "%sB", SizeToStr(Tags.FindULL("Size")).c_str()); | ||
| else | ||
| package_size = _("unknown"); | ||
View
8
doc/CMakeLists.txt
| @@ -12,8 +12,11 @@ set(LINGUAS | ||
| pt | ||
| ) | ||
| -set(ENTITIES | ||
| +set(TRANSLATED_ENTITIES | ||
| apt.ent | ||
| +) | ||
| + | ||
| +set(ENTITIES | ||
| apt-verbatim.ent | ||
| ../vendor/${CURRENT_VENDOR}/apt-vendor.ent | ||
| ) | ||
| @@ -25,6 +28,7 @@ add_docbook(apt-doc HTML TEXT ALL | ||
| offline.dbk | ||
| INSTALL ${CMAKE_INSTALL_DOCDIR}/../apt-doc | ||
| LINGUAS ${LINGUAS} | ||
| + TRANSLATED_ENTITIES ${TRANSLATED_ENTITIES} | ||
| DEPENDS ${ENTITIES} | ||
| ) | ||
| @@ -36,6 +40,7 @@ add_docbook(libapt-pkg-doc HTML TEXT ALL | ||
| method.dbk | ||
| INSTALL ${CMAKE_INSTALL_DOCDIR}/../libapt-pkg-doc | ||
| LINGUAS ${LINGUAS} | ||
| + TRANSLATED_ENTITIES ${TRANSLATED_ENTITIES} | ||
| DEPENDS ${ENTITIES} | ||
| ) | ||
| @@ -81,6 +86,7 @@ add_docbook(apt-man MANPAGE ALL | ||
| apt-sortpkgs.1.xml | ||
| sources.list.5.xml | ||
| DEPENDS ${ENTITIES} | ||
| + TRANSLATED_ENTITIES ${TRANSLATED_ENTITIES} | ||
| LINGUAS ${LINGUAS} | ||
| ) | ||
View
122
doc/po/nl.po
| @@ -4,10 +4,10 @@ | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| -"Project-Id-Version: apt-doc 1.5~beta1-nl\n" | ||
| +"Project-Id-Version: apt-doc 1.5-nl\n" | ||
| "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" | ||
| -"POT-Creation-Date: 2017-09-04 22:35+0200\n" | ||
| -"PO-Revision-Date: 2017-08-17 21:29+0200\n" | ||
| +"POT-Creation-Date: 2017-11-12 19:50+0100\n" | ||
| +"PO-Revision-Date: 2017-10-23 17:02+0200\n" | ||
| "Last-Translator: Frans Spiesschaert <Frans.Spiesschaert@yucom.be>\n" | ||
| "Language-Team: Debian Dutch l10n Team <debian-l10n-dutch@lists.debian.org>\n" | ||
| "Language: nl\n" | ||
| @@ -1820,15 +1820,6 @@ msgstr "" | ||
| #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> | ||
| #: apt-get.8.xml | ||
| -#, fuzzy | ||
| -#| msgid "" | ||
| -#| "Force yes; this is a dangerous option that will cause apt to continue " | ||
| -#| "without prompting if it is doing something potentially harmful. It should " | ||
| -#| "not be used except in very special situations. Using <literal>force-yes</" | ||
| -#| "literal> can potentially destroy your system! Configuration Item: " | ||
| -#| "<literal>APT::Get::force-yes</literal>. This is deprecated and replaced " | ||
| -#| "by <option>--allow-downgrades</option>, <option>--allow-remove-essential</" | ||
| -#| "option>, <option>--allow-change-held-packages</option> in 1.1." | ||
| msgid "" | ||
| "Force yes; this is a dangerous option that will cause apt to continue " | ||
| "without prompting if it is doing something potentially harmful. It should " | ||
| @@ -1845,8 +1836,9 @@ msgstr "" | ||
| "<literal>force-yes</literal> kan mogelijkerwijs tot de vernietiging van uw " | ||
| "systeem leiden! Configuratie-item: <literal>APT::Get::force-yes</literal>. " | ||
| "Deze optie is verouderd en werd in 1.1 vervangen door <option>--allow-" | ||
| -"downgrades</option>, <option>--allow-remove-essential</option>, <option>--" | ||
| -"allow-change-held-packages</option>." | ||
| +"unauthenticated</option> , <option>--allow-downgrades</option> , <option>--" | ||
| +"allow-remove-essential</option> , <option>--allow-change-held-packages</" | ||
| +"option>." | ||
| #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> | ||
| #: apt-get.8.xml | ||
| @@ -2074,15 +2066,6 @@ msgstr "" | ||
| #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> | ||
| #: apt-get.8.xml | ||
| -#, fuzzy | ||
| -#| msgid "" | ||
| -#| "Specialist options (<literal>--allow-releaseinfo-changes-</" | ||
| -#| "literal><replaceable>field</replaceable>) exist to allow changes only " | ||
| -#| "for certain fields like <literal>origin</literal>, <literal>label</" | ||
| -#| "literal>, <literal>codename</literal>, <literal>suite</literal>, " | ||
| -#| "<literal>version</literal> and <literal>defaultpin</literal>. See also " | ||
| -#| "&apt-preferences;. Configuration Item: <literal>Acquire::" | ||
| -#| "AllowReleaseInfoChanges</literal>." | ||
| msgid "" | ||
| "Specialist options (<literal>--allow-releaseinfo-change-</" | ||
| "literal><replaceable>field</replaceable>) exist to allow changes only for " | ||
| @@ -2091,7 +2074,7 @@ msgid "" | ||
| "literal> and <literal>defaultpin</literal>. See also &apt-preferences;. " | ||
| "Configuration Item: <literal>Acquire::AllowReleaseInfoChanges</literal>." | ||
| msgstr "" | ||
| -"Er bestaan specialistische opties (<literal>--allow-releaseinfo-changes-</" | ||
| +"Er bestaan specialistische opties (<literal>--allow-releaseinfo-change-</" | ||
| "literal><replaceable>veld</replaceable>) om enkel veranderingen toe te staan " | ||
| "voor bepaalde velden, zoals <literal>origin</literal>, <literal>label</" | ||
| "literal>, <literal>codename</literal>, <literal>suite</literal>, " | ||
| @@ -3529,15 +3512,6 @@ msgstr "" | ||
| #. type: Content of: <refentry><refsect1><para> | ||
| #: apt-secure.8.xml | ||
| -#, fuzzy | ||
| -#| msgid "" | ||
| -#| "This information is shown in various places so a repository owner should " | ||
| -#| "always ensure correctness. Further more user configuration like &apt-" | ||
| -#| "preferences; can depend and make use of this information. Since version " | ||
| -#| "1.5 the user must therefore explicitly confirm changes to signal that the " | ||
| -#| "user is sufficently prepared e.g. for the new major release of the " | ||
| -#| "distribution shipped in the repository (as e.g. indicated by the " | ||
| -#| "codename)." | ||
| msgid "" | ||
| "This information is shown in various places so a repository owner should " | ||
| "always ensure correctness. Further more user configuration like &apt-" | ||
| @@ -8439,6 +8413,17 @@ msgid "" | ||
| "replaceable>. The authentication details for proxies can also be supplied " | ||
| "via &apt-authconf;." | ||
| msgstr "" | ||
| +"De methode http geeft een HTTP-server op voor een archief. Dit is de meest " | ||
| +"gebruikte methode waarvoor veel configuratieopties beschikbaar zijn binnen " | ||
| +"de ruimte <literal>Acquire::http</literal>. Ze worden in &apt-conf; " | ||
| +"gedetailleerd. De URI zelf kan login-informatie bevatten als dat door het " | ||
| +"archief vereist wordt, maar de voorkeur moet gegeven worden aan het gebruik " | ||
| +"van &apt-authconf;. De methode biedt ook ondersteuning voor SOCKS5- en " | ||
| +"HTTP(S)-proxies, ofwel geconfigureerd via een apt-specifieke configuratie, " | ||
| +"of gespecificeerd met de omgevingsvariabele <envar>http_proxy</envar> " | ||
| +"volgens de indeling <replaceable>http://gebruiker:wachtwoord@server:poort/</" | ||
| +"replaceable> (er vanuit gaand dat het om een HTTP-proxy gaat die " | ||
| +"authenticatie vereist)." | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| @@ -8450,6 +8435,13 @@ msgid "" | ||
| "communication through as APTs data security model is independent of the " | ||
| "chosen transport method. See &apt-secure; for details." | ||
| msgstr "" | ||
| +"Merk op dat deze authenticatiemethodes onveilig zijn, aangezien de volledige " | ||
| +"communicatie met de externe server (of de proxy) onversleuteld verloopt. " | ||
| +"Daardoor kan een voldoende onderlegde aanvaller de logingegevens bekijken en " | ||
| +"opslaan evenals de rest van de interactie. De aanvaller kan evenwel de " | ||
| +"communicatie <emphasis>niet</emphasis> beïnvloeden, vermits het " | ||
| +"databeveiligingsmodel dat toegepast wordt door APT, onafhankelijk van de " | ||
| +"gekozen transportmethode functioneert. Raadpleeg voor details &apt-secure;." | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| @@ -8462,6 +8454,15 @@ msgid "" | ||
| "potentially still reveal which data was downloaded. If this is a concern the " | ||
| "Tor-based schemes mentioned further below might be a suitable alternative." | ||
| msgstr "" | ||
| +"De methode https geeft een HTTPS-server op voor een archief en is inzake " | ||
| +"gebruik en beschikbare opties erg vergelijkbaar met de http-methode. Het " | ||
| +"grote verschil is dat de communicatie tussen apt en de server (of de proxy) " | ||
| +"versleuteld verloopt. Merk op dat de versleuteling niet verhindert dat een " | ||
| +"aanvaller kan te weten komen met welke server (of welke proxy) apt " | ||
| +"communiceert. En eventueel kan deze via een meer diepgaande analyse toch nog " | ||
| +"achterhalen welke gegevens gedownload werden. Indien dit een bekommernis is, " | ||
| +"kunnen de op Tor gebaseerde methodes die later behandeld worden, een " | ||
| +"adequaat alternatief vormen." | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| @@ -8476,19 +8477,14 @@ msgstr "" | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| -#, fuzzy | ||
| -#| msgid "" | ||
| -#| "The cdrom scheme allows APT to use a local CD-ROM drive with media " | ||
| -#| "swapping. Use the &apt-cdrom; program to create cdrom entries in the " | ||
| -#| "source list." | ||
| msgid "" | ||
| "The cdrom scheme allows APT to use a local CD-ROM, DVD or USB drive with " | ||
| "media swapping. Use the &apt-cdrom; program to create cdrom entries in the " | ||
| "source list." | ||
| msgstr "" | ||
| -"De methode cdrom laat APT toe om met meerdere CD's in een lokaal CD-station " | ||
| -"te werken. Gebruik het programma &apt-cdrom; om regels met CD-pakketbronnen " | ||
| -"aan te maken in de lijst met pakketbronnen." | ||
| +"De methode cdrom laat APT toe om een lokaal CD-, DVD- of USB-station te " | ||
| +"gebruiken en media te wisselen. Gebruik het programma &apt-cdrom; om regels " | ||
| +"met CD-pakketbronnen aan te maken in de lijst met pakketbronnen." | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| @@ -8499,19 +8495,15 @@ msgid "" | ||
| "still need this method many configuration options for it are available in " | ||
| "the <literal>Acquire::ftp</literal> scope and detailed in &apt-conf;." | ||
| msgstr "" | ||
| +"De methode ftp geeft een FTP-server op voor een archief. Het gebruik van FTP " | ||
| +"is op de terugweg ten voordele van <literal>http</literal> en " | ||
| +"<literal>https</literal> en veel archieven hebben ofwel nooit FTP-toegang " | ||
| +"aangeboden of trekken die terug in. Indien u deze methode nog steeds nodig " | ||
| +"heeft, zijn er veel configuratieopties voor beschikbaar binnen de ruimte " | ||
| +"<literal>Acquire::ftp</literal>. Ze worden in &apt-conf; gedetailleerd." | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| -#, fuzzy | ||
| -#| msgid "" | ||
| -#| "The ftp scheme specifies an FTP server for the archive. APT's FTP " | ||
| -#| "behavior is highly configurable; for more information see the &apt-conf; " | ||
| -#| "manual page. Please note that an FTP proxy can be specified by using the " | ||
| -#| "<envar>ftp_proxy</envar> environment variable. It is possible to specify " | ||
| -#| "an HTTP proxy (HTTP proxy servers often understand FTP URLs) using this " | ||
| -#| "environment variable and <emphasis>only</emphasis> this environment " | ||
| -#| "variable. Proxies using HTTP specified in the configuration file will be " | ||
| -#| "ignored." | ||
| msgid "" | ||
| "Please note that an FTP proxy can be specified by using the " | ||
| "<envar>ftp_proxy</envar> environment variable. It is possible to specify an " | ||
| @@ -8520,14 +8512,11 @@ msgid "" | ||
| "variable. Proxies using HTTP specified in the configuration file will be " | ||
| "ignored." | ||
| msgstr "" | ||
| -"De methode ftp specificeert een FTP-server voor het archief. Het FTP-gedrag " | ||
| -"van APT kan in belangrijke mate geconfigureerd worden. Zie voor meer " | ||
| -"informatie de man-pagina &apt-conf;. Noteer dat een FTP-proxy opgegeven kan " | ||
| -"worden met de omgevingsvariabele <envar>ftp_proxy</envar>. Met deze " | ||
| -"omgevingsvariabele en <emphasis>enkel</emphasis> daarmee kan ook een HTTP-" | ||
| -"proxy opgegeven worden (HTTP proxyservers kunnen vaak omgaan met FTP-URL's). " | ||
| -"Proxy's die HTTP gebruiken en in het configuratiebestand vermeld staan " | ||
| -"worden genegeerd." | ||
| +"Noteer dat een FTP-proxy opgegeven kan worden met de omgevingsvariabele " | ||
| +"<envar>ftp_proxy</envar>. Met deze omgevingsvariabele en <emphasis>enkel</" | ||
| +"emphasis> daarmee kan ook een HTTP-proxy opgegeven worden (HTTP proxyservers " | ||
| +"kunnen vaak omgaan met FTP-URL's). Proxy's die HTTP gebruiken en in het " | ||
| +"configuratiebestand vermeld staan worden genegeerd." | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| @@ -8564,15 +8553,6 @@ msgstr "nog andere herkenbare URI-types toevoegen" | ||
| #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> | ||
| #: sources.list.5.xml | ||
| -#, fuzzy | ||
| -#| msgid "" | ||
| -#| "APT can be extended with more methods shipped in other optional packages, " | ||
| -#| "which should follow the naming scheme <package>apt-transport-" | ||
| -#| "<replaceable>method</replaceable></package>. For instance, the APT team " | ||
| -#| "also maintains the package <package>apt-transport-https</package>, which " | ||
| -#| "provides access methods for HTTPS URIs with features similar to the http " | ||
| -#| "method. Methods for using e.g. debtorrent are also available - see &apt-" | ||
| -#| "transport-debtorrent;." | ||
| msgid "" | ||
| "APT can be extended with more methods shipped in other optional packages, " | ||
| "which should follow the naming scheme <package>apt-transport-" | ||
| @@ -8584,10 +8564,8 @@ msgstr "" | ||
| "pakketten ter beschikking gesteld worden en die moeten voldoen aan het " | ||
| "naamgevingsschema <package>apt-transport-<replaceable>methode</replaceable></" | ||
| "package>. Het APT-team onderhoudt bijvoorbeeld ook het pakket <package>apt-" | ||
| -"transport-https</package>, dat methodes aanbiedt om toegang te krijgen tot " | ||
| -"HTTPS URI's met dezelfde functionaliteit als bij de http-methode. Er zijn " | ||
| -"ook methodes beschikbaar om bijvoorbeeld van debtorrent gebruik te maken - " | ||
| -"zie &apt-transport-debtorrent;." | ||
| +"transport-tor</package>, dat methodes aanbiedt om toegang te krijgen tot " | ||
| +"HTTP- en HTTPS-URI's, waarbij een route via het Tor-netwerk genomen wordt." | ||
| #. type: Content of: <refentry><refsect1><para> | ||
| #: sources.list.5.xml | ||
View
17
methods/http.cc
| @@ -425,7 +425,9 @@ bool HttpServerState::Open() | ||
| In.Reset(); | ||
| Out.Reset(); | ||
| Persistent = true; | ||
| - | ||
| + | ||
| + bool tls = (ServerName.Access == "https" || APT::String::Endswith(ServerName.Access, "+https")); | ||
| + | ||
| // Determine the proxy setting | ||
| AutoDetectProxy(ServerName); | ||
| string SpecificProxy = Owner->ConfigFind("Proxy::" + ServerName.Host, ""); | ||
| @@ -445,8 +447,16 @@ bool HttpServerState::Open() | ||
| } | ||
| else | ||
| { | ||
| - char* result = getenv("http_proxy"); | ||
| - Proxy = result ? result : ""; | ||
| + char *result = getenv("http_proxy"); | ||
| + Proxy = result ? result : ""; | ||
| + if (tls == true) | ||
| + { | ||
| + char *result = getenv("https_proxy"); | ||
| + if (result != nullptr) | ||
| + { | ||
| + Proxy = result; | ||
| + } | ||
| + } | ||
| } | ||
| } | ||
| @@ -460,7 +470,6 @@ bool HttpServerState::Open() | ||
| if (Proxy.empty() == false) | ||
| Owner->AddProxyAuth(Proxy, ServerName); | ||
| - bool tls = (ServerName.Access == "https" || APT::String::Endswith(ServerName.Access, "+https")); | ||
| auto const DefaultService = tls ? "https" : "http"; | ||
| auto const DefaultPort = tls ? 443 : 80; | ||
| if (Proxy.Access == "socks5h") | ||
Oops, something went wrong.