Status = StatError;
Dequeue();
}
-
++
+ // report mirror failure back to LP if we actually use a mirror
+ string FailReason = LookupTag(Message, "FailReason");
+ if(FailReason.size() != 0)
+ ReportMirrorFailure(FailReason);
+ else
+ ReportMirrorFailure(ErrorText);
}
/*}}}*/
// Acquire::Item::Start - Item has begun to download /*{{{*/
// Queue Packages file (either diff or full packages files, depending
// on the users option)
- if(_config->FindB("Acquire::PDiffs",true) == true)
- if(_config->FindB("Acquire::PDiffs",false) == true)
++ if(_config->FindB("Acquire::PDiffs", true) == true)
new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description,
(*Target)->ShortDesc, ExpectedIndexHash);
else
{
close(LockFD);
LockFD = -1;
++ const char *cmd;
++ if (getenv("SUDO_USER") != NULL)
++ cmd = "sudo dpkg --configure -a";
++ else
++ cmd = "dpkg --configure -a";
++ // TRANSLATORS: the %s contains the recovery command, usually
++ // dpkg --configure -a
return _error->Error(_("dpkg was interrupted, you must manually "
- "run 'dpkg --configure -a' to correct the problem. "));
- "run 'sudo dpkg --configure -a' to correct the problem. "));
++ "run '%s' to correct the problem. "), cmd);
}
LockCount++;
List.erase(List.begin(),List.end());
}
/*}}}*/
- if (_config->FindB("Dpkg::ApportFailureReport",true) == false)
+ // pkgDpkgPM::WriteApportReport - write out error report pkg failure /*{{{*/
+ // ---------------------------------------------------------------------
+ /* */
+ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
+ {
+ string pkgname, reportfile, srcpkgname, pkgver, arch;
+ string::size_type pos;
+ FILE *report;
+
++ if (_config->FindB("Dpkg::ApportFailureReport", false) == false)
+ {
+ std::clog << "configured to not write apport reports" << std::endl;
+ return;
+ }
+
+ // only report the first errors
+ if(pkgFailures > _config->FindI("APT::Apport::MaxReports", 3))
+ {
+ std::clog << _("No apport report written because MaxReports is reached already") << std::endl;
+ return;
+ }
+
+ // check if its not a follow up error
+ const char *needle = dgettext("dpkg", "dependency problems - leaving unconfigured");
+ if(strstr(errormsg, needle) != NULL) {
+ std::clog << _("No apport report written because the error message indicates its a followup error from a previous failure.") << std::endl;
+ return;
+ }
+
+ // do not report disk-full failures
+ if(strstr(errormsg, strerror(ENOSPC)) != NULL) {
+ std::clog << _("No apport report written because the error message indicates a disk full error") << std::endl;
+ return;
+ }
+
+ // do not report out-of-memory failures
+ if(strstr(errormsg, strerror(ENOMEM)) != NULL) {
+ std::clog << _("No apport report written because the error message indicates a out of memory error") << std::endl;
+ return;
+ }
+
+ // do not report dpkg I/O errors
+ // XXX - this message is localized, but this only matches the English version. This is better than nothing.
+ if(strstr(errormsg, "short read in buffer_copy (")) {
+ std::clog << _("No apport report written because the error message indicates a dpkg I/O error") << std::endl;
+ return;
+ }
+
+ // get the pkgname and reportfile
+ pkgname = flNotDir(pkgpath);
+ pos = pkgname.find('_');
+ if(pos != string::npos)
+ pkgname = pkgname.substr(0, pos);
+
+ // find the package versin and source package name
+ pkgCache::PkgIterator Pkg = Cache.FindPkg(pkgname);
+ if (Pkg.end() == true)
+ return;
+ pkgCache::VerIterator Ver = Cache.GetCandidateVer(Pkg);
+ if (Ver.end() == true)
+ return;
+ pkgver = Ver.VerStr() == NULL ? "unknown" : Ver.VerStr();
+ pkgRecords Recs(Cache);
+ pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
+ srcpkgname = Parse.SourcePkg();
+ if(srcpkgname.empty())
+ srcpkgname = pkgname;
+
+ // if the file exists already, we check:
+ // - if it was reported already (touched by apport).
+ // If not, we do nothing, otherwise
+ // we overwrite it. This is the same behaviour as apport
+ // - if we have a report with the same pkgversion already
+ // then we skip it
+ reportfile = flCombine("/var/crash",pkgname+".0.crash");
+ if(FileExists(reportfile))
+ {
+ struct stat buf;
+ char strbuf[255];
+
+ // check atime/mtime
+ stat(reportfile.c_str(), &buf);
+ if(buf.st_mtime > buf.st_atime)
+ return;
+
+ // check if the existing report is the same version
+ report = fopen(reportfile.c_str(),"r");
+ while(fgets(strbuf, sizeof(strbuf), report) != NULL)
+ {
+ if(strstr(strbuf,"Package:") == strbuf)
+ {
+ char pkgname[255], version[255];
+ if(sscanf(strbuf, "Package: %s %s", pkgname, version) == 2)
+ if(strcmp(pkgver.c_str(), version) == 0)
+ {
+ fclose(report);
+ return;
+ }
+ }
+ }
+ fclose(report);
+ }
+
+ // now write the report
+ arch = _config->Find("APT::Architecture");
+ report = fopen(reportfile.c_str(),"w");
+ if(report == NULL)
+ return;
+ if(_config->FindB("DPkgPM::InitialReportOnly",false) == true)
+ chmod(reportfile.c_str(), 0);
+ else
+ chmod(reportfile.c_str(), 0600);
+ fprintf(report, "ProblemType: Package\n");
+ fprintf(report, "Architecture: %s\n", arch.c_str());
+ time_t now = time(NULL);
+ fprintf(report, "Date: %s" , ctime(&now));
+ fprintf(report, "Package: %s %s\n", pkgname.c_str(), pkgver.c_str());
+ fprintf(report, "SourcePackage: %s\n", srcpkgname.c_str());
+ fprintf(report, "ErrorMessage:\n %s\n", errormsg);
+
+ // ensure that the log is flushed
+ if(term_out)
+ fflush(term_out);
+
+ // attach terminal log it if we have it
+ string logfile_name = _config->FindFile("Dir::Log::Terminal");
+ if (!logfile_name.empty())
+ {
+ FILE *log = NULL;
+ char buf[1024];
+
+ fprintf(report, "DpkgTerminalLog:\n");
+ log = fopen(logfile_name.c_str(),"r");
+ if(log != NULL)
+ {
+ while( fgets(buf, sizeof(buf), log) != NULL)
+ fprintf(report, " %s", buf);
+ fclose(log);
+ }
+ }
+
+ // log the ordering
+ const char *ops_str[] = {"Install", "Configure","Remove","Purge"};
+ fprintf(report, "AptOrdering:\n");
+ for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
+ fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]);
+
+ // attach dmesg log (to learn about segfaults)
+ if (FileExists("/bin/dmesg"))
+ {
+ FILE *log = NULL;
+ char buf[1024];
+
+ fprintf(report, "Dmesg:\n");
+ log = popen("/bin/dmesg","r");
+ if(log != NULL)
+ {
+ while( fgets(buf, sizeof(buf), log) != NULL)
+ fprintf(report, " %s", buf);
+ fclose(log);
+ }
+ }
+
+ // attach df -l log (to learn about filesystem status)
+ if (FileExists("/bin/df"))
+ {
+ FILE *log = NULL;
+ char buf[1024];
+
+ fprintf(report, "Df:\n");
+ log = popen("/bin/df -l","r");
+ if(log != NULL)
+ {
+ while( fgets(buf, sizeof(buf), log) != NULL)
+ fprintf(report, " %s", buf);
+ fclose(log);
+ }
+ }
+
+ fclose(report);
+
+ }
+ /*}}}*/
char dpkgbuf[1024];
int dpkgbuf_pos;
FILE *term_out;
+ FILE *history_out;
+ string dpkg_error;
protected:
+ int pkgFailures;
// progress reporting
struct DpkgState
// Helpers
bool RunScriptsWithPkgs(const char *Cnf);
bool SendV2Pkgs(FILE *F);
- void WriteHistoryTag(FILE* history_out, string tag, string value);
+ void WriteHistoryTag(string tag, string value);
+ // apport integration
+ void WriteApportReport(const char *pkgpath, const char *errormsg);
+
// dpkg log
bool OpenLog();
bool CloseLog();
{"remove",&DoInstall},
{"purge",&DoInstall},
{"autoremove",&DoInstall},
- {"purge",&DoInstall},
+ {"markauto",&DoMarkAuto},
+ {"unmarkauto",&DoMarkAuto},
{"dist-upgrade",&DoDistUpgrade},
{"dselect-upgrade",&DoDSelectUpgrade},
{"build-dep",&DoBuildDep},
--- /dev/null
+ #!/usr/bin/python
++#
++# This is a stub that is meant to support failure reporting of
++# mirrors to a central database
++#
++# its currently not used
+
+ import sys
+ import urllib
+ import apt_pkg
+
+ apt_pkg.init()
+ url = apt_pkg.Config.find("Acquire::Mirror::ReportFailures", "")
+ #"http://people.ubuntu.com:9000/mirror-failure")
+ #"http://localhost:9000/mirror-failure")
+ if not url:
+ sys.exit(0)
+
+ print "Reporting mirror failure to '%s'" % url
+
+ data = {}
+ data['mirror'] = sys.argv[1]
+ data['failurl'] = sys.argv[2]
+ data['error'] = sys.argv[3]
+ f = urllib.urlopen(url, urllib.urlencode(data))
+ f.read()
+ f.close()
+
+
TO=$(BIN)
TARGET=program
include $(COPY_H)
-# The apt-key program
-SOURCE=apt-report-mirror-failure
-TO=$(BIN)
-TARGET=program
-include $(COPY_H)
+
++# The apt-report-mirror-failure program
++#SOURCE=apt-report-mirror-failure
++#TO=$(BIN)
++#TARGET=program
++#include $(COPY_H)
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
- AC_DEFINE_UNQUOTED(VERSION,"0.7.26~exp4")
-AC_DEFINE_UNQUOTED(VERSION,"0.7.25ubuntu1")
++AC_DEFINE_UNQUOTED(VERSION,"0.7.26~exp6")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
APT
{
NeverAutoRemove
- {
+ {
+ "^linux-firmware$";
"^linux-image.*";
"^linux-restricted-modules.*";
- "^kfreebsd-image.*";
+ "^linux-ubuntu-modules-.*";
+ };
+
+ Never-MarkAuto-Sections
- {
++ {
+ "metapackages";
+ "restricted/metapackages";
+ "universe/metapackages";
+ "multiverse/metapackages";
+ "oldlibs";
+ "restricted/oldlibs";
+ "universe/oldlibs";
+ "multiverse/oldlibs";
+
};
};
-apt (0.7.25.3ubuntu9) lucid-proposed; urgency=low
++apt (0.7.26~exp6) experimental; urgency=low
+
- * debian/apt.postinst:
- - do not fail if getent returns nothing useful (LP: #579647)
- thanks to Jean-Baptiste Lallement
-
- -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 14 May 2010 09:40:50 +0200
-
-apt (0.7.25.3ubuntu8) lucid-proposed; urgency=low
++ [ Michael Vogt ]
++ * merge the remaining Ubuntu change:
++ - on gpg verification failure warn and restore the last known
++ good state
++ - on failure display the IP of the server (useful for servers
++ that use round robin DNS)
++ - support Original-Maintainer in RewritePackageOrder
++ - enable cdrom autodetection via libudev by default
++ - show messsage about Vcs in use when apt-get source is run for
++ packages maintained in a Vcs
++ - better support transitional packages with mark auto-installed.
++ when the transitional package is in "oldlibs" the new package
++ is not marked auto installed (same is true for section
++ metapackages)
++ - provide new "deb mirror://archive.foo/mirrors.list sid main"
++ method expects a list of mirrors (generated on the server e.g.
++ via geoip) and will use that, including cycle on failure
++ - write apport crash file on package failure (disabled by default
++ on debian until apport is available)
++ - support mirror failure reporting (disabled by default on debian)
++
++ -- Michael Vogt <mvo@debian.org> Wed, 09 Jun 2010 10:50:17 +0200
++
+apt (0.7.26~exp5) experimental; urgency=low
- [ Loïc Minier ]
- * Use https:// in Vcs-Bzr URL.
+ [ David Kalnischkies ]
+ * cmdline/apt-get.cc:
+ - rerun dpkg-source in source if --fix-broken is given (Closes: #576752)
+ - don't suggest held packages as they are installed (Closes: #578135)
+ - handle multiple --{tar,diff,dsc}-only options correctly
+ - show at the end of the install process a list of disappeared packages
+ * cmdline/apt-cache.cc:
+ - use GroupCount for package names in stats and add a package struct line
+ * methods/rred.cc:
+ - use the patchfile modification time instead of the one from the
+ "old" file - thanks to Philipp Weis for noticing! (Closes: #571541)
+ * debian/rules:
+ - remove targets referring to CVS or arch as they are useless
+ - use $(CURDIR) instead of $(pwd)
+ - use dpkg-buildflags if available for CXXFLAGS
+ * README.arch:
+ - remove the file completely as it has no use nowadays
+ * apt-pkg/depcache.cc:
+ - be doublesure that the killer query is empty before starting reinstall
+ * methods/gpgv.cc:
+ - remove the keyrings count limit by using vector magic
+ * contrib/mmap.cc:
+ - clarify "MMap reached size limit" error message, thanks Ivan Masár!
+ * doc/apt.ent
+ - add entities for the current oldstable/stable/testing codenames
+ * doc/sources.list.5.xml:
+ - use stable-codename instead of stable in the examples (Closes: #531492)
+ * doc/apt_preferences.5.xml:
+ - adapt some examples here to use current codenames as well
+ - add "NotAutomatic: yes" handling, thanks Osamu Aoki (Closes: #490347)
+ * debian/libapt-pkg-doc.doc-base.cache:
+ - remove yet another reference to the removed cache.sgml
+ * doc/apt-get.8.xml:
+ - do not say explicit target_release_{name,version,codename}, it should
+ be clear by itself and 'man' can break lines again (Closes: #566166)
+ - remove the gnome-apt reference as it is removed from unstable
+ * apt-pkg/deb/dpkgpm.cc:
+ - add 'disappear' to the known processing states, thanks Jonathan Nieder
+ * apt-pkg/packagemanager.h:
+ - export info about disappeared packages with GetDisappearedPackages()
[ Michael Vogt ]
- * apt-pkg/deb/debrecords.cc:
- - fix max tag buffer size (LP: #545336, closes: #578959)
- * apt-pkg/indexfile.cc:
- - If no "_" is found in the language code, try to find a "."
- This is required for languages like Esperanto that have no
- county associated with them (LP: #560956)
- Thanks to "Aisano" for the fix
+ * methods/http.{cc,h}:
+ - code cleanup, use enums instead of magic ints
+
+ [ Jari Aalto ]
+ * debian/rules:
+ - spell out some less known options to reduce manpage consultation-rate
+ - Use POSIX command substitution: $(<command sequence>)
+ - Remove EOL whitespace (Closes: #577804)
- -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 05 May 2010 10:33:46 +0200
+ [ Julian Andres Klode ]
+ * apt-pkg/acquire-item.cc:
+ - Fix pkgAcqFile::Custom600Headers() to always return something.
+
-apt (0.7.25.3ubuntu7) lucid; urgency=low
+ [ Christian Perrier ]
+ * Slovak translation update. Closes: #581159
+ * Italian translation update. Closes: #581742
- Cherry pick fixes from the lp:~mvo/apt/mvo branch:
+ -- Michael Vogt <mvo@debian.org> Tue, 25 May 2010 16:01:42 +0200
- [ Evan Dandrea ]
- * Remember hosts with general failures for
- https://wiki.ubuntu.com/NetworklessInstallationFixes (LP: #556831).
-
- [ Michael Vogt ]
- * improve debug output for Debug::pkgPackageManager
+apt (0.7.26~exp4) experimental; urgency=low
- -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 14 Apr 2010 20:30:03 +0200
+ [ David Kalnischkies ]
+ * apt-pkg/depcache.cc:
+ - rewrite the pseudo package reinstaller to be more intelligent
+ in his package choices
+ * apt-pkg/packagemanager.cc:
+ - don't try to "unpack" pseudo packages twice
+ * apt-pkg/contrib/fileutl.cc:
+ - add a parent-guarded "mkdir -p" as CreateDirectory()
+ * apt-pkg/acquire.{cc,h}:
+ - add a delayed constructor with Setup() for success reporting
+ - check for and create directories in Setup if needed instead of
+ error out unfriendly in the Constructor (Closes: #523920, #525783)
+ - optional handle a lock file in Setup()
+ * apt-pkg/acquire-item.cc:
+ - Acquire::ForceHash to force method for expected hash
+ * cmdline/apt-get.cc:
+ - remove the lock file handling and let Acquire take care of it instead
+ - display MD5Sum in --print-uris if not forced to use another method
+ instead of displaying the strongest available (Closes: #576420)
+ - regex for package names executed on Grp- not PkgIterator
+ - show non-candidates as fallback for virtual packages (Closes: #578385)
+ - set also "all" to this version for pseudo packages in TryToChangeVer
+ * apt-pkg/deb/dpkgpm.cc:
+ - remove Chroot-Directory from files passed to install commands.
+ Thanks to Kel Modderman for report & patch! (Closes: #577226)
+ * ftparchive/writer.cc:
+ - remove 999 chars Files and Checksums rewrite limit (Closes: #577759)
+ * cmdline/apt-cache.cc:
+ - align Installed and Candidate Version in policy so they can be compared
+ easier, thanks Ralf Gesellensetter for the pointer! (Closes: #578657)
+ * doc/apt.ent:
+ - Add a note about APT_CONFIG in the -c description (Closes: #578267)
+ * doc/po/de.po:
+ - correct typos in german apt_preferences manpage, thanks Chris Leick!
+ * apt-pkg/sourcelist.cc:
+ - be less strict and accept [option=value] as well
+ * apt-pkg/contrib/configuration.cc:
+ - error out if #clear directive has no argument
+ * doc/files.sgml:
+ - sync documentation with status quo, regarding files/directories in
+ use, extended_states and uri schemes.
+ * doc/cache.sgml:
+ - drop the file in favor of inplace documentation with doxygen
+ * apt-pkg/pkgcache.h:
+ - enhance the Groups ABI by providing a ID as the other structs does
+ - check also the size of the Group struct then checking for the others
+
+ [ Jari Aalto ]
+ * cmdline/apt-get.cc:
+ - replace backticks with single quotes around fix-broken command
+ in the broken packages message. (Closes: #577168)
+ * dselect/install:
+ - modernize if-statements not to use 'x' (Closes: #577117)
+ - replace backticks with POSIX $() (Closes: #577116)
-apt (0.7.25.3ubuntu6) lucid; urgency=low
+ [ Michael Vogt ]
+ * [ Abi break ] apt-pkg/acquire-item.{cc,h}:
+ - add "IsIndexFile" to constructor of pkgAcqFile so that it sends
+ the right cache control headers
+ * cmdline/apt-get.cc:
+ - fix crash when pkg.VersionList() is empty
+ * apt-pkg/depcache.cc:
+ - fix incorrect std::cout usage for debug output
+ * test/libapt/getlanguages_test.cc:
+ - Add test for Esperanto that has nocounty associated with them
+ (LP: #560956)
+ * apt-pkg/deb/debrecords.cc:
+ - fix max tag buffer size (LP: #545336, closes: #578959)
+ * debian/rules:
+ - install html doxygen in libapt-pkg-doc
+ * debian/control:
+ - build-depend on doxygen
+ [ Julian Andres Klode ]
+ * apt-pkg/contrib/weakptr.h:
+ - add a class WeakPointable which allows one to register weak pointers to
+ an object which will be set to NULL when the object is deallocated.
+ * [ABI break] apt-pkg/acquire{-worker,-item,}.h:
+ - subclass pkgAcquire::{Worker,Item,ItemDesc} from WeakPointable.
+ * apt-pkg/pkgcache.cc:
+ - Merge fix from David to correct handling in single-arch environments.
+ * cmdline/apt-cache.cc:
+ - Add a showauto command to apt-cache.
* cmdline/apt-get.cc:
- - fix crash when pkg.VersionList() is empty (LP: #556056)
+ - Add apt-get markauto and unmarkauto commands.
+
+ -- Michael Vogt <mvo@debian.org> Thu, 06 May 2010 09:32:54 +0200
- -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 08 Apr 2010 21:13:25 +0200
+apt (0.7.26~exp3) experimental; urgency=low
-apt (0.7.25.3ubuntu5) lucid; urgency=low
+ [ Christian Perrier ]
+ * German translation update. Closes: #571037
+ * Spanish manpages translation update. Closes: #573293
+ * Dutch translation update. Closes: #573946
+ * Polish manpages translation update. Closes: #574558
+ * Add "manpages-pl (<< 20060617-3~)" to avoid file conflicts with
+ that package that was providing some manpages for APT utilities.
[ David Kalnischkies ]
+ * [BREAK] merge MultiArch-ABI. We don't support MultiArch,
+ but we support the usage of the new ABI so libapt users
+ can start to prepare for MultiArch (Closes: #536029)
+ * Ignore :qualifiers after package name in build dependencies
+ in the library by default, but try to honour them in apt-get
+ as we have some sort of MultiArch support ready (Closes: #558103)
+ * add translation of the manpages to PT (portuguese)
+ Thanks to Américo Monteiro!
+ * Switch to dpkg-source 3.0 (native) format
+ * apt-pkg/depcache.cc:
+ - remove Auto-Installed information from extended_states
+ together with the package itself (Closes: #572364)
+ * cmdline/apt-mark:
+ - don't crash if no arguments are given (Closes: #570962)
+ * debian/control:
+ - remove some years old and obsolete Replaces
+ - add automake/conf build-depends/conflicts as recommend by
+ the autotools-dev README (Closes: #572615)
+ * apt-pkg/contrib/mmap.{h,cc}:
+ - add char[] fallback for filesystems without shared writable
+ mmap() like JFFS2. Thanks to Marius Vollmer for writing
+ and to Loïc Minier for pointing to the patch! (Closes: #314334)
+ * doc/apt_preferences.5.xml:
+ - fix two typos and be more verbose in the novice warning.
+ Thanks to Osamu Aoki for pointing it out! (Closes: #567669)
+ - fix a=sid vs. n=sid typo, thanks Ansgar Burchardt!
+ - origin can be used to match a hostname (Closes: #352667)
+ - remove wrong pin-priority is optional remark (Closes: #574944)
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix error message construction in OpenLog()
+ - if available store the Commandline in the history
* cmdline/apt-get.cc:
+ - add a --only-upgrade flag to install command (Closes: #572259)
+ - fix memory leaks in error conditions in DoSource()
- try version match in FindSrc first exact than fuzzy (LP: #551178)
+ * apt-pkg/contrib/cmndline.cc:
+ - save Commandline in Commandline::AsString for logging
+ * apt-pkg/deb/debversion.cc:
+ - consider absent of debian revision equivalent to 0 (Closes: #573592)
+ * doc/makefile, doc/*:
+ - generate subdirectories for building the manpages in on the fly
+ depending on the po files we have.
+ * apt-pkg/pkgcachegen.cc:
+ - merge versions correctly even if multiple different versions
+ with the same version number are available.
+ Thanks to Magnus Holmgren for the patch! (Closes: #351056)
+ * ftparchive/writer.cc:
+ - write LongDescriptions if they shouldn't be included in Packages
+ file into i18n/Translation-en by default.
+ * doc/po/de.po:
+ - correct a few typos in the german manpage translation.
+ Thanks to Chris Leick and Georg Koppen! (Closes: #574962)
+ * apt-pkg/contrib/strutl.cc:
+ - convert all toupper calls to tolower_ascii for a little speedup
[ Jean-Baptiste Lallement ]
* apt-pkg/contrib/strutl.cc:
Uploaders: Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>,
Christian Perrier <bubulle@debian.org>, Daniel Burrows <dburrows@debian.org>,
Luca Bruno <lethalman88@gmail.com>, Julian Andres Klode <jak@debian.org>
-Standards-Version: 3.8.3
-Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, xsltproc, docbook-xsl, po4a (>= 0.34-2), autotools-dev, intltool
-Vcs-Bzr: https://code.launchpad.net/~ubuntu-core-dev/apt/ubuntu
+Standards-Version: 3.8.4
- Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, xsltproc, docbook-xsl, po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen
++Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5), debiandoc-sgml, xsltproc, docbook-xsl, po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen, intltool
+Build-Conflicts: autoconf2.13, automake1.4
Package: apt
Architecture: any
cp debian/bugscript debian/$@/usr/share/bug/apt/script
cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt
+ cp share/ubuntu-archive.gpg debian/$@/usr/share/$@
+ sed 's/^_//' share/apt-auth-failure.note > debian/$@/usr/share/$@/apt-auth-failure.note
cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
- cp debian/apt.conf.ubuntu debian/$@/etc/apt/apt.conf.d/01ubuntu
-# head -n 500 ChangeLog > debian/ChangeLog
# copy lintian override
cp share/lintian-overrides debian/$@/usr/share/lintian/overrides/apt
rm -f build/po/*.pot
rm -f po/*.pot
- mv debian/$@/usr/bin/apt-report-mirror-failure \
- debian/$@/usr/lib/apt/apt-report-mirror-failure \
+ # move the mirror failure script in place
++ #mv debian/$@/usr/bin/apt-report-mirror-failure \
++ # debian/$@/usr/lib/apt/apt-report-mirror-failure \
+
dh_installexamples -p$@ $(BLD)/docs/examples/*
dh_installman -p$@ $(wildcard $(patsubst %,doc/%.[158],$(apt_MANPAGES)) $(patsubst %,doc/*/%.*.[158],$(apt_MANPAGES)))
dh_installcron -p$@
failure */
if (Srv->Result < 200 || Srv->Result >= 300)
{
+ char err[255];
+ snprintf(err,sizeof(err)-1,"HttpError%i",Srv->Result);
+ SetFailReason(err);
_error->Error("%u %s",Srv->Result,Srv->Code);
if (Srv->HaveContent == true)
- return 4;
- return 3;
+ return ERROR_WITH_CONTENT_PAGE;
+ return ERROR_UNRECOVERABLE;
}
// This is some sort of 2xx 'data follows' reply
bool Go(bool ToFile,ServerState *Srv);
bool Flush(ServerState *Srv);
bool ServerDie(ServerState *Srv);
- int DealWithHeaders(FetchResult &Res,ServerState *Srv);
+
+ /** \brief Result of the header parsing */
+ enum DealWithHeadersResult {
+ /** \brief The file is open and ready */
+ FILE_IS_OPEN,
+ /** \brief We got a IMS hit, the file has not changed */
+ IMS_HIT,
+ /** \brief The server reported a unrecoverable error */
+ ERROR_UNRECOVERABLE,
+ /** \brief The server reported a error with a error content page */
+ ERROR_WITH_CONTENT_PAGE,
+ /** \brief A error on the client side */
+ ERROR_NOT_FROM_SERVER,
+ /** \brief A redirect or retry request */
+ TRY_AGAIN_OR_REDIRECT
+ };
+ /** \brief Handle the retrieved header data */
+ DealWithHeadersResult DealWithHeaders(FetchResult &Res,ServerState *Srv);
+
+ /** \brief Try to AutoDetect the proxy */
bool AutoDetectProxy();
- virtual bool Fetch(FetchItem *);
virtual bool Configuration(string Message);
// In the event of a fatal signal this file will be closed and timestamped.