From 02b7ddb1404fa3969bceb03a5f35107884027ba6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 16 Aug 2006 12:16:46 +0200 Subject: * methods/http.cc: - check for incorrect proxy settings more carefully --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a84146d20..e69c5091f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ apt (0.6.45.1) unstable; urgency=low versions of the package (closes: #257054) - properly handle recommends/suggests or-groups when printing the list of suggested/recommends packages (closes: #311619) + * methods/http.cc: + - check more careful for incorrect proxy settings (closes: #378868) -- -- cgit v1.2.3-70-g09d2 From 504bbe47e634f07c3de7a4868f63ee2ec142b9e4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 12 Sep 2006 11:19:35 +0200 Subject: * methods/gzip.cc: - if it can't write (because var is full), close the FromGz stream to not hang in ExecWait() later --- debian/changelog | 3 +++ methods/gzip.cc | 1 + po/apt-all.pot | 80 ++++++++++++++++++++++++++++---------------------------- 3 files changed, 44 insertions(+), 40 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e69c5091f..05d29662c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ apt (0.6.45.1) unstable; urgency=low suggested/recommends packages (closes: #311619) * methods/http.cc: - check more careful for incorrect proxy settings (closes: #378868) + * methods/gzip.cc: + - don't hang when /var is full (closes: #341537), thanks to + Luis Rodrigo Gallardo Cruz for the patch -- diff --git a/methods/gzip.cc b/methods/gzip.cc index 809afc0fc..55ff33270 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -111,6 +111,7 @@ bool GzipMethod::Fetch(FetchItem *Itm) if (To.Write(Buffer,Count) == false) { Failed = true; + FromGz.Close(); break; } } diff --git a/po/apt-all.pot b/po/apt-all.pot index 095de7f6d..352f2f5a6 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-08-09 16:17+0200\n" +"POT-Creation-Date: 2006-09-12 11:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -148,7 +148,7 @@ msgstr "" #: cmdline/apt-cache.cc:1652 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:550 -#: cmdline/apt-get.cc:2380 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2387 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s %s compiled on %s %s\n" msgstr "" @@ -705,11 +705,11 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1811 cmdline/apt-get.cc:1844 +#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1818 cmdline/apt-get.cc:1851 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1892 cmdline/apt-get.cc:2128 +#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1899 cmdline/apt-get.cc:2135 #: apt-pkg/cachefile.cc:67 msgid "The list of sources could not be read." msgstr "" @@ -738,7 +738,7 @@ msgstr "" msgid "After unpacking %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1982 +#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1989 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -772,7 +772,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2025 +#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2032 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -781,7 +781,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2034 +#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2041 msgid "Download complete and in download only mode" msgstr "" @@ -938,144 +938,144 @@ msgstr "" msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1685 +#: cmdline/apt-get.cc:1692 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1686 +#: cmdline/apt-get.cc:1693 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1706 +#: cmdline/apt-get.cc:1713 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1709 methods/ftp.cc:702 methods/connect.cc:101 +#: cmdline/apt-get.cc:1716 methods/ftp.cc:702 methods/connect.cc:101 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1714 +#: cmdline/apt-get.cc:1721 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1779 cmdline/apt-get.cc:1787 +#: cmdline/apt-get.cc:1786 cmdline/apt-get.cc:1794 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:1887 +#: cmdline/apt-get.cc:1894 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:1917 cmdline/apt-get.cc:2146 +#: cmdline/apt-get.cc:1924 cmdline/apt-get.cc:2153 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:1961 +#: cmdline/apt-get.cc:1968 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1985 +#: cmdline/apt-get.cc:1992 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:1990 +#: cmdline/apt-get.cc:1997 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:1993 +#: cmdline/apt-get.cc:2000 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:1999 +#: cmdline/apt-get.cc:2006 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2030 +#: cmdline/apt-get.cc:2037 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2058 +#: cmdline/apt-get.cc:2065 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2070 +#: cmdline/apt-get.cc:2077 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2071 +#: cmdline/apt-get.cc:2078 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2088 +#: cmdline/apt-get.cc:2095 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2107 +#: cmdline/apt-get.cc:2114 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2123 +#: cmdline/apt-get.cc:2130 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2151 +#: cmdline/apt-get.cc:2158 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2171 +#: cmdline/apt-get.cc:2178 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2223 +#: cmdline/apt-get.cc:2230 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2275 +#: cmdline/apt-get.cc:2282 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2310 +#: cmdline/apt-get.cc:2317 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2335 +#: cmdline/apt-get.cc:2342 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2349 +#: cmdline/apt-get.cc:2356 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2353 +#: cmdline/apt-get.cc:2360 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2385 +#: cmdline/apt-get.cc:2392 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2426 +#: cmdline/apt-get.cc:2433 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1490,12 +1490,12 @@ msgstr "" msgid "File not found" msgstr "" -#: methods/copy.cc:42 methods/gpgv.cc:281 methods/gzip.cc:133 -#: methods/gzip.cc:142 +#: methods/copy.cc:42 methods/gpgv.cc:281 methods/gzip.cc:134 +#: methods/gzip.cc:143 msgid "Failed to stat" msgstr "" -#: methods/copy.cc:79 methods/gpgv.cc:278 methods/gzip.cc:139 +#: methods/copy.cc:79 methods/gpgv.cc:278 methods/gzip.cc:140 msgid "Failed to set modification time" msgstr "" -- cgit v1.2.3-70-g09d2 From 9c0b7da119e1078727ffa890ec5fd4b0e0d1e96a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 12 Sep 2006 11:23:42 +0200 Subject: * doc/examples/sources.list: - removed no-longer used non-us line --- debian/changelog | 2 ++ doc/examples/sources.list | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 05d29662c..474beac58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ apt (0.6.45.1) unstable; urgency=low * methods/gzip.cc: - don't hang when /var is full (closes: #341537), thanks to Luis Rodrigo Gallardo Cruz for the patch + * doc/examples/sources.list: + - removed non-us.debian.org from the example (closes: #380030,#316196) -- diff --git a/doc/examples/sources.list b/doc/examples/sources.list index 9f2343277..9af1c3c4c 100644 --- a/doc/examples/sources.list +++ b/doc/examples/sources.list @@ -2,7 +2,6 @@ # Remember that you can only use http, ftp or file URIs # CDROMs are managed through the apt-cdrom tool. deb http://http.us.debian.org/debian stable main contrib non-free -deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb http://security.debian.org stable/updates main contrib non-free # Uncomment if you want the apt-get source function to work -- cgit v1.2.3-70-g09d2 From 071812e3bfe5446f58c8ac4cd5731bd601eac29a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 12 Sep 2006 12:24:42 +0200 Subject: * share/debian-archive.gpg: - removed the outdated debian 2004 and the amd64 keys --- debian/changelog | 7 ++++--- share/debian-archive.gpg | Bin 4171 -> 2280 bytes 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index db1ba77ea..b55e0c582 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.6.46) unstable; urgency=low +apt (0.6.45.1) unstable; urgency=low * debian/control: - switched to libdb4.4 for building (closes: #381019) @@ -19,10 +19,11 @@ apt (0.6.46) unstable; urgency=low * ja.po: Updated to 514t. Closes: #386537 * gl.po: Updated to 514t. Closes: #386397 * fr.po: Updated to 516t. - * fr.po: Updated to 516t. * fi.po: Updated to 512t. Closes: #382702 + * share/archive-archive.gpg: + - removed the outdated amd64 and debian-2004 keys - -- + -- apt (0.6.45) unstable; urgency=low diff --git a/share/debian-archive.gpg b/share/debian-archive.gpg index ce412117d..da1aa5e97 100644 Binary files a/share/debian-archive.gpg and b/share/debian-archive.gpg differ -- cgit v1.2.3-70-g09d2 From 2c4eaffff40d4ee4a2c8410a48f1a6170d9beff9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 15 Sep 2006 17:29:53 +0200 Subject: * apt-pkg/tagfile.cc: - applied patch from jvw to make the tag key stuff case-insensitive --- apt-pkg/tagfile.cc | 4 ++-- configure.in | 2 +- debian/changelog | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 8fcbeb23b..0bc6ce6fd 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -192,12 +192,12 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) // --------------------------------------------------------------------- /* This looks for the first double new line in the data stream. It also indexes the tags in the section. This very simple hash function for the - first 3 letters gives very good performance on the debian package files */ + last 8 letters gives very good performance on the debian package files */ inline static unsigned long AlphaHash(const char *Text, const char *End = 0) { unsigned long Res = 0; for (; Text != End && *Text != ':' && *Text != 0; Text++) - Res = (unsigned long)(*Text) ^ (Res << 2); + Res = ((unsigned long)(*Text) & 0xDF) ^ (Res << 1); return Res & 0xFF; } diff --git a/configure.in b/configure.in index fc4eff203..f0b0d6703 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) 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.6.45") +AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index b55e0c582..5f5421355 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,9 @@ apt (0.6.45.1) unstable; urgency=low * fi.po: Updated to 512t. Closes: #382702 * share/archive-archive.gpg: - removed the outdated amd64 and debian-2004 keys + * apt-pkg/tagfile.cc: + - applied patch from Jeroen van Wolffelaar to make the tags + caseinsensitive (closes: #384182) -- -- cgit v1.2.3-70-g09d2 From 2ca99a0dceb4101f1ecaff0348b1684cb975099c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 15 Sep 2006 18:24:47 +0200 Subject: * apt-pkg/tagfile.cc, tagfile.h: - reverted the mmap patch again, it caused too much trouble with pipes etc --- apt-pkg/tagfile.cc | 74 ++++++++++++++++-------------------------------------- apt-pkg/tagfile.h | 2 -- debian/changelog | 4 ++- 3 files changed, 24 insertions(+), 56 deletions(-) (limited to 'debian') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 0bc6ce6fd..040562fff 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -33,33 +33,22 @@ using std::string; /* */ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : Fd(*pFd), - Size(Size), - Map(NULL), - Buffer(0) + Size(Size) { if (Fd.IsOpen() == false) { + Buffer = 0; Start = End = Buffer = 0; Done = true; iOffset = 0; - Map = NULL; return; } - // check if we can MMap it - if(Fd.Size() == 0) - { - Buffer = new char[Size]; - Start = End = Buffer; - Done = false; - Fill(); - } else { - Map = new MMap (Fd, MMap::Public | MMap::ReadOnly); - Buffer = (char *) Map->Data (); - Start = Buffer; - End = Buffer + Map->Size (); - } + Buffer = new char[Size]; + Start = End = Buffer; + Done = false; iOffset = 0; + Fill(); } /*}}}*/ // TagFile::~pkgTagFile - Destructor /*{{{*/ @@ -67,8 +56,7 @@ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : /* */ pkgTagFile::~pkgTagFile() { - if(!Map) delete [] Buffer; - delete Map; + delete [] Buffer; } /*}}}*/ // TagFile::Step - Advance to the next section /*{{{*/ @@ -76,15 +64,8 @@ pkgTagFile::~pkgTagFile() /* If the Section Scanner fails we refill the buffer and try again. */ bool pkgTagFile::Step(pkgTagSection &Tag) { - if ((Map != NULL) && (Start == End)) - return false; - if (Tag.Scan(Start,End - Start) == false) { - if (Map != NULL) - return _error->Error(_("Unable to parse package file %s (1)"), - Fd.Name().c_str()); - if (Fill() == false) return false; @@ -158,30 +139,23 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) return Step(Tag); } + // Reposition and reload.. iOffset = Offset; - if (Map != NULL) - { - Start = Buffer + iOffset; - } - else - { - // Reposition and reload.. - Done = false; - if (Fd.Seek(Offset) == false) - return false; - End = Start = Buffer; + Done = false; + if (Fd.Seek(Offset) == false) + return false; + End = Start = Buffer; - if (Fill() == false) - return false; + if (Fill() == false) + return false; - if (Tag.Scan(Start,End - Start) == true) - return true; + if (Tag.Scan(Start,End - Start) == true) + return true; + + // This appends a double new line (for the real eof handling) + if (Fill() == false) + return false; - // This appends a double new line (for the real eof handling) - if (Fill() == false) - return false; - } - if (Tag.Scan(Start,End - Start) == false) return _error->Error(_("Unable to parse package file %s (2)"),Fd.Name().c_str()); @@ -207,7 +181,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) Stop = Section = Start; memset(AlphaIndexes,0,sizeof(AlphaIndexes)); - if (Stop == 0 || MaxLength == 0) + if (Stop == 0) return false; TagCount = 0; @@ -238,12 +212,6 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) Stop++; } - if ((Stop+1 >= End) && (End[-1] == '\n' || End[-1] == '\r')) - { - Indexes[TagCount] = (End - 1) - Section; - return true; - } - return false; } /*}}}*/ diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index dd481ba51..f7f8155a5 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -25,7 +25,6 @@ #endif #include -#include #include class pkgTagSection @@ -70,7 +69,6 @@ class pkgTagSection class pkgTagFile { FileFd &Fd; - MMap *Map; char *Buffer; char *Start; char *End; diff --git a/debian/changelog b/debian/changelog index 5f5421355..4c5841057 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,8 +25,10 @@ apt (0.6.45.1) unstable; urgency=low * apt-pkg/tagfile.cc: - applied patch from Jeroen van Wolffelaar to make the tags caseinsensitive (closes: #384182) + - reverted MMap use in the tagfile because it does not work + across pipes (closes: #383487) - -- + -- apt (0.6.45) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From 42142a6cf63458599c6a11c398a25b301df2df55 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 16 Sep 2006 12:02:02 +0200 Subject: * cmdline/apt-get.cc: - merged patch from otavio to make the order of package selections less important --- cmdline/apt-get.cc | 19 +++++++++++++++---- configure.in | 2 +- debian/changelog | 4 +++- 3 files changed, 19 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 64882e3e8..b33a324ea 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1144,10 +1144,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, } else ExpectedInst++; - - // Install it with autoinstalling enabled. - if (State.InstBroken() == true && BrokenFix == false) - Cache.MarkInstall(Pkg,true); + return true; } /*}}}*/ @@ -1538,6 +1535,20 @@ bool DoInstall(CommandLine &CmdL) } } + for (unsigned J = 0; J < Cache->Head().PackageCount; J++) + { + pkgCache::PkgIterator I(Cache,Cache.List[J]); + if ((*Cache)[I].Install() == false) + continue; + + pkgDepCache::StateCache &State = Cache[I]; + // Install it with autoinstalling enabled (if we not respect the minial + // required deps or the policy) + if (State.InstBroken() == true && BrokenFix == false) + Cache->MarkInstall(I,true); + } + + /* If we are in the Broken fixing mode we do not attempt to fix the problems. This is if the user invoked install without -f and gave packages */ diff --git a/configure.in b/configure.in index f0b0d6703..dc410b22f 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) 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.6.45.1") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 4c5841057..1ec80ca01 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.6.45.1) unstable; urgency=low +apt (0.6.46) unstable; urgency=low * debian/control: - switched to libdb4.4 for building (closes: #381019) @@ -7,6 +7,8 @@ apt (0.6.45.1) unstable; urgency=low versions of the package (closes: #257054) - properly handle recommends/suggests or-groups when printing the list of suggested/recommends packages (closes: #311619) + - fix the way multiple packages are installed so that the order of + packages on the commandline doesn't matter anymore * methods/http.cc: - check more careful for incorrect proxy settings (closes: #378868) * methods/gzip.cc: -- cgit v1.2.3-70-g09d2 From 3772dc74d3e7767980a011e01302dd688b3764fc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 16 Sep 2006 12:30:38 +0200 Subject: * reverted otavios patch again because it breaks the following behaviour: A depends on X|Y B depends on Y With the old code we get: "apt-get install A B": we get "A B X Y" "apt-get install B A": we get "A B Y" With the new code there is no way to get this right and we always end up with "A B X Y" because we just go over the packages in the order that they are in the cache and run MarkInstall(AutoInstall=true) on them then. When A comes before B we always end up with the unneeded X dependency. --- cmdline/apt-get.cc | 19 ++++--------------- configure.in | 2 +- debian/changelog | 4 +--- 3 files changed, 6 insertions(+), 19 deletions(-) (limited to 'debian') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index b33a324ea..64882e3e8 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1144,7 +1144,10 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, } else ExpectedInst++; - + + // Install it with autoinstalling enabled. + if (State.InstBroken() == true && BrokenFix == false) + Cache.MarkInstall(Pkg,true); return true; } /*}}}*/ @@ -1535,20 +1538,6 @@ bool DoInstall(CommandLine &CmdL) } } - for (unsigned J = 0; J < Cache->Head().PackageCount; J++) - { - pkgCache::PkgIterator I(Cache,Cache.List[J]); - if ((*Cache)[I].Install() == false) - continue; - - pkgDepCache::StateCache &State = Cache[I]; - // Install it with autoinstalling enabled (if we not respect the minial - // required deps or the policy) - if (State.InstBroken() == true && BrokenFix == false) - Cache->MarkInstall(I,true); - } - - /* If we are in the Broken fixing mode we do not attempt to fix the problems. This is if the user invoked install without -f and gave packages */ diff --git a/configure.in b/configure.in index dc410b22f..f0b0d6703 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) 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.6.46") +AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 1ec80ca01..4c5841057 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.6.46) unstable; urgency=low +apt (0.6.45.1) unstable; urgency=low * debian/control: - switched to libdb4.4 for building (closes: #381019) @@ -7,8 +7,6 @@ apt (0.6.46) unstable; urgency=low versions of the package (closes: #257054) - properly handle recommends/suggests or-groups when printing the list of suggested/recommends packages (closes: #311619) - - fix the way multiple packages are installed so that the order of - packages on the commandline doesn't matter anymore * methods/http.cc: - check more careful for incorrect proxy settings (closes: #378868) * methods/gzip.cc: -- cgit v1.2.3-70-g09d2 From 84cc6f7364d31321698ab3182bcd10d575710a49 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 14:14:04 +0200 Subject: * methods/gzip.cc: - just stop on empty files, don't call the extractor * debian/changelog: - merged the last debian upload - added entry for extractor --- debian/changelog | 9 ++++++++- methods/gzip.cc | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 385c8ca23..a828d02c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.6.46.1) unstable; urgency=low + + * methods/gzip.cc: + - deal with empty files + + -- + apt (0.6.46) unstable; urgency=low * debian/control: @@ -32,7 +39,7 @@ apt (0.6.46) unstable; urgency=low - reverted MMap use in the tagfile because it does not work across pipes (closes: #383487) - -- + -- Michael Vogt Thu, 21 Sep 2006 10:25:03 +0200 apt (0.6.45) unstable; urgency=low diff --git a/methods/gzip.cc b/methods/gzip.cc index 55ff33270..a8e816bf3 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -52,6 +52,13 @@ bool GzipMethod::Fetch(FetchItem *Itm) // Open the source and destination files FileFd From(Path,FileFd::ReadOnly); + // if the file is empty, just rename it and return + if(From.Size() == 0) + { + Rename(Path, Itm->DestFile); + return true; + } + int GzOut[2]; if (pipe(GzOut) < 0) return _error->Errno("pipe",_("Couldn't open pipe for %s"),Prog); -- cgit v1.2.3-70-g09d2 From fa341c6aaca13173add9841ca05e473255d3923c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 14:16:55 +0200 Subject: * debian/rules: - Daniel Schepler to make apt bin-NMU able --- debian/changelog | 4 +++- debian/rules | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a828d02c1..448f4f1ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,9 @@ apt (0.6.46.1) unstable; urgency=low * methods/gzip.cc: - deal with empty files - + * Applied patch from Daniel Schepler to make apt bin-NMU able. + (Closes: bug#359634) + -- apt (0.6.46) unstable; urgency=low diff --git a/debian/rules b/debian/rules index a8bf88762..02ee734bb 100755 --- a/debian/rules +++ b/debian/rules @@ -38,7 +38,7 @@ build: PKG=apt DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS) -APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p') +APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p' -e 's/\+.*$$//') APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in) APT_CVSTAG=$(shell echo "$(APT_DEBVER)" | sed -e 's/^/v/' -e 's/\./_/g') -- cgit v1.2.3-70-g09d2 From 21e1008e144c50770997bc00dc1b27826a31064c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 14:28:00 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - translate the dpkg progress strings when they are used, not in the struct (thanks to Steinar Gunderson) * debian/changelog: - updated --- apt-pkg/deb/dpkgpm.cc | 22 +++++++++++----------- buildlib/apti18n.h.in | 2 ++ debian/changelog | 7 ++++++- 3 files changed, 19 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bf0434ccc..2b167dbf6 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -355,28 +355,28 @@ bool pkgDPkgPM::Go(int OutStatusFd) static const struct DpkgState DpkgStatesOpMap[][5] = { // Install operation { - {"half-installed", _("Preparing %s")}, - {"unpacked", _("Unpacking %s") }, + {"half-installed", N_("Preparing %s")}, + {"unpacked", N_("Unpacking %s") }, {NULL, NULL} }, // Configure operation { - {"unpacked",_("Preparing to configure %s") }, - {"half-configured", _("Configuring %s") }, - { "installed", _("Installed %s")}, + {"unpacked",N_("Preparing to configure %s") }, + {"half-configured", N_("Configuring %s") }, + { "installed", N_("Installed %s")}, {NULL, NULL} }, // Remove operation { - {"half-configured", _("Preparing for removal of %s")}, - {"half-installed", _("Removing %s")}, - {"config-files", _("Removed %s")}, + {"half-configured", N_("Preparing for removal of %s")}, + {"half-installed", N_("Removing %s")}, + {"config-files", N_("Removed %s")}, {NULL, NULL} }, // Purge operation { - {"config-files", _("Preparing to completely remove %s")}, - {"not-installed", _("Completely removed %s")}, + {"config-files", N_("Preparing to completely remove %s")}, + {"not-installed", N_("Completely removed %s")}, {NULL, NULL} }, }; @@ -670,7 +670,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) { // only read the translation if there is actually a next // action - const char *translation = states[PackageOpsDone[pkg]].str; + const char *translation = _(states[PackageOpsDone[pkg]].str); char s[200]; snprintf(s, sizeof(s), translation, pkg); diff --git a/buildlib/apti18n.h.in b/buildlib/apti18n.h.in index 812457643..a5b91b1ee 100644 --- a/buildlib/apti18n.h.in +++ b/buildlib/apti18n.h.in @@ -14,8 +14,10 @@ # else # define _(x) gettext(x) # endif +# define N_(x) x #else // apt will not use any gettext # define setlocale(a, b) # define _(x) x +# define N_(x) x #endif diff --git a/debian/changelog b/debian/changelog index 448f4f1ee..92c12b5a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,12 @@ apt (0.6.46.1) unstable; urgency=low * methods/gzip.cc: - deal with empty files * Applied patch from Daniel Schepler to make apt bin-NMU able. - (Closes: bug#359634) + (closes: bug#359634) + * rebuild against current g++ because of: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29289 + (closes: #390189) + * fix broken i18n in the dpkg progress reporting, thanks to + Frans Pop and Steinar Gunderson. (closes: #389261) -- -- cgit v1.2.3-70-g09d2 From c407612f82f02ed97ec879e48e3cd1c187b4f5ea Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 22:50:41 +0200 Subject: * apt-pkg/tagfile.h: - increase the buffer in tagfile.cc for now, this really needs to become a dynamic buffer --- apt-pkg/tagfile.h | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index f7f8155a5..35ffebda8 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -84,7 +84,7 @@ class pkgTagFile inline unsigned long Offset() {return iOffset;}; bool Jump(pkgTagSection &Tag,unsigned long Offset); - pkgTagFile(FileFd *F,unsigned long Size = 64*1024); + pkgTagFile(FileFd *F,unsigned long Size = 128*1024); ~pkgTagFile(); }; diff --git a/debian/changelog b/debian/changelog index db84bc65a..77c7cf698 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ apt (0.6.46.1) unstable; urgency=low * fi.po: Updated to 514t. Closes: #390149 * eu.po: Updated to 514t. Closes: #389725 * vi.po: Updated to 514t. Closes: #388555 + * use a bigger buffer in tagfile for now, this needs to + become much more dynamic (closes: #388708) -- -- cgit v1.2.3-70-g09d2 From 75c541fdeda664bdf0e48e68a2aa5dae7015587c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Oct 2006 00:58:53 +0200 Subject: * apt-pkg/tagfile.cc,h: - make the internal buffer grow dynamically if required --- apt-pkg/tagfile.cc | 41 +++++++++++++++++++++++++++++++++++++---- apt-pkg/tagfile.h | 7 ++++--- debian/changelog | 4 ++-- 3 files changed, 43 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 040562fff..223618cd1 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -59,19 +59,52 @@ pkgTagFile::~pkgTagFile() delete [] Buffer; } /*}}}*/ +// TagFile::Resize - Resize the internal buffer /*{{{*/ +// --------------------------------------------------------------------- +/* Resize the internal buffer (double it in size). Fail if a maximum size + * size is reached. + */ +bool pkgTagFile::Resize() +{ + char *tmp; + unsigned long EndSize = End - Start; + + // fail is the buffer grows too big + if(Size > 1024*1024+1) + return false; + + // get new buffer and use it + tmp = new char[2*Size]; + memcpy(tmp, Buffer, Size); + Size = Size*2; + delete [] Buffer; + Buffer = tmp; + + // update the start/end pointers to the new buffer + Start = Buffer; + End = Start + EndSize; + return true; +} + // TagFile::Step - Advance to the next section /*{{{*/ // --------------------------------------------------------------------- -/* If the Section Scanner fails we refill the buffer and try again. */ +/* If the Section Scanner fails we refill the buffer and try again. + * If that fails too, double the buffer size and try again until a + * maximum buffer is reached. + */ bool pkgTagFile::Step(pkgTagSection &Tag) { - if (Tag.Scan(Start,End - Start) == false) + while (Tag.Scan(Start,End - Start) == false) { if (Fill() == false) return false; - if (Tag.Scan(Start,End - Start) == false) + if(Tag.Scan(Start,End - Start)) + break; + + if (Resize() == false) return _error->Error(_("Unable to parse package file %s (1)"), - Fd.Name().c_str()); + Fd.Name().c_str()); } Start += Tag.size(); iOffset += Tag.size(); diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 35ffebda8..70381ad13 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -75,16 +75,17 @@ class pkgTagFile bool Done; unsigned long iOffset; unsigned long Size; - + bool Fill(); - + bool Resize(); + public: bool Step(pkgTagSection &Section); inline unsigned long Offset() {return iOffset;}; bool Jump(pkgTagSection &Tag,unsigned long Offset); - pkgTagFile(FileFd *F,unsigned long Size = 128*1024); + pkgTagFile(FileFd *F,unsigned long Size = 32*1024); ~pkgTagFile(); }; diff --git a/debian/changelog b/debian/changelog index 77c7cf698..6b842898c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,8 @@ apt (0.6.46.1) unstable; urgency=low * fi.po: Updated to 514t. Closes: #390149 * eu.po: Updated to 514t. Closes: #389725 * vi.po: Updated to 514t. Closes: #388555 - * use a bigger buffer in tagfile for now, this needs to - become much more dynamic (closes: #388708) + * make the internal buffer in pkgTagFile grow dynamically + (closes: #388708) -- -- cgit v1.2.3-70-g09d2 From d21a95bf5efe85390eb9def96ceb27dbab1d72d8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 9 Oct 2006 22:29:22 +0200 Subject: * debian/changelog: fixed date --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c0036fbd6..2fe5ad913 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,7 +25,7 @@ apt (0.6.46.1) unstable; urgency=low * make the internal buffer in pkgTagFile grow dynamically (closes: #388708) - -- Michael Vogt Mon, 2 Oct 2006 20:42:20 +0200 + -- Michael Vogt Mon, 2 Oct 2006 20:42:20 +0200 apt (0.6.46) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From 18ea6d69dd43eac83f1fa1fb8ff6d3c59f3f9efb Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 11 Oct 2006 09:23:01 +0200 Subject: * debian/changelog: - finalized changelog --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index fd59bed22..2aa21c399 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,7 @@ apt (0.6.46.2) unstable; urgency=low - cs.po: Updated. Closes: #391064 - es.po: Updated to 514t. Closes: #391661 - da.po: Updated to 514t. Closes: #391424 - -- + -- Michael Vogt Wed, 11 Oct 2006 09:03:15 +0200 apt (0.6.46.1) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From ed94a0d6f60e7b236a3b62dd9d4d453e956cfcf9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 30 Oct 2006 10:39:18 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - fix segfault if dpkg sends multiline error messages --- apt-pkg/deb/dpkgpm.cc | 19 ++++++++++++------- configure.in | 2 +- debian/changelog | 9 +++++++++ 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 2b167dbf6..4c44cd01a 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -624,15 +624,20 @@ bool pkgDPkgPM::Go(int OutStatusFd) */ char* list[5]; - if(!TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]))) - // FIXME: dpkg sends multiline error messages sometimes (see - // #374195 for a example. we should support this by - // either patching dpkg to not send multiline over the - // statusfd or by rewriting the code here to deal with - // it. for now we just ignore it and not crash - continue; + // dpkg sends multiline error messages sometimes (see + // #374195 for a example. we should support this by + // either patching dpkg to not send multiline over the + // statusfd or by rewriting the code here to deal with + // it. for now we just ignore it and not crash + TokSplitString(':', line, list, sizeof(list)/sizeof(list[0])); char *pkg = list[1]; char *action = _strstrip(list[2]); + if( pkg == NULL || action == NULL) + { + if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) + std::clog << "ignoring line: not enough ':'" << std::endl; + continue; + } if(strncmp(action,"error",strlen("error")) == 0) { diff --git a/configure.in b/configure.in index 35d0ea5ee..81f327c37 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) 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.6.45.1") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.3") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 2aa21c399..887d2f254 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.6.46.3) unstable; urgency=low + + * apt-pkg/deb/dpkgpm.cc: + - make progress reporting robust against multiline error + messages + + -- + apt (0.6.46.2) unstable; urgency=low * Merged from Christian Perrier bzr branch: @@ -6,6 +14,7 @@ apt (0.6.46.2) unstable; urgency=low - cs.po: Updated. Closes: #391064 - es.po: Updated to 514t. Closes: #391661 - da.po: Updated to 514t. Closes: #391424 + -- Michael Vogt Wed, 11 Oct 2006 09:03:15 +0200 apt (0.6.46.1) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From fa2bca9de5acabcfcf782702450937a978b48c37 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 23 Nov 2006 07:16:12 +0100 Subject: * changelog updated to match latest debian upload --- debian/changelog | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 887d2f254..5cdfc9d02 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,24 @@ apt (0.6.46.3) unstable; urgency=low - make progress reporting robust against multiline error messages - -- + * Merged from Christian Perrier bzr branch: + - ca.po: Updated to 514t + - be.po: Updated to 514t + - it.po: Updated to 514t + - hu.po: Updated to 514t + - zh_TW.po: Updated to 514t + - ar.po: Updated to 293t221u. + - ru.po: Updated to 514t. Closes: #392466 + - nb.po: Updated to 514t. Closes: #392466 + - pt.po: Updated to 514t. Closes: #393199 + - fr.po: One spelling error corrected: s/accèder/accéder + - km.po: Updated to 514t. + - ko.po: Updated to 514t. + - bg.po: Updated to 514t. + - de.po: Updated to 514t. + - en_GB.po: Updated to 514t. + + -- Michael Vogt Thu, 2 Nov 2006 11:37:58 +0100 apt (0.6.46.2) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From 14127f180b86c2290abf3653cd4b4d5972a1177e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 23 Nov 2006 08:04:38 +0100 Subject: * mention apt-secure in apt.8 and apt-apt.8 --- debian/changelog | 6 ++++++ doc/apt-get.8.xml | 2 +- doc/apt.8 | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5cdfc9d02..24e10dcd5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +apt (0.6.46.4) unstable; urgency=low + + * add apt-secure.8 to "See also" section + + -- + apt (0.6.46.3) unstable; urgency=low * apt-pkg/deb/dpkgpm.cc: diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index b98d58737..451806e7b 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -467,7 +467,7 @@ See Also &apt-cache;, &apt-cdrom;, &dpkg;, &dselect;, &sources-list;, - &apt-conf;, &apt-config;, + &apt-conf;, &apt-config;, &apt-secure; The APT User's guide in &guidesdir;, &apt-preferences;, the APT Howto. diff --git a/doc/apt.8 b/doc/apt.8 index 3fb214a3b..671fe9c5b 100644 --- a/doc/apt.8 +++ b/doc/apt.8 @@ -33,6 +33,7 @@ None. .BR apt-get (8), .BR apt.conf (5), .BR sources.list (5) +.BR apt-secure (8) .SH DIAGNOSTICS apt returns zero on normal operation, decimal 100 on error. .SH BUGS -- cgit v1.2.3-70-g09d2 From c70496f94c8a16072b0b7a7906dec4b1aa4f306e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 27 Nov 2006 12:07:06 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - added "Dpkg::StopOnError" variable that controls if apt will abort on errors from dpkg --- apt-pkg/deb/dpkgpm.cc | 23 ++++++++++++++++------- debian/changelog | 5 ++++- doc/examples/configure-index | 4 ++++ 3 files changed, 24 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index c7a6b921f..3204fc1bb 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -711,14 +711,23 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Check for an error code. if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) { - RunScripts("DPkg::Post-Invoke"); - if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) - return _error->Error("Sub-process %s received a segmentation fault.",Args[0]); - - if (WIFEXITED(Status) != 0) - return _error->Error("Sub-process %s returned an error code (%u)",Args[0],WEXITSTATUS(Status)); + // if it was set to "keep-dpkg-runing" then we won't return + // here but keep the loop going and just report it as a error + // for later + bool stopOnError = _config->FindB("Dpkg::StopOnError",true); - return _error->Error("Sub-process %s exited unexpectedly",Args[0]); + if(stopOnError) + RunScripts("DPkg::Post-Invoke"); + + if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) + _error->Error("Sub-process %s received a segmentation fault.",Args[0]); + else if (WIFEXITED(Status) != 0) + _error->Error("Sub-process %s returned an error code (%u)",Args[0],WEXITSTATUS(Status)); + else + _error->Error("Sub-process %s exited unexpectedly",Args[0]); + + if(stopOnError) + return false; } } diff --git a/debian/changelog b/debian/changelog index 24e10dcd5..8da0d6471 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ apt (0.6.46.4) unstable; urgency=low - * add apt-secure.8 to "See also" section + * added apt-secure.8 to "See also" section + * apt-pkg/deb/dpkgpm.cc: + - added "Dpkg::StopOnError" variable that controls if apt + will abort on errors from dpkg -- diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 0f0abc30c..73e20aa43 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -237,6 +237,10 @@ DPkg // Control the size of the command line passed to dpkg. MaxBytes 1024; MaxArgs 350; + + // controls if apt will apport on the first dpkg error or if it + // tries to install as many packages as possible + StopOnError "true"; } /* Options you can set to see some debugging text They correspond to names -- cgit v1.2.3-70-g09d2 From 4ab24e53db1d39cd26072f03795efd0f6425a369 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 30 Nov 2006 15:06:28 +0100 Subject: * apt-pkg/deb/debsrcrecords.{cc,h}: - make the buffer dynmaic --- apt-pkg/deb/debsrcrecords.cc | 28 +++++++++------------------- apt-pkg/deb/debsrcrecords.h | 10 +++++----- debian/changelog | 2 ++ 3 files changed, 16 insertions(+), 24 deletions(-) (limited to 'debian') diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index cac36c2e6..17645a5ac 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -18,6 +18,8 @@ #include #include #include + +using std::max; /*}}}*/ // SrcRecordParser::Binaries - Return the binaries field /*{{{*/ @@ -34,31 +36,19 @@ const char **debSrcRecordParser::Binaries() if (Bins.empty() == true || Bins.length() >= 102400) return 0; - // Workaround for #236688. Only allocate a new buffer if the field - // is large, to avoid a performance penalty - char *BigBuf = NULL; - char *Buf; - if (Bins.length() > sizeof(Buffer)) - { - BigBuf = new char[Bins.length()]; - Buf = BigBuf; - } - else + if (Bins.length() > BufSize) { - Buf = Buffer; + delete [] Buffer; + // allocate new size based on buffer (but never smaller than 4000) + BufSize = max((unsigned long)4000, max(Bins.length()+1,2*BufSize)); + Buffer = new char[BufSize]; } - strcpy(Buf,Bins.c_str()); - if (TokSplitString(',',Buf,StaticBinList, + strcpy(Buffer,Bins.c_str()); + if (TokSplitString(',',Buffer,StaticBinList, sizeof(StaticBinList)/sizeof(StaticBinList[0])) == false) - { - if (BigBuf != NULL) - delete BigBuf; return 0; - } - if (BigBuf != NULL) - delete BigBuf; return (const char **)StaticBinList; } /*}}}*/ diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index f899993df..f4e2cb46c 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -24,9 +24,10 @@ class debSrcRecordParser : public pkgSrcRecords::Parser FileFd Fd; pkgTagFile Tags; pkgTagSection Sect; - char Buffer[10000]; char *StaticBinList[400]; unsigned long iOffset; + char *Buffer; + unsigned long BufSize; public: @@ -49,10 +50,9 @@ class debSrcRecordParser : public pkgSrcRecords::Parser }; virtual bool Files(vector &F); - debSrcRecordParser(string File,pkgIndexFile const *Index) : - Parser(Index), - Fd(File,FileFd::ReadOnly), - Tags(&Fd,102400) {}; + debSrcRecordParser(string File,pkgIndexFile const *Index) + : Parser(Index), Fd(File,FileFd::ReadOnly), Tags(&Fd,102400), + Buffer(0), BufSize(0) {} }; #endif diff --git a/debian/changelog b/debian/changelog index 8da0d6471..a3cb3028a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ apt (0.6.46.4) unstable; urgency=low * apt-pkg/deb/dpkgpm.cc: - added "Dpkg::StopOnError" variable that controls if apt will abort on errors from dpkg + * apt-pkg/deb/debsrcrecords.{cc,h}: + - make the Buffer dynmaic -- -- cgit v1.2.3-70-g09d2 From 0752f8fd5ef0bef11721f2c96211fa852aab316d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Dec 2006 14:27:02 +0100 Subject: * changelog updated --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a3cb3028a..29e64bad7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,7 @@ apt (0.6.46.4) unstable; urgency=low - added "Dpkg::StopOnError" variable that controls if apt will abort on errors from dpkg * apt-pkg/deb/debsrcrecords.{cc,h}: - - make the Buffer dynmaic + - make the Buffer grow dynmaically (closes: #400874) -- -- cgit v1.2.3-70-g09d2 From f88137b8972f57c52bbadf54a80932f225562a95 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Dec 2006 14:30:19 +0100 Subject: * changelog updates --- debian/changelog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 29e64bad7..ac13357ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,10 @@ apt (0.6.46.4) unstable; urgency=low will abort on errors from dpkg * apt-pkg/deb/debsrcrecords.{cc,h}: - make the Buffer grow dynmaically (closes: #400874) + * Merged from Christian Perrier bzr branch: + - uk.po: New Ukrainian translation: 483t28f3u + - el.po: Update to 503t9f2u + - de.po: Updates and corrections. -- -- cgit v1.2.3-70-g09d2