From: Michael Vogt Date: Sun, 26 Jan 2014 07:15:29 +0000 (+0100) Subject: Merge remote-tracking branch 'donkult/debian/sid' into debian/sid X-Git-Tag: 0.9.15.1~11 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/796673c38509300c988fbba2f2679ba3c76916db?ds=inline;hp=-c Merge remote-tracking branch 'donkult/debian/sid' into debian/sid Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework --- 796673c38509300c988fbba2f2679ba3c76916db diff --combined apt-pkg/contrib/fileutl.cc index ffb8b4b53,1c8acd513..37155b688 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@@ -319,7 -319,7 +319,7 @@@ bool CreateDirectory(string const &Pare return false; // we are not going to create directories "into the blue" - if (Path.find(Parent, 0) != 0) + if (Path.compare(0, Parent.length(), Parent) != 0) return false; vector const dirs = VectorizeString(Path.substr(Parent.size()), '/'); @@@ -465,7 -465,7 +465,7 @@@ std::vector GetListOfFilesInDir const char *C = Ent->d_name; for (; *C != 0; ++C) if (isalpha(*C) == 0 && isdigit(*C) == 0 - && *C != '_' && *C != '-') { + && *C != '_' && *C != '-' && *C != ':') { // no required extension -> dot is a bad character if (*C == '.' && Ext.empty() == false) continue; diff --combined apt-pkg/deb/dpkgpm.cc index 506ebf620,1967d5d26..91893c4e1 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@@ -568,7 -568,6 +568,6 @@@ void pkgDPkgPM::ProcessDpkgStatusLine(c std::string prefix = APT::String::Strip(list[0]); std::string pkgname; std::string action; - ostringstream status; // "processing" has the form "processing: action: pkg or trigger" // with action = ["install", "configure", "remove", "purge", "disappear", @@@ -1028,12 -1027,6 +1027,12 @@@ bool pkgDPkgPM::Go(int StatusFd void pkgDPkgPM::StartPtyMagic() { + if (_config->FindB("Dpkg::Use-Pty", true) == false) + { + d->master = d->slave = -1; + return; + } + // setup the pty and stuff struct winsize win; @@@ -1042,9 -1035,10 +1041,9 @@@ _error->PushToStack(); if (tcgetattr(STDOUT_FILENO, &d->tt) == 0) { - ioctl(1, TIOCGWINSZ, (char *)&win); - if (_config->FindB("Dpkg::Use-Pty", true) == false) + if (ioctl(1, TIOCGWINSZ, (char *)&win) < 0) { - d->master = d->slave = -1; + _error->Errno("ioctl", _("ioctl(TIOCGWINSZ) failed")); } else if (openpty(&d->master, &d->slave, NULL, &d->tt, &win) < 0) { _error->Errno("openpty", _("Can not write log (%s)"), _("Is /dev/pts mounted?")); @@@ -1398,17 -1392,12 +1397,17 @@@ bool pkgDPkgPM::GoNoABIBreak(APT::Progr if(d->slave >= 0 && d->master >= 0) { setsid(); - ioctl(d->slave, TIOCSCTTY, 0); - close(d->master); - dup2(d->slave, 0); - dup2(d->slave, 1); - dup2(d->slave, 2); - close(d->slave); + int res = ioctl(d->slave, TIOCSCTTY, 0); + if (res < 0) { + std::cerr << "ioctl(TIOCSCTTY) failed for fd: " + << d->slave << std::endl; + } else { + close(d->master); + dup2(d->slave, 0); + dup2(d->slave, 1); + dup2(d->slave, 2); + close(d->slave); + } } close(fd[0]); // close the read end of the pipe @@@ -1662,7 -1651,7 +1661,7 @@@ void pkgDPkgPM::WriteApportReport(cons io_errors.push_back(string("failed in write on buffer copy for %s")); io_errors.push_back(string("short read on buffer copy for %s")); - for (vector::iterator I = io_errors.begin(); I != io_errors.end(); I++) + for (vector::iterator I = io_errors.begin(); I != io_errors.end(); ++I) { vector list = VectorizeString(dgettext("dpkg", (*I).c_str()), '%'); if (list.size() > 1) { @@@ -1777,13 -1766,11 +1776,11 @@@ string histfile_name = _config->FindFile("Dir::Log::History"); if (!histfile_name.empty()) { - FILE *log = NULL; - char buf[1024]; - fprintf(report, "DpkgHistoryLog:\n"); - log = fopen(histfile_name.c_str(),"r"); + FILE* log = fopen(histfile_name.c_str(),"r"); if(log != NULL) { + char buf[1024]; while( fgets(buf, sizeof(buf), log) != NULL) fprintf(report, " %s", buf); fclose(log); diff --combined apt-private/private-list.cc index fbb66d204,898ee7222..44a766c84 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@@ -61,7 -61,7 +61,7 @@@ class PackageNameMatcher : public Match public: PackageNameMatcher(const char **patterns) { - for(int i=0; patterns[i] != NULL; i++) + for(int i=0; patterns[i] != NULL; ++i) { std::string pattern = patterns[i]; #ifdef PACKAGE_MATCHER_ABI_COMPAT @@@ -79,12 -79,12 +79,12 @@@ } virtual ~PackageNameMatcher() { - for(J=filters.begin(); J != filters.end(); J++) + for(J=filters.begin(); J != filters.end(); ++J) delete *J; } virtual bool operator () (const pkgCache::PkgIterator &P) { - for(J=filters.begin(); J != filters.end(); J++) + for(J=filters.begin(); J != filters.end(); ++J) { APT::CacheFilter::PackageMatcher *cachefilter = *J; if((*cachefilter)(P)) @@@ -101,15 -101,11 +101,15 @@@ private /*}}}*/ void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ pkgCache::PkgIterator P, - std::ostream &outs) + std::ostream &outs, + bool include_summary=true) { for (pkgCache::VerIterator Ver = P.VersionList(); - Ver.end() == false; Ver++) - Ver.end() == false; ++Ver) - ListSingleVersion(CacheFile, records, Ver, outs); ++ Ver.end() == false; ++Ver) + { + ListSingleVersion(CacheFile, records, Ver, outs, include_summary); + outs << "\n"; + } } /*}}}*/ // list - list package based on criteria /*{{{*/ @@@ -140,18 -136,18 +140,18 @@@ bool List(CommandLine &Cmd PackageNameMatcher matcher(patterns); LocalitySortedVersionSet bag; - OpTextProgress progress; + OpTextProgress progress(*_config); progress.OverallProgress(0, Cache->Head().PackageCount, Cache->Head().PackageCount, _("Listing")); GetLocalitySortedVersionSet(CacheFile, bag, matcher, progress); - for (LocalitySortedVersionSet::iterator V = bag.begin(); V != bag.end(); V++) + for (LocalitySortedVersionSet::iterator V = bag.begin(); V != bag.end(); ++V) { std::stringstream outs; if(_config->FindB("APT::Cmd::All-Versions", false) == true) { - ListAllVersions(CacheFile, records, V.ParentPkg(), outs); + ListAllVersions(CacheFile, records, V.ParentPkg(), outs, includeSummary); output_map.insert(std::make_pair( V.ParentPkg().Name(), outs.str())); } else { @@@ -163,7 -159,7 +163,7 @@@ // FIXME: SORT! and make sorting flexible (alphabetic, by pkg status) // output the sorted map - for (K = output_map.begin(); K != output_map.end(); K++) + for (K = output_map.begin(); K != output_map.end(); ++K) std::cout << (*K).second << std::endl; diff --combined apt-private/private-search.cc index 9d7f36138,ade12353a..0b1a929b0 --- a/apt-private/private-search.cc +++ b/apt-private/private-search.cc @@@ -53,7 -53,7 +53,7 @@@ bool FullTextSearch(CommandLine &CmdL std::map::const_iterator K; LocalitySortedVersionSet bag; - OpTextProgress progress; + OpTextProgress progress(*_config); progress.OverallProgress(0, 100, 50, _("Sorting")); GetLocalitySortedVersionSet(CacheFile, bag, progress); LocalitySortedVersionSet::iterator V = bag.begin(); @@@ -61,18 -61,18 +61,18 @@@ progress.OverallProgress(50, 100, 50, _("Full Text Search")); progress.SubProgress(bag.size()); int Done = 0; - for ( ;V != bag.end(); V++) + for ( ;V != bag.end(); ++V) { if (Done%500 == 0) progress.Progress(Done); - Done++; + ++Done; int i; pkgCache::DescIterator Desc = V.TranslatedDescription(); pkgRecords::Parser &parser = records.Lookup(Desc.FileList()); bool all_found = true; - for(i=0; patterns[i] != NULL; i++) + for(i=0; patterns[i] != NULL; ++i) { // FIXME: use regexp instead of simple find() const char *pattern = patterns[i]; @@@ -93,7 -93,7 +93,7 @@@ // FIXME: SORT! and make sorting flexible (alphabetic, by pkg status) // output the sorted map - for (K = output_map.begin(); K != output_map.end(); K++) + for (K = output_map.begin(); K != output_map.end(); ++K) std::cout << (*K).second << std::endl; return true; diff --combined doc/po/de.po index 3c9799fe1,67c3f992b..61f99ee81 --- a/doc/po/de.po +++ b/doc/po/de.po @@@ -1,14 -1,14 +1,29 @@@ --# Translation of apt-doc to German --# Copyright (C) 1997, 1998, 1999 Jason Gunthorpe and others. --# This file is distributed under the same license as the apt-doc package. - # Chris Leick , 2009-2012. -# Chris Leick , 2009-2014. ++# SOME DESCRIPTIVE TITLE. ++# Copyright (C) YEAR Free Software Foundation, Inc. ++# FIRST AUTHOR , YEAR. # ++#, fuzzy msgid "" msgstr "" - "Project-Id-Version: apt-doc 0.9.7\n" -"Project-Id-Version: apt-doc 0.9.14.2\n" --"Report-Msgid-Bugs-To: APT Development Team \n" - "POT-Creation-Date: 2014-01-25 22:21+0100\n" - "PO-Revision-Date: 2012-06-25 22:49+0100\n" ++"Project-Id-Version: PACKAGE VERSION\n" ++"PO-Revision-Date: 2014-01-26 08:14+0100\n" ++"Last-Translator: FULL NAME \n" ++"Language-Team: LANGUAGE \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=CHARSET\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++#~ # Translation of apt-doc to German ++#~ # Copyright (C) 1997, 1998, 1999 Jason Gunthorpe and others. ++#~ # This file is distributed under the same license as the apt-doc package. ++#~ # Chris Leick , 2009-2014. ++#~ # ++#~ msgid "" ++#~ msgstr "" ++#~ "Project-Id-Version: apt-doc 0.9.14.2\n" ++#~ "Report-Msgid-Bugs-To: APT Development Team \n" + "POT-Creation-Date: 2014-01-24 12:29+0100\n" + "PO-Revision-Date: 2014-01-21 20:59+0100\n" "Last-Translator: Chris Leick \n" "Language-Team: German \n" "Language: de\n" @@@ -1334,6 -1334,14 +1349,14 @@@ msgid " "will never remove packages, only allow adding new ones. Configuration Item: " "APT::Get::Upgrade-Allow-New." msgstr "" + "erlaubt das Installieren neuer Pakete, wenn es zusammen mit " + "upgrade benutzt wird. Dies ist nützlich, falls das " + "Aktualisieren eines installierten Pakets zur Installation neue " + "Abhängigkeiten hat. Anstatt das Paket zurückzuhalten, wird upgrade ein Upgrade des Pakets durchführen und die neuen Abhängigkeiten " + "installieren. Beachten Sie, dass upgrade mit dieser " + "Option niemals Pakete entfernen, sondern nur das Hinzufügen neuer gestatten " + "wird.Konfigurationselement: APT::Get::Upgrade-Allow-New." #. type: Content of: #: apt-get.8.xml:407 @@@ -1553,6 -1561,7 +1576,7 @@@ msgstr " "fragen. Dies ist für Werkzeuge wie pbuilder nützlich. Konfigurationselement: " "APT::Get::AllowUnauthenticated." + # FIXME s/Item/Items/ #. type: Content of: #: apt-get.8.xml:527 msgid "" @@@ -1562,6 -1571,12 +1586,12 @@@ "Item: DpkgPM::Progress and Dpkg::Progress-Fancy." msgstr "" + "zeigt benutzerfreundliche Fortschrittsinformationen im Terminalfenster, wenn " + "Pakete installiert beziehungsweise entfernt werden oder ein Upgrade " + "durchgeführt wird. Informationen über eine maschinell auswertbare Version " + "dieser Daten finden Sie in README.progress-reporting im Apt-doc-Verzeichnis. " + "Konfigurationselemente: DpkgPM::Progress und " + "Dpkg::Progress-Fancy." #. type: Content of: #: apt-get.8.xml:540 apt-cache.8.xml:345 apt-key.8.xml:176 apt-mark.8.xml:127 @@@ -1572,7 -1587,7 +1602,7 @@@ msgstr "Dateien #. type: Content of: <refentry><refsect1><title> #: apt-get.8.xml:550 apt-cache.8.xml:352 apt-key.8.xml:197 apt-mark.8.xml:133 #: apt-secure.8.xml:193 apt-cdrom.8.xml:154 apt-config.8.xml:111 -#: apt.conf.5.xml:1206 apt_preferences.5.xml:707 sources.list.5.xml:258 +#: apt.conf.5.xml:1206 apt_preferences.5.xml:707 sources.list.5.xml:280 #: apt-extracttemplates.1.xml:72 apt-sortpkgs.1.xml:65 #: apt-ftparchive.1.xml:609 msgid "See Also" @@@ -2900,20 -2915,14 +2930,14 @@@ msgstr " #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-cdrom.8.xml:87 - #, fuzzy - #| msgid "" - #| "Mount point; specify the location to mount the CD-ROM. This mount point " - #| "must be listed in <filename>/etc/fstab</filename> and properly " - #| "configured. Configuration Item: <literal>Acquire::cdrom::mount</literal>." msgid "" "Do not try to auto-detect the CD-ROM path. Usually combined with the " "<option>--cdrom</option> option. Configuration Item: <literal>Acquire::" "cdrom::AutoDetect</literal>." msgstr "" - "Einhängepunkt; gibt den Ort an, an dem die CD-ROM eingehängt wird. Dieser " - "Einhängepunkt muss in <filename>/etc/fstab</filename> eingetragen und " - "angemessen konfiguriert sein. Konfigurationselement: <literal>Acquire::" - "cdrom::mount</literal>." + "versucht nicht, den CD-ROM-Pfad automatisch zu bestimmen. Dies wird " + "üblicherweise mit der Option <option>--cdrom</option> kombiniert. " + "Konfigurationselement: <literal>Acquire::cdrom::AutoDetect</literal>." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-cdrom.8.xml:95 @@@ -3894,13 -3903,6 +3918,6 @@@ msgstr " #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:391 - #, fuzzy - #| msgid "" - #| "The used bandwidth can be limited with <literal>Acquire::http::Dl-Limit</" - #| "literal> which accepts integer values in kilobytes. The default value is " - #| "0 which deactivates the limit and tries to use all available bandwidth " - #| "(note that this option implicitly disables downloading from multiple " - #| "servers at the same time.)" msgid "" "The used bandwidth can be limited with <literal>Acquire::http::Dl-Limit</" "literal> which accepts integer values in kilobytes per second. The default " @@@ -3909,11 -3911,11 +3926,11 @@@ "multiple servers at the same time." msgstr "" "Die benutzte Bandbreite kann durch <literal>Acquire::http::Dl-Limit</" - "literal> eingeschränkt werden, was Ganzzahlwerte in Kilobyte akzeptiert. Der " - "Vorgabewert ist 0, was die Beschränkung ausschaltet und versucht, sämtliche " - "verfügbare Bandbreite zu benutzen. (Beachten Sie, dass diese Optionen " - "implizit das Herunterladen von mehreren Servern zur gleichen Zeit " - "deaktiviert.)" + "literal> eingeschränkt werden, was Ganzzahlwerte in Kilobyte pro Sekunde " + "akzeptiert. Der Vorgabewert ist 0, was die Beschränkung ausschaltet und " + "versucht, sämtliche verfügbare Bandbreite zu benutzen. Beachten Sie, dass " + "diese Optionen implizit das Herunterladen von mehreren Servern zur gleichen " + "Zeit deaktiviert." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:398 @@@ -3940,6 -3942,15 +3957,15 @@@ msgid " "takes precedence over the legacy option name <literal>ProxyAutoDetect</" "literal>." msgstr "" + "<literal>Acquire::http::Proxy-Auto-Detect</literal> kann benutzt werden, um " + "einen externen Befehl zum Auffinden des HTTP-Proxys anzugeben, der benutzt " + "werden soll. APT erwartet den Befehl zum Ausgeben auf der Standardausgabe " + "imStil <literal>http://proxy:port/</literal>. Dies wird das typische " + "<literal>Acquire::http::Proxy</literal> außer Kraft setzen, aber keine " + "spezielle per <literal>Acquire::http::Proxy::$HOST</literal> gesetzte Proxy-" + "Rechnerkonfiguration. Eine Beispielimplementierung, die Avahi benutzt, " + "finden Sie im Paket &squid-deb-proxy-client;. Diese Option hat Vorrang vor " + "dem veralteten Optionsnamen <literal>ProxyAutoDetect</literal>." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:420 @@@ -4330,12 -4341,12 +4356,12 @@@ msgstr " #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:576 msgid "When downloading, force to use only the IPv4 protocol." - msgstr "" + msgstr "Beim Herunterladen wird die Verwendung des IPv4-Protokolls erzwungen." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:582 msgid "When downloading, force to use only the IPv6 protocol." - msgstr "" + msgstr "Beim Herunterladen wird die Verwendung des IPv6-Protokolls erzwungen." #. type: Content of: <refentry><refsect1><title> #: apt.conf.5.xml:589 @@@ -4575,13 -4586,6 +4601,6 @@@ msgstr " #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:703 - #, fuzzy - #| msgid "" - #| "This is a list of shell commands to run before invoking &dpkg;. Like " - #| "<literal>options</literal> this must be specified in list notation. The " - #| "commands are invoked in order using <filename>/bin/sh</filename>; should " - #| "any fail APT will abort. APT will pass the filenames of all .deb files it " - #| "is going to install to the commands, one per line on standard input." msgid "" "This is a list of shell commands to run before invoking &dpkg;. Like " "<literal>options</literal> this must be specified in list notation. The " @@@ -4595,17 -4599,12 +4614,12 @@@ msgstr " "Listenschreibweise angegeben werden. Die Befehle werden der Reihenfolge nach " "mit <filename>/bin/sh</filename> aufgerufen, sollte einer fehlschlagen, wird " "APT abgebrochen. APT wird den Befehlen die Dateinamen aller .deb-Dateien, " - "die es installieren wird, auf der Standardeingabe übergeben, einen pro Zeile." + "die es installieren wird, einen pro Zeile, an den angeforderten " + "standardmäßig auf die Standardeingabe verweisenden Dateideskriptor, " + "übergeben." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:710 - #, fuzzy - #| msgid "" - #| "Version 2 of this protocol dumps more information, including the protocol " - #| "version, the APT configuration space and the packages, files and versions " - #| "being changed. Version 2 is enabled by setting <literal>DPkg::Tools::" - #| "options::cmd::Version</literal> to 2. <literal>cmd</literal> is a command " - #| "given to <literal>Pre-Install-Pkgs</literal>." msgid "" "Version 2 of this protocol dumps more information, including the protocol " "version, the APT configuration space and the packages, files and versions " @@@ -4614,10 -4613,8 +4628,8 @@@ msgstr "" "Version 2 dieses Protokolls gibt mehr Informationen aus, einschließlich der " "Protokollversion, dem APT-Konfigurationsraum und den Paketen, Dateien und " - "den Versionen, die geändert werden. Version 2 wird durch Setzen von " - "<literal>DPkg::Tools::options::cmd::Version</literal> auf 2 eingeschaltet. " - "<literal>cmd</literal> ist ein Befehl, der an <literal>Pre-Install-Pkgs</" - "literal> gegeben wird." + "den Versionen, die geändert werden. Version 3 fügt jeder ausgegebenen " + "Version die Architektur und den <literal>MultiArch</literal>-Schalter hinzu." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:715 @@@ -4629,6 -4626,13 +4641,13 @@@ msgid " "the requested version it will send the information in the highest version it " "has support for instead." msgstr "" + "Die Protokollversion, die für den Befehl <literal><replaceable>Befehl</" + "replaceable></literal> benutzt werden soll, kann durch entsprechendes Setzen " + "von <literal>DPkg::Tools::options::<replaceable>Befehl</replaceable>::" + "Version</literal> ausgewählt werden, Voreinstellung ist Version 1. Falls APT " + "die angefragte Version nicht unterstützt, wird es stattdessen die " + "Informationen in der höchsten Version senden, für die es Unterstützung " + "bietet." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:722 @@@ -4640,6 -4644,13 +4659,13 @@@ msgid " "looking for the environment variable <envar>APT_HOOK_INFO_FD</envar> which " "contains the number of the used file descriptor as a confirmation." msgstr "" + "Der Dateideskriptor, der zum Senden der Informationen benutzt wird, kann mit " + "<literal>DPkg::Tools::options::<replaceable>Befehl</replaceable>::InfoFD</" + "literal> abgefragt werden. Er ist standardmäßig <literal>0</literal> für die " + "Standardeingabe und seit Version 0.9.11 verfügbar. Unterstützung für die " + "Option können Sie finden, indem Sie in die Umgebungsvariable " + "<envar>APT_HOOK_INFO_FD</envar> schauen. Sie enthält die Nummer des " + "verwendeten Dateideskriptors als eine Bestätigung." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml:732 @@@ -5210,7 -5221,7 +5236,7 @@@ msgstr " "filename> gelesenen Anbieter aus." #. type: Content of: <refentry><refsect1><title> -#: apt.conf.5.xml:1194 apt_preferences.5.xml:547 sources.list.5.xml:217 +#: apt.conf.5.xml:1194 apt_preferences.5.xml:547 sources.list.5.xml:239 #: apt-ftparchive.1.xml:598 msgid "Examples" msgstr "Beispiele" @@@ -6697,7 -6708,7 +6723,7 @@@ msgstr " "benötigt, um Quellindizes herunterzuladen." #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:80 +#: sources.list.5.xml:79 msgid "" "The format for a <filename>sources.list</filename> entry using the " "<literal>deb</literal> and <literal>deb-src</literal> types is:" @@@ -6706,62 -6717,21 +6732,62 @@@ msgstr " "<literal>deb</literal>- und <literal>deb-src</literal>-Typen benutzt, ist:" #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:83 -#, no-wrap -msgid "deb [ options ] uri distribution [component1] [component2] [...]" +#: sources.list.5.xml:82 +#, fuzzy, no-wrap +#| msgid "deb [ options ] uri distribution [component1] [component2] [...]" +msgid "deb [ options ] uri suite [component1] [component2] [...]" msgstr "deb [ Optionen ] URI Distribution [Komponente1] [Komponente2] […]" +#. type: Content of: <refentry><refsect1><para><literallayout> +#: sources.list.5.xml:86 +#, no-wrap +msgid "" +" Types: deb deb-src\n" +" URIs: http://example.com\n" +" Suites: stable testing\n" +" Sections: component1 component2\n" +" Description: short\n" +" long long long\n" +" [option1]: [option1-value]\n" +"\n" +" Types: deb\n" +" URIs: http://another.example.com\n" +" Suites: experimental\n" +" Sections: component1 component2\n" +" Enabled: no\n" +" Description: short\n" +" long long long\n" +" [option1]: [option1-value]\n" +" " +msgstr "" + +#. type: Content of: <refentry><refsect1><para> +#: sources.list.5.xml:84 +msgid "" +"Alternatively a rfc822 style format is also supported: <placeholder type=" +"\"literallayout\" id=\"0\"/>" +msgstr "" + #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:85 +#: sources.list.5.xml:105 +#, fuzzy +#| msgid "" +#| "The URI for the <literal>deb</literal> type must specify the base of the " +#| "Debian distribution, from which APT will find the information it needs. " +#| "<literal>distribution</literal> can specify an exact path, in which case " +#| "the components must be omitted and <literal>distribution</literal> must " +#| "end with a slash (<literal>/</literal>). This is useful for the case when " +#| "only a particular sub-section of the archive denoted by the URI is of " +#| "interest. If <literal>distribution</literal> does not specify an exact " +#| "path, at least one <literal>component</literal> must be present." msgid "" "The URI for the <literal>deb</literal> type must specify the base of the " "Debian distribution, from which APT will find the information it needs. " -"<literal>distribution</literal> can specify an exact path, in which case the " -"components must be omitted and <literal>distribution</literal> must end with " -"a slash (<literal>/</literal>). This is useful for the case when only a " +"<literal>suite</literal> can specify an exact path, in which case the " +"components must be omitted and <literal>suite</literal> must end with a " +"slash (<literal>/</literal>). This is useful for the case when only a " "particular sub-section of the archive denoted by the URI is of interest. If " -"<literal>distribution</literal> does not specify an exact path, at least one " +"<literal>suite</literal> does not specify an exact path, at least one " "<literal>component</literal> must be present." msgstr "" "Die URI für den <literal>deb</literal>-Typ muss die Basis der Debian-" @@@ -6775,24 -6745,15 +6801,24 @@@ "angegeben sein." #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:94 -msgid "" -"<literal>distribution</literal> may also contain a variable, <literal>" -"$(ARCH)</literal> which expands to the Debian architecture (such as " -"<literal>amd64</literal> or <literal>armel</literal>) used on the system. " -"This permits architecture-independent <filename>sources.list</filename> " -"files to be used. In general this is only of interest when specifying an " -"exact path, <literal>APT</literal> will automatically generate a URI with " -"the current architecture otherwise." +#: sources.list.5.xml:114 +#, fuzzy +#| msgid "" +#| "<literal>distribution</literal> may also contain a variable, <literal>" +#| "$(ARCH)</literal> which expands to the Debian architecture (such as " +#| "<literal>amd64</literal> or <literal>armel</literal>) used on the system. " +#| "This permits architecture-independent <filename>sources.list</filename> " +#| "files to be used. In general this is only of interest when specifying an " +#| "exact path, <literal>APT</literal> will automatically generate a URI with " +#| "the current architecture otherwise." +msgid "" +"<literal>suite</literal> may also contain a variable, <literal>$(ARCH)</" +"literal> which expands to the Debian architecture (such as <literal>amd64</" +"literal> or <literal>armel</literal>) used on the system. This permits " +"architecture-independent <filename>sources.list</filename> files to be used. " +"In general this is only of interest when specifying an exact path, " +"<literal>APT</literal> will automatically generate a URI with the current " +"architecture otherwise." msgstr "" "<literal>distribution</literal> könnte außerdem eine Variable, <literal>" "$(ARCH)</literal>, enthalten, die zur Debian-Architektur (wie " @@@ -6804,32 -6765,18 +6830,32 @@@ "Architektur generieren." #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:102 -msgid "" -"Since only one distribution can be specified per line it may be necessary to " -"have multiple lines for the same URI, if a subset of all available " -"distributions or components at that location is desired. APT will sort the " -"URI list after it has generated a complete set internally, and will collapse " -"multiple references to the same Internet host, for instance, into a single " -"connection, so that it does not inefficiently establish an FTP connection, " -"close it, do something else, and then re-establish a connection to that same " -"host. This feature is useful for accessing busy FTP sites with limits on the " -"number of simultaneous anonymous users. APT also parallelizes connections to " -"different hosts to more effectively deal with sites with low bandwidth." +#: sources.list.5.xml:122 +#, fuzzy +#| msgid "" +#| "Since only one distribution can be specified per line it may be necessary " +#| "to have multiple lines for the same URI, if a subset of all available " +#| "distributions or components at that location is desired. APT will sort " +#| "the URI list after it has generated a complete set internally, and will " +#| "collapse multiple references to the same Internet host, for instance, " +#| "into a single connection, so that it does not inefficiently establish an " +#| "FTP connection, close it, do something else, and then re-establish a " +#| "connection to that same host. This feature is useful for accessing busy " +#| "FTP sites with limits on the number of simultaneous anonymous users. APT " +#| "also parallelizes connections to different hosts to more effectively deal " +#| "with sites with low bandwidth." +msgid "" +"In the traditional style sources.list format since only one distribution can " +"be specified per line it may be necessary to have multiple lines for the " +"same URI, if a subset of all available distributions or components at that " +"location is desired. APT will sort the URI list after it has generated a " +"complete set internally, and will collapse multiple references to the same " +"Internet host, for instance, into a single connection, so that it does not " +"inefficiently establish an FTP connection, close it, do something else, and " +"then re-establish a connection to that same host. This feature is useful for " +"accessing busy FTP sites with limits on the number of simultaneous anonymous " +"users. APT also parallelizes connections to different hosts to more " +"effectively deal with sites with low bandwidth." msgstr "" "Da pro Zeile nur eine Distribution angegeben werden kann, könnte es nötig " "sein, mehrere Zeilen für die gleiche URI zu haben, falls eine Untermenge " @@@ -6845,7 -6792,7 +6871,7 @@@ "niedriger Bandbreite hauszuhalten." #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:114 +#: sources.list.5.xml:136 msgid "" "<literal>options</literal> is always optional and needs to be surrounded by " "square brackets. It can consist of multiple settings in the form " @@@ -6863,7 -6810,7 +6889,7 @@@ msgstr " "stillschweigend ignoriert werden." #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> -#: sources.list.5.xml:120 +#: sources.list.5.xml:142 msgid "" "<literal>arch=<replaceable>arch1</replaceable>,<replaceable>arch2</" "replaceable>,…</literal> can be used to specify for which architectures " @@@ -6879,29 -6826,22 +6905,22 @@@ msgstr " "heruntergeladen." #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> - #: sources.list.5.xml:146 - #, fuzzy - #| msgid "" - #| "<literal>arch=<replaceable>arch1</replaceable>,<replaceable>arch2</" - #| "replaceable>,…</literal> can be used to specify for which architectures " - #| "information should be downloaded. If this option is not set all " - #| "architectures defined by the <literal>APT::Architectures</literal> option " - #| "will be downloaded." + #: sources.list.5.xml:124 msgid "" "<literal>arch+=<replaceable>arch1</replaceable>,<replaceable>arch2</" "replaceable>,…</literal> and <literal>arch-=<replaceable>arch1</replaceable>," "<replaceable>arch2</replaceable>,…</literal> which can be used to add/remove " "architectures from the set which will be downloaded." msgstr "" - "<literal>arch=<replaceable>Architektur1</replaceable>," - "<replaceable>Architektur2</replaceable>, …</literal> kann benutzt werden, um " - "anzugeben, für welche Architekturen Paketinformationen heruntergeladen " - "werden sollen. Falls diese Option nicht gesetzt ist, werden alle durch die " - "Option <literal>APT::Architectures</literal> definierten Architekturen " - "heruntergeladen." + "<literal>arch+=<replaceable>Architektur1</replaceable>," + "<replaceable>Architektur2</replaceable>, …</literal> und <literal>arch-" + "=<replaceable>Architektur1</replaceable>,<replaceable>Architektur2</" + "replaceable>, …</literal>, die benutzt werden können, um der " + "Zusammenstellung, die heruntergeladen werden soll, Architekturen " + "hinzuzufügen oder zu entfernen." #. type: Content of: <refentry><refsect1><para><itemizedlist><listitem><para> -#: sources.list.5.xml:127 +#: sources.list.5.xml:149 msgid "" "<literal>trusted=yes</literal> can be set to indicate that packages from " "this source are always authenticated even if the <filename>Release</" @@@ -6919,7 -6859,7 +6938,7 @@@ msgstr " "korrekt authentifizierte Quellen als nicht authentifiziert." #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:134 +#: sources.list.5.xml:156 msgid "" "It is important to list sources in order of preference, with the most " "preferred source listed first. Typically this will result in sorting by " @@@ -6933,12 -6873,12 +6952,12 @@@ msgstr " "Rechnern, zum Beispiel)." #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:139 +#: sources.list.5.xml:161 msgid "Some examples:" msgstr "Einige Beispiele:" #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:141 +#: sources.list.5.xml:163 #, no-wrap msgid "" "deb http://ftp.debian.org/debian &stable-codename; main contrib non-free\n" @@@ -6950,17 -6890,17 +6969,17 @@@ msgstr " " " #. type: Content of: <refentry><refsect1><title> -#: sources.list.5.xml:147 +#: sources.list.5.xml:169 msgid "URI specification" msgstr "URI-Beschreibung" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:149 +#: sources.list.5.xml:171 msgid "The currently recognized URI types are:" msgstr "Die derzeit zulässigen URI-Typen sind:" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> -#: sources.list.5.xml:153 +#: sources.list.5.xml:175 msgid "" "The file scheme allows an arbitrary directory in the file system to be " "considered an archive. This is useful for NFS mounts and local mirrors or " @@@ -6971,7 -6911,7 +6990,7 @@@ msgstr " "lokale Spiegel oder Archive." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> -#: sources.list.5.xml:160 +#: sources.list.5.xml:182 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." @@@ -6981,7 -6921,7 +7000,7 @@@ msgstr " "der Quellenliste zu erstellen." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> -#: sources.list.5.xml:167 +#: sources.list.5.xml:189 msgid "" "The http scheme specifies an HTTP server for the archive. If an environment " "variable <envar>http_proxy</envar> is set with the format http://server:" @@@ -6998,7 -6938,7 +7017,7 @@@ msgstr " "Beachten Sie, dass dies eine unsichere Authentifizierungsmethode ist." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> -#: sources.list.5.xml:178 +#: sources.list.5.xml:200 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. " @@@ -7020,7 -6960,7 +7039,7 @@@ msgstr " "benutzen, werden ignoriert." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> -#: sources.list.5.xml:190 +#: sources.list.5.xml:212 msgid "" "The copy scheme is identical to the file scheme except that packages are " "copied into the cache directory instead of used directly at their location. " @@@ -7033,7 -6973,7 +7052,7 @@@ msgstr " "Wechseldatenträger benutzen, um Dateien mit APT umherzukopieren." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> -#: sources.list.5.xml:197 +#: sources.list.5.xml:219 msgid "" "The rsh/ssh method invokes RSH/SSH to connect to a remote host and access " "the files as a given user. Prior configuration of rhosts or RSA keys is " @@@ -7047,12 -6987,12 +7066,12 @@@ msgstr " "<command>find</command> und <command>dd</command> verwandt." #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><term> -#: sources.list.5.xml:204 +#: sources.list.5.xml:226 msgid "adding more recognizable URI types" msgstr "weitere zulässige URI-Typen hinzufügen" #. type: Content of: <refentry><refsect1><para><variablelist><varlistentry><listitem><para> -#: sources.list.5.xml:206 +#: sources.list.5.xml:228 msgid "" "APT can be extended with more methods shipped in other optional packages, " "which should follow the naming scheme <package>apt-transport-" @@@ -7071,7 -7011,7 +7090,7 @@@ msgstr " "Benutzung von debtorrent verfügbar – siehe &apt-transport-debtorrent;." #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:218 +#: sources.list.5.xml:240 msgid "" "Uses the archive stored locally (or NFS mounted) at /home/jason/debian for " "stable/main, stable/contrib, and stable/non-free." @@@ -7080,37 -7020,37 +7099,37 @@@ msgstr " "jason/debian für stable/main, stable/contrib und stable/non-free." #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:220 +#: sources.list.5.xml:242 #, no-wrap msgid "deb file:/home/jason/debian stable main contrib non-free" msgstr "deb file:/home/jason/debian stable main contrib non-free" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:222 +#: sources.list.5.xml:244 msgid "As above, except this uses the unstable (development) distribution." msgstr "" "wie oben, außer das dies die »unstable«- (Entwicklungs-) Distribution " "benutzt." #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:223 +#: sources.list.5.xml:245 #, no-wrap msgid "deb file:/home/jason/debian unstable main contrib non-free" msgstr "deb file:/home/jason/debian unstable main contrib non-free" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:225 +#: sources.list.5.xml:247 msgid "Source line for the above" msgstr "Quellzeile für obiges" #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:226 +#: sources.list.5.xml:248 #, no-wrap msgid "deb-src file:/home/jason/debian unstable main contrib non-free" msgstr "deb-src file:/home/jason/debian unstable main contrib non-free" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:228 +#: sources.list.5.xml:250 msgid "" "The first line gets package information for the architectures in " "<literal>APT::Architectures</literal> while the second always retrieves " @@@ -7121,7 -7061,7 +7140,7 @@@ msgstr " "<literal>amd64</literal> und <literal>armel</literal> holt." #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:230 +#: sources.list.5.xml:252 #, no-wrap msgid "" "deb http://ftp.debian.org/debian &stable-codename; main\n" @@@ -7131,7 -7071,7 +7150,7 @@@ msgstr " "deb [ arch=amd64,armel ] http://ftp.debian.org/debian &stable-codename; main" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:233 +#: sources.list.5.xml:255 msgid "" "Uses HTTP to access the archive at archive.debian.org, and uses only the " "hamm/main area." @@@ -7140,13 -7080,13 +7159,13 @@@ msgstr " "den hamm/main-Bereich zu benutzen." #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:235 +#: sources.list.5.xml:257 #, no-wrap msgid "deb http://archive.debian.org/debian-archive hamm main" msgstr "deb http://archive.debian.org/debian-archive hamm main" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:237 +#: sources.list.5.xml:259 msgid "" "Uses FTP to access the archive at ftp.debian.org, under the debian " "directory, and uses only the &stable-codename;/contrib area." @@@ -7156,13 -7096,13 +7175,13 @@@ msgstr " "benutzen." #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:239 +#: sources.list.5.xml:261 #, no-wrap msgid "deb ftp://ftp.debian.org/debian &stable-codename; contrib" msgstr "deb ftp://ftp.debian.org/debian &stable-codename; contrib" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:241 +#: sources.list.5.xml:263 msgid "" "Uses FTP to access the archive at ftp.debian.org, under the debian " "directory, and uses only the unstable/contrib area. If this line appears as " @@@ -7176,19 -7116,19 +7195,19 @@@ msgstr " "für beide Quellzeilen benutzt." #. type: Content of: <refentry><refsect1><literallayout> -#: sources.list.5.xml:245 +#: sources.list.5.xml:267 #, no-wrap msgid "deb ftp://ftp.debian.org/debian unstable contrib" msgstr "deb ftp://ftp.debian.org/debian unstable contrib" #. type: Content of: <refentry><refsect1><para><literallayout> -#: sources.list.5.xml:254 +#: sources.list.5.xml:276 #, no-wrap msgid "deb http://ftp.tlh.debian.org/universe unstable/binary-$(ARCH)/" msgstr "deb http://ftp.tlh.debian.org/universe unstable/binary-$(ARCH)/" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:247 +#: sources.list.5.xml:269 msgid "" "Uses HTTP to access the archive at ftp.tlh.debian.org, under the universe " "directory, and uses only files found under <filename>unstable/binary-i386</" @@@ -7208,7 -7148,7 +7227,7 @@@ msgstr " "type=\"literallayout\" id=\"0\"/>" #. type: Content of: <refentry><refsect1><para> -#: sources.list.5.xml:259 +#: sources.list.5.xml:281 msgid "&apt-cache; &apt-conf;" msgstr "&apt-cache; &apt-conf;" @@@ -8749,18 -8689,9 +8768,9 @@@ msgstr " #. type: <p></p> #: guide.sgml:163 - #, fuzzy - #| msgid "" - #| "<prgn>apt-get</prgn> has several command line options that are detailed " - #| "in its man page, <manref section=\"8\" name=\"apt-get\">. The most useful " - #| "option is <tt>-d</tt> which does not install the fetched files. If the " - #| "system has to download a large number of package it would be undesired to " - #| "start installing them in case something goes wrong. When <tt>-d</tt> is " - #| "used the downloaded archives can be installed by simply running the " - #| "command that caused them to be downloaded again without <tt>-d</tt>." msgid "" "<prgn>apt-get</prgn> has several command line options that are detailed in " - "its man page, <manref name=\"apt-get\" section=\"8\">. The most useful " + "its man page, <manref section=\"8\" name=\"apt-get\">. The most useful " "option is <tt>-d</tt> which does not install the fetched files. If the " "system has to download a large number of package it would be undesired to " "start installing them in case something goes wrong. When <tt>-d</tt> is used " diff --combined test/integration/framework index ca2f90050,3ea9f3774..5439244f7 --- a/test/integration/framework +++ b/test/integration/framework @@@ -3,40 -3,46 +3,46 @@@ EXIT_CODE=0 # we all like colorful messages - if expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null && \ - expr match "$(readlink -f /proc/$$/fd/2)" '/dev/pts/[0-9]\+' > /dev/null; then - CERROR="" # red - CWARNING="" # yellow - CMSG="" # green - CINFO="" # light blue - CDEBUG="" # blue - CNORMAL="" # default system console color - CDONE="" # green - CPASS="" # green - CFAIL="" # red - CCMD="" # pink + if [ "$MSGCOLOR" != 'NO' ]; then + if ! expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null; then + export MSGCOLOR='NO' + fi + fi + + + if [ "$MSGCOLOR" != 'NO' ]; then + CERROR="\033[1;31m" # red + CWARNING="\033[1;33m" # yellow + CMSG="\033[1;32m" # green + CINFO="\033[1;96m" # light blue + CDEBUG="\033[1;94m" # blue + CNORMAL="\033[0;39m" # default system console color + CDONE="\033[1;32m" # green + CPASS="\033[1;32m" # green + CFAIL="\033[1;31m" # red + CCMD="\033[1;35m" # pink fi msgdie() { echo "${CERROR}E: $1${CNORMAL}" >&2; exit 1; } msgwarn() { echo "${CWARNING}W: $1${CNORMAL}" >&2; } - msgmsg() { echo "${CMSG}$1${CNORMAL}" >&2; } - msginfo() { echo "${CINFO}I: $1${CNORMAL}" >&2; } - msgdebug() { echo "${CDEBUG}D: $1${CNORMAL}" >&2; } - msgdone() { echo "${CDONE}DONE${CNORMAL}" >&2; } + msgmsg() { echo "${CMSG}$1${CNORMAL}"; } + msginfo() { echo "${CINFO}I: $1${CNORMAL}"; } + msgdebug() { echo "${CDEBUG}D: $1${CNORMAL}"; } + msgdone() { echo "${CDONE}DONE${CNORMAL}"; } msgnwarn() { echo -n "${CWARNING}W: $1${CNORMAL}" >&2; } - msgnmsg() { echo -n "${CMSG}$1${CNORMAL}" >&2; } - msgninfo() { echo -n "${CINFO}I: $1${CNORMAL}" >&2; } - msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}" >&2; } + msgnmsg() { echo -n "${CMSG}$1${CNORMAL}"; } + msgninfo() { echo -n "${CINFO}I: $1${CNORMAL}"; } + msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}"; } msgtest() { while [ -n "$1" ]; do - echo -n "${CINFO}$1${CCMD} " >&2; - echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} " >&2; + echo -n "${CINFO}$1${CCMD} " + echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} " shift if [ -n "$1" ]; then shift; else break; fi done - echo -n "…${CNORMAL} " >&2; + echo -n "…${CNORMAL} " } - msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; } + msgpass() { echo "${CPASS}PASS${CNORMAL}"; } msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; } msgfail() { if [ $# -gt 0 ]; then echo "${CFAIL}FAIL: $*${CNORMAL}" >&2; @@@ -57,7 -63,7 +63,7 @@@ if [ $MSGLEVEL -le 2 ]; the msgmsg() { true; } msgnmsg() { true; } msgtest() { true; } - msgpass() { echo -n " ${CPASS}P${CNORMAL}" >&2; } + msgpass() { echo -n " ${CPASS}P${CNORMAL}"; } msgskip() { echo -n " ${CWARNING}S${CNORMAL}" >&2; } if [ -n "$CFAIL" ]; then msgfail() { echo -n " ${CFAIL}FAIL${CNORMAL}" >&2; EXIT_CODE=$((EXIT_CODE+1)); } @@@ -81,50 -87,58 +87,59 @@@ msgdone() [ "$1" = "die" -a $MSGLEVEL -le 0 ]; then true; else - echo "${CDONE}DONE${CNORMAL}" >&2; + echo "${CDONE}DONE${CNORMAL}"; fi } runapt() { msgdebug "Executing: ${CCMD}$*${CDEBUG} " + local CMD="$1" + shift if [ -f ./aptconfig.conf ]; then - MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$* + MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$CMD "$@" elif [ -f ../aptconfig.conf ]; then - MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$* + MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$CMD "$@" else - MALLOC_PERTURB_=21 MALLOC_CHECK_=2 LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$* + MALLOC_PERTURB_=21 MALLOC_CHECK_=2 LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$CMD "$@" fi } - aptconfig() { runapt apt-config $*; } - aptcache() { runapt apt-cache $*; } - aptcdrom() { runapt apt-cdrom $*; } - aptget() { runapt apt-get $*; } - apt() { runapt apt $*; } - aptftparchive() { runapt apt-ftparchive $*; } - aptkey() { runapt apt-key $*; } - aptmark() { runapt apt-mark $*; } + aptconfig() { runapt apt-config "$@"; } + aptcache() { runapt apt-cache "$@"; } + aptcdrom() { runapt apt-cdrom "$@"; } + aptget() { runapt apt-get "$@"; } + aptftparchive() { runapt apt-ftparchive "$@"; } + aptkey() { runapt apt-key "$@"; } + aptmark() { runapt apt-mark "$@"; } ++apt() { runapt apt "$@"; } aptwebserver() { - LD_LIBRARY_PATH=${APTWEBSERVERBINDIR} ${APTWEBSERVERBINDIR}/aptwebserver $*; + LD_LIBRARY_PATH=${APTWEBSERVERBINDIR} ${APTWEBSERVERBINDIR}/aptwebserver "$@"; } dpkg() { - $(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $* + command dpkg --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log "$@" } aptitude() { if [ -f ./aptconfig.conf ]; then - APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* + APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} command aptitude "$@" elif [ -f ../aptconfig.conf ]; then - APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* + APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} command aptitude "$@" else - LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* + LD_LIBRARY_PATH=${BUILDDIRECTORY} command aptitude "$@" fi } gdb() { echo "gdb: run »$*«" - APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which gdb) ${BUILDDIRECTORY}/$1 --args $* + APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} command gdb ${BUILDDIRECTORY}/$1 --args "$@" } http() { LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/methods/http } + gpg() { + # see apt-key for the whole trickery. Setup is done in setupenvironment + command gpg --ignore-time-conflict --no-options --no-default-keyring \ + --homedir "${TMPWORKINGDIRECTORY}/gnupghome" \ + --no-auto-check-trustdb --trust-model always \ + "$@" + } exitwithstatus() { # error if we about to overflow, but ... @@@ -171,7 -185,7 +186,7 @@@ setupenvironment() mkdir rootdir aptarchive keys cd rootdir mkdir -p etc/apt/apt.conf.d etc/apt/sources.list.d etc/apt/trusted.gpg.d etc/apt/preferences.d - mkdir -p var/cache var/lib var/log + mkdir -p var/cache var/lib var/log tmp mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers touch var/lib/dpkg/available mkdir -p usr/lib/apt @@@ -197,16 -211,29 +212,30 @@@ echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf - if ! $(which dpkg) --assert-multi-arch >/dev/null 2>&1; then + if ! command dpkg --assert-multi-arch >/dev/null 2>&1; then echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it… fi echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf echo 'quiet::NoUpdate "true";' >> aptconfig.conf echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https + echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary - export LC_ALL=C + export LC_ALL=C.UTF-8 export PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin" configcompression '.' 'gz' #'bz2' 'lzma' 'xz' + + # gpg needs a trustdb to function, but it can't be invalid (not even empty) + # see also apt-key where this trickery comes from: + local TRUSTDBDIR="${TMPWORKINGDIRECTORY}/gnupghome" + mkdir "$TRUSTDBDIR" + chmod 700 "$TRUSTDBDIR" + # We also don't use a secret keyring, of course, but gpg panics and + # implodes if there isn't one available - and writeable for imports + local SECRETKEYRING="${TRUSTDBDIR}/secring.gpg" + touch $SECRETKEYRING + # now create the trustdb with an (empty) dummy keyring + # newer gpg versions are fine without it, but play it safe for now + gpg --quiet --check-trustdb --secret-keyring $SECRETKEYRING --keyring $SECRETKEYRING >/dev/null 2>&1 + msgdone "info" } @@@ -248,7 -275,7 +277,7 @@@ configdpkg() fi fi rm -f rootdir/etc/apt/apt.conf.d/00foreigndpkg - if $(which dpkg) --assert-multi-arch >/dev/null 2>&1; then + if command dpkg --assert-multi-arch >/dev/null 2>&1 ; then local ARCHS="$(getarchitectures)" if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then DPKGARCH="$(dpkg --print-architecture)" @@@ -392,7 -419,7 +421,7 @@@ Package: $NAME" >> ${BUILDDIR}/debian/c | while read SRC; do echo "pool/${SRC}" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.srclist # if expr match "${SRC}" '.*\.dsc' >/dev/null 2>&1; then - # gpg --yes --no-default-keyring --secret-keyring ./keys/joesixpack.sec \ + # gpg --yes --secret-keyring ./keys/joesixpack.sec \ # --keyring ./keys/joesixpack.pub --default-key 'Joe Sixpack' \ # --clearsign -o "${BUILDDIR}/../${SRC}.sign" "${BUILDDIR}/../$SRC" # mv "${BUILDDIR}/../${SRC}.sign" "${BUILDDIR}/../$SRC" @@@ -410,7 -437,14 +439,14 @@@ (cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$arch) (cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums) - dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. 2> /dev/null > /dev/null + local LOG="${BUILDDIR}/../${NAME}_${VERSION}_${arch}.dpkg-deb.log" + # ensure the right permissions as dpkg-deb ensists + chmod 755 ${BUILDDIR}/debian/tmp/DEBIAN + if ! dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. >$LOG 2>&1; then + cat $LOG + false + fi + rm $LOG echo "pool/${NAME}_${VERSION}_${arch}.deb" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.pkglist done @@@ -426,14 -460,19 +462,19 @@@ buildpackage() local RELEASE=$2 local SECTION=$3 local ARCH=$(getarchitecture $4) - msgninfo "Build package $(echo "$BUILDDIR" | grep -o '[^/]*$') for ${RELEASE} in ${SECTION}… " + local PKGNAME="$(echo "$BUILDDIR" | grep -o '[^/]*$')" + local BUILDLOG="$(readlink -f "${BUILDDIR}/../${PKGNAME}_${RELEASE}_${SECTION}.dpkg-bp.log")" + msgninfo "Build package ${PKGNAME} for ${RELEASE} in ${SECTION}… " cd $BUILDDIR if [ "$ARCH" = "all" ]; then ARCH="$(dpkg-architecture -qDEB_HOST_ARCH 2> /dev/null)" fi - local BUILT="$(dpkg-buildpackage -uc -us -a$ARCH 2> /dev/null)" - local PKGS="$( echo "$BUILT" | grep '^dpkg-deb: building package' | cut -d'/' -f 2 | sed -e "s#'\.##")" - local SRCS="$( echo "$BUILT" | grep '^dpkg-source: info: building' | grep -o '[a-z0-9._+~-]*$')" + if ! dpkg-buildpackage -uc -us -a$ARCH >$BUILDLOG 2>&1 ; then + cat $BUILDLOG + false + fi + local PKGS="$(grep '^dpkg-deb: building package' $BUILDLOG | cut -d'/' -f 2 | sed -e "s#'\.##")" + local SRCS="$(grep '^dpkg-source: info: building' $BUILDLOG | grep -o '[a-z0-9._+~-]*$')" cd - > /dev/null for PKG in $PKGS; do echo "pool/${PKG}" >> ${TMPWORKINGDIRECTORY}/incoming/${RELEASE}.${SECTION}.pkglist @@@ -446,9 -485,9 +487,9 @@@ buildaptarchive() { if [ -d incoming ]; then - buildaptarchivefromincoming $* + buildaptarchivefromincoming "$@" else - buildaptarchivefromfiles $* + buildaptarchivefromfiles "$@" fi } @@@ -664,7 -703,12 +705,12 @@@ compressfile() } # can be overridden by testcases for their pleasure - getcodenamefromsuite() { echo -n "$1"; } + getcodenamefromsuite() { + case "$1" in + unstable) echo 'sid';; + *) echo -n "$1";; + esac + } getreleaseversionfromsuite() { true; } getlabelfromsuite() { true; } @@@ -761,7 -805,7 +807,7 @@@ setupaptarchive() signreleasefiles() { local SIGNER="${1:-Joe Sixpack}" - local GPG="gpg --batch --yes --no-default-keyring --trustdb-name rootdir/etc/apt/trustdb.gpg" + local GPG="gpg --batch --yes" msgninfo "\tSign archive with $SIGNER key… " local REXKEY='keys/rexexpired' local SECEXPIREBAK="${REXKEY}.sec.bak" @@@ -808,8 -852,7 +854,7 @@@ webserverconfig() downloadfile "http://localhost:8080/_config/set/${1}/${2}" '/dev/null' >/dev/null local DOWNLOG='download-testfile.log' rm -f "$DOWNLOG" - local STATUS="$(mktemp)" - addtrap "rm $STATUS;" + local STATUS="${TMPWORKINGDIRECTORY}/rootdir/tmp/webserverconfig.status" downloadfile "http://localhost:8080/_config/find/aptwebserver::last-status-code" "$STATUS" > "$DOWNLOG" if [ "$(cat "$STATUS")" = '200' ]; then msgpass @@@ -817,6 -860,7 +862,7 @@@ cat >&2 "$DOWNLOG" msgfail "Statuscode was $(cat "$STATUS")" fi + rm "$STATUS" } rewritesourceslist() { @@@ -832,10 -876,12 +878,12 @@@ changetowebserver() else shift fi - local LOG='/dev/null' if test -x ${APTWEBSERVERBINDIR}/aptwebserver; then cd aptarchive - aptwebserver -o aptwebserver::fork=1 "$@" >$LOG 2>&1 + if ! aptwebserver -o aptwebserver::fork=1 "$@" >webserver.log 2>&1 ; then + cat $LOG + false + fi local PID="$(cat aptwebserver.pid)" if [ -z "$PID" ]; then msgdie 'Could not fork aptwebserver successfully' @@@ -924,7 -970,7 +972,7 @@@ Filename: ${2 } checkdiff() { - local DIFFTEXT="$($(which diff) -u $* | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')" + local DIFFTEXT="$(command diff -u "$@" | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')" if [ -n "$DIFFTEXT" ]; then echo echo "$DIFFTEXT" @@@ -951,28 -997,17 +999,27 @@@ testempty() } testequal() { + local MSG='Test of equality of' + if [ "$1" = '--nomsg' ]; then + MSG='' + shift + fi + - local COMPAREFILE=$(mktemp) + local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testequal.comparefile" + addtrap "rm $COMPAREFILE;" echo "$1" > $COMPAREFILE shift - msgtest "Test for equality of" "$*" + + if [ -n "$MSG" ]; then + msgtest "$MSG" "$*" + fi $* 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail } testequalor2() { - local COMPAREFILE1=$(mktemp) - local COMPAREFILE2=$(mktemp) - local COMPAREAGAINST=$(mktemp) - addtrap "rm $COMPAREFILE1 $COMPAREFILE2 $COMPAREAGAINST;" + local COMPAREFILE1="${TMPWORKINGDIRECTORY}/rootdir/tmp/testequalor2.comparefile1" + local COMPAREFILE2="${TMPWORKINGDIRECTORY}/rootdir/tmp/testequalor2.comparefile2" + local COMPAREAGAINST="${TMPWORKINGDIRECTORY}/rootdir/tmp/testequalor2.compareagainst" echo "$1" > $COMPAREFILE1 echo "$2" > $COMPAREFILE2 shift 2 @@@ -998,8 -1033,7 +1045,7 @@@ N: Can't select versions from package ' msgtest "Test for virtual packages" "apt-cache show $PACKAGE" VIRTUAL="${VIRTUAL} N: No packages found" - local COMPAREFILE=$(mktemp) - addtrap "rm $COMPAREFILE;" + local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testshowvirtual.comparefile" local ARCH="$(getarchitecture 'native')" echo "$VIRTUAL" | sed -e "s/:$ARCH//" -e 's/:all//' > $COMPAREFILE aptcache show -q=0 $PACKAGE 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail @@@ -1007,7 -1041,7 +1053,7 @@@ testnopackage() { msgtest "Test for non-existent packages" "apt-cache show $*" - local SHOWPKG="$(aptcache show $* 2>&1 | grep '^Package: ')" + local SHOWPKG="$(aptcache show "$@" 2>&1 | grep '^Package: ')" if [ -n "$SHOWPKG" ]; then echo echo "$SHOWPKG" @@@ -1019,10 -1053,10 +1065,10 @@@ testdpkginstalled() { msgtest "Test for correctly installed package(s) with" "dpkg -l $*" - local PKGS="$(dpkg -l $* 2>/dev/null | grep '^i' | wc -l)" + local PKGS="$(dpkg -l "$@" 2>/dev/null | grep '^i' | wc -l)" if [ "$PKGS" != $# ]; then echo $PKGS - dpkg -l $* | grep '^[a-z]' + dpkg -l "$@" | grep '^[a-z]' msgfail return 1 fi @@@ -1031,10 -1065,10 +1077,10 @@@ testdpkgnotinstalled() { msgtest "Test for correctly not-installed package(s) with" "dpkg -l $*" - local PKGS="$(dpkg -l $* 2> /dev/null | grep '^i' | wc -l)" + local PKGS="$(dpkg -l "$@" 2> /dev/null | grep '^i' | wc -l)" if [ "$PKGS" != 0 ]; then echo - dpkg -l $* | grep '^[a-z]' + dpkg -l "$@" | grep '^[a-z]' msgfail return 1 fi @@@ -1042,8 -1076,7 +1088,7 @@@ } testmarkedauto() { - local COMPAREFILE=$(mktemp) - addtrap "rm $COMPAREFILE;" + local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testmarkedauto.comparefile" if [ -n "$1" ]; then msgtest 'Test for correctly marked as auto-installed' "$*" while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE @@@ -1060,8 -1093,7 +1105,7 @@@ testsuccess() else msgtest 'Test for successful execution of' "$*" fi - local OUTPUT=$(mktemp) - addtrap "rm $OUTPUT;" + local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" if $@ >${OUTPUT} 2>&1; then msgpass else @@@ -1077,8 -1109,7 +1121,7 @@@ testfailure() else msgtest 'Test for failure in execution of' "$*" fi - local OUTPUT=$(mktemp) - addtrap "rm $OUTPUT;" + local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output" if $@ >${OUTPUT} 2>&1; then echo cat $OUTPUT