summaryrefslogtreecommitdiff
path: root/ftparchive
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-12-18 17:08:45 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-12-18 17:08:45 +0100
commitb3bc1bd74cb5ed091c6a067d09dc49b165d6f873 (patch)
treec5b161ae69814276fde03de15939cd5e607a7b21 /ftparchive
parentb52da4cd38991881e0f456fb1976412886c564ee (diff)
parent8cf0b1e1a4eab0f78d86ba3dc4576b35ee46969b (diff)
* Merged from the mvo branch
* merged from the lp:~mvo/apt/history branch * Fix apt-ftparchive(1) wrt description of the "-o" option. Thanks to Dann Frazier for the patch. Closes: #273100 * po/LINGUAS. Re-disable Hebrew. Closes: #534992 * po/LINGUAS. Enable Asturian and Lithuanian * Fix typo in apt-cache.8.xml: nessasarily * Fix "with with" in apt-get.8.xml * Fix some of the typos mentioned by the german team Closes: #479997 * Polish translation update by Wiktor Wandachowicz Closes: #548571 * German translation update by Holger Wansing Closes: #551534 * Italian translation update by Milo Casagrande Closes: #555797 * Simplified Chinese translation update by Aron Xu Closes: #558737 * Slovak translation update by Ivan Masár Closes: #559277 * apt-pkg/packagemanager.cc: - add output about pre-depends configuring when debug::pkgPackageManager is used * methods/https.cc: - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972 thanks to Brian Thomason for the patch * merge lp:~mvo/apt/netrc branch, this adds support for a /etc/apt/auth.conf that can be used to store username/passwords in a "netrc" style file (with the extension that it supports "/" in a machine definition). Based on the maemo git branch (Closes: #518473) (thanks also to Jussi Hakala and Julian Andres Klode) * apt-pkg/deb/dpkgpm.cc: - add "purge" to list of known actions * apt-pkg/init.h: - add compatibility with old ABI name until the next ABI break * merge segfault fix from Mario Sanchez Prada, many thanks (closes: #561109) * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc: - typo fix (LP: #462328) * cmdline/apt-key: - Emit a warning if removed keys keyring is missing and skip associated checks (LP: #218971) * apt-pkg/packagemanager.cc: - better debug output for ImmediateAdd with depth and why - improve the message shown for failing immediate configuration * doc/guide.it.sgml: moved to doc/it/guide.it.sgml * doc/po4a.conf: activate translation of guide.sgml and offline.sgml * doc/apt.conf.5.xml: - provide a few more details about APT::Immediate-Configure - briefly document the behaviour of the new https options * doc/sources.list.5.xml: - add note about additional apt-transport-methods * doc/apt-mark.8.xml: - correct showauto synopsis, thanks Andrew Schulman (Closes: #551440) * cmdline/apt-get.cc: - source should display his final pkg pick (Closes: #249383, #550952) - source doesn't need the complete version for match (Closes: #245250) - source ignores versions/releases if not available (Closes: #377424) - only warn if (free) space overflows (Closes: #522238) - add --debian-only as alias for --diff-only * methods/connect.cc: - display also strerror of "wicked" getaddrinfo errors - add AI_ADDRCONFIG to ai_flags as suggested by Aurelien Jarno in response to Bernhard R. Link, thanks! (Closes: #505020) * buildlib/configure.mak, buildlib/config.{sub,guess}: - remove (outdated) config.{sub,guess} and use the ones provided by the new added build-dependency autotools-dev instead * configure.in, buildlib/{xml,yodl,sgml}_manpage.mak: - remove the now obsolete manpage buildsystems * doc/{pl,pt_BR,es,it}/*.{sgml,xml}: - convert all remaining translation to the po4a system * debian/control: - drop build-dependency on docbook-utils and xmlto - add build-dependency on autotools-dev - bump policy to 3.8.3 as we have no outdated manpages anymore * debian/NEWS: - fix a typo in 0.7.24: Allready -> Already (Closes: #557674) * ftparchive/writer.{cc,h}: - add APT::FTPArchive::LongDescription to be able to disable them * apt-pkg/deb/debsrcrecords.cc: - use "diff" filetype for .debian.tar.* files (Closes: #554898) * methods/rred.cc: - rewrite to be able to handle even big patch files - adopt optional mmap+iovec patch from Morten Hustveit (Closes: #463354) which should speed up a bit. Thanks! * methods/http{,s}.cc - add config setting for User-Agent to the Acquire group, thanks Timothy J. Miller! (Closes: #355782) - add https options which default to http ones (Closes: #557085) * debian/apt.cron.daily: - check cache size even if we do nothing else otherwise, thanks Francesco Poli for patch(s) and patience! (Closes: #459344) * ftparchive/*: - fix a few typos in strings, comments and manpage, thanks Karl Goetz! (Closes: #558757) * cmdline/apt-mark: - print an error if a new state file can't be created (Closes: #521289) and - exit nicely if python-apt is not installed (Closes: #521284) * doc/de: German translation of manpages (Closes: #552606) * doc/ various manpages: - correct various errors, typos and oddities (Closes: #552535) * doc/apt-secure.8.xml: - replace literal with emphasis tags in Archive configuration * doc/apt-ftparchive.1.xml: - remove informalexample tag which hides the programlisting * doc/apt-get.8.xml: - change equivalent "for" to "to the" (purge command) - clarify --fix-broken sentence about specifying packages * apt-pkg/contib/strutl.h - Avoid extra inner copy in APT_MKSTRCMP and APT_MKSTRCMP2. * build infrastructure: - Bumped libapt version, excluded eglibc from SONAME. (Closes: #448249) * doc/apt.conf.5.xml: - Deprecate unquoted values, string concatenation and explain what should not be written inside a value (quotes,backslash). - Restrict option names to alphanumerical characters and "/-:._+". - Deprecate #include, we have apt.conf.d nowadays which should be sufficient. * ftparchive/apt-ftparchive.cc: - Call setlocale() so translations are actually used. * debian/apt.conf.autoremove: - Add kfreebsd-image-* to the list (Closes: #558803)
Diffstat (limited to 'ftparchive')
-rw-r--r--ftparchive/apt-ftparchive.cc5
-rw-r--r--ftparchive/cachedb.cc16
-rw-r--r--ftparchive/contents.cc2
-rw-r--r--ftparchive/multicompress.cc2
-rw-r--r--ftparchive/writer.cc23
-rw-r--r--ftparchive/writer.h1
6 files changed, 34 insertions, 15 deletions
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index 3b1e80631..5b6b3940c 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -3,7 +3,7 @@
// $Id: apt-ftparchive.cc,v 1.8.2.3 2004/01/02 22:01:48 mdz Exp $
/* ######################################################################
- apt-scanpackages - Efficient work-alike for dpkg-scanpackages
+ apt-ftparchive - Efficient work-alike for dpkg-scanpackages
Let contents be disabled from the conf
@@ -792,7 +792,7 @@ bool Generate(CommandLine &CmdL)
if (_config->FindB("APT::FTPArchive::Contents",true) == false)
return true;
- c1out << "Done Packages, Starting contents." << endl;
+ c1out << "Packages done, Starting contents." << endl;
// Sort the contents file list by date
string ArchiveDir = Setup.FindDir("Dir::ArchiveDir");
@@ -898,6 +898,7 @@ bool Clean(CommandLine &CmdL)
int main(int argc, const char *argv[])
{
+ setlocale(LC_ALL, "");
CommandLine::Args Args[] = {
{'h',"help","help",0},
{0,"md5","APT::FTPArchive::MD5",0},
diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc
index ff9a92d32..e02f0e1b6 100644
--- a/ftparchive/cachedb.cc
+++ b/ftparchive/cachedb.cc
@@ -69,7 +69,7 @@ bool CacheDB::ReadyDB(string DB)
// apt 0.6.44
if (err == EINVAL)
{
- _error->Error(_("DB format is invalid. If you upgraded from a older version of apt, please remove and re-create the database."));
+ _error->Error(_("DB format is invalid. If you upgraded from an older version of apt, please remove and re-create the database."));
}
if (err)
{
@@ -83,7 +83,7 @@ bool CacheDB::ReadyDB(string DB)
return true;
}
/*}}}*/
-// CacheDB::OpenFile - Open the filei /*{{{*/
+// CacheDB::OpenFile - Open the file /*{{{*/
// ---------------------------------------------------------------------
/* */
bool CacheDB::OpenFile()
@@ -139,7 +139,7 @@ bool CacheDB::GetCurStat()
if (DBLoaded)
{
- /* First see if thre is anything about it
+ /* First see if there is anything about it
in the database */
/* Get the flags (and mtime) */
@@ -182,11 +182,11 @@ bool CacheDB::GetFileInfo(string FileName, bool DoControl, bool DoContents,
Stats.Bytes += CurStat.FileSize;
Stats.Packages++;
- if (DoControl && LoadControl() == false
- || DoContents && LoadContents(GenContentsOnly) == false
- || DoMD5 && GetMD5(false) == false
- || DoSHA1 && GetSHA1(false) == false
- || DoSHA256 && GetSHA256(false) == false)
+ if ((DoControl && LoadControl() == false)
+ || (DoContents && LoadContents(GenContentsOnly) == false)
+ || (DoMD5 && GetMD5(false) == false)
+ || (DoSHA1 && GetSHA1(false) == false)
+ || (DoSHA256 && GetSHA256(false) == false))
{
delete Fd;
Fd = NULL;
diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc
index 1f2cbcc3d..fb1438f74 100644
--- a/ftparchive/contents.cc
+++ b/ftparchive/contents.cc
@@ -13,7 +13,7 @@
removing the massive sort time overhead.
By breaking all the pathnames into components and storing them
- separately a space savings is realized by not duplicating the string
+ separately a space saving is realized by not duplicating the string
over and over again. Ultimately this saving is sacrificed to storage of
the tree structure itself but the tree structure yields a speed gain
in the sorting and processing. Ultimately it takes about 5 seconds to
diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc
index 2fc8efcbf..16cef9769 100644
--- a/ftparchive/multicompress.cc
+++ b/ftparchive/multicompress.cc
@@ -365,7 +365,7 @@ bool MultiCompress::CloseOld(int Fd,pid_t Proc)
// MultiCompress::Child - The writer child /*{{{*/
// ---------------------------------------------------------------------
/* The child process forks a bunch of compression children and takes
- input on FD and passes it to all the compressor childer. On the way it
+ input on FD and passes it to all the compressor child. On the way it
computes the MD5 of the raw data. After this the raw data in the
original files is compared to see if this data is new. If the data
is new then the temp files are renamed, otherwise they are erased. */
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index 293e851f5..4e6c9a77d 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -308,6 +308,7 @@ PackagesWriter::PackagesWriter(string DB,string Overrides,string ExtOverrides,
DoSHA256 = _config->FindB("APT::FTPArchive::SHA256",true);
DoContents = _config->FindB("APT::FTPArchive::Contents",true);
NoOverride = _config->FindB("APT::FTPArchive::NoOverrideMsg",false);
+ LongDescription = _config->FindB("APT::FTPArchive::LongDescription",true);
if (Db.Loaded() == false)
DoContents = false;
@@ -414,10 +415,18 @@ bool PackagesWriter::DoPackage(string FileName)
NewFileName = FileName;
if (PathPrefix.empty() == false)
NewFileName = flCombine(PathPrefix,NewFileName);
-
+
+ /* Configuration says we don't want to include the long Description
+ in the package file - instead we want to ship a separated file */
+ string desc;
+ if (LongDescription == false) {
+ desc = Tags.FindS("Description").append("\n");
+ OverItem->FieldOverride["Description"] = desc.substr(0, desc.find('\n')).c_str();
+ }
+
// This lists all the changes to the fields we are going to make.
// (7 hardcoded + maintainer + suggests + end marker)
- TFRewriteData Changes[6+2+OverItem->FieldOverride.size()+1];
+ TFRewriteData Changes[6+2+OverItem->FieldOverride.size()+1+1];
unsigned int End = 0;
SetTFRewriteData(Changes[End++], "Size", Size);
@@ -429,6 +438,14 @@ bool PackagesWriter::DoPackage(string FileName)
SetTFRewriteData(Changes[End++], "Status", 0);
SetTFRewriteData(Changes[End++], "Optional", 0);
+ string DescriptionMd5;
+ if (LongDescription == false) {
+ MD5Summation descmd5;
+ descmd5.Add(desc.c_str());
+ DescriptionMd5 = descmd5.Result().Value();
+ SetTFRewriteData(Changes[End++], "Description-md5", DescriptionMd5.c_str());
+ }
+
// Rewrite the maintainer field if necessary
bool MaintFailed;
string NewMaint = OverItem->SwapMaint(Tags.FindS("Maintainer"),MaintFailed);
@@ -446,7 +463,7 @@ bool PackagesWriter::DoPackage(string FileName)
SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str());
/* Get rid of the Optional tag. This is an ugly, ugly, ugly hack that
- dpkg-scanpackages does.. Well sort of. dpkg-scanpackages just does renaming
+ dpkg-scanpackages does. Well sort of. dpkg-scanpackages just does renaming
but dpkg does this append bit. So we do the append bit, at least that way the
status file and package file will remain similar. There are other transforms
but optional is the only legacy one still in use for some lazy reason. */
diff --git a/ftparchive/writer.h b/ftparchive/writer.h
index 6e161c752..e76438900 100644
--- a/ftparchive/writer.h
+++ b/ftparchive/writer.h
@@ -86,6 +86,7 @@ class PackagesWriter : public FTWScanner
bool DoSHA256;
bool NoOverride;
bool DoContents;
+ bool LongDescription;
// General options
string PathPrefix;