From caeb19b796f7045f489dbce0bf681925d49136a9 Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Mon, 2 Dec 2013 08:21:49 +0100
Subject: add unittest for new sourceslist parser as well
---
test/libapt/makefile | 6 +++++
test/libapt/sourcelist_test.cc | 52 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
create mode 100644 test/libapt/sourcelist_test.cc
(limited to 'test/libapt')
diff --git a/test/libapt/makefile b/test/libapt/makefile
index 73403b24c..a8e053d6e 100644
--- a/test/libapt/makefile
+++ b/test/libapt/makefile
@@ -111,3 +111,9 @@ SLIBS = -lapt-pkg
SOURCE = tagfile_test.cc
include $(PROGRAM_H)
+# test sourcelist
+PROGRAM = SourceList${BASENAME}
+SLIBS = -lapt-pkg
+SOURCE = sourcelist_test.cc
+include $(PROGRAM_H)
+
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
new file mode 100644
index 000000000..6e83d08e0
--- /dev/null
+++ b/test/libapt/sourcelist_test.cc
@@ -0,0 +1,52 @@
+#include
+#include
+
+#include "assert.h"
+#include
+#include
+#include
+
+char *tempfile = NULL;
+int tempfile_fd = -1;
+
+void remove_tmpfile(void)
+{
+ if (tempfile_fd > 0)
+ close(tempfile_fd);
+ if (tempfile != NULL) {
+ unlink(tempfile);
+ free(tempfile);
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ const char contents[] = ""
+ "Type: deb\n"
+ "URL: http://ftp.debian.org/debian\n"
+ "Dist: stable\n"
+ "Section: main\n"
+ "Comment: Some random string\n"
+ " that can be very long\n"
+ "\n"
+ "Type: deb\n"
+ "URL: http://ftp.debian.org/debian\n"
+ "Dist: unstable\n"
+ "Section: main non-free\n"
+ ;
+
+ FileFd fd;
+ tempfile = strdup("apt-test.XXXXXXXX");
+ tempfile_fd = mkstemp(tempfile);
+
+ /* (Re-)Open (as FileFd), write and seek to start of the temp file */
+ equals(fd.OpenDescriptor(tempfile_fd, FileFd::ReadWrite), true);
+ equals(fd.Write(contents, strlen(contents)), true);
+ equals(fd.Seek(0), true);
+
+ pkgSourceList sources(tempfile);
+ equals(sources.size(), 2);
+
+ /* clean up handled by atexit handler, so just return here */
+ return 0;
+}
--
cgit v1.2.3-70-g09d2
From 9aaa45283b14c3c81641f3f3e38157a267b1e8f7 Mon Sep 17 00:00:00 2001
From: David Kalnischkies
Date: Wed, 15 Jan 2014 16:14:23 +0100
Subject: actually register the tempfile removal atexit
Git-Dch: Ignore
---
test/libapt/sourcelist_test.cc | 1 +
1 file changed, 1 insertion(+)
(limited to 'test/libapt')
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 6e83d08e0..adadae6a7 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -36,6 +36,7 @@ int main(int argc, char *argv[])
;
FileFd fd;
+ atexit(remove_tmpfile);
tempfile = strdup("apt-test.XXXXXXXX");
tempfile_fd = mkstemp(tempfile);
--
cgit v1.2.3-70-g09d2
From 78766f46d043c1c1eeb9869db7e1c5b4093d5274 Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Thu, 16 Jan 2014 18:14:14 +0100
Subject: update libapt test
---
test/libapt/sourcelist_test.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'test/libapt')
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 6e83d08e0..1d30bd85b 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -23,15 +23,15 @@ int main(int argc, char *argv[])
{
const char contents[] = ""
"Type: deb\n"
- "URL: http://ftp.debian.org/debian\n"
- "Dist: stable\n"
+ "Uri: http://ftp.debian.org/debian\n"
+ "Suite: stable\n"
"Section: main\n"
"Comment: Some random string\n"
" that can be very long\n"
"\n"
"Type: deb\n"
- "URL: http://ftp.debian.org/debian\n"
- "Dist: unstable\n"
+ "Uri: http://ftp.debian.org/debian\n"
+ "Suite: unstable\n"
"Section: main non-free\n"
;
--
cgit v1.2.3-70-g09d2
From 62d8a765b9b37354efab6ca838cbdb7f347f7cac Mon Sep 17 00:00:00 2001
From: David Kalnischkies
Date: Thu, 16 Jan 2014 19:51:23 +0100
Subject: rework some code to fix some scan-build warnings
No visible functional changes, just code moved around and additional
checks to eliminate impossible branches
Reported-By: scan-build
Git-Dch: Ignore
---
apt-pkg/aptconfiguration.cc | 4 +--
apt-pkg/cacheset.cc | 2 ++
apt-pkg/contrib/gpgv.cc | 6 ++---
apt-pkg/contrib/mmap.cc | 8 +++++-
ftparchive/contents.cc | 2 +-
ftparchive/override.cc | 56 +++++++++++++++++++---------------------
test/libapt/parsedepends_test.cc | 2 +-
7 files changed, 42 insertions(+), 38 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 115d11616..1ebcf97bc 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -141,7 +141,7 @@ std::vector const Configuration::getLanguages(bool const &All,
// so they will be all included in the Cache.
std::vector builtin;
DIR *D = opendir(_config->FindDir("Dir::State::lists").c_str());
- if (D != 0) {
+ if (D != NULL) {
builtin.push_back("none");
for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) {
string const name = SubstVar(Ent->d_name, "%5f", "_");
@@ -166,8 +166,8 @@ std::vector const Configuration::getLanguages(bool const &All,
continue;
builtin.push_back(c);
}
+ closedir(D);
}
- closedir(D);
// FIXME: Remove support for the old APT::Acquire::Translation
// it was undocumented and so it should be not very widthly used
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 0147f7e86..29281aab9 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -73,6 +73,8 @@ bool PackageContainerInterface::FromTask(PackageContainerInterface * const pci,
const char *start, *end;
parser.GetRec(start,end);
unsigned int const length = end - start;
+ if (unlikely(length == 0))
+ continue;
char buf[length];
strncpy(buf, start, length);
buf[length-1] = '\0';
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc
index f57a72d86..0a469dd7a 100644
--- a/apt-pkg/contrib/gpgv.cc
+++ b/apt-pkg/contrib/gpgv.cc
@@ -103,12 +103,12 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG,
}
}
+ enum { DETACHED, CLEARSIGNED } releaseSignature = (FileGPG != File) ? DETACHED : CLEARSIGNED;
std::vector dataHeader;
char * sig = NULL;
char * data = NULL;
- // file with detached signature
- if (FileGPG != File)
+ if (releaseSignature == DETACHED)
{
Args.push_back(FileGPG.c_str());
Args.push_back(File.c_str());
@@ -181,7 +181,7 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG,
putenv((char *)"LC_MESSAGES=");
}
- if (FileGPG != File)
+ if (releaseSignature == DETACHED)
{
execvp(gpgvpath.c_str(), (char **) &Args[0]);
ioprintf(std::cerr, "Couldn't execute %s to check %s", Args[0], File.c_str());
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index a176da636..51e8eb30f 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -352,6 +352,12 @@ unsigned long DynamicMMap::RawAllocate(unsigned long long Size,unsigned long Aln
size in the file. */
unsigned long DynamicMMap::Allocate(unsigned long ItemSize)
{
+ if (unlikely(ItemSize == 0))
+ {
+ _error->Fatal("Can't allocate an item of size zero");
+ return 0;
+ }
+
// Look for a matching pool entry
Pool *I;
Pool *Empty = 0;
@@ -412,7 +418,7 @@ unsigned long DynamicMMap::WriteString(const char *String,
unsigned long const Result = RawAllocate(Len+1,0);
- if (Result == 0 && _error->PendingError())
+ if (Base == NULL || (Result == 0 && _error->PendingError()))
return 0;
memcpy((char *)Base + Result,String,Len);
diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc
index 015c790e0..80fe6e17e 100644
--- a/ftparchive/contents.cc
+++ b/ftparchive/contents.cc
@@ -233,7 +233,7 @@ void GenContents::Add(const char *Dir,const char *Package)
// The final component if it does not have a trailing /
if (I - Start >= 1)
- Root = Grab(Root,Start,Package);
+ Grab(Root,Start,Package);
}
/*}}}*/
// GenContents::WriteSpace - Write a given number of white space chars /*{{{*/
diff --git a/ftparchive/override.cc b/ftparchive/override.cc
index 1288ff133..d2130db8a 100644
--- a/ftparchive/override.cc
+++ b/ftparchive/override.cc
@@ -52,45 +52,41 @@ bool Override::ReadOverride(string const &File,bool const &Source)
if (*Pkg == 0)
continue;
+#define APT_FIND_NEXT_FIELD \
+ for (End++; isspace(*End) != 0 && *End != 0; ++End) \
+ /* skip spaces */ ; \
+ Start = End; \
+ for (; isspace(*End) == 0 && *End != 0; ++End) \
+ /* find end of word */ ;
+
+#define APT_WARNING_MALFORMED_LINE(FIELD) \
+ if (*End == 0) \
+ { \
+ _error->Warning(_("Malformed override %s line %llu (%s)"),File.c_str(), \
+ Counter, FIELD ); \
+ continue; \
+ } \
+ *End = 0;
+
// Find the package and zero..
- char *Start = Pkg;
+ char *Start;
char *End = Pkg;
for (; isspace(*End) == 0 && *End != 0; End++);
- if (*End == 0)
- {
- _error->Warning(_("Malformed override %s line %llu #1"),File.c_str(),
- Counter);
- continue;
- }
- *End = 0;
+ APT_WARNING_MALFORMED_LINE("pkgname");
+
+ APT_FIND_NEXT_FIELD;
// Find the priority
if (Source == false)
{
- for (End++; isspace(*End) != 0 && *End != 0; End++);
- Start = End;
- for (; isspace(*End) == 0 && *End != 0; End++);
- if (*End == 0)
- {
- _error->Warning(_("Malformed override %s line %llu #2"),File.c_str(),
- Counter);
- continue;
- }
- *End = 0;
+ APT_WARNING_MALFORMED_LINE("priority");
Itm.Priority = Start;
+
+ APT_FIND_NEXT_FIELD;
}
-
+
// Find the Section
- for (End++; isspace(*End) != 0 && *End != 0; End++);
- Start = End;
- for (; isspace(*End) == 0 && *End != 0; End++);
- if (*End == 0)
- {
- _error->Warning(_("Malformed override %s line %llu #3"),File.c_str(),
- Counter);
- continue;
- }
- *End = 0;
+ APT_WARNING_MALFORMED_LINE("section");
Itm.FieldOverride["Section"] = Start;
// Source override files only have the two columns
@@ -99,7 +95,7 @@ bool Override::ReadOverride(string const &File,bool const &Source)
Mapping[Pkg] = Itm;
continue;
}
-
+
// Find the =>
for (End++; isspace(*End) != 0 && *End != 0; End++);
if (*End != 0)
diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc
index 677b1c892..e95016240 100644
--- a/test/libapt/parsedepends_test.cc
+++ b/test/libapt/parsedepends_test.cc
@@ -176,7 +176,7 @@ test:
equals("7.15.3~", Version);
equals(Null | pkgCache::Dep::Equals | pkgCache::Dep::Or, Op);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
if (StripMultiArch == true)
equals("overlord-dev", Package);
else
--
cgit v1.2.3-70-g09d2
From 866e9fadf892368fcb50e6a192bcdd350cfe8e5c Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Fri, 17 Jan 2014 20:41:55 +0100
Subject: implement suggestion by donkult (thanks!)
---
apt-pkg/sourcelist.cc | 4 ++--
doc/sources.list.5.xml | 4 ++--
test/integration/test-apt-sources-deb822 | 2 +-
test/libapt/sourcelist_test.cc | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 09d8287a0..51b766095 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -78,7 +78,7 @@ bool pkgSourceList::Type::ParseStanza(vector &List,
{
map Options;
- string URI = Tags.FindS("Uri");
+ string URI = Tags.FindS("URI");
if (!FixupURI(URI))
{
_error->Error(_("Malformed stanza %u in source list %s (URI parse)"),i,Fd.Name().c_str());
@@ -87,7 +87,7 @@ bool pkgSourceList::Type::ParseStanza(vector &List,
// Define external/internal options
const char* option_deb822[] = {
- "Architectures", "Architectures-Add", "Architectures-Delete", "Trusted",
+ "Architectures", "Architectures-Add", "Architectures-Remove", "Trusted",
};
const char* option_internal[] = {
"arch", "arch+", "arch-", "trusted",
diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml
index e770023d5..7a82bd4ce 100644
--- a/doc/sources.list.5.xml
+++ b/doc/sources.list.5.xml
@@ -84,13 +84,13 @@
Alternatively a rfc822 style format is also supported:
Type: deb
- Uri: http://example.com
+ URI: http://example.com
Suite: stable
Section: component1 component2
[option1]: [option1-value]
Type: deb-src
- Uri: http://example.com
+ URI: http://example.com
Suite: stable
Section: component1 component2
[option1]: [option1-value]
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index 67d119565..a055c8d5e 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -20,7 +20,7 @@ BASE="# some comment
#Type: meep
Type: deb
-Uri: http://ftp.debian.org/debian
+URI: http://ftp.debian.org/debian
Suite: stable
Section: main
Comment: Some random string
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 1d30bd85b..6a625770f 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -23,14 +23,14 @@ int main(int argc, char *argv[])
{
const char contents[] = ""
"Type: deb\n"
- "Uri: http://ftp.debian.org/debian\n"
+ "URI: http://ftp.debian.org/debian\n"
"Suite: stable\n"
"Section: main\n"
"Comment: Some random string\n"
" that can be very long\n"
"\n"
"Type: deb\n"
- "Uri: http://ftp.debian.org/debian\n"
+ "URI: http://ftp.debian.org/debian\n"
"Suite: unstable\n"
"Section: main non-free\n"
;
--
cgit v1.2.3-70-g09d2
From 6c069a2247781754bcc8574687cb98b493c6ab8a Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Sat, 18 Jan 2014 20:51:03 +0100
Subject: rename "Suite/Section" to plural
---
apt-pkg/sourcelist.cc | 4 ++--
doc/sources.list.5.xml | 10 +++++-----
test/integration/test-apt-sources-deb822 | 6 +++---
test/libapt/sourcelist_test.cc | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 51b766095..4e580ba04 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -97,9 +97,9 @@ bool pkgSourceList::Type::ParseStanza(vector &List,
Options[option_internal[j]] = Tags.FindS(option_deb822[j]);
// now create one item per suite/section
- string Suite = Tags.FindS("Suite");
+ string Suite = Tags.FindS("Suites");
Suite = SubstVar(Suite,"$(ARCH)",_config->Find("APT::Architecture"));
- string const Section = Tags.FindS("Section");
+ string const Section = Tags.FindS("Sections");
std::vector list_dist = StringSplit(Suite, " ");
std::vector list_section = StringSplit(Section, " ");
diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml
index 7a82bd4ce..87f4d5fc5 100644
--- a/doc/sources.list.5.xml
+++ b/doc/sources.list.5.xml
@@ -20,7 +20,7 @@
&apt-email;
&apt-product;
- 2012-06-09T00:00:00Z
+ 2014-01-18T00:00:00Z
@@ -85,14 +85,14 @@
Type: deb
URI: http://example.com
- Suite: stable
- Section: component1 component2
+ Suites: stable
+ Sections: component1 component2
[option1]: [option1-value]
Type: deb-src
URI: http://example.com
- Suite: stable
- Section: component1 component2
+ Suites: stable
+ Sections: component1 component2
[option1]: [option1-value]
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index a055c8d5e..c73b942d4 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -21,8 +21,8 @@ BASE="# some comment
Type: deb
URI: http://ftp.debian.org/debian
-Suite: stable
-Section: main
+Suites: stable
+Sections: main
Comment: Some random string
that can be very long"
@@ -70,7 +70,7 @@ testequalwithmsg "Invalid sources.list file gives proper error" "E: Malformed li
E: The list of sources could not be read." aptget update --print-uris
echo "Type: deb
-Suite: stable
+Suites: stable
" > $SOURCES
testequalwithmsg "Invalid deb822 sources.list file gives proper error" "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 6a625770f..ae5d11f66 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -24,8 +24,8 @@ int main(int argc, char *argv[])
const char contents[] = ""
"Type: deb\n"
"URI: http://ftp.debian.org/debian\n"
- "Suite: stable\n"
- "Section: main\n"
+ "Suites: stable\n"
+ "Sections: main\n"
"Comment: Some random string\n"
" that can be very long\n"
"\n"
--
cgit v1.2.3-70-g09d2
From e67b9a23d7646d2f1e21bf4039fa71cc66b628c5 Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Mon, 20 Jan 2014 07:43:17 +0100
Subject: add Description tag for deb822 sources
---
doc/sources.list.5.xml | 4 ++++
test/integration/test-apt-sources-deb822 | 6 +++---
test/libapt/sourcelist_test.cc | 4 ++--
3 files changed, 9 insertions(+), 5 deletions(-)
(limited to 'test/libapt')
diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml
index 87f4d5fc5..b2b682292 100644
--- a/doc/sources.list.5.xml
+++ b/doc/sources.list.5.xml
@@ -87,6 +87,8 @@
URI: http://example.com
Suites: stable
Sections: component1 component2
+ Description: short
+ long long long
[option1]: [option1-value]
Type: deb-src
@@ -94,6 +96,8 @@
Suites: stable
Sections: component1 component2
[option1]: [option1-value]
+ Description: short
+ long long long
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index c73b942d4..34708d2d1 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -23,12 +23,11 @@ Type: deb
URI: http://ftp.debian.org/debian
Suites: stable
Sections: main
-Comment: Some random string
- that can be very long"
+Description: summay
+ and the long part"
# simple case
echo "$BASE" > $SOURCES
-
testequalwithmsg "Simple deb822 sources.list works" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
@@ -75,3 +74,4 @@ Suites: stable
testequalwithmsg "Invalid deb822 sources.list file gives proper error" "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
E: The list of sources could not be read." aptget update --print-uris
+
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index ae5d11f66..b9dd47207 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -26,8 +26,8 @@ int main(int argc, char *argv[])
"URI: http://ftp.debian.org/debian\n"
"Suites: stable\n"
"Sections: main\n"
- "Comment: Some random string\n"
- " that can be very long\n"
+ "Description: short\n"
+ " long description that can be very long\n"
"\n"
"Type: deb\n"
"URI: http://ftp.debian.org/debian\n"
--
cgit v1.2.3-70-g09d2
From 75c10df1533ede97e05fef3d1e2fc6a22fc4db00 Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Mon, 20 Jan 2014 08:10:50 +0100
Subject: add support for multiple URIs in deb822 style sources.list
---
apt-pkg/sourcelist.cc | 29 ++++++++++++++++++-----------
doc/sources.list.5.xml | 4 ++--
test/integration/test-apt-sources-deb822 | 11 ++++++++++-
test/libapt/sourcelist_test.cc | 4 ++--
4 files changed, 32 insertions(+), 16 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 5d41fb00e..339005149 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -78,13 +78,6 @@ bool pkgSourceList::Type::ParseStanza(vector &List,
{
map Options;
- string URI = Tags.FindS("URI");
- if (!FixupURI(URI))
- {
- _error->Error(_("Malformed stanza %u in source list %s (URI parse)"),i,Fd.Name().c_str());
- return false;
- }
-
string Enabled = Tags.FindS("Enabled");
if (Enabled.size() > 0 && StringToBool(Enabled) == false)
return true;
@@ -104,20 +97,34 @@ bool pkgSourceList::Type::ParseStanza(vector &List,
string Suite = Tags.FindS("Suites");
Suite = SubstVar(Suite,"$(ARCH)",_config->Find("APT::Architecture"));
string const Section = Tags.FindS("Sections");
+ string URIS = Tags.FindS("URIs");
+ std::vector list_uris = StringSplit(URIS, " ");
std::vector list_dist = StringSplit(Suite, " ");
std::vector list_section = StringSplit(Section, " ");
- for (std::vector::const_iterator I = list_dist.begin();
- I != list_dist.end(); I++)
+
+ for (std::vector::const_iterator U = list_uris.begin();
+ U != list_uris.end(); U++)
{
- for (std::vector::const_iterator J = list_section.begin();
- J != list_section.end(); J++)
+ std::string URI = (*U);
+ if (!FixupURI(URI))
+ {
+ _error->Error(_("Malformed stanza %u in source list %s (URI parse)"),i,Fd.Name().c_str());
+ return false;
+ }
+
+ for (std::vector::const_iterator I = list_dist.begin();
+ I != list_dist.end(); I++)
+ {
+ for (std::vector::const_iterator J = list_section.begin();
+ J != list_section.end(); J++)
{
if (CreateItem(List, URI, (*I), (*J), Options) == false)
{
return false;
}
}
+ }
}
return true;
}
diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml
index a2f6e985e..5a421293e 100644
--- a/doc/sources.list.5.xml
+++ b/doc/sources.list.5.xml
@@ -84,7 +84,7 @@
Alternatively a rfc822 style format is also supported:
Type: deb
- URI: http://example.com
+ URIs: http://example.com
Suites: stable testing
Sections: component1 component2
Description: short
@@ -92,7 +92,7 @@
[option1]: [option1-value]
Type: deb-src
- URI: http://example.com
+ URIs: http://example.com
Suites: stable
Sections: component1 component2
Enabled: no
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index f461314e6..5c91dd6f5 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -20,7 +20,7 @@ BASE="# some comment
#Type: meep
Type: deb
-URI: http://ftp.debian.org/debian
+URIs: http://ftp.debian.org/debian
Suites: stable
Sections: main
Description: summay
@@ -79,3 +79,12 @@ E: The list of sources could not be read." aptget update --print-uris
echo "$BASE" > $SOURCES
echo "Enabled: no" >> $SOURCES
testempty aptget update --print-uris
+
+# multiple URIs
+echo "$BASE" | sed -e 's#http://ftp.debian.org/debian#http://ftp.debian.org/debian http://ftp.de.debian.org/debian#' > $SOURCES
+testequalwithmsg "Multiple URIs work" "'http://ftp.de.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
+'http://ftp.de.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.de.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
+'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp.de.debian.org_debian_dists_stable_InRelease 0
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
+'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index b9dd47207..3597b3d58 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -23,14 +23,14 @@ int main(int argc, char *argv[])
{
const char contents[] = ""
"Type: deb\n"
- "URI: http://ftp.debian.org/debian\n"
+ "URIs: http://ftp.debian.org/debian\n"
"Suites: stable\n"
"Sections: main\n"
"Description: short\n"
" long description that can be very long\n"
"\n"
"Type: deb\n"
- "URI: http://ftp.debian.org/debian\n"
+ "URIs: http://ftp.debian.org/debian\n"
"Suite: unstable\n"
"Section: main non-free\n"
;
--
cgit v1.2.3-70-g09d2
From 7f316a3feab95370f1dd28c08c58bc3c140bf0a0 Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Mon, 20 Jan 2014 08:17:43 +0100
Subject: add support for multipl types in one line
---
apt-pkg/sourcelist.cc | 25 +++++++++++++++----------
doc/sources.list.5.xml | 8 ++++----
test/integration/test-apt-sources-deb822 | 13 ++++++++++---
test/libapt/sourcelist_test.cc | 8 ++++----
4 files changed, 33 insertions(+), 21 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 339005149..bbc514f5b 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -387,21 +387,26 @@ int pkgSourceList::ParseFileDeb822(string File)
// read step by step
while (Sources.Step(Tags) == true)
{
- if(!Tags.Exists("Type"))
+ if(!Tags.Exists("Types"))
continue;
- string const type = Tags.FindS("Type");
- Type *Parse = Type::GetType(type.c_str());
- if (Parse == 0)
+ string const types = Tags.FindS("Types");
+ std::vector list_types = StringSplit(types, " ");
+ for (std::vector::const_iterator I = list_types.begin();
+ I != list_types.end(); I++)
{
- _error->Error(_("Type '%s' is not known on stanza %u in source list %s"),type.c_str(),i,Fd.Name().c_str());
- return -1;
- }
+ Type *Parse = Type::GetType((*I).c_str());
+ if (Parse == 0)
+ {
+ _error->Error(_("Type '%s' is not known on stanza %u in source list %s"), (*I).c_str(),i,Fd.Name().c_str());
+ return -1;
+ }
- if (!Parse->ParseStanza(SrcList, Tags, i, Fd))
- return -1;
+ if (!Parse->ParseStanza(SrcList, Tags, i, Fd))
+ return -1;
- i++;
+ i++;
+ }
}
// we are done, return the number of stanzas read
diff --git a/doc/sources.list.5.xml b/doc/sources.list.5.xml
index 5a421293e..4d0c4d502 100644
--- a/doc/sources.list.5.xml
+++ b/doc/sources.list.5.xml
@@ -83,7 +83,7 @@
Alternatively a rfc822 style format is also supported:
- Type: deb
+ Types: deb deb-src
URIs: http://example.com
Suites: stable testing
Sections: component1 component2
@@ -91,9 +91,9 @@
long long long
[option1]: [option1-value]
- Type: deb-src
- URIs: http://example.com
- Suites: stable
+ Types: deb
+ URIs: http://another.example.com
+ Suites: experimental
Sections: component1 component2
Enabled: no
Description: short
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index 5c91dd6f5..e74fc4cb9 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -17,9 +17,9 @@ testequalwithmsg "Old style sources.list works" "'http://ftp.debian.org/debian/d
BASE="# some comment
# that contains a : as well
-#Type: meep
+#Types: meep
-Type: deb
+Types: deb
URIs: http://ftp.debian.org/debian
Suites: stable
Sections: main
@@ -68,7 +68,7 @@ echo "deb http://ftp.debian.org" > $SOURCES
testequalwithmsg "Invalid sources.list file gives proper error" "E: Malformed line 1 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (dist)
E: The list of sources could not be read." aptget update --print-uris
-echo "Type: deb
+echo "Types: deb
Suites: stable
" > $SOURCES
@@ -88,3 +88,10 @@ testequalwithmsg "Multiple URIs work" "'http://ftp.de.debian.org/debian/dists/st
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
+
+# multiple Type in one field
+echo "$BASE" | sed -e 's#Types: deb#Types: deb deb-src#' > $SOURCES
+testequalwithmsg "Multiple Types work" "'http://ftp.debian.org/debian/dists/stable/main/source/Sources.bz2' ftp.debian.org_debian_dists_stable_main_source_Sources 0 :
+'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
+'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 :
+'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 3597b3d58..6ab30ba67 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -22,17 +22,17 @@ void remove_tmpfile(void)
int main(int argc, char *argv[])
{
const char contents[] = ""
- "Type: deb\n"
+ "Types: deb\n"
"URIs: http://ftp.debian.org/debian\n"
"Suites: stable\n"
"Sections: main\n"
"Description: short\n"
" long description that can be very long\n"
"\n"
- "Type: deb\n"
+ "Types: deb\n"
"URIs: http://ftp.debian.org/debian\n"
- "Suite: unstable\n"
- "Section: main non-free\n"
+ "Suites: unstable\n"
+ "Sections: main non-free\n"
;
FileFd fd;
--
cgit v1.2.3-70-g09d2
From 5d9667d92a9d6973fc001c27d618bc878a4df2ba Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Fri, 24 Jan 2014 23:29:10 +0100
Subject: fix test
---
test/libapt/sourcelist_test.cc | 2 ++
1 file changed, 2 insertions(+)
(limited to 'test/libapt')
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 6fc84fd93..0300ce929 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -21,6 +21,8 @@ void remove_tmpfile(void)
int main(int argc, char *argv[])
{
+ _config->Set("APT::Sources::Use-Deb822", true);
+
const char contents[] = ""
"Types: deb\n"
"URIs: http://ftp.debian.org/debian\n"
--
cgit v1.2.3-70-g09d2
From 1e3f4083db29bba600b9725e9456b0e140975c99 Mon Sep 17 00:00:00 2001
From: Michael Vogt
Date: Sat, 22 Feb 2014 18:34:33 +0100
Subject: Fix typos in documentation (codespell)
---
COMPILING | 2 +-
README.ddtp | 4 ++--
README.make | 2 +-
README.progress-reporting | 2 +-
apt-inst/contrib/arfile.cc | 2 +-
apt-inst/contrib/extracttar.cc | 2 +-
apt-inst/extract.cc | 4 ++--
apt-inst/filelist.cc | 4 ++--
apt-pkg/acquire-item.cc | 20 ++++++++---------
apt-pkg/acquire-worker.cc | 2 +-
apt-pkg/acquire.cc | 6 ++---
apt-pkg/algorithms.cc | 12 +++++-----
apt-pkg/algorithms.h | 4 ++--
apt-pkg/aptconfiguration.cc | 8 +++----
apt-pkg/aptconfiguration.h | 10 ++++-----
apt-pkg/cacheiterators.h | 6 ++---
apt-pkg/cdrom.h | 2 +-
apt-pkg/clean.cc | 2 +-
apt-pkg/contrib/cdromutl.cc | 4 ++--
apt-pkg/contrib/cmndline.cc | 2 +-
apt-pkg/contrib/crc-16.cc | 2 +-
apt-pkg/contrib/error.h | 2 +-
apt-pkg/contrib/fileutl.cc | 6 ++---
apt-pkg/contrib/gpgv.h | 2 +-
apt-pkg/contrib/macros.h | 2 +-
apt-pkg/contrib/md5.h | 2 +-
apt-pkg/contrib/mmap.h | 4 ++--
apt-pkg/contrib/progress.h | 2 +-
apt-pkg/contrib/sha2_internal.cc | 2 +-
apt-pkg/contrib/strutl.cc | 10 ++++-----
apt-pkg/deb/deblistparser.cc | 2 +-
apt-pkg/deb/debsystem.cc | 2 +-
apt-pkg/deb/debversion.cc | 4 ++--
apt-pkg/depcache.cc | 6 ++---
apt-pkg/depcache.h | 2 +-
apt-pkg/edsp.h | 6 ++---
apt-pkg/indexfile.h | 4 ++--
apt-pkg/orderlist.cc | 8 +++----
apt-pkg/packagemanager.cc | 16 ++++++-------
apt-pkg/pkgcache.cc | 4 ++--
apt-pkg/pkgcache.h | 2 +-
apt-pkg/pkgsystem.h | 4 ++--
apt-pkg/upgrade.cc | 2 +-
buildlib/fail.mak | 2 +-
buildlib/program.mak | 2 +-
cmdline/apt-config.cc | 2 +-
cmdline/apt-get.cc | 4 ++--
cmdline/apt-internal-solver.cc | 6 ++---
cmdline/apt-key.in | 4 ++--
configure.ac | 2 +-
debian/apt.cron.daily | 4 ++--
debian/changelog | 4 ++++
doc/Bugs | 8 +++----
doc/design.sgml | 2 +-
doc/dpkg-tech.sgml | 6 ++---
doc/examples/configure-index | 2 +-
doc/files.sgml | 2 +-
doc/libapt-pkg2_to_3.txt | 4 ++--
doc/method.sgml | 6 ++---
doc/style.txt | 8 +++----
ftparchive/apt-ftparchive.cc | 2 +-
methods/file.cc | 2 +-
methods/ftp.cc | 4 ++--
methods/ftp.h | 2 +-
methods/http.cc | 4 ++--
methods/http.h | 2 +-
methods/https.cc | 4 ++--
methods/https.h | 2 +-
methods/mirror.cc | 6 ++---
methods/mirror.h | 2 +-
methods/rfc2553emu.h | 2 +-
methods/rsh.cc | 2 +-
methods/server.cc | 6 ++---
test/integration/framework | 2 +-
test/integration/test-apt-get-source | 2 +-
...17690-allow-unauthenticated-makes-all-untrusted | 2 +-
.../test-sourceslist-arch-plusminus-options | 2 +-
test/libapt/globalerror_test.cc | 26 +++++++++++-----------
78 files changed, 171 insertions(+), 167 deletions(-)
(limited to 'test/libapt')
diff --git a/COMPILING b/COMPILING
index bc934c846..1076c6366 100644
--- a/COMPILING
+++ b/COMPILING
@@ -27,7 +27,7 @@ I am not interested in making 'ultra portable code'. I will accept patches
to make the code that already exists conform more to SUS or POSIX, but
I don't really care if your not-SUS OS doesn't work. It is simply too
much work to maintain patches for dysfunctional OSs. I highly suggest you
-contact your vendor and express intrest in a conforming C library.
+contact your vendor and express interest in a conforming C library.
That said, there are lots of finicky problems that must be dealt with even
between the supported OS's. Primarily the path I choose to take is to put
diff --git a/README.ddtp b/README.ddtp
index 98f6109aa..5865b4e02 100644
--- a/README.ddtp
+++ b/README.ddtp
@@ -52,7 +52,7 @@ is md5("XXX\n YYY\n .\n ZZZ\n") (perl-syntax).
A future APT version will download one or some 'Translate-$lang'
file(s) at 'update'-time. After this download it show a translated
description instead of the english form, if it found a translated
-description of the package with the right md5 chechsum. The enviroment
+description of the package with the right md5 chechsum. The environment
of the user will controlled this process (LANG, LANGUAGE, LC_MESSAGES,
etc). With this the package system will never show a outdated
translation.
@@ -60,7 +60,7 @@ translation.
The translations come all from the DDTP. A daily process on
ddtp.debian.org make new 'Translated-$lang' files and a script on
ftp-master request this files and move this to the debian archive.
-Now the first files are accessable at
+Now the first files are accessible at
http://ddtp.debian.org/pdesc/translatefiles/
If you found wrong translations, please read the guides on
diff --git a/README.make b/README.make
index 69d79d37a..db5f36e94 100644
--- a/README.make
+++ b/README.make
@@ -25,7 +25,7 @@ of these parameters will have an immediate effect. The use of makefile.in
and configure substitutions across build makefiles is not used at all.
Furthermore, the make system runs with a current directory equal to the
-source directory irregardless of the destination directory. This means
+source directory regardless of the destination directory. This means
#include "" and #include <> work as expected and more importantly
running 'make' in the source directory will work as expected. The
environment variable or make parameter 'BUILD' sets the build directory.
diff --git a/README.progress-reporting b/README.progress-reporting
index b575e7879..91c0a8ac0 100644
--- a/README.progress-reporting
+++ b/README.progress-reporting
@@ -2,7 +2,7 @@ Install-progress reporting
--------------------------
If the apt options: "APT::Status-Fd" is set, apt will send status
-reports to that fd. The status information is seperated with a ':',
+reports to that fd. The status information is separated with a ':',
there are the following status conditions:
status = {"pmstatus", "dlstatus", "conffile-prompt", "error", "media-change" }
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index 9d84c1784..77dbc55d6 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -6,7 +6,7 @@
AR File - Handle an 'AR' archive
AR Archives have plain text headers at the start of each file
- section. The headers are aligned on a 2 byte boundry.
+ section. The headers are aligned on a 2 byte boundary.
Information about the structure of AR files can be found in ar(5)
on a BSD system, or in the binutils source.
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index fb4db42f8..2437c9749 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -6,7 +6,7 @@
Extract a Tar - Tar Extractor
Some performance measurements showed that zlib performed quite poorly
- in comparision to a forked gzip process. This tar extractor makes use
+ in comparison to a forked gzip process. This tar extractor makes use
of the fact that dup'd file descriptors have the same seek pointer
and that gzip will not read past the end of a compressed stream,
even if there is more data. We use the dup property to track extraction
diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc
index 2c95fba92..b3dfccfc6 100644
--- a/apt-inst/extract.cc
+++ b/apt-inst/extract.cc
@@ -10,7 +10,7 @@
object is unpacked to '.dpkg.new' then the original is hardlinked to
'.dpkg.tmp' and finally the new object is renamed to overwrite the old
one. From an external perspective the file never ceased to exist.
- After the archive has been sucessfully unpacked the .dpkg.tmp files
+ After the archive has been successfully unpacked the .dpkg.tmp files
are erased. A failure causes all the .dpkg.tmp files to be restored.
Decisions about unpacking go like this:
@@ -22,7 +22,7 @@
[Note, this is reduced to only check if a file was expected to be
there]
- If the existing link/file is not a directory then it is replaced
- irregardless
+ regardless
- If the existing link/directory is being replaced by a directory then
absolutely nothing happens.
- If the existing link/directory is being replaced by a link then
diff --git a/apt-inst/filelist.cc b/apt-inst/filelist.cc
index 879c07855..defc4f4df 100644
--- a/apt-inst/filelist.cc
+++ b/apt-inst/filelist.cc
@@ -5,14 +5,14 @@
File Listing - Manages a Cache of File -> Package names.
- Diversions add some signficant complexity to the system. To keep
+ Diversions add some significant complexity to the system. To keep
storage space down in the very special case of a diverted file no
extra bytes are allocated in the Node structure. Instead a diversion
is inserted directly into the hash table and its flag bit set. Every
lookup for that filename will always return the diversion.
The hash buckets are stored in sorted form, with diversions having
- the higest sort order. Identical files are assigned the same file
+ the highest sort order. Identical files are assigned the same file
pointer, thus after a search all of the nodes owning that file can be
found by iterating down the bucket.
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 60003c023..36bb48382 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -129,7 +129,7 @@ void pkgAcquire::Item::Done(string Message,unsigned long long Size,string Hash,
/*}}}*/
// Acquire::Item::Rename - Rename a file /*{{{*/
// ---------------------------------------------------------------------
-/* This helper function is used by alot of item methods as thier final
+/* This helper function is used by a lot of item methods as their final
step */
void pkgAcquire::Item::Rename(string From,string To)
{
@@ -299,7 +299,7 @@ void pkgAcqSubIndex::Done(string Message,unsigned long long Size,string Md5Hash,
return;
}
- // sucess in downloading the index
+ // success in downloading the index
// rename the index
if(Debug)
std::clog << "Renaming: " << DestFile << " -> " << FinalFile << std::endl;
@@ -327,7 +327,7 @@ bool pkgAcqSubIndex::ParseIndex(string const &IndexFile) /*{{{*/
/*}}}*/
// AcqDiffIndex::AcqDiffIndex - Constructor /*{{{*/
// ---------------------------------------------------------------------
-/* Get the DiffIndex file first and see if there are patches availabe
+/* Get the DiffIndex file first and see if there are patches available
* If so, create a pkgAcqIndexDiffs fetcher that will get and apply the
* patches. If anything goes wrong in that process, it will fall back to
* the original packages file
@@ -548,7 +548,7 @@ void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{
{
if(Debug)
std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << std::endl
- << "Falling back to normal index file aquire" << std::endl;
+ << "Falling back to normal index file acquire" << std::endl;
new pkgAcqIndex(Owner, RealURI, Description, Desc.ShortDesc,
ExpectedHash);
@@ -569,7 +569,7 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long long Size,string Md5Hash
string FinalFile;
FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(RealURI);
- // sucess in downloading the index
+ // success in downloading the index
// rename the index
FinalFile += string(".IndexDiff");
if(Debug)
@@ -628,7 +628,7 @@ void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{
{
if(Debug)
std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << std::endl
- << "Falling back to normal index file aquire" << std::endl;
+ << "Falling back to normal index file acquire" << std::endl;
new pkgAcqIndex(Owner, RealURI, Description,Desc.ShortDesc,
ExpectedHash);
Finish();
@@ -733,7 +733,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size,string Md5Has
string FinalFile;
FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(RealURI);
- // sucess in downloading a diff, enter ApplyDiff state
+ // success in downloading a diff, enter ApplyDiff state
if(State == StateFetchDiff)
{
@@ -825,7 +825,7 @@ void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
// first failure means we should fallback
State = StateErrorDiff;
- std::clog << "Falling back to normal index file aquire" << std::endl;
+ std::clog << "Falling back to normal index file acquire" << std::endl;
new pkgAcqIndex(Owner, RealURI, Description,Desc.ShortDesc,
ExpectedHash);
}
@@ -1240,7 +1240,7 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, /*{{{*/
if (RealFileExists(Final) == true)
{
// File was already in place. It needs to be re-downloaded/verified
- // because Release might have changed, we do give it a differnt
+ // because Release might have changed, we do give it a different
// name than DestFile because otherwise the http method will
// send If-Range requests and there are too many broken servers
// out there that do not understand them
@@ -2021,7 +2021,7 @@ bool pkgAcqArchive::QueueNext()
return true;
}
- /* Hmm, we have a file and its size does not match, this shouldnt
+ /* Hmm, we have a file and its size does not match, this shouldn't
happen.. */
unlink(FinalFile.c_str());
}
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 44c3e4e17..de62080da 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -568,7 +568,7 @@ bool pkgAcquire::Worker::InFdReady()
/*}}}*/
// Worker::MethodFailure - Called when the method fails /*{{{*/
// ---------------------------------------------------------------------
-/* This is called when the method is belived to have failed, probably because
+/* This is called when the method is believed to have failed, probably because
read returned -1. */
bool pkgAcquire::Worker::MethodFailure()
{
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index a8a5abd34..120e809e1 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -5,9 +5,9 @@
Acquire - File Acquiration
- The core element for the schedual system is the concept of a named
+ The core element for the schedule system is the concept of a named
queue. Each queue is unique and each queue has a name derived from the
- URI. The degree of paralization can be controled by how the queue
+ URI. The degree of paralization can be controlled by how the queue
name is derived from the URI.
##################################################################### */
@@ -175,7 +175,7 @@ void pkgAcquire::Add(Worker *Work)
// ---------------------------------------------------------------------
/* A worker has died. This can not be done while the select loop is running
as it would require that RunFds could handling a changing list state and
- it cant.. */
+ it can't.. */
void pkgAcquire::Remove(Worker *Work)
{
if (Running == true)
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 8644a8138..0363ab3e2 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -424,7 +424,7 @@ void pkgProblemResolver::MakeScores()
/* This is arbitrary, it should be high enough to elevate an
essantial package above most other packages but low enough
to allow an obsolete essential packages to be removed by
- a conflicts on a powerfull normal package (ie libc6) */
+ a conflicts on a powerful normal package (ie libc6) */
if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential
|| (I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important)
Score += PrioEssentials;
@@ -441,7 +441,7 @@ void pkgProblemResolver::MakeScores()
Score += PrioInstalledAndNotObsolete;
}
- // Now that we have the base scores we go and propogate dependencies
+ // Now that we have the base scores we go and propagate dependencies
for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
{
if (Cache[I].InstallVer == 0)
@@ -485,7 +485,7 @@ void pkgProblemResolver::MakeScores()
}
}
- /* Now we propogate along provides. This makes the packages that
+ /* Now we propagate along provides. This makes the packages that
provide important packages extremely important */
for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
{
@@ -640,7 +640,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
adjusting the package will inflict.
It goes from highest score to lowest and corrects all of the breaks by
- keeping or removing the dependant packages. If that fails then it removes
+ keeping or removing the dependent packages. If that fails then it removes
the package itself and goes on. The routine should be able to intelligently
go from any broken state to a fixed state.
@@ -830,7 +830,7 @@ bool pkgProblemResolver::ResolveInternal(bool const BrokenFix)
/* Look across the version list. If there are no possible
targets then we keep the package and bail. This is necessary
- if a package has a dep on another package that cant be found */
+ if a package has a dep on another package that can't be found */
SPtrArray VList = Start.AllTargets();
if (*VList == 0 && (Flags[I->ID] & Protected) != Protected &&
Start.IsNegative() == false &&
@@ -1183,7 +1183,7 @@ bool pkgProblemResolver::ResolveByKeepInternal()
continue;
/* Keep the package. If this works then great, otherwise we have
- to be significantly more agressive and manipulate its dependencies */
+ to be significantly more aggressive and manipulate its dependencies */
if ((Flags[I->ID] & Protected) == 0)
{
if (Debug == true)
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 5a9a77415..489d81159 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -10,7 +10,7 @@
see all of the effects of an upgrade run.
pkgDistUpgrade computes an upgrade that causes as many packages as
- possible to move to the newest verison.
+ possible to move to the newest version.
pkgApplyStatus sets the target state based on the content of the status
field in the status file. It is important to get proper crash recovery.
@@ -44,7 +44,7 @@ using std::ostream;
#endif
#ifndef APT_9_CLEANER_HEADERS
-// include pkg{DistUpgrade,AllUpgrade,MiniizeUpgrade} here for compatiblity
+// include pkg{DistUpgrade,AllUpgrade,MiniizeUpgrade} here for compatibility
#include
#include
#endif
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 1ebcf97bc..0b0b546c5 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -27,9 +27,9 @@
#include
/*}}}*/
namespace APT {
-// getCompressionTypes - Return Vector of usbale compressiontypes /*{{{*/
+// getCompressionTypes - Return Vector of usable compressiontypes /*{{{*/
// ---------------------------------------------------------------------
-/* return a vector of compression types in the prefered order. */
+/* return a vector of compression types in the preferred order. */
std::vector
const Configuration::getCompressionTypes(bool const &Cached) {
static std::vector types;
@@ -109,7 +109,7 @@ const Configuration::getCompressionTypes(bool const &Cached) {
/*}}}*/
// GetLanguages - Return Vector of Language Codes /*{{{*/
// ---------------------------------------------------------------------
-/* return a vector of language codes in the prefered order.
+/* return a vector of language codes in the preferred order.
the special word "environment" will be replaced with the long and the short
code of the local settings and it will be insured that this will not add
duplicates. So in an german local the setting "environment, de_DE, en, de"
@@ -330,7 +330,7 @@ bool const Configuration::checkLanguage(std::string Lang, bool const All) {
return (std::find(langs.begin(), langs.end(), Lang) != langs.end());
}
/*}}}*/
-// getArchitectures - Return Vector of prefered Architectures /*{{{*/
+// getArchitectures - Return Vector of preferred Architectures /*{{{*/
std::vector const Configuration::getArchitectures(bool const &Cached) {
using std::string;
diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h
index d22b675c0..bf7deae85 100644
--- a/apt-pkg/aptconfiguration.h
+++ b/apt-pkg/aptconfiguration.h
@@ -37,14 +37,14 @@ public: /*{{{*/
* \param Cached saves the result so we need to calculated it only once
* this parameter should ony be used for testing purposes.
*
- * \return a vector of the compression types in the prefered usage order
+ * \return a vector of the compression types in the preferred usage order
*/
std::vector static const getCompressionTypes(bool const &Cached = true);
/** \brief Returns a vector of Language Codes
*
* Languages can be defined with their two or five chars long code.
- * This methods handles the various ways to set the prefered codes,
+ * This methods handles the various ways to set the preferred codes,
* honors the environment and ensures that the codes are not listed twice.
*
* The special word "environment" will be replaced with the long and the short
@@ -52,7 +52,7 @@ public: /*{{{*/
* duplicates. So in an german local the setting "environment, de_DE, en, de"
* will result in "de_DE, de, en".
*
- * Another special word is "none" which separates the prefered from all codes
+ * Another special word is "none" which separates the preferred from all codes
* in this setting. So setting and method can be used to get codes the user want
* to see or to get all language codes APT (should) have Translations available.
*
@@ -62,7 +62,7 @@ public: /*{{{*/
* \param Locale don't get the locale from the system but use this one instead
* this parameter should ony be used for testing purposes.
*
- * \return a vector of (all) Language Codes in the prefered usage order
+ * \return a vector of (all) Language Codes in the preferred usage order
*/
std::vector static const getLanguages(bool const &All = false,
bool const &Cached = true, char const ** const Locale = 0);
@@ -80,7 +80,7 @@ public: /*{{{*/
* \param Cached saves the result so we need to calculated it only once
* this parameter should ony be used for testing purposes.
*
- * \return a vector of Architectures in prefered order
+ * \return a vector of Architectures in preferred order
*/
std::vector static const getArchitectures(bool const &Cached = true);
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 886d84838..ea6a4afba 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -46,7 +46,7 @@ template class pkgCache::Iterator :
* The implementation of this method should be pretty short
* as it will only return the Pointer into the mmap stored
* in the owner but the name of this pointer is different for
- * each stucture and we want to abstract here at least for the
+ * each structure and we want to abstract here at least for the
* basic methods from the actual structure.
* \return Pointer to the first structure of this type
*/
@@ -198,7 +198,7 @@ class pkgCache::VerIterator : public Iterator {
/** \brief compares two version and returns if they are similar
This method should be used to identify if two pseudo versions are
- refering to the same "real" version */
+ referring to the same "real" version */
inline bool SimilarVer(const VerIterator &B) const {
return (B.end() == false && S->Hash == B->Hash && strcmp(VerStr(), B.VerStr()) == 0);
};
@@ -419,7 +419,7 @@ class pkgCache::DescFileIterator : public Iterator {
inline DescFileIterator(pkgCache &Owner,DescFile *Trg) : Iterator(Owner, Trg) {};
};
/*}}}*/
-// Inlined Begin functions cant be in the class because of order problems /*{{{*/
+// Inlined Begin functions can't be in the class because of order problems /*{{{*/
inline pkgCache::PkgIterator pkgCache::GrpIterator::PackageList() const
{return PkgIterator(*Owner,Owner->PkgP + S->FirstPackage);};
inline pkgCache::VerIterator pkgCache::PkgIterator::VersionList() const
diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h
index db637b96d..c58593550 100644
--- a/apt-pkg/cdrom.h
+++ b/apt-pkg/cdrom.h
@@ -88,7 +88,7 @@ struct CdromDevice /*{{{*/
class pkgUdevCdromDevices /*{{{*/
{
protected:
- // libudev dlopen stucture
+ // libudev dlopen structure
void *libudev_handle;
struct udev* (*udev_new)(void);
int (*udev_enumerate_add_match_property)(struct udev_enumerate *udev_enumerate, const char *property, const char *value);
diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc
index eae419e34..2dea8ffdd 100644
--- a/apt-pkg/clean.cc
+++ b/apt-pkg/clean.cc
@@ -105,7 +105,7 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
break;
}
- // See if this verison matches the file
+ // See if this version matches the file
if (IsFetchable == true && Ver == V.VerStr())
break;
}
diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc
index afa01a562..20210ec0a 100644
--- a/apt-pkg/contrib/cdromutl.cc
+++ b/apt-pkg/contrib/cdromutl.cc
@@ -47,8 +47,8 @@ bool IsMounted(string &Path)
if (Path[Path.length() - 1] != '/')
Path += '/';
- /* First we check if the path is actualy mounted, we do this by
- stating the path and the previous directory (carefull of links!)
+ /* First we check if the path is actually mounted, we do this by
+ stating the path and the previous directory (careful of links!)
and comparing their device fields. */
struct stat Buf,Buf2;
if (stat(Path.c_str(),&Buf) != 0 ||
diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc
index 2086d91ca..ed5800007 100644
--- a/apt-pkg/contrib/cmndline.cc
+++ b/apt-pkg/contrib/cmndline.cc
@@ -293,7 +293,7 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[],
// Look for an argument.
while (1)
{
- // Look at preceeding text
+ // Look at preceding text
char Buffer[300];
if (Argument == 0)
{
diff --git a/apt-pkg/contrib/crc-16.cc b/apt-pkg/contrib/crc-16.cc
index 4058821f9..f5df2d8b1 100644
--- a/apt-pkg/contrib/crc-16.cc
+++ b/apt-pkg/contrib/crc-16.cc
@@ -10,7 +10,7 @@
Al Longyear
Modified by Jason Gunthorpe to fit the local coding
- style, this code is belived to be in the Public Domain.
+ style, this code is believed to be in the Public Domain.
##################################################################### */
/*}}}*/
diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h
index 7d09b2d4a..bcee70b1a 100644
--- a/apt-pkg/contrib/error.h
+++ b/apt-pkg/contrib/error.h
@@ -229,7 +229,7 @@ public: /*{{{*/
/** \brief is the list empty?
*
* The default checks if the list is empty or contains only notices,
- * if you want to check if also no notices happend set the parameter
+ * if you want to check if also no notices happened set the parameter
* flag to \b false.
*
* \param WithoutNotice does notices count, default is \b true, so no
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 536284064..52411a762 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -222,7 +222,7 @@ int GetLock(string File,bool Errors)
int FD = open(File.c_str(),O_RDWR | O_CREAT | O_NOFOLLOW,0640);
if (FD < 0)
{
- // Read only .. cant have locking problems there.
+ // Read only .. can't have locking problems there.
if (errno == EROFS)
{
_error->Warning(_("Not using locking for read only lock file %s"),File.c_str());
@@ -238,7 +238,7 @@ int GetLock(string File,bool Errors)
}
SetCloseExec(FD,true);
- // Aquire a write lock
+ // Acquire a write lock
struct flock fl;
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
@@ -1256,7 +1256,7 @@ FileFd::~FileFd()
/*}}}*/
// FileFd::Read - Read a bit of the file /*{{{*/
// ---------------------------------------------------------------------
-/* We are carefull to handle interruption by a signal while reading
+/* We are careful to handle interruption by a signal while reading
gracefully. */
bool FileFd::Read(void *To,unsigned long long Size,unsigned long long *Actual)
{
diff --git a/apt-pkg/contrib/gpgv.h b/apt-pkg/contrib/gpgv.h
index 45f069058..1d79a52ac 100644
--- a/apt-pkg/contrib/gpgv.h
+++ b/apt-pkg/contrib/gpgv.h
@@ -29,7 +29,7 @@
* for reading. Use #OpenMaybeClearSignedFile to access the message
* instead to ensure you are only reading signed data.
*
- * The method does not return, but has some noteable exit-codes:
+ * The method does not return, but has some notable exit-codes:
* 111 signals an internal error like the inability to execute gpgv,
* 112 indicates a clear-signed file which doesn't include a message,
* which can happen if APT is run while on a network requiring
diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
index 62e7b65db..e53d01b8f 100644
--- a/apt-pkg/contrib/macros.h
+++ b/apt-pkg/contrib/macros.h
@@ -44,7 +44,7 @@
#define _boundv(a,b,c) b = _bound(a,b,c)
#define ABS(a) (((a) < (0)) ?-(a) : (a))
-/* Usefull count macro, use on an array of things and it will return the
+/* Useful count macro, use on an array of things and it will return the
number of items in the array */
#define _count(a) (sizeof(a)/sizeof(a[0]))
diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h
index 25631b166..195455645 100644
--- a/apt-pkg/contrib/md5.h
+++ b/apt-pkg/contrib/md5.h
@@ -10,7 +10,7 @@
store a MD5Sum in 16 bytes of memory.
A MD5Sum is used to generate a (hopefully) unique 16 byte number for a
- block of data. This can be used to gaurd against corruption of a file.
+ block of data. This can be used to guard against corruption of a file.
MD5 should not be used for tamper protection, use SHA or something more
secure.
diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h
index 6bd4a2d86..c1dfedf6d 100644
--- a/apt-pkg/contrib/mmap.h
+++ b/apt-pkg/contrib/mmap.h
@@ -6,7 +6,7 @@
MMap Class - Provides 'real' mmap or a faked mmap using read().
The purpose of this code is to provide a generic way for clients to
- access the mmap function. In enviroments that do not support mmap
+ access the mmap function. In environments that do not support mmap
from file fd's this function will use read and normal allocated
memory.
@@ -15,7 +15,7 @@
The DynamicMMap class is used to help the on-disk data structure
generators. It provides a large allocated workspace and members
- to allocate space from the workspace in an effecient fashion.
+ to allocate space from the workspace in an efficient fashion.
This source is placed in the Public Domain, do with it what you will
It was originally written by Jason Gunthorpe.
diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h
index 3a6943aee..f7fbc9ccf 100644
--- a/apt-pkg/contrib/progress.h
+++ b/apt-pkg/contrib/progress.h
@@ -7,7 +7,7 @@
This class allows lengthy operations to communicate their progress
to the GUI. The progress model is simple and is not designed to handle
- the complex case of the multi-activity aquire class.
+ the complex case of the multi-activity acquire class.
The model is based on the concept of an overall operation consisting
of a series of small sub operations. Each sub operation has it's own
diff --git a/apt-pkg/contrib/sha2_internal.cc b/apt-pkg/contrib/sha2_internal.cc
index f84fb761c..bb2560252 100644
--- a/apt-pkg/contrib/sha2_internal.cc
+++ b/apt-pkg/contrib/sha2_internal.cc
@@ -65,7 +65,7 @@
* Please make sure that your system defines BYTE_ORDER. If your
* architecture is little-endian, make sure it also defines
* LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
- * equivilent.
+ * equivalent.
*
* If your system does not define the above, then you can do so by
* hand like this:
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 962112854..d4f53ea3a 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -426,7 +426,7 @@ string TimeToStr(unsigned long Sec)
/*}}}*/
// SubstVar - Substitute a string for another string /*{{{*/
// ---------------------------------------------------------------------
-/* This replaces all occurances of Subst with Contents in Str. */
+/* This replaces all occurrences of Subst with Contents in Str. */
string SubstVar(const string &Str,const string &Subst,const string &Contents)
{
string::size_type Pos = 0;
@@ -926,7 +926,7 @@ bool FTPMDTMStrToTime(const char* const str,time_t &time)
/*}}}*/
// StrToTime - Converts a string into a time_t /*{{{*/
// ---------------------------------------------------------------------
-/* This handles all 3 populare time formats including RFC 1123, RFC 1036
+/* This handles all 3 popular time formats including RFC 1123, RFC 1036
and the C library asctime format. It requires the GNU library function
'timegm' to convert a struct tm in UTC to a time_t. For some bizzar
reason the C library does not provide any such function :< This also
@@ -1313,7 +1313,7 @@ string StripEpoch(const string &VerStr)
// tolower_ascii - tolower() function that ignores the locale /*{{{*/
// ---------------------------------------------------------------------
/* This little function is the most called method we have and tries
- therefore to do the absolut minimum - and is noteable faster than
+ therefore to do the absolut minimum - and is notable faster than
standard tolower/toupper and as a bonus avoids problems with different
locales - we only operate on ascii chars anyway. */
int tolower_ascii(int const c)
@@ -1324,9 +1324,9 @@ int tolower_ascii(int const c)
}
/*}}}*/
-// CheckDomainList - See if Host is in a , seperate list /*{{{*/
+// CheckDomainList - See if Host is in a , separate list /*{{{*/
// ---------------------------------------------------------------------
-/* The domain list is a comma seperate list of domains that are suffix
+/* The domain list is a comma separate list of domains that are suffix
matched against the argument */
bool CheckDomainList(const string &Host,const string &List)
{
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 68d544e1f..acdcc4554 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -758,7 +758,7 @@ bool debListParser::GrabWord(string Word,WordList *List,unsigned char &Out)
/*}}}*/
// ListParser::Step - Move to the next section in the file /*{{{*/
// ---------------------------------------------------------------------
-/* This has to be carefull to only process the correct architecture */
+/* This has to be careful to only process the correct architecture */
bool debListParser::Step()
{
iOffset = Tags.Offset();
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index 7ed6936c3..b95ff15df 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -193,7 +193,7 @@ bool debSystem::Initialize(Configuration &Cnf)
/*}}}*/
// System::ArchiveSupported - Is a file format supported /*{{{*/
// ---------------------------------------------------------------------
-/* The standard name for a deb is 'deb'.. There are no seperate versions
+/* The standard name for a deb is 'deb'.. There are no separate versions
of .deb to worry about.. */
bool debSystem::ArchiveSupported(const char *Type)
{
diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc
index 140561262..74e2552ff 100644
--- a/apt-pkg/deb/debversion.cc
+++ b/apt-pkg/deb/debversion.cc
@@ -116,7 +116,7 @@ int debVersioningSystem::CmpFragment(const char *A,const char *AEnd,
return 1;
}
- // Shouldnt happen
+ // Shouldn't happen
return 1;
}
/*}}}*/
@@ -221,7 +221,7 @@ bool debVersioningSystem::CheckDep(const char *PkgVer,
if (PkgVer == DepVer)
return Op == pkgCache::Dep::Equals || Op == pkgCache::Dep::LessEq || Op == pkgCache::Dep::GreaterEq;
- // Perform the actual comparision.
+ // Perform the actual comparison.
int const Res = CmpVersion(PkgVer, DepVer);
switch (Op)
{
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index c39e8c628..a12e6963d 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -789,7 +789,7 @@ bool pkgDepCache::MarkKeep(PkgIterator const &Pkg, bool Soft, bool FromUser,
// - this makes sense as default when all Garbage dependencies
// are automatically marked for removal (as aptitude does).
// setting a package for keep then makes it no longer autoinstalled
- // for all other use-case this action is rather suprising
+ // for all other use-case this action is rather surprising
if(FromUser && !P.Marked)
P.Flags &= ~Flag::Auto;
#endif
@@ -1195,7 +1195,7 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
}
}
- /* This bit is for processing the possibilty of an install/upgrade
+ /* This bit is for processing the possibility of an install/upgrade
fixing the problem for "positive" dependencies */
if (Start.IsNegative() == false && (DepState[Start->ID] & DepCVer) == DepCVer)
{
@@ -1315,7 +1315,7 @@ bool pkgDepCache::IsInstallOkMultiArchSameVersionSynced(PkgIterator const &Pkg,
// (simple string-compare as stuff like '1' == '0:1-0' can't happen here)
if (P->CurrentVer == 0 || strcmp(Pkg.CandVersion(), P.CandVersion()) == 0)
continue;
- // packages loosing M-A:same can be out-of-sync
+ // packages losing M-A:same can be out-of-sync
VerIterator CV = PkgState[P->ID].CandidateVerIter(*this);
if (unlikely(CV.end() == true) ||
(CV->MultiArch & pkgCache::Version::Same) != pkgCache::Version::Same)
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 61c9aa559..f6848f383 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -15,7 +15,7 @@
This structure is important to support the readonly status of the cache
file. When the data is saved the cache will be refereshed from our
- internal rep and written to disk. Then the actual persistant data
+ internal rep and written to disk. Then the actual persistent data
files will be put on the disk.
Each dependency is compared against 3 target versions to produce to
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index 12b06d143..fd4436f60 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -2,7 +2,7 @@
/** Description \file edsp.h {{{
######################################################################
Set of methods to help writing and reading everything needed for EDSP
- with the noteable exception of reading a scenario for conversion into
+ with the notable exception of reading a scenario for conversion into
a Cache as this is handled by edsp interface for listparser and friends
##################################################################### */
/*}}}*/
@@ -182,13 +182,13 @@ public:
* they were unable to calculate a solution for a given task.
* Obviously they can't send a solution through, so this
* methods deals with formatting an error message correctly
- * so that the front-ends can recieve and display it.
+ * so that the front-ends can receive and display it.
*
* The first line of the message should be a short description
* of the error so it can be used for dialog titles or alike
*
* \param uuid of this error message
- * \param message is free form text to discribe the error
+ * \param message is free form text to describe the error
* \param output the front-end listens for error messages
*/
bool static WriteError(char const * const uuid, std::string const &message, FILE* output);
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index 2d433b60a..a0096fa34 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -10,12 +10,12 @@
Binary index files
Binary translation files
- Bianry index files decribing the local system
+ Binary index files describing the local system
Source index files
They are all bundled together here, and the interfaces for
sources.list, acquire, cache gen and record parsing all use this class
- to acess the underlying representation.
+ to access the underlying representation.
##################################################################### */
/*}}}*/
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc
index 984ae1d10..21b5fc4e7 100644
--- a/apt-pkg/orderlist.cc
+++ b/apt-pkg/orderlist.cc
@@ -566,10 +566,10 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical)
// ---------------------------------------------------------------------
/* This is the core ordering routine. It calls the set dependency
consideration functions which then potentialy call this again. Finite
- depth is achived through the colouring mechinism. */
+ depth is achieved through the colouring mechinism. */
bool pkgOrderList::VisitNode(PkgIterator Pkg, char const* from)
{
- // Looping or irrelevent.
+ // Looping or irrelevant.
// This should probably trancend not installed packages
if (Pkg.end() == true || IsFlag(Pkg,Added) == true ||
IsFlag(Pkg,AddPending) == true || IsFlag(Pkg,InList) == false)
@@ -824,7 +824,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D)
The forwards depends loop is designed to bring the packages dependents
close to the package. This helps reduce deconfigure time.
- Loops are irrelevent to this. */
+ Loops are irrelevant to this. */
bool pkgOrderList::DepUnPackDep(DepIterator D)
{
@@ -840,7 +840,7 @@ bool pkgOrderList::DepUnPackDep(DepIterator D)
D.ParentPkg().CurrentVer() != D.ParentVer())
continue;
- // The dep will not break so it is irrelevent.
+ // The dep will not break so it is irrelevant.
if (CheckDep(D) == true)
continue;
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 3fdd9b637..5f9a31264 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -215,7 +215,7 @@ bool pkgPackageManager::CreateOrderList()
return true;
}
/*}}}*/
-// PM::DepAlwaysTrue - Returns true if this dep is irrelevent /*{{{*/
+// PM::DepAlwaysTrue - Returns true if this dep is irrelevant /*{{{*/
// ---------------------------------------------------------------------
/* The restriction on provides is to eliminate the case when provides
are transitioning between valid states [ie exim to smail] */
@@ -243,11 +243,11 @@ bool pkgPackageManager::CheckRConflicts(PkgIterator Pkg,DepIterator D,
D->Type != pkgCache::Dep::Obsoletes)
continue;
- // The package hasnt been changed
+ // The package hasn't been changed
if (List->IsNow(Pkg) == false)
continue;
- // Ignore self conflicts, ignore conflicts from irrelevent versions
+ // Ignore self conflicts, ignore conflicts from irrelevant versions
if (D.IsIgnorable(Pkg) || D.ParentVer() != D.ParentPkg().CurrentVer())
continue;
@@ -314,7 +314,7 @@ bool pkgPackageManager::ConfigureAll()
Note on failure: This method can fail, without causing any problems.
This can happen when using Immediate-Configure-All, SmartUnPack may call
- SmartConfigure, it may fail because of a complex dependancy situation, but
+ SmartConfigure, it may fail because of a complex dependency situation, but
a error will only be reported if ConfigureAll fails. This is why some of the
messages this function reports on failure (return false;) as just warnings
only shown when debuging*/
@@ -596,7 +596,7 @@ bool pkgPackageManager::SmartRemove(PkgIterator Pkg)
/*}}}*/
// PM::SmartUnPack - Install helper /*{{{*/
// ---------------------------------------------------------------------
-/* This puts the system in a state where it can Unpack Pkg, if Pkg is allready
+/* This puts the system in a state where it can Unpack Pkg, if Pkg is already
unpacked, or when it has been unpacked, if Immediate==true it configures it. */
bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
{
@@ -623,7 +623,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
/* PreUnpack Checks: This loop checks and attempts to rectify and problems that would prevent the package being unpacked.
It addresses: PreDepends, Conflicts, Obsoletes and Breaks (DpkgBreaks). Any resolutions that do not require it should
avoid configuration (calling SmartUnpack with Immediate=true), this is because when unpacking some packages with
- complex dependancy structures, trying to configure some packages while breaking the loops can complicate things .
+ complex dependency structures, trying to configure some packages while breaking the loops can complicate things .
This will be either dealt with if the package is configured as a dependency of Pkg (if and when Pkg is configured),
or by the ConfigureAll call at the end of the for loop in OrderInstall. */
bool Changed = false;
@@ -790,7 +790,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
{
if (List->IsFlag(BrokenPkg,pkgOrderList::Loop) && PkgLoop)
{
- // This dependancy has already been dealt with by another SmartUnPack on Pkg
+ // This dependency has already been dealt with by another SmartUnPack on Pkg
break;
}
else
@@ -1003,7 +1003,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
DoneSomething = true;
if (ImmConfigureAll) {
- /* ConfigureAll here to pick up and packages left unconfigured becuase they were unpacked in the
+ /* ConfigureAll here to pick up and packages left unconfigured because they were unpacked in the
"PreUnpack Checks" section */
if (!ConfigureAll())
return Failed;
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 52e814c0b..67a2a709d 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -8,7 +8,7 @@
Please see doc/apt-pkg/cache.sgml for a more detailed description of
this format. Also be sure to keep that file up-to-date!!
- This is the general utility functions for cache managment. They provide
+ This is the general utility functions for cache management. They provide
a complete set of accessor functions for the cache. The cacheiterators
header contains the STL-like iterators that can be used to easially
navigate the cache as well as seemlessly dereference the mmap'd
@@ -499,7 +499,7 @@ pkgCache::PkgIterator::CurVersion() const
// ostream operator to handle string representation of a package /*{{{*/
// ---------------------------------------------------------------------
/* Output name < cur.rent.version -> candid.ate.version | new.est.version > (section)
- Note that the characters <|>() are all literal above. Versions will be ommited
+ Note that the characters <|>() are all literal above. Versions will be omitted
if they provide no new information (e.g. there is no newer version than candidate)
If no version and/or section can be found "none" is used. */
std::ostream&
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 1a7013551..c31c5f30b 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -354,7 +354,7 @@ struct pkgCache::Group
the hash index of the name in the pkgCache::Header::PkgHashTable
A package can be created for every architecture so package names are
- not unique, but it is garanteed that packages with the same name
+ not unique, but it is guaranteed that packages with the same name
are sequencel ordered in the list. Packages with the same name can be
accessed with the Group.
*/
diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h
index 75f7b9fcc..eb75df412 100644
--- a/apt-pkg/pkgsystem.h
+++ b/apt-pkg/pkgsystem.h
@@ -7,7 +7,7 @@
Instances of this class can be thought of as factories or meta-classes
for a variety of more specialized classes. Together this class and
- it's speciallized offspring completely define the environment and how
+ it's specialized offspring completely define the environment and how
to access resources for a specific system. There are several sub
areas that are all orthogonal - each system has a unique combination of
these sub areas:
@@ -23,7 +23,7 @@
- Selection of local 'status' indexes that make up the pkgCache.
It is important to note that the handling of index files is not a
- function of the system. Index files are handled through a seperate
+ function of the system. Index files are handled through a separate
abstraction - the only requirement is that the index files have the
same idea of versioning as the target system.
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc
index f06f6d40d..d6f6933dd 100644
--- a/apt-pkg/upgrade.cc
+++ b/apt-pkg/upgrade.cc
@@ -225,7 +225,7 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache)
Cache.MarkInstall(I, false, 0, false);
else
{
- // If keep didnt actually do anything then there was no change..
+ // If keep didn't actually do anything then there was no change..
if (Cache[I].Upgrade() == false)
Change = true;
}
diff --git a/buildlib/fail.mak b/buildlib/fail.mak
index dfc194e1e..fc187766d 100644
--- a/buildlib/fail.mak
+++ b/buildlib/fail.mak
@@ -4,7 +4,7 @@
# Input
# $(MESSAGE) - The message to show
-# $(PROGRAM) - The program/libary/whatever.
+# $(PROGRAM) - The program/library/whatever.
# See defaults.mak for information about LOCAL
diff --git a/buildlib/program.mak b/buildlib/program.mak
index e0e76316c..da538f5eb 100644
--- a/buildlib/program.mak
+++ b/buildlib/program.mak
@@ -6,7 +6,7 @@
# $(SOURCE) - The source code to use
# $(PROGRAM) - The name of the program
# $(SLIBS) - Shared libs to link against
-# $(LIB_MAKES) - Shared libary make files to depend on - to ensure we get
+# $(LIB_MAKES) - Shared library make files to depend on - to ensure we get
# remade when the shared library version increases.
# See defaults.mak for information about LOCAL
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 3481eaf5f..30c2a22d5 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -8,7 +8,7 @@
This program will parse a config file and then do something with it.
Commands:
- shell - Shell mode. After this a series of word pairs should occure.
+ shell - Shell mode. After this a series of word pairs should occur.
The first is the environment var to set and the second is
the key to set it from. Use like:
eval `apt-config shell QMode apt::QMode`
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 4d609104c..12e385b69 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -15,7 +15,7 @@
upgrade - Smart-Download the newest versions of all packages
dselect-upgrade - Follows dselect's changes to the Status: field
and installes new and removes old packages
- dist-upgrade - Powerfull upgrader designed to handle the issues with
+ dist-upgrade - Powerful upgrader designed to handle the issues with
a new distribution.
install - Download and install a given package (by name, not by .deb)
check - Update the package cache and check for broken packages
@@ -513,7 +513,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL)
}
/* Resolve any problems that dselect created, allupgrade cannot handle
- such things. We do so quite agressively too.. */
+ such things. We do so quite aggressively too.. */
if (Cache->BrokenCount() != 0)
{
pkgProblemResolver Fix(Cache);
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 53b38ea43..bf5b8c1fe 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -160,16 +160,16 @@ int main(int argc,const char *argv[]) /*{{{*/
if (upgrade == true) {
if (pkgAllUpgrade(CacheFile) == false) {
- EDSP::WriteError("ERR_UNSOLVABLE_UPGRADE", "An upgrade error occured", output);
+ EDSP::WriteError("ERR_UNSOLVABLE_UPGRADE", "An upgrade error occurred", output);
return 0;
}
} else if (distUpgrade == true) {
if (pkgDistUpgrade(CacheFile) == false) {
- EDSP::WriteError("ERR_UNSOLVABLE_DIST_UPGRADE", "An dist-upgrade error occured", output);
+ EDSP::WriteError("ERR_UNSOLVABLE_DIST_UPGRADE", "An dist-upgrade error occurred", output);
return 0;
}
} else if (Fix.Resolve() == false) {
- EDSP::WriteError("ERR_UNSOLVABLE", "An error occured", output);
+ EDSP::WriteError("ERR_UNSOLVABLE", "An error occurred", output);
return 0;
}
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index 0ced500db..0774cf4b7 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -18,7 +18,7 @@ touch $SECRETKEYRING
GPG_CMD="$GPG_CMD --homedir $GPGHOMEDIR"
# create the trustdb with an (empty) dummy keyring
# older gpgs required it, newer gpgs even warn that it isn't needed,
-# but require it nontheless for some commands, so we just play safe
+# but require it nonetheless for some commands, so we just play safe
# here for the foreseeable future and create a dummy one
$GPG_CMD --quiet --check-trustdb --keyring $SECRETKEYRING >/dev/null 2>&1
# tell gpg that it shouldn't try to maintain a trustdb file
@@ -187,7 +187,7 @@ remove_key_from_keyring() {
echo >&2 "Key ${2} is in keyring ${1}, but can't be removed as it is read only."
return
fi
- # check if it is the only key in the keyring and if so remove the keyring alltogether
+ # check if it is the only key in the keyring and if so remove the keyring altogether
if [ '1' = "$($GPG --with-colons --list-keys | grep "^pub:[^:]*:[^:]*:[^:]*:[0-9A-F]\+:" | wc -l)" ]; then
mv -f "$1" "${1}~" # behave like gpg
return
diff --git a/configure.ac b/configure.ac
index a5a9fe0b8..083e7c494 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl linux architectures and configurations, it is not used to make the
dnl code more portable
dnl You MUST have an environment that has all the POSIX functions and
-dnl some of the more populare bsd/sysv ones (like select). You'll also
+dnl some of the more popular bsd/sysv ones (like select). You'll also
dnl need a C++ compiler that is semi-standard conformant, exceptions are
dnl not used but STL is.
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 2616af1dd..71ac76555 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -34,7 +34,7 @@
# APT::Archives::MinAge "2"; (old, deprecated)
# APT::Periodic::MinAge "2"; (new)
# - Set minimum age of a package file. If a file is younger it
-# will not be deleted (0=disable). Usefull to prevent races
+# will not be deleted (0=disable). Useful to prevent races
# and to keep backups of the packages for emergency.
#
# APT::Archives::MaxSize "0"; (old, deprecated)
@@ -384,7 +384,7 @@ fi
now=$(date +%s)
# Support old Archive for compatibility.
-# Document only Periodic for all controling parameters of this script.
+# Document only Periodic for all controlling parameters of this script.
UpdateInterval=0
eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists)
diff --git a/debian/changelog b/debian/changelog
index 78c2d4573..eb5e079bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
apt (0.9.15.4) UNRELEASED; urgency=low
+ [ Michael Vogt ]
* remove auto-generated apt-key and sources.list on clean (closes: 739749)
+
+ [ Guillem Jover ]
+ * Fix typos in documentation (codespell)
-- Michael Vogt Sat, 22 Feb 2014 17:58:08 +0100
diff --git a/doc/Bugs b/doc/Bugs
index deb7334db..d584dce49 100644
--- a/doc/Bugs
+++ b/doc/Bugs
@@ -31,12 +31,12 @@
#27601: srange errors from dselect
Summary: Couldn't locate an archive source
Status: Require status file
- Believed to be fixed in 0.1.9, was not reproducable w/ given
+ Believed to be fixed in 0.1.9, was not reproducible w/ given
status file
#27841: apt: apt depends on a missing library
Status: New versions of APT in slink have been compiled with libstdc++2.9
#23984: apt: support for "no_proxy" would be nice
- Status: Planed to be integrated into the new methods via the configuration
+ Status: Planned to be integrated into the new methods via the configuration
file
Done - Use Acquire::http::proxy::host.com="DIRECT"
#25021: apt: Need some control over multiple connections
@@ -83,7 +83,7 @@
Status: Fix the man pages. This certainly will be done in 0.3.0
#24799: Some suggestions for the apt method in dselect
Summary: Wants to be able to specifiy -d from dselect
- Status: Likely a APT_OPTIONS enviornment variable will be created, -d can
+ Status: Likely a APT_OPTIONS environment variable will be created, -d can
be put there.
There is already an APT_CONFIG in 0.3, APT_OPTIONS may also
appear..
@@ -112,7 +112,7 @@
APT now sends a max age header. See the apt.conf(5)
#28172: HTTP Proxy cache refresh should be forced for corrupted packages
Summary: Some problem resulted in a corrupted package
- Status: I belive this reflects a deeper problem and the suggested solution
+ Status: I believe this reflects a deeper problem and the suggested solution
is only a band-aide patch. I intend to close this bug when #24685
is fixed with a configuration directive.
Use -o acquire::http::no-cache=true
diff --git a/doc/design.sgml b/doc/design.sgml
index 1ddf49fd8..67406aa01 100644
--- a/doc/design.sgml
+++ b/doc/design.sgml
@@ -48,7 +48,7 @@
that additional functionality in the underlying dpkg would
also be requested.
- Diety/dselect are the first introduction that people have to
+
Deity/dselect are the first introduction that people have to
Debian, and unfortunately this first impression contributes
greatly to the public perception of the distribution. It is
imperative that this be a showcase for Debian, rather than
diff --git a/doc/dpkg-tech.sgml b/doc/dpkg-tech.sgml
index 1a15f6a4c..ce0c5fa83 100644
--- a/doc/dpkg-tech.sgml
+++ b/doc/dpkg-tech.sgml
@@ -322,7 +322,7 @@ The main principal of the new-format Debian archive (I won't describe the old
format - for that have a look at deb-old.5), is that the archive really is
an archive - as used by "ar" and friends. However, dpkg-deb uses this format
internally, rather than calling "ar". Inside this archive, there are usually
-the folowing members:-
+the following members:-
- debian-binary
@@ -349,7 +349,7 @@ supports the following options:-
- --build (-b) <dir> - builds a .deb archive, takes a directory which
contains all the files as an argument. Note that the directory
<dir>/DEBIAN will be packed separately into the control archive.
-
- --contents (-c) <debfile> - Lists the contents of ther "data.tar.gz"
+
- --contents (-c) <debfile> - Lists the contents of the "data.tar.gz"
member.
- --control (-e) <debfile> - Extracts the control archive into a
directory called DEBIAN. Alternatively, with another argument, it will extract
@@ -450,7 +450,7 @@ cleaned up when dpkg exits cleanly.
Juding by the use of the updates directory I would call it a Journal. Inorder
-to effeciently ensure the complete integrity of the status file dpkg will
+to efficiently ensure the complete integrity of the status file dpkg will
"checkpoint" or journal all of it's activities in the updates directory. By
merging the contents of the updates directory (in order!!) against the
original status file it can get the precise current state of the system,
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index f4d9d17f2..93e96cf16 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -142,7 +142,7 @@ APT
// APT::Archives::MinAge "2"; (old, deprecated)
MinAge "2"; // (new)
// - Set minimum age of a package file. If a file is younger it
- // will not be deleted (0=disable). Usefull to prevent races
+ // will not be deleted (0=disable). Useful to prevent races
// and to keep backups of the packages for emergency.
// APT::Archives::MaxSize "0"; (old, deprecated)
diff --git a/doc/files.sgml b/doc/files.sgml
index a52efc756..56c7f574d 100644
--- a/doc/files.sgml
+++ b/doc/files.sgml
@@ -201,7 +201,7 @@ from partial into archives/. Any files found in archives/ can be assumed
to be verified.
-No directory structure is transfered from the receiving site and all .deb
+No directory structure is transferred from the receiving site and all .deb
file names conform to debian conventions. No short (msdos) filename should
be placed in archives. If the need arises .debs should be unpacked, scanned
and renamed to their correct internal names. This is mostly to prevent
diff --git a/doc/libapt-pkg2_to_3.txt b/doc/libapt-pkg2_to_3.txt
index c1f71f9f2..b94dc666e 100644
--- a/doc/libapt-pkg2_to_3.txt
+++ b/doc/libapt-pkg2_to_3.txt
@@ -3,7 +3,7 @@ people need to be aware of.. Many of this changes are done so that most old
source will continue to function, but perhaps at reduced functionality.
* pkgDepCache is no longer self initilizing, you have to call the Init
- method seperately after constructing it. Users of pkgCacheFile do not
+ method separately after constructing it. Users of pkgCacheFile do not
need to worry about this
* GetCandidateVer/etc is gone from the pkgCache. It exists only in the
DepCache and is just an inline around the new Policy class
@@ -55,7 +55,7 @@ source will continue to function, but perhaps at reduced functionality.
(should be transparent largely)
* Locking is handled differently, there is no dpkg lock class, the _system
class provides Lock/UnLock methods
-* pkgDepCache is not a subclass of pkgCache, it agregates it now. Some
+* pkgDepCache is not a subclass of pkgCache, it aggregates it now. Some
compatibility functions are provided that make this transition fairly
easy.
* The following functions have had minor argument changes:
diff --git a/doc/method.sgml b/doc/method.sgml
index 27db50173..5aa7b52e8 100644
--- a/doc/method.sgml
+++ b/doc/method.sgml
@@ -246,14 +246,14 @@ pre-transfer status for Internet type methods.
Fields: Message
200 URI Start-
-Indicates the URI is starting to be transfered. The URI is specified
+Indicates the URI is starting to be transferred. The URI is specified
along with stats about the file itself.
Fields: URI, Size, Last-Modified, Resume-Point
201 URI Done
-
-Indicates that a URI has completed being transfered. It is possible
+Indicates that a URI has completed being transferred. It is possible
to specify a 201 URI Done> without a URI Start> which would
-mean no data was transfered but the file is now available. A Filename
+mean no data was transferred but the file is now available. A Filename
field is specified when the URI is directly available in the local
pathname space. APT will either directly use that file or copy it into
another location. It is possible to return Alt-* fields to indicate that
diff --git a/doc/style.txt b/doc/style.txt
index 2072251d0..7658b0314 100644
--- a/doc/style.txt
+++ b/doc/style.txt
@@ -9,7 +9,7 @@ Ver - A version
Indenting, Comments, Etc
~~~~~~~~~~~~~~~~~~~~~~~~
Would make Linus cry :P However it is what I prefer. 3 space indent,
-8 space tab all braces on seperate lines, function return on the same line
+8 space tab all braces on separate lines, function return on the same line
as the function, cases aligned with their code. The 'indent' options for
this style are:
indent -bl -bli0 -di1 -i3 -nsc -ts8 -npcs -npsl
@@ -60,13 +60,13 @@ almost always designates a change in ownership rules).
* Pass by non-const reference may be used to indicate a OUT type variable
* Pass by pointer (except in the case where the pointer is really an array)
should be used when the object will be retained or ownership will be
- transfered. Ownership transference should be rare and noted by a comment.
+ transferred. Ownership transference should be rare and noted by a comment.
* Standard C things (FILE * etc) should be left as is.
* Return by references should indicate a borrowed object
* Return by pointer (except arrays) should indicate ownership is
- transfered. Return by pointer should not be used unless ownership is
- transfered.
+ transferred. Return by pointer should not be used unless ownership is
+ transferred.
* Return by pointer to variable indicates ownership transfer unless the
pointer is an 'input' parameter (designated generally by an =0,
indicating a default of 'none')
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index 2639bc2f6..712f8469a 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -864,7 +864,7 @@ bool Generate(CommandLine &CmdL)
unsigned long MaxContentsChange = Setup.FindI("Default::MaxContentsChange",UINT_MAX)*1024;
for (vector::iterator I = PkgList.begin(); I != PkgList.end(); ++I)
{
- // This record is not relevent
+ // This record is not relevant
if (I->ContentsDone == true ||
I->Contents.empty() == true)
continue;
diff --git a/methods/file.cc b/methods/file.cc
index 7ed4e6f60..3d0687c5b 100644
--- a/methods/file.cc
+++ b/methods/file.cc
@@ -5,7 +5,7 @@
File URI method for APT
- This simply checks that the file specified exists, if so the relevent
+ This simply checks that the file specified exists, if so the relevant
information is returned. If a .gz filename is specified then the file
name with .gz removed will also be checked and information about it
will be returned in Alt-*
diff --git a/methods/ftp.cc b/methods/ftp.cc
index 70bf4f607..621f48476 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -3,7 +3,7 @@
// $Id: ftp.cc,v 1.31.2.1 2004/01/16 18:58:50 mdz Exp $
/* ######################################################################
- FTP Aquire Method - This is the FTP aquire method for APT.
+ FTP Acquire Method - This is the FTP acquire method for APT.
This is a very simple implementation that does not try to optimize
at all. Commands are sent syncronously with the FTP server (as the
@@ -946,7 +946,7 @@ FtpMethod::FtpMethod() : pkgAcqMethod("1.0",SendConfig)
/*}}}*/
// FtpMethod::SigTerm - Handle a fatal signal /*{{{*/
// ---------------------------------------------------------------------
-/* This closes and timestamps the open file. This is neccessary to get
+/* This closes and timestamps the open file. This is necessary to get
resume behavoir on user abort */
void FtpMethod::SigTerm(int)
{
diff --git a/methods/ftp.h b/methods/ftp.h
index 2634f0732..8055c389f 100644
--- a/methods/ftp.h
+++ b/methods/ftp.h
@@ -3,7 +3,7 @@
// $Id: ftp.h,v 1.4 2001/03/06 07:15:29 jgg Exp $
/* ######################################################################
- FTP Aquire Method - This is the FTP aquire method for APT.
+ FTP Acquire Method - This is the FTP acquire method for APT.
##################################################################### */
/*}}}*/
diff --git a/methods/http.cc b/methods/http.cc
index 96c4e3ca0..42b31beeb 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -3,7 +3,7 @@
// $Id: http.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
/* ######################################################################
- HTTP Acquire Method - This is the HTTP aquire method for APT.
+ HTTP Acquire Method - This is the HTTP acquire method for APT.
It uses HTTP/1.1 and many of the fancy options there-in, such as
pipelining, range, if-range and so on.
@@ -732,7 +732,7 @@ void HttpMethod::SendReq(FetchItem *Itm)
}
// If we ask for uncompressed files servers might respond with content-
- // negotation which lets us end up with compressed files we do not support,
+ // negotiation which lets us end up with compressed files we do not support,
// see 657029, 657560 and co, so if we have no extension on the request
// ask for text only. As a sidenote: If there is nothing to negotate servers
// seem to be nice and ignore it.
diff --git a/methods/http.h b/methods/http.h
index 02c04e8ae..450a42eed 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -3,7 +3,7 @@
// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
/* ######################################################################
- HTTP Acquire Method - This is the HTTP aquire method for APT.
+ HTTP Acquire Method - This is the HTTP acquire method for APT.
##################################################################### */
/*}}}*/
diff --git a/methods/https.cc b/methods/https.cc
index e713be19f..febe6a0f0 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -3,7 +3,7 @@
// $Id: http.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
/* ######################################################################
- HTTPS Acquire Method - This is the HTTPS aquire method for APT.
+ HTTPS Acquire Method - This is the HTTPS acquire method for APT.
It uses libcurl
@@ -309,7 +309,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errorstr);
// If we ask for uncompressed files servers might respond with content-
- // negotation which lets us end up with compressed files we do not support,
+ // negotiation which lets us end up with compressed files we do not support,
// see 657029, 657560 and co, so if we have no extension on the request
// ask for text only. As a sidenote: If there is nothing to negotate servers
// seem to be nice and ignore it.
diff --git a/methods/https.h b/methods/https.h
index 89a89d19c..ab0dd3407 100644
--- a/methods/https.h
+++ b/methods/https.h
@@ -3,7 +3,7 @@
// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
/* ######################################################################
- HTTP Acquire Method - This is the HTTP aquire method for APT.
+ HTTP Acquire Method - This is the HTTP acquire method for APT.
##################################################################### */
/*}}}*/
diff --git a/methods/mirror.cc b/methods/mirror.cc
index 83ef0d133..085f3717b 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -3,7 +3,7 @@
// $Id: mirror.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
/* ######################################################################
- Mirror Aquire Method - This is the Mirror aquire method for APT.
+ Mirror Acquire Method - This is the Mirror acquire method for APT.
##################################################################### */
/*}}}*/
@@ -49,7 +49,7 @@ using namespace std;
* of the failure that is also send to LP
*
* TODO:
- * - deal with runing as non-root because we can't write to the lists
+ * - deal with running as non-root because we can't write to the lists
dir then -> use the cached mirror file
* - better method to download than having a pkgAcquire interface here
* and better error handling there!
@@ -290,7 +290,7 @@ bool MirrorMethod::InitMirrors()
// FIXME: make the mirror selection more clever, do not
// just use the first one!
// BUT: we can not make this random, the mirror has to be
- // stable accross session, because otherwise we can
+ // stable across session, because otherwise we can
// get into sync issues (got indexfiles from mirror A,
// but packages from mirror B - one might be out of date etc)
ifstream in(MirrorFile.c_str());
diff --git a/methods/mirror.h b/methods/mirror.h
index 81e531e21..1dd9f2ec6 100644
--- a/methods/mirror.h
+++ b/methods/mirror.h
@@ -3,7 +3,7 @@
// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
/* ######################################################################
- MIRROR Aquire Method - This is the MIRROR aquire method for APT.
+ MIRROR Acquire Method - This is the MIRROR acquire method for APT.
##################################################################### */
/*}}}*/
diff --git a/methods/rfc2553emu.h b/methods/rfc2553emu.h
index b15facb31..ad7ddf48a 100644
--- a/methods/rfc2553emu.h
+++ b/methods/rfc2553emu.h
@@ -75,7 +75,7 @@
#endif
/* If we don't have getaddrinfo then we probably don't have
- sockaddr_storage either (same RFC) so we definately will not be
+ sockaddr_storage either (same RFC) so we definitely will not be
doing any IPv6 stuff. Do not use the members of this structure to
retain portability, cast to a sockaddr. */
#define sockaddr_storage sockaddr_in
diff --git a/methods/rsh.cc b/methods/rsh.cc
index 4e1aaea26..550f77eca 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -255,7 +255,7 @@ bool RSHConn::WriteMsg(std::string &Text,bool Sync,const char *Fmt,...)
/*}}}*/
// RSHConn::Size - Return the size of the file /*{{{*/
// ---------------------------------------------------------------------
-/* Right now for successfull transfer the file size must be known in
+/* Right now for successful transfer the file size must be known in
advance. */
bool RSHConn::Size(const char *Path,unsigned long long &Size)
{
diff --git a/methods/server.cc b/methods/server.cc
index 6dd3970a6..ef90c809c 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -86,7 +86,7 @@ ServerState::RunHeadersResult ServerState::RunHeaders(FileFd * const File)
if (Result == 100)
continue;
- // Tidy up the connection persistance state.
+ // Tidy up the connection persistence state.
if (Encoding == Closes && HaveContent == true)
Persistent = false;
@@ -146,7 +146,7 @@ bool ServerState::HeaderLine(string Line)
return _error->Error(_("The HTTP server sent an invalid reply header"));
}
- /* Check the HTTP response header to get the default persistance
+ /* Check the HTTP response header to get the default persistence
state. */
if (Major < 1)
Persistent = false;
@@ -366,7 +366,7 @@ ServerMethod::DealWithHeaders(FetchResult &Res)
/*}}}*/
// ServerMethod::SigTerm - Handle a fatal signal /*{{{*/
// ---------------------------------------------------------------------
-/* This closes and timestamps the open file. This is neccessary to get
+/* This closes and timestamps the open file. This is necessary to get
resume behavoir on user abort */
void ServerMethod::SigTerm(int)
{
diff --git a/test/integration/framework b/test/integration/framework
index 08d796a10..63df86df7 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -947,7 +947,7 @@ URI: $1
Filename: ${2}
"
# simple worker keeping stdin open until we are done (201) or error (400)
- # and requesting new URIs on try-agains/redirects inbetween
+ # and requesting new URIs on try-agains/redirects in-between
{ tail -n 999 -f "$DOWNLOG" & echo "TAILPID: $!"; } | while read f1 f2; do
if [ "$f1" = 'TAILPID:' ]; then
TAILPID="$f2"
diff --git a/test/integration/test-apt-get-source b/test/integration/test-apt-get-source
index 083e26db1..33bd980d0 100755
--- a/test/integration/test-apt-get-source
+++ b/test/integration/test-apt-get-source
@@ -65,7 +65,7 @@ Need to get 0 B of source archives.
'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo=1.0
# select by release with no binary package (Bug#731102) but ensure to get
-# higest version
+# highest version
testequal "$HEADER
Selected version '0.1' (wheezy) for foo
Need to get 0 B of source archives.
diff --git a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
index 633c197c0..f93510fd7 100755
--- a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
+++ b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
@@ -11,7 +11,7 @@ buildsimplenativepackage 'cool' 'i386' '1.0' 'unstable'
setupaptarchive --no-update
testfileexists() {
- msgtest 'Test for existance of file' "$1"
+ msgtest 'Test for existence of file' "$1"
test -e "$1" && msgpass || msgfail
rm -f "$1"
}
diff --git a/test/integration/test-sourceslist-arch-plusminus-options b/test/integration/test-sourceslist-arch-plusminus-options
index 0d4d7448f..0091964e6 100755
--- a/test/integration/test-sourceslist-arch-plusminus-options
+++ b/test/integration/test-sourceslist-arch-plusminus-options
@@ -76,7 +76,7 @@ echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' >
testbinaries 'substract from a arch-set' 'i386'
echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
-testbinaries 'useless substract from a arch-set' 'i386'
+testbinaries 'useless subtract from a arch-set' 'i386'
echo 'deb [arch=mips,i386 arch+=armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
testbinaries 'addition to a arch-set' 'i386' 'mips' 'armhf'
diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc
index 72044d493..b6939231d 100644
--- a/test/libapt/globalerror_test.cc
+++ b/test/libapt/globalerror_test.cc
@@ -15,17 +15,17 @@ int main(int argc,char *argv[])
equals(_error->empty(), true);
equals(_error->empty(GlobalError::DEBUG), false);
equals(_error->PendingError(), false);
- equals(_error->Error("%s horrible %s %d times", "Something", "happend", 2), false);
+ equals(_error->Error("%s horrible %s %d times", "Something", "happened", 2), false);
equals(_error->PendingError(), true);
std::string text;
equals(_error->PopMessage(text), false);
equals(_error->PendingError(), true);
equals(text, "A Notice");
equals(_error->PopMessage(text), true);
- equals(text, "Something horrible happend 2 times");
+ equals(text, "Something horrible happened 2 times");
equals(_error->empty(GlobalError::DEBUG), true);
equals(_error->PendingError(), false);
- equals(_error->Error("%s horrible %s %d times", "Something", "happend", 2), false);
+ equals(_error->Error("%s horrible %s %d times", "Something", "happened", 2), false);
equals(_error->PendingError(), true);
equals(_error->empty(GlobalError::FATAL), false);
_error->Discard();
@@ -33,7 +33,7 @@ int main(int argc,char *argv[])
equals(_error->empty(), true);
equals(_error->PendingError(), false);
equals(_error->Notice("%s Notice", "A"), false);
- equals(_error->Error("%s horrible %s %d times", "Something", "happend", 2), false);
+ equals(_error->Error("%s horrible %s %d times", "Something", "happened", 2), false);
equals(_error->PendingError(), true);
equals(_error->empty(GlobalError::NOTICE), false);
_error->PushToStack();
@@ -49,12 +49,12 @@ int main(int argc,char *argv[])
equals(_error->PendingError(), true);
equals(text, "A Notice");
equals(_error->PopMessage(text), true);
- equals(text, "Something horrible happend 2 times");
+ equals(text, "Something horrible happened 2 times");
equals(_error->PendingError(), false);
equals(_error->empty(), true);
equals(_error->Notice("%s Notice", "A"), false);
- equals(_error->Error("%s horrible %s %d times", "Something", "happend", 2), false);
+ equals(_error->Error("%s horrible %s %d times", "Something", "happened", 2), false);
equals(_error->PendingError(), true);
equals(_error->empty(GlobalError::NOTICE), false);
_error->PushToStack();
@@ -70,7 +70,7 @@ int main(int argc,char *argv[])
equals(_error->PendingError(), true);
equals(text, "A Notice");
equals(_error->PopMessage(text), true);
- equals(text, "Something horrible happend 2 times");
+ equals(text, "Something horrible happened 2 times");
equals(_error->PendingError(), false);
equals(_error->empty(), false);
equals(_error->PopMessage(text), false);
@@ -78,24 +78,24 @@ int main(int argc,char *argv[])
equals(_error->empty(), true);
errno = 0;
- equals(_error->Errno("errno", "%s horrible %s %d times", "Something", "happend", 2), false);
+ equals(_error->Errno("errno", "%s horrible %s %d times", "Something", "happened", 2), false);
equals(_error->empty(), false);
equals(_error->PendingError(), true);
equals(_error->PopMessage(text), true);
equals(_error->PendingError(), false);
- equals(text, std::string("Something horrible happend 2 times - errno (0: ").append(textOfErrnoZero).append(")"));
+ equals(text, std::string("Something horrible happened 2 times - errno (0: ").append(textOfErrnoZero).append(")"));
equals(_error->empty(), true);
std::string longText;
for (size_t i = 0; i < 500; ++i)
longText.append("a");
- equals(_error->Error("%s horrible %s %d times", longText.c_str(), "happend", 2), false);
+ equals(_error->Error("%s horrible %s %d times", longText.c_str(), "happened", 2), false);
equals(_error->PopMessage(text), true);
- equals(text, std::string(longText).append(" horrible happend 2 times"));
+ equals(text, std::string(longText).append(" horrible happened 2 times"));
- equals(_error->Errno("errno", "%s horrible %s %d times", longText.c_str(), "happend", 2), false);
+ equals(_error->Errno("errno", "%s horrible %s %d times", longText.c_str(), "happened", 2), false);
equals(_error->PopMessage(text), true);
- equals(text, std::string(longText).append(" horrible happend 2 times - errno (0: ").append(textOfErrnoZero).append(")"));
+ equals(text, std::string(longText).append(" horrible happened 2 times - errno (0: ").append(textOfErrnoZero).append(")"));
equals(_error->Warning("Репозиторий не обновлён и будут %d %s", 4, "test"), false);
equals(_error->PopMessage(text), false);
--
cgit v1.2.3-70-g09d2
From a5414e56403537678d5be87acf59c37a05f55719 Mon Sep 17 00:00:00 2001
From: David Kalnischkies
Date: Mon, 24 Feb 2014 23:10:25 +0100
Subject: add default and override handling for Cnf::FindVector
Automatically handle the override of list options via its parent value
which can even be a comma-separated list of values. It also adds an easy
way of providing a default for the list.
---
apt-pkg/aptconfiguration.cc | 72 ++++++---------------------------------
apt-pkg/contrib/configuration.cc | 14 ++++++--
apt-pkg/contrib/configuration.h | 16 ++++++++-
apt-pkg/contrib/strutl.cc | 4 ++-
prepare-release | 1 +
test/libapt/configuration_test.cc | 34 ++++++++++++++++--
test/libapt/getlanguages_test.cc | 8 +++++
7 files changed, 81 insertions(+), 68 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 0b0b546c5..f5c758e14 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -49,11 +49,6 @@ const Configuration::getCompressionTypes(bool const &Cached) {
setDefaultConfigurationForCompressors();
std::vector const compressors = getCompressors();
- // accept non-list order as override setting for config settings on commandline
- std::string const overrideOrder = _config->Find("Acquire::CompressionTypes::Order","");
- if (overrideOrder.empty() == false)
- types.push_back(overrideOrder);
-
// load the order setting into our vector
std::vector const order = _config->FindVector("Acquire::CompressionTypes::Order");
for (std::vector::const_iterator o = order.begin();
@@ -227,61 +222,11 @@ std::vector const Configuration::getLanguages(bool const &All,
}
}
} else {
+ // cornercase: LANG=C, so we use only "en" Translation
environment.push_back("en");
}
- // Support settings like Acquire::Languages=none on the command line to
- // override the configuration settings vector of languages.
- string const forceLang = _config->Find("Acquire::Languages","");
- if (forceLang.empty() == false) {
- if (forceLang == "none") {
- codes.clear();
- allCodes.clear();
- allCodes.push_back("none");
- } else {
- if (forceLang == "environment")
- codes = environment;
- else
- codes.push_back(forceLang);
- allCodes = codes;
- for (std::vector::const_iterator b = builtin.begin();
- b != builtin.end(); ++b)
- if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end())
- allCodes.push_back(*b);
- }
- if (All == true)
- return allCodes;
- else
- return codes;
- }
-
- // cornercase: LANG=C, so we use only "en" Translation
- if (envShort == "C") {
- allCodes = codes = environment;
- allCodes.insert(allCodes.end(), builtin.begin(), builtin.end());
- if (All == true)
- return allCodes;
- else
- return codes;
- }
-
- std::vector const lang = _config->FindVector("Acquire::Languages");
- // the default setting -> "environment, en"
- if (lang.empty() == true) {
- codes = environment;
- if (envShort != "en")
- codes.push_back("en");
- allCodes = codes;
- for (std::vector::const_iterator b = builtin.begin();
- b != builtin.end(); ++b)
- if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end())
- allCodes.push_back(*b);
- if (All == true)
- return allCodes;
- else
- return codes;
- }
-
+ std::vector const lang = _config->FindVector("Acquire::Languages", "environment,en");
// the configs define the order, so add the environment
// then needed and ensure the codes are not listed twice.
bool noneSeen = false;
@@ -308,10 +253,15 @@ std::vector const Configuration::getLanguages(bool const &All,
allCodes.push_back(*l);
}
- for (std::vector::const_iterator b = builtin.begin();
- b != builtin.end(); ++b)
- if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end())
- allCodes.push_back(*b);
+ if (allCodes.empty() == false) {
+ for (std::vector::const_iterator b = builtin.begin();
+ b != builtin.end(); ++b)
+ if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end())
+ allCodes.push_back(*b);
+ } else {
+ // "none" was forced
+ allCodes.push_back("none");
+ }
if (All == true)
return allCodes;
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 4ef4663c0..8eddd56d4 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
#include
#include
@@ -246,12 +247,18 @@ string Configuration::FindDir(const char *Name,const char *Default) const
// Configuration::FindVector - Find a vector of values /*{{{*/
// ---------------------------------------------------------------------
/* Returns a vector of config values under the given item */
-vector Configuration::FindVector(const char *Name) const
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
+vector Configuration::FindVector(const char *Name) const { return FindVector(Name, ""); }
+#endif
+vector Configuration::FindVector(const char *Name, std::string const &Default) const
{
vector Vec;
const Item *Top = Lookup(Name);
if (Top == NULL)
- return Vec;
+ return VectorizeString(Default, ',');
+
+ if (Top->Value.empty() == false)
+ return VectorizeString(Top->Value, ',');
Item *I = Top->Child;
while(I != NULL)
@@ -259,6 +266,9 @@ vector Configuration::FindVector(const char *Name) const
Vec.push_back(I->Value);
I = I->Next;
}
+ if (Vec.empty() == true)
+ return VectorizeString(Default, ',');
+
return Vec;
}
/*}}}*/
diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h
index 8e09ea0a6..c256139f4 100644
--- a/apt-pkg/contrib/configuration.h
+++ b/apt-pkg/contrib/configuration.h
@@ -74,8 +74,22 @@ class Configuration
std::string Find(std::string const &Name, std::string const &Default) const {return Find(Name.c_str(),Default.c_str());};
std::string FindFile(const char *Name,const char *Default = 0) const;
std::string FindDir(const char *Name,const char *Default = 0) const;
+ /** return a list of child options
+ *
+ * Options like Acquire::Languages are handled as lists which
+ * can be overridden and have a default. For the later two a comma
+ * separated list of values is supported.
+ *
+ * \param Name of the parent node
+ * \param Default list of values separated by commas */
+ std::vector FindVector(const char *Name, std::string const &Default) const;
+ std::vector FindVector(std::string const &Name, std::string const &Default) const { return FindVector(Name.c_str(), Default); };
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+ std::vector FindVector(const char *Name) const { return FindVector(Name, ""); };
+#else
std::vector FindVector(const char *Name) const;
- std::vector FindVector(std::string const &Name) const { return FindVector(Name.c_str()); };
+#endif
+ std::vector FindVector(std::string const &Name) const { return FindVector(Name.c_str(), ""); };
int FindI(const char *Name,int const &Default = 0) const;
int FindI(std::string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);};
bool FindB(const char *Name,bool const &Default = false) const;
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index d4f53ea3a..f8bb3890d 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1130,9 +1130,11 @@ bool TokSplitString(char Tok,char *Input,char **List,
also, but the advantage is that we have an iteratable vector */
vector VectorizeString(string const &haystack, char const &split)
{
+ vector exploded;
+ if (haystack.empty() == true)
+ return exploded;
string::const_iterator start = haystack.begin();
string::const_iterator end = start;
- vector exploded;
do {
for (; end != haystack.end() && *end != split; ++end);
exploded.push_back(string(start, end));
diff --git a/prepare-release b/prepare-release
index 6141ce6e4..6229ee1fd 100755
--- a/prepare-release
+++ b/prepare-release
@@ -1,6 +1,7 @@
#!/bin/sh
set -e
+cd "$(readlink -f $(dirname $0))"
dpkg-checkbuilddeps -d 'libxml2-utils'
if [ -n "${GBP_BUILD_DIR}" ]; then
diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc
index 2c974ee0a..957e905d5 100644
--- a/test/libapt/configuration_test.cc
+++ b/test/libapt/configuration_test.cc
@@ -98,9 +98,37 @@ int main(int argc,const char *argv[]) {
equals(Cnf.FindDir("Dir::State"), "/rootdir/dev/null");
equals(Cnf.FindDir("Dir::State::lists"), "/rootdir/dev/null");
- Cnf.Set("Moo::Bar", "1");
- Cnf.Clear();
- equals(Cnf.Find("Moo::Bar"), "");
+ Cnf.Set("Moo::Bar", "1");
+ Cnf.Clear();
+ equals(Cnf.Find("Moo::Bar"), "");
+
+ std::vector vec = Cnf.FindVector("Test::Vector", "");
+ equals(vec.size(), 0);
+ vec = Cnf.FindVector("Test::Vector", "foo");
+ equals(vec.size(), 1);
+ equals(vec[0], "foo");
+ vec = Cnf.FindVector("Test::Vector", "foo,bar");
+ equals(vec.size(), 2);
+ equals(vec[0], "foo");
+ equals(vec[1], "bar");
+ Cnf.Set("Test::Vector::", "baz");
+ Cnf.Set("Test::Vector::", "bob");
+ Cnf.Set("Test::Vector::", "dob");
+ vec = Cnf.FindVector("Test::Vector");
+ equals(vec.size(), 3);
+ equals(vec[0], "baz");
+ equals(vec[1], "bob");
+ equals(vec[2], "dob");
+ vec = Cnf.FindVector("Test::Vector", "foo,bar");
+ equals(vec.size(), 3);
+ equals(vec[0], "baz");
+ equals(vec[1], "bob");
+ equals(vec[2], "dob");
+ Cnf.Set("Test::Vector", "abel,bravo");
+ vec = Cnf.FindVector("Test::Vector", "foo,bar");
+ equals(vec.size(), 2);
+ equals(vec[0], "abel");
+ equals(vec[1], "bravo");
//FIXME: Test for configuration file parsing;
// currently only integration/ tests test them implicitly
diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc
index cef89bde6..51cfecee3 100644
--- a/test/libapt/getlanguages_test.cc
+++ b/test/libapt/getlanguages_test.cc
@@ -105,6 +105,14 @@ int main(int argc,char *argv[])
vec = APT::Configuration::getLanguages(false, false, env);
equals(vec.size(), 1);
equals(vec[0], "fr");
+
+ _config->Set("Acquire::Languages", "environment,en");
+ env[0] = "de_DE.UTF-8";
+ vec = APT::Configuration::getLanguages(false, false, env);
+ equals(vec.size(), 3);
+ equals(vec[0], "de_DE");
+ equals(vec[1], "de");
+ equals(vec[2], "en");
_config->Set("Acquire::Languages", "");
_config->Set("Acquire::Languages::1", "environment");
--
cgit v1.2.3-70-g09d2
From 565ded7b65240b25ad8551789ac388c8ce72b1f4 Mon Sep 17 00:00:00 2001
From: Johannes Schauer
Date: Tue, 25 Feb 2014 00:12:20 +0100
Subject: implement BuildProfileSpec support as dpkg has in 1.17.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Build-dependencies are now able to include a
specification limiting usage similar to already supported [arch …].
More details: https://wiki.debian.org/BuildProfileSpec
Closes: 661537
---
apt-pkg/deb/deblistparser.cc | 91 ++++++++++++++++++++++++++++++++++++++--
apt-pkg/deb/deblistparser.h | 17 ++++++--
apt-pkg/deb/debsrcrecords.cc | 2 +-
test/libapt/parsedepends_test.cc | 88 ++++++++++++++++++++++++++------------
4 files changed, 162 insertions(+), 36 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index acdcc4554..a4795f15d 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -474,18 +474,31 @@ const char *debListParser::ConvertRelation(const char *I,unsigned int &Op)
// ---------------------------------------------------------------------
/* This parses the dependency elements out of a standard string in place,
bit by bit. */
+const char *debListParser::ParseDepends(const char *Start,const char *Stop,
+ std::string &Package,std::string &Ver,unsigned int &Op)
+ { return ParseDepends(Start, Stop, Package, Ver, Op, false, true, false); }
+const char *debListParser::ParseDepends(const char *Start,const char *Stop,
+ std::string &Package,std::string &Ver,unsigned int &Op,
+ bool const &ParseArchFlags)
+ { return ParseDepends(Start, Stop, Package, Ver, Op, ParseArchFlags, true, false); }
+const char *debListParser::ParseDepends(const char *Start,const char *Stop,
+ std::string &Package,std::string &Ver,unsigned int &Op,
+ bool const &ParseArchFlags, bool const &StripMultiArch)
+ { return ParseDepends(Start, Stop, Package, Ver, Op, ParseArchFlags, StripMultiArch, false); }
const char *debListParser::ParseDepends(const char *Start,const char *Stop,
string &Package,string &Ver,
unsigned int &Op, bool const &ParseArchFlags,
- bool const &StripMultiArch)
+ bool const &StripMultiArch,
+ bool const &ParseRestrictionsList)
{
// Strip off leading space
- for (;Start != Stop && isspace(*Start) != 0; Start++);
+ for (;Start != Stop && isspace(*Start) != 0; ++Start);
// Parse off the package name
const char *I = Start;
for (;I != Stop && isspace(*I) == 0 && *I != '(' && *I != ')' &&
- *I != ',' && *I != '|' && *I != '[' && *I != ']'; I++);
+ *I != ',' && *I != '|' && *I != '[' && *I != ']' &&
+ *I != '<' && *I != '>'; ++I);
// Malformed, no '('
if (I != Stop && *I == ')')
@@ -602,6 +615,76 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
for (;I != Stop && isspace(*I) != 0; I++);
}
+ if (ParseRestrictionsList == true)
+ {
+ // Parse a restrictions list
+ if (I != Stop && *I == '<')
+ {
+ ++I;
+ // malformed
+ if (unlikely(I == Stop))
+ return 0;
+
+ std::vector const profiles = _config->FindVector("APT::Build-Profiles");
+
+ const char *End = I;
+ bool Found = false;
+ bool NegRestriction = false;
+ while (I != Stop)
+ {
+ // look for whitespace or ending '>'
+ for (;End != Stop && !isspace(*End) && *End != '>'; ++End);
+
+ if (unlikely(End == Stop))
+ return 0;
+
+ if (*I == '!')
+ {
+ NegRestriction = true;
+ ++I;
+ }
+
+ std::string restriction(I, End);
+
+ std::string prefix = "profile.";
+ // only support for "profile" prefix, ignore others
+ if (restriction.size() > prefix.size() &&
+ restriction.substr(0, prefix.size()) == prefix)
+ {
+ // get the name of the profile
+ restriction = restriction.substr(prefix.size());
+
+ if (restriction.empty() == false && profiles.empty() == false &&
+ std::find(profiles.begin(), profiles.end(), restriction) != profiles.end())
+ {
+ Found = true;
+ if (I[-1] != '!')
+ NegRestriction = false;
+ // we found a match, so fast-forward to the end of the wildcards
+ for (; End != Stop && *End != '>'; ++End);
+ }
+ }
+
+ if (*End++ == '>') {
+ I = End;
+ break;
+ }
+
+ I = End;
+ for (;I != Stop && isspace(*I) != 0; I++);
+ }
+
+ if (NegRestriction == true)
+ Found = !Found;
+
+ if (Found == false)
+ Package = ""; /* not for this restriction */
+ }
+
+ // Skip whitespace
+ for (;I != Stop && isspace(*I) != 0; I++);
+ }
+
if (I != Stop && *I == '|')
Op |= pkgCache::Dep::Or;
@@ -635,7 +718,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
string Version;
unsigned int Op;
- Start = ParseDepends(Start, Stop, Package, Version, Op, false, false);
+ Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false);
if (Start == 0)
return _error->Error("Problem parsing dependency %s",Tag);
size_t const found = Package.rfind(':');
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 386d291a2..0531b20f3 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -72,11 +72,20 @@ class debListParser : public pkgCacheGenerator::ListParser
bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File,
std::string section);
-
+
+ static const char *ParseDepends(const char *Start,const char *Stop,
+ std::string &Package,std::string &Ver,unsigned int &Op);
static const char *ParseDepends(const char *Start,const char *Stop,
- std::string &Package,std::string &Ver,unsigned int &Op,
- bool const &ParseArchFlags = false,
- bool const &StripMultiArch = true);
+ std::string &Package,std::string &Ver,unsigned int &Op,
+ bool const &ParseArchFlags);
+ static const char *ParseDepends(const char *Start,const char *Stop,
+ std::string &Package,std::string &Ver,unsigned int &Op,
+ bool const &ParseArchFlags, bool const &StripMultiArch);
+ static const char *ParseDepends(const char *Start,const char *Stop,
+ std::string &Package,std::string &Ver,unsigned int &Op,
+ bool const &ParseArchFlags, bool const &StripMultiArch,
+ bool const &ParseRestrictionsList);
+
static const char *ConvertRelation(const char *I,unsigned int &Op);
debListParser(FileFd *File, std::string const &Arch = "");
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index ce55ccd1f..90182b4a4 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -90,7 +90,7 @@ bool debSrcRecordParser::BuildDepends(std::vectorError("Problem parsing dependency: %s", fields[I]);
diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc
index e95016240..67dbab823 100644
--- a/test/libapt/parsedepends_test.cc
+++ b/test/libapt/parsedepends_test.cc
@@ -10,7 +10,9 @@ int main(int argc,char *argv[]) {
unsigned int Null = 0;
bool StripMultiArch = true;
bool ParseArchFlags = false;
+ bool ParseRestrictionsList = false;
_config->Set("APT::Architecture","amd64");
+ _config->Set("APT::Build-Profiles","stage1");
const char* Depends =
"debhelper:any (>= 5.0), "
@@ -27,6 +29,9 @@ int main(int argc,char *argv[]) {
"os-for-me [ linux-any ], "
"cpu-not-for-me [ any-armel ], "
"os-not-for-me [ kfreebsd-any ], "
+ "not-in-stage1 , "
+ "not-in-stage1-or-nodoc , "
+ "only-in-stage1 , "
"overlord-dev:any (= 7.15.3~) | overlord-dev:native (>> 7.15.5), "
;
@@ -39,7 +44,7 @@ test:
const char* Start = Depends;
const char* End = Depends + strlen(Depends);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
if (StripMultiArch == true)
equals("debhelper", Package);
else
@@ -47,7 +52,7 @@ test:
equals("5.0", Version);
equals(Null | pkgCache::Dep::GreaterEq, Op);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
if (StripMultiArch == true)
equals("libdb-dev", Package);
else
@@ -55,7 +60,7 @@ test:
equals("", Version);
equals(Null | pkgCache::Dep::NoOp, Op);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
if (StripMultiArch == true)
equals("gettext", Package);
else
@@ -63,7 +68,7 @@ test:
equals("0.12", Version);
equals(Null | pkgCache::Dep::LessEq, Op);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
if (StripMultiArch == true)
equals("libcurl4-gnutls-dev", Package);
else
@@ -71,104 +76,131 @@ test:
equals("", Version);
equals(Null | pkgCache::Dep::Or, Op);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("libcurl3-gnutls-dev", Package);
equals("7.15.5", Version);
equals(Null | pkgCache::Dep::Greater, Op);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("debiandoc-sgml", Package);
equals("", Version);
equals(Null | pkgCache::Dep::NoOp, Op);
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("apt", Package);
equals("0.7.25", Version);
equals(Null | pkgCache::Dep::GreaterEq, Op);
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("", Package); // not-for-me
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("only-for-me", Package);
equals("", Version);
equals(Null | pkgCache::Dep::NoOp, Op);
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("any-for-me", Package);
equals("", Version);
equals(Null | pkgCache::Dep::NoOp, Op);
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("not-for-darwin", Package);
equals("", Version);
equals(Null | pkgCache::Dep::NoOp, Op);
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("cpu-for-me", Package);
equals("", Version);
equals(Null | pkgCache::Dep::NoOp, Op);
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("os-for-me", Package);
equals("", Version);
equals(Null | pkgCache::Dep::NoOp, Op);
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("", Package); // cpu-not-for-me
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
if (ParseArchFlags == true) {
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
equals("", Package); // os-not-for-me
} else {
- equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch));
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
Start = strstr(Start, ",");
Start++;
}
- Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ if (ParseRestrictionsList == true) {
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
+ equals("", Package); // not-in-stage1
+ } else {
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
+ Start = strstr(Start, ",");
+ Start++;
+ }
+
+ if (ParseRestrictionsList == true) {
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
+ equals("", Package); // not-in-stage1-or-in-nodoc
+ } else {
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
+ Start = strstr(Start, ",");
+ Start++;
+ }
+
+ if (ParseRestrictionsList == true) {
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
+ equals("only-in-stage1", Package);
+ } else {
+ equals(true, 0 == debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList));
+ Start = strstr(Start, ",");
+ Start++;
+ }
+
+ Start = debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
if (StripMultiArch == true)
equals("overlord-dev", Package);
else
@@ -176,7 +208,7 @@ test:
equals("7.15.3~", Version);
equals(Null | pkgCache::Dep::Equals | pkgCache::Dep::Or, Op);
- debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch);
+ debListParser::ParseDepends(Start, End, Package, Version, Op, ParseArchFlags, StripMultiArch, ParseRestrictionsList);
if (StripMultiArch == true)
equals("overlord-dev", Package);
else
@@ -185,11 +217,13 @@ test:
equals(Null | pkgCache::Dep::Greater, Op);
if (StripMultiArch == false)
- ParseArchFlags = true;
+ if (ParseArchFlags == false)
+ ParseRestrictionsList = !ParseRestrictionsList;
+ ParseArchFlags = !ParseArchFlags;
StripMultiArch = !StripMultiArch;
runner++;
- if (runner < 4)
+ if (runner < 8)
goto test; // this is the prove: tests are really evil ;)
return 0;
--
cgit v1.2.3-70-g09d2
From c3ccac9232c2684b15f75fa8622a9a290aeca123 Mon Sep 17 00:00:00 2001
From: David Kalnischkies
Date: Thu, 27 Feb 2014 03:11:54 +0100
Subject: warning: no previous declaration for foobar()
[-Wmissing-declarations]
Git-Dch: Ignore
Reported-By: gcc -Wmissing-declarations
---
apt-pkg/depcache.cc | 2 +-
apt-private/private-cmndline.cc | 14 ++++-----
apt-private/private-download.cc | 1 +
apt-private/private-install.cc | 2 +-
apt-private/private-list.cc | 2 +-
apt-private/private-moo.cc | 4 +--
apt-private/private-output.cc | 16 +++++-----
apt-private/private-show.cc | 3 +-
apt-private/private-update.cc | 1 +
cmdline/apt-cache.cc | 48 +++++++++++++++---------------
cmdline/apt-cdrom.cc | 8 ++---
cmdline/apt-config.cc | 6 ++--
cmdline/apt-dump-solver.cc | 2 +-
cmdline/apt-extracttemplates.cc | 8 ++---
cmdline/apt-get.cc | 36 +++++++++++-----------
cmdline/apt-helper.cc | 4 +--
cmdline/apt-internal-solver.cc | 2 +-
cmdline/apt-mark.cc | 12 ++++----
cmdline/apt-sortpkgs.cc | 4 +--
cmdline/apt.cc | 2 +-
debian/libapt-pkg4.12.symbols | 1 -
ftparchive/apt-ftparchive.cc | 18 +++++------
test/interactive-helper/aptwebserver.cc | 30 +++++++++----------
test/interactive-helper/extract-control.cc | 2 +-
test/interactive-helper/testdeb.cc | 2 +-
test/libapt/assert.h | 9 ++++++
test/libapt/compareversion_test.cc | 6 ++--
test/libapt/sourcelist_test.cc | 2 +-
test/libapt/tagfile_test.cc | 2 +-
29 files changed, 130 insertions(+), 119 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 90d0c9314..946c1e254 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -889,7 +889,7 @@ bool pkgDepCache::IsDeleteOkProtectInstallRequests(PkgIterator const &Pkg,
and prevents mode changes for packages on hold for example.
If you want to check Mode specific stuff you can use the virtual public
IsOk methods instead */
-char const* PrintMode(char const mode)
+static char const* PrintMode(char const mode)
{
switch (mode)
{
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index b99443210..132da04d5 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -14,7 +14,7 @@
#include
/*}}}*/
-bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/
+static bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/
{
va_list args;
bool found = false;
@@ -33,7 +33,7 @@ bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/
/*}}}*/
#define addArg(w,x,y,z) Args.push_back(CommandLine::MakeArgs(w,x,y,z))
#define CmdMatches(...) strcmp_match_in_list(Cmd, __VA_ARGS__, NULL)
-bool addArgumentsAPTCache(std::vector &Args, char const * const Cmd)/*{{{*/
+static bool addArgumentsAPTCache(std::vector &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("depends", "rdepends", "xvcg", "dotty"))
{
@@ -82,7 +82,7 @@ bool addArgumentsAPTCache(std::vector &Args, char const * con
return true;
}
/*}}}*/
-bool addArgumentsAPTCDROM(std::vector &Args, char const * const Cmd)/*{{{*/
+static bool addArgumentsAPTCDROM(std::vector &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("add", "ident") == false)
return false;
@@ -100,7 +100,7 @@ bool addArgumentsAPTCDROM(std::vector &Args, char const * con
return true;
}
/*}}}*/
-bool addArgumentsAPTConfig(std::vector &Args, char const * const Cmd)/*{{{*/
+static bool addArgumentsAPTConfig(std::vector &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("dump"))
{
@@ -115,7 +115,7 @@ bool addArgumentsAPTConfig(std::vector &Args, char const * co
return true;
}
/*}}}*/
-bool addArgumentsAPTGet(std::vector &Args, char const * const Cmd)/*{{{*/
+static bool addArgumentsAPTGet(std::vector &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade",
"dselect-upgrade", "autoremove"))
@@ -202,7 +202,7 @@ bool addArgumentsAPTGet(std::vector &Args, char const * const
return true;
}
/*}}}*/
-bool addArgumentsAPTMark(std::vector &Args, char const * const Cmd)/*{{{*/
+static bool addArgumentsAPTMark(std::vector &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("auto", "manual", "hold", "unhold", "showauto",
"showmanual", "showhold", "showholds", "install",
@@ -222,7 +222,7 @@ bool addArgumentsAPTMark(std::vector &Args, char const * cons
return true;
}
/*}}}*/
-bool addArgumentsAPT(std::vector &Args, char const * const Cmd)/*{{{*/
+static bool addArgumentsAPT(std::vector &Args, char const * const Cmd)/*{{{*/
{
if (CmdMatches("list"))
{
diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc
index f02991cde..80795f964 100644
--- a/apt-private/private-download.cc
+++ b/apt-private/private-download.cc
@@ -8,6 +8,7 @@
#include
#include "private-output.h"
+#include "private-download.h"
#include
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 3adb00b23..ff609f567 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -386,7 +386,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
// DoAutomaticRemove - Remove all automatic unused packages /*{{{*/
// ---------------------------------------------------------------------
/* Remove unused automatic packages */
-bool DoAutomaticRemove(CacheFile &Cache)
+static bool DoAutomaticRemove(CacheFile &Cache)
{
bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc
index 44a766c84..bc4539aeb 100644
--- a/apt-private/private-list.cc
+++ b/apt-private/private-list.cc
@@ -99,7 +99,7 @@ private:
#undef PackageMatcher
};
/*}}}*/
-void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/
+static void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records,/*{{{*/
pkgCache::PkgIterator P,
std::ostream &outs,
bool include_summary=true)
diff --git a/apt-private/private-moo.cc b/apt-private/private-moo.cc
index 23255db6f..5d247041d 100644
--- a/apt-private/private-moo.cc
+++ b/apt-private/private-moo.cc
@@ -22,7 +22,7 @@
#include
/*}}}*/
-std::string getMooLine() { /*{{{*/
+static std::string getMooLine() { /*{{{*/
time_t const timenow = time(NULL);
struct tm special;
localtime_r(&timenow, &special);
@@ -60,7 +60,7 @@ std::string getMooLine() { /*{{{*/
return out.str();
}
/*}}}*/
-bool printMooLine() { /*{{{*/
+static bool printMooLine() { /*{{{*/
std::cerr << getMooLine() << std::endl;
return true;
}
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index 420ca14d5..dec518392 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -63,7 +63,7 @@ bool InitOutput() /*{{{*/
return true;
}
/*}}}*/
-std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) /*{{{*/
+static std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) /*{{{*/
{
std::string suite = "";
if (ver && ver.FileList() && ver.FileList())
@@ -82,7 +82,7 @@ std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver)
return suite;
}
/*}}}*/
-std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
+static std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
{
pkgDepCache *DepCache = CacheFile.GetDepCache();
pkgDepCache::StateCache &state = (*DepCache)[P];
@@ -99,7 +99,7 @@ std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
return flags_str;
}
/*}}}*/
-std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
+static std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
{
pkgPolicy *policy = CacheFile.GetPolicy();
pkgCache::VerIterator cand = policy->GetCandidateVer(P);
@@ -107,14 +107,14 @@ std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P
return cand ? cand.VerStr() : "(none)";
}
/*}}}*/
-std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
+static std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
{
pkgCache::VerIterator inst = P.CurrentVer();
return inst ? inst.VerStr() : "(none)";
}
/*}}}*/
-std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)/*{{{*/
+static std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)/*{{{*/
{
pkgCache::PkgIterator P = V.ParentPkg();
if (V == P.CurrentVer())
@@ -134,16 +134,16 @@ std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)/*{{{*/
return "(none)";
}
/*}}}*/
-std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
+static std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
{
pkgPolicy *policy = CacheFile.GetPolicy();
pkgCache::VerIterator inst = P.CurrentVer();
pkgCache::VerIterator cand = policy->GetCandidateVer(P);
-
+
return inst ? inst.Arch() : cand.Arch();
}
/*}}}*/
-std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P)/*{{{*/
+static std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P)/*{{{*/
{
pkgPolicy *policy = CacheFile.GetPolicy();
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc
index 0a69debbf..94f944af1 100644
--- a/apt-private/private-show.cc
+++ b/apt-private/private-show.cc
@@ -24,6 +24,7 @@
#include "private-output.h"
#include "private-cacheset.h"
+#include "private-show.h"
/*}}}*/
namespace APT {
@@ -31,7 +32,7 @@ namespace APT {
// DisplayRecord - Displays the complete record for the package /*{{{*/
// ---------------------------------------------------------------------
-bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
+static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
ostream &out)
{
pkgCache *Cache = CacheFile.GetPkgCache();
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index f6c12c26a..1f6fb6f79 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -31,6 +31,7 @@
#include "private-cachefile.h"
#include "private-output.h"
+#include "private-update.h"
#include "acqprogress.h"
#include
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 22778eb24..7e569f2fc 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -58,7 +58,7 @@ using namespace std;
// LocalitySort - Sort a version list by package file locality /*{{{*/
// ---------------------------------------------------------------------
/* */
-int LocalityCompare(const void *a, const void *b)
+static int LocalityCompare(const void *a, const void *b)
{
pkgCache::VerFile *A = *(pkgCache::VerFile **)a;
pkgCache::VerFile *B = *(pkgCache::VerFile **)b;
@@ -75,13 +75,13 @@ int LocalityCompare(const void *a, const void *b)
return A->File - B->File;
}
-void LocalitySort(pkgCache::VerFile **begin,
+static void LocalitySort(pkgCache::VerFile **begin,
unsigned long Count,size_t Size)
{
qsort(begin,Count,Size,LocalityCompare);
}
-void LocalitySort(pkgCache::DescFile **begin,
+static void LocalitySort(pkgCache::DescFile **begin,
unsigned long Count,size_t Size)
{
qsort(begin,Count,Size,LocalityCompare);
@@ -90,7 +90,7 @@ void LocalitySort(pkgCache::DescFile **begin,
// UnMet - Show unmet dependencies /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowUnMet(pkgCache::VerIterator const &V, bool const Important)
+static bool ShowUnMet(pkgCache::VerIterator const &V, bool const Important)
{
bool Header = false;
for (pkgCache::DepIterator D = V.DependsList(); D.end() == false;)
@@ -163,7 +163,7 @@ bool ShowUnMet(pkgCache::VerIterator const &V, bool const Important)
}
return true;
}
-bool UnMet(CommandLine &CmdL)
+static bool UnMet(CommandLine &CmdL)
{
bool const Important = _config->FindB("APT::Cache::Important",false);
@@ -193,7 +193,7 @@ bool UnMet(CommandLine &CmdL)
// DumpPackage - Show a dump of a package record /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool DumpPackage(CommandLine &CmdL)
+static bool DumpPackage(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
APT::CacheSetHelper helper(true, GlobalError::NOTICE);
@@ -258,7 +258,7 @@ bool DumpPackage(CommandLine &CmdL)
// Stats - Dump some nice statistics /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Stats(CommandLine &Cmd)
+static bool Stats(CommandLine &Cmd)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -371,7 +371,7 @@ bool Stats(CommandLine &Cmd)
// Dump - show everything /*{{{*/
// ---------------------------------------------------------------------
/* This is worthless except fer debugging things */
-bool Dump(CommandLine &Cmd)
+static bool Dump(CommandLine &Cmd)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -423,7 +423,7 @@ bool Dump(CommandLine &Cmd)
// ---------------------------------------------------------------------
/* This is needed to make dpkg --merge happy.. I spent a bit of time to
make this run really fast, perhaps I went a little overboard.. */
-bool DumpAvail(CommandLine &Cmd)
+static bool DumpAvail(CommandLine &Cmd)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -562,7 +562,7 @@ bool DumpAvail(CommandLine &Cmd)
}
/*}}}*/
// ShowDepends - Helper for printing out a dependency tree /*{{{*/
-bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
+static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -676,7 +676,7 @@ bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
// Depends - Print out a dependency tree /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Depends(CommandLine &CmdL)
+static bool Depends(CommandLine &CmdL)
{
return ShowDepends(CmdL, false);
}
@@ -684,7 +684,7 @@ bool Depends(CommandLine &CmdL)
// RDepends - Print out a reverse dependency tree /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool RDepends(CommandLine &CmdL)
+static bool RDepends(CommandLine &CmdL)
{
return ShowDepends(CmdL, true);
}
@@ -693,7 +693,7 @@ bool RDepends(CommandLine &CmdL)
// ---------------------------------------------------------------------
// Code contributed from Junichi Uekawa on 20 June 2002.
-bool XVcg(CommandLine &CmdL)
+static bool XVcg(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -905,7 +905,7 @@ bool XVcg(CommandLine &CmdL)
/* Dotty is the graphvis program for generating graphs. It is a fairly
simple queuing algorithm that just writes dependencies and nodes.
http://www.research.att.com/sw/tools/graphviz/ */
-bool Dotty(CommandLine &CmdL)
+static bool Dotty(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -1126,7 +1126,7 @@ static unsigned char const* skipDescriptionFields(unsigned char const * DescP)
++DescP;
return DescP;
}
-bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
+static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
{
pkgCache *Cache = CacheFile.GetPkgCache();
if (unlikely(Cache == NULL))
@@ -1228,7 +1228,7 @@ struct ExDescFile
// Search - Perform a search /*{{{*/
// ---------------------------------------------------------------------
/* This searches the package names and package descriptions for a pattern */
-bool Search(CommandLine &CmdL)
+static bool Search(CommandLine &CmdL)
{
bool const ShowFull = _config->FindB("APT::Cache::ShowFull",false);
bool const NamesOnly = _config->FindB("APT::Cache::NamesOnly",false);
@@ -1388,7 +1388,7 @@ bool Search(CommandLine &CmdL)
}
/*}}}*/
/* ShowAuto - show automatically installed packages (sorted) {{{*/
-bool ShowAuto(CommandLine &CmdL)
+static bool ShowAuto(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -1415,7 +1415,7 @@ bool ShowAuto(CommandLine &CmdL)
// ShowPackage - Dump the package record to the screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowPackage(CommandLine &CmdL)
+static bool ShowPackage(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
CacheSetHelperVirtuals helper(true, GlobalError::NOTICE);
@@ -1439,7 +1439,7 @@ bool ShowPackage(CommandLine &CmdL)
// ShowPkgNames - Show package names /*{{{*/
// ---------------------------------------------------------------------
/* This does a prefix match on the first argument */
-bool ShowPkgNames(CommandLine &CmdL)
+static bool ShowPkgNames(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
if (unlikely(CacheFile.BuildCaches(NULL, false) == false))
@@ -1478,7 +1478,7 @@ bool ShowPkgNames(CommandLine &CmdL)
// ShowSrcPackage - Show source package records /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowSrcPackage(CommandLine &CmdL)
+static bool ShowSrcPackage(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgSourceList *List = CacheFile.GetSourceList();
@@ -1515,7 +1515,7 @@ bool ShowSrcPackage(CommandLine &CmdL)
// Policy - Show the results of the preferences file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Policy(CommandLine &CmdL)
+static bool Policy(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -1644,7 +1644,7 @@ bool Policy(CommandLine &CmdL)
// Madison - Look a bit like katie's madison /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Madison(CommandLine &CmdL)
+static bool Madison(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgSourceList *SrcList = CacheFile.GetSourceList();
@@ -1717,7 +1717,7 @@ bool Madison(CommandLine &CmdL)
// GenCaches - Call the main cache generator /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool GenCaches(CommandLine &Cmd)
+static bool GenCaches(CommandLine &Cmd)
{
OpTextProgress Progress(*_config);
@@ -1728,7 +1728,7 @@ bool GenCaches(CommandLine &Cmd)
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &Cmd)
+static bool ShowHelp(CommandLine &Cmd)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 9aaebefd7..dc0e050c3 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -111,7 +111,7 @@ OpProgress* pkgCdromTextStatus::GetOpProgress()
}
/*}}}*/
// SetupAutoDetect /*{{{*/
-bool AutoDetectCdrom(pkgUdevCdromDevices &UdevCdroms, unsigned int &i, bool &automounted)
+static bool AutoDetectCdrom(pkgUdevCdromDevices &UdevCdroms, unsigned int &i, bool &automounted)
{
bool Debug = _config->FindB("Debug::Acquire::cdrom", false);
@@ -155,7 +155,7 @@ bool AutoDetectCdrom(pkgUdevCdromDevices &UdevCdroms, unsigned int &i, bool &aut
sequence is to mount/umount the CD, Ident it then scan it for package
files and reduce that list. Then we copy over the package files and
verify them. Then rewrite the database files */
-bool DoAdd(CommandLine &)
+static bool DoAdd(CommandLine &)
{
pkgUdevCdromDevices UdevCdroms;
pkgCdromTextStatus log;
@@ -201,7 +201,7 @@ bool DoAdd(CommandLine &)
// DoIdent - Ident a CDROM /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool DoIdent(CommandLine &)
+static bool DoIdent(CommandLine &)
{
pkgUdevCdromDevices UdevCdroms;
string ident;
@@ -247,7 +247,7 @@ bool DoIdent(CommandLine &)
// ShowHelp - Show the help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 9f20b3c1b..e83c4b64b 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -40,7 +40,7 @@ using namespace std;
// DoShell - Handle the shell command /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool DoShell(CommandLine &CmdL)
+static bool DoShell(CommandLine &CmdL)
{
for (const char **I = CmdL.FileList + 1; *I != 0; I += 2)
{
@@ -63,7 +63,7 @@ bool DoShell(CommandLine &CmdL)
// DoDump - Dump the configuration space /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool DoDump(CommandLine &CmdL)
+static bool DoDump(CommandLine &CmdL)
{
bool const empty = _config->FindB("APT::Config::Dump::EmptyValue", true);
std::string const format = _config->Find("APT::Config::Dump::Format", "%f \"%v\";\n");
@@ -78,7 +78,7 @@ bool DoDump(CommandLine &CmdL)
// ShowHelp - Show the help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &CmdL)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc
index aa16b1271..c26cdc70a 100644
--- a/cmdline/apt-dump-solver.cc
+++ b/cmdline/apt-dump-solver.cc
@@ -18,7 +18,7 @@
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp() {
+static bool ShowHelp() {
std::cout <<
PACKAGE " " PACKAGE_VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl <<
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index 2408a7d9d..2b01968e3 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -212,7 +212,7 @@ bool DebFile::ParseInfo()
// ShowHelp - show a short help text /*{{{*/
// ---------------------------------------------------------------------
/* */
-int ShowHelp(void)
+static int ShowHelp(void)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
@@ -237,7 +237,7 @@ int ShowHelp(void)
// WriteFile - write the contents of the passed string to a file /*{{{*/
// ---------------------------------------------------------------------
/* */
-string WriteFile(const char *package, const char *prefix, const char *data)
+static string WriteFile(const char *package, const char *prefix, const char *data)
{
char fn[512];
static int i;
@@ -265,7 +265,7 @@ string WriteFile(const char *package, const char *prefix, const char *data)
// WriteConfig - write out the config data from a debian package file /*{{{*/
// ---------------------------------------------------------------------
/* */
-void WriteConfig(const DebFile &file)
+static void WriteConfig(const DebFile &file)
{
string templatefile = WriteFile(file.Package.c_str(), "template", file.Template);
string configscript = WriteFile(file.Package.c_str(), "config", file.Config);
@@ -279,7 +279,7 @@ void WriteConfig(const DebFile &file)
// InitCache - initialize the package cache /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Go(CommandLine &CmdL)
+static bool Go(CommandLine &CmdL)
{
// Initialize the apt cache
MMap *Map = 0;
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index f8de80a91..253b2f4a5 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -97,7 +97,7 @@ using namespace std;
// ---------------------------------------------------------------------
/* This used to be inlined in DoInstall, but with the advent of regex package
name matching it was split out.. */
-bool TryToInstallBuildDep(pkgCache::PkgIterator Pkg,pkgCacheFile &Cache,
+static bool TryToInstallBuildDep(pkgCache::PkgIterator Pkg,pkgCacheFile &Cache,
pkgProblemResolver &Fix,bool Remove,bool BrokenFix,
bool AllowFail = true)
{
@@ -138,7 +138,7 @@ bool TryToInstallBuildDep(pkgCache::PkgIterator Pkg,pkgCacheFile &Cache,
// helper that can go wit hthe next ABI break
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
-std::string MetaIndexFileNameOnDisk(metaIndex *metaindex)
+static std::string MetaIndexFileNameOnDisk(metaIndex *metaindex)
{
// FIXME: this cast is the horror, the horror
debReleaseIndex *r = (debReleaseIndex*)metaindex;
@@ -159,7 +159,7 @@ std::string MetaIndexFileNameOnDisk(metaIndex *metaindex)
// GetReleaseForSourceRecord - Return Suite for the given srcrecord /*{{{*/
// ---------------------------------------------------------------------
/* */
-std::string GetReleaseForSourceRecord(pkgSourceList *SrcList,
+static std::string GetReleaseForSourceRecord(pkgSourceList *SrcList,
pkgSrcRecords::Parser *Parse)
{
// try to find release
@@ -194,7 +194,7 @@ std::string GetReleaseForSourceRecord(pkgSourceList *SrcList,
// FindSrc - Find a source record /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
+static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
pkgSrcRecords &SrcRecs,string &Src,
CacheFile &CacheFile)
{
@@ -430,7 +430,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
}
/*}}}*/
/* mark packages as automatically/manually installed. {{{*/
-bool DoMarkAuto(CommandLine &CmdL)
+static bool DoMarkAuto(CommandLine &CmdL)
{
bool Action = true;
int AutoMarkChanged = 0;
@@ -475,7 +475,7 @@ bool DoMarkAuto(CommandLine &CmdL)
// DoDSelectUpgrade - Do an upgrade by following dselects selections /*{{{*/
// ---------------------------------------------------------------------
/* Follows dselect's selections */
-bool DoDSelectUpgrade(CommandLine &CmdL)
+static bool DoDSelectUpgrade(CommandLine &CmdL)
{
CacheFile Cache;
if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
@@ -551,7 +551,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL)
// DoClean - Remove download archives /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool DoClean(CommandLine &CmdL)
+static bool DoClean(CommandLine &CmdL)
{
std::string const archivedir = _config->FindDir("Dir::Cache::archives");
std::string const pkgcache = _config->FindFile("Dir::cache::pkgcache");
@@ -599,7 +599,7 @@ class LogCleaner : public pkgArchiveCleaner
};
};
-bool DoAutoClean(CommandLine &CmdL)
+static bool DoAutoClean(CommandLine &CmdL)
{
// Lock the archive directory
FileFd Lock;
@@ -623,7 +623,7 @@ bool DoAutoClean(CommandLine &CmdL)
/*}}}*/
// DoDownload - download a binary /*{{{*/
// ---------------------------------------------------------------------
-bool DoDownload(CommandLine &CmdL)
+static bool DoDownload(CommandLine &CmdL)
{
CacheFile Cache;
if (Cache.ReadOnlyOpen() == false)
@@ -696,7 +696,7 @@ bool DoDownload(CommandLine &CmdL)
// ---------------------------------------------------------------------
/* Opening automatically checks the system, this command is mostly used
for debugging */
-bool DoCheck(CommandLine &CmdL)
+static bool DoCheck(CommandLine &CmdL)
{
CacheFile Cache;
Cache.Open();
@@ -715,7 +715,7 @@ struct DscFile
string Dsc;
};
-bool DoSource(CommandLine &CmdL)
+static bool DoSource(CommandLine &CmdL)
{
CacheFile Cache;
if (Cache.Open(false) == false)
@@ -1016,7 +1016,7 @@ bool DoSource(CommandLine &CmdL)
// ---------------------------------------------------------------------
/* This function will look at the build depends list of the given source
package and install the necessary packages to make it true, or fail. */
-bool DoBuildDep(CommandLine &CmdL)
+static bool DoBuildDep(CommandLine &CmdL)
{
CacheFile Cache;
@@ -1410,7 +1410,7 @@ bool DoBuildDep(CommandLine &CmdL)
* pool/ next to the deb itself)
* Example return: "pool/main/a/apt/apt_0.8.8ubuntu3"
*/
-string GetChangelogPath(CacheFile &Cache,
+static string GetChangelogPath(CacheFile &Cache,
pkgCache::PkgIterator Pkg,
pkgCache::VerIterator Ver)
{
@@ -1437,7 +1437,7 @@ string GetChangelogPath(CacheFile &Cache,
* apt-get changelog mplayer-doc:
* http://packages.medibuntu.org/pool/non-free/m/mplayer/mplayer_1.0~rc4~try1.dsfg1-1ubuntu1+medibuntu1.changelog
*/
-bool GuessThirdPartyChangelogUri(CacheFile &Cache,
+static bool GuessThirdPartyChangelogUri(CacheFile &Cache,
pkgCache::PkgIterator Pkg,
pkgCache::VerIterator Ver,
string &out_uri)
@@ -1462,7 +1462,7 @@ bool GuessThirdPartyChangelogUri(CacheFile &Cache,
/*}}}*/
// DownloadChangelog - Download the changelog /*{{{*/
// ---------------------------------------------------------------------
-bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
+static bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
pkgCache::VerIterator Ver, string targetfile)
/* Download a changelog file for the given package version to
* targetfile. This will first try the server from Apt::Changelogs::Server
@@ -1517,7 +1517,7 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
/*}}}*/
// DoChangelog - Get changelog from the command line /*{{{*/
// ---------------------------------------------------------------------
-bool DoChangelog(CommandLine &CmdL)
+static bool DoChangelog(CommandLine &CmdL)
{
CacheFile Cache;
if (Cache.ReadOnlyOpen() == false)
@@ -1581,7 +1581,7 @@ bool DoChangelog(CommandLine &CmdL)
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &CmdL)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
@@ -1677,7 +1677,7 @@ bool ShowHelp(CommandLine &CmdL)
// SigWinch - Window size change signal handler /*{{{*/
// ---------------------------------------------------------------------
/* */
-void SigWinch(int)
+static void SigWinch(int)
{
// Riped from GNU ls
#ifdef TIOCGWINSZ
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index c1c8b2178..d8ea0435a 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -33,7 +33,7 @@
/*}}}*/
using namespace std;
-bool DoDownloadFile(CommandLine &CmdL)
+static bool DoDownloadFile(CommandLine &CmdL)
{
if (CmdL.FileSize() <= 2)
return _error->Error(_("Must specify at least one pair url/filename"));
@@ -55,7 +55,7 @@ bool DoDownloadFile(CommandLine &CmdL)
return true;
}
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &CmdL)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index bf5b8c1fe..108e86b9a 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -30,7 +30,7 @@
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &CmdL) {
+static bool ShowHelp(CommandLine &CmdL) {
ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index d3a3a780b..1af17cd7a 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -35,7 +35,7 @@ ostream c1out(0);
ostream c2out(0);
ofstream devnull("/dev/null");
/* DoAuto - mark packages as automatically/manually installed {{{*/
-bool DoAuto(CommandLine &CmdL)
+static bool DoAuto(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -82,7 +82,7 @@ bool DoAuto(CommandLine &CmdL)
/* DoMarkAuto - mark packages as automatically/manually installed {{{*/
/* Does the same as DoAuto but tries to do it exactly the same why as
the python implementation did it so it can be a drop-in replacement */
-bool DoMarkAuto(CommandLine &CmdL)
+static bool DoMarkAuto(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -119,7 +119,7 @@ bool DoMarkAuto(CommandLine &CmdL)
}
/*}}}*/
/* ShowAuto - show automatically installed packages (sorted) {{{*/
-bool ShowAuto(CommandLine &CmdL)
+static bool ShowAuto(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -159,7 +159,7 @@ bool ShowAuto(CommandLine &CmdL)
}
/*}}}*/
/* DoHold - mark packages as hold by dpkg {{{*/
-bool DoHold(CommandLine &CmdL)
+static bool DoHold(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -335,7 +335,7 @@ bool DoHold(CommandLine &CmdL)
}
/*}}}*/
/* ShowHold - show packages set on hold in dpkg status {{{*/
-bool ShowHold(CommandLine &CmdL)
+static bool ShowHold(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -372,7 +372,7 @@ bool ShowHold(CommandLine &CmdL)
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &CmdL)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index 46989044e..8d9cb23de 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -62,7 +62,7 @@ struct PkgName /*{{{*/
// DoIt - Sort a single file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool DoIt(string InFile)
+static bool DoIt(string InFile)
{
FileFd Fd(InFile,FileFd::ReadOnly);
pkgTagFile Tags(&Fd);
@@ -142,7 +142,7 @@ bool DoIt(string InFile)
// ShowHelp - Show the help text /*{{{*/
// ---------------------------------------------------------------------
/* */
-int ShowHelp()
+static int ShowHelp()
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 7ef9060aa..040ed6c25 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -61,7 +61,7 @@
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &CmdL)
{
ioprintf(c1out,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/debian/libapt-pkg4.12.symbols b/debian/libapt-pkg4.12.symbols
index 17b9f69fa..c1747bc9e 100644
--- a/debian/libapt-pkg4.12.symbols
+++ b/debian/libapt-pkg4.12.symbols
@@ -1197,7 +1197,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"APT::Configuration::setDefaultConfigurationForCompressors()@Base" 0.8.12
(c++)"pkgAcqMetaClearSig::Custom600Headers()@Base" 0.8.13
(c++|optional=private)"debListParser::NewProvidesAllArch(pkgCache::VerIterator&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)@Base" 0.8.13.2
- (c++|optional=private)"PrintMode(char)@Base" 0.8.13.2
(c++)"pkgDepCache::IsModeChangeOk(pkgDepCache::ModeList, pkgCache::PkgIterator const&, unsigned long, bool)@Base" 0.8.13.2
(c++)"pkgCache::DepIterator::IsNegative() const@Base" 0.8.15~exp1
(c++)"Configuration::CndSet(char const*, int)@Base" 0.8.15.3
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index d14b68044..c28ad5c5c 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -438,7 +438,7 @@ bool PackageMap::GenContents(Configuration &Setup,
// ---------------------------------------------------------------------
/* This populates the PkgList with all the possible permutations of the
section/arch lists. */
-void LoadTree(vector &PkgList,Configuration &Setup)
+static void LoadTree(vector &PkgList,Configuration &Setup)
{
// Load the defaults
string DDir = Setup.Find("TreeDefault::Directory",
@@ -550,7 +550,7 @@ void LoadTree(vector &PkgList,Configuration &Setup)
// LoadBinDir - Load a 'bindirectory' section from the Generate Config /*{{{*/
// ---------------------------------------------------------------------
/* */
-void LoadBinDir(vector &PkgList,Configuration &Setup)
+static void LoadBinDir(vector &PkgList,Configuration &Setup)
{
mode_t const Permissions = Setup.FindI("Default::FileMode",0644);
@@ -586,7 +586,7 @@ void LoadBinDir(vector &PkgList,Configuration &Setup)
// ShowHelp - Show the help text /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &CmdL)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
@@ -639,7 +639,7 @@ bool ShowHelp(CommandLine &CmdL)
// SimpleGenPackages - Generate a Packages file for a directory tree /*{{{*/
// ---------------------------------------------------------------------
/* This emulates dpkg-scanpackages's command line interface. 'mostly' */
-bool SimpleGenPackages(CommandLine &CmdL)
+static bool SimpleGenPackages(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -667,7 +667,7 @@ bool SimpleGenPackages(CommandLine &CmdL)
// SimpleGenContents - Generate a Contents listing /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool SimpleGenContents(CommandLine &CmdL)
+static bool SimpleGenContents(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -689,7 +689,7 @@ bool SimpleGenContents(CommandLine &CmdL)
// SimpleGenSources - Generate a Sources file for a directory tree /*{{{*/
// ---------------------------------------------------------------------
/* This emulates dpkg-scanpackages's command line interface. 'mostly' */
-bool SimpleGenSources(CommandLine &CmdL)
+static bool SimpleGenSources(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -722,7 +722,7 @@ bool SimpleGenSources(CommandLine &CmdL)
/*}}}*/
// SimpleGenRelease - Generate a Release file for a directory tree /*{{{*/
// ---------------------------------------------------------------------
-bool SimpleGenRelease(CommandLine &CmdL)
+static bool SimpleGenRelease(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -747,7 +747,7 @@ bool SimpleGenRelease(CommandLine &CmdL)
// Generate - Full generate, using a config file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Generate(CommandLine &CmdL)
+static bool Generate(CommandLine &CmdL)
{
struct CacheDB::Stats SrcStats;
if (CmdL.FileSize() < 2)
@@ -911,7 +911,7 @@ bool Generate(CommandLine &CmdL)
// Clean - Clean out the databases /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Clean(CommandLine &CmdL)
+static bool Clean(CommandLine &CmdL)
{
if (CmdL.FileSize() != 2)
return ShowHelp(CmdL);
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
index 992f802a6..7ed984fa9 100644
--- a/test/interactive-helper/aptwebserver.cc
+++ b/test/interactive-helper/aptwebserver.cc
@@ -23,7 +23,7 @@
#include
#include
-char const * const httpcodeToStr(int const httpcode) /*{{{*/
+static char const * const httpcodeToStr(int const httpcode) /*{{{*/
{
switch (httpcode)
{
@@ -77,7 +77,7 @@ char const * const httpcodeToStr(int const httpcode) /*{{{*/
return NULL;
}
/*}}}*/
-void addFileHeaders(std::list &headers, FileFd &data) /*{{{*/
+static void addFileHeaders(std::list &headers, FileFd &data)/*{{{*/
{
std::ostringstream contentlength;
contentlength << "Content-Length: " << data.FileSize();
@@ -88,14 +88,14 @@ void addFileHeaders(std::list &headers, FileFd &data) /*{{{*/
headers.push_back(lastmodified);
}
/*}}}*/
-void addDataHeaders(std::list &headers, std::string &data) /*{{{*/
+static void addDataHeaders(std::list &headers, std::string &data)/*{{{*/
{
std::ostringstream contentlength;
contentlength << "Content-Length: " << data.size();
headers.push_back(contentlength.str());
}
/*}}}*/
-bool sendHead(int const client, int const httpcode, std::list &headers)/*{{{*/
+static bool sendHead(int const client, int const httpcode, std::list &headers)/*{{{*/
{
std::string response("HTTP/1.1 ");
response.append(httpcodeToStr(httpcode));
@@ -128,7 +128,7 @@ bool sendHead(int const client, int const httpcode, std::list &head
return Success;
}
/*}}}*/
-bool sendFile(int const client, FileFd &data) /*{{{*/
+static bool sendFile(int const client, FileFd &data) /*{{{*/
{
bool Success = true;
char buffer[500];
@@ -144,7 +144,7 @@ bool sendFile(int const client, FileFd &data) /*{{{*/
return Success;
}
/*}}}*/
-bool sendData(int const client, std::string const &data) /*{{{*/
+static bool sendData(int const client, std::string const &data) /*{{{*/
{
if (FileFd::Write(client, data.c_str(), data.size()) == false)
{
@@ -154,7 +154,7 @@ bool sendData(int const client, std::string const &data) /*{{{*/
return true;
}
/*}}}*/
-void sendError(int const client, int const httpcode, std::string const &request,/*{{{*/
+static void sendError(int const client, int const httpcode, std::string const &request,/*{{{*/
bool content, std::string const &error = "")
{
std::list headers;
@@ -179,13 +179,13 @@ void sendError(int const client, int const httpcode, std::string const &request,
if (content == true)
sendData(client, response);
}
-void sendSuccess(int const client, std::string const &request,
+static void sendSuccess(int const client, std::string const &request,
bool content, std::string const &error = "")
{
sendError(client, 200, request, content, error);
}
/*}}}*/
-void sendRedirect(int const client, int const httpcode, std::string const &uri,/*{{{*/
+static void sendRedirect(int const client, int const httpcode, std::string const &uri,/*{{{*/
std::string const &request, bool content)
{
std::list headers;
@@ -222,7 +222,7 @@ void sendRedirect(int const client, int const httpcode, std::string const &uri,/
sendData(client, response);
}
/*}}}*/
-int filter_hidden_files(const struct dirent *a) /*{{{*/
+static int filter_hidden_files(const struct dirent *a) /*{{{*/
{
if (a->d_name[0] == '.')
return 0;
@@ -236,7 +236,7 @@ int filter_hidden_files(const struct dirent *a) /*{{{*/
#endif
return 1;
}
-int grouped_alpha_case_sort(const struct dirent **a, const struct dirent **b) {
+static int grouped_alpha_case_sort(const struct dirent **a, const struct dirent **b) {
#ifdef _DIRENT_HAVE_D_TYPE
if ((*a)->d_type == DT_DIR && (*b)->d_type == DT_DIR);
else if ((*a)->d_type == DT_DIR && (*b)->d_type == DT_REG)
@@ -260,7 +260,7 @@ int grouped_alpha_case_sort(const struct dirent **a, const struct dirent **b) {
return strcasecmp((*a)->d_name, (*b)->d_name);
}
/*}}}*/
-void sendDirectoryListing(int const client, std::string const &dir, /*{{{*/
+static void sendDirectoryListing(int const client, std::string const &dir,/*{{{*/
std::string const &request, bool content)
{
std::list headers;
@@ -312,7 +312,7 @@ void sendDirectoryListing(int const client, std::string const &dir, /*{{{*/
sendData(client, response);
}
/*}}}*/
-bool parseFirstLine(int const client, std::string const &request, /*{{{*/
+static bool parseFirstLine(int const client, std::string const &request,/*{{{*/
std::string &filename, std::string ¶ms, bool &sendContent,
bool &closeConnection)
{
@@ -432,7 +432,7 @@ bool parseFirstLine(int const client, std::string const &request, /*{{{*/
return true;
}
/*}}}*/
-bool handleOnTheFlyReconfiguration(int const client, std::string const &request, std::vector const &parts)/*{{{*/
+static bool handleOnTheFlyReconfiguration(int const client, std::string const &request, std::vector const &parts)/*{{{*/
{
size_t const pcount = parts.size();
if (pcount == 4 && parts[1] == "set")
@@ -475,7 +475,7 @@ bool handleOnTheFlyReconfiguration(int const client, std::string const &request,
return false;
}
/*}}}*/
-void * handleClient(void * voidclient) /*{{{*/
+static void * handleClient(void * voidclient) /*{{{*/
{
int client = *((int*)(voidclient));
std::clog << "ACCEPT client " << client << std::endl;
diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc
index 3f7feabcb..94fe9dca8 100644
--- a/test/interactive-helper/extract-control.cc
+++ b/test/interactive-helper/extract-control.cc
@@ -7,7 +7,7 @@
using namespace std;
-bool ExtractMember(const char *File,const char *Member)
+static bool ExtractMember(const char *File,const char *Member)
{
FileFd Fd(File,FileFd::ReadOnly);
debDebFile Deb(Fd);
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc
index d28f20114..89375af13 100644
--- a/test/interactive-helper/testdeb.cc
+++ b/test/interactive-helper/testdeb.cc
@@ -9,7 +9,7 @@ class NullStream : public pkgDirStream
virtual bool DoItem(Item &Itm,int &Fd) {return true;};
};
-bool Test(const char *File)
+static bool Test(const char *File)
{
FileFd Fd(File,FileFd::ReadOnly);
debDebFile Deb(Fd);
diff --git a/test/libapt/assert.h b/test/libapt/assert.h
index 113c057ed..cde6a6351 100644
--- a/test/libapt/assert.h
+++ b/test/libapt/assert.h
@@ -1,6 +1,11 @@
#include
#include
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wmissing-declarations"
+#endif
+
#define equals(x,y) assertEquals(y, x, __LINE__)
#define equalsNot(x,y) assertEqualsNot(y, x, __LINE__)
@@ -111,3 +116,7 @@ void dumpVector(X vec) {
v != vec.end(); ++v)
std::cout << *v << std::endl;
}
+
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic pop
+#endif
diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc
index fdb1d5674..44f8e9d78 100644
--- a/test/libapt/compareversion_test.cc
+++ b/test/libapt/compareversion_test.cc
@@ -31,7 +31,7 @@
using namespace std;
-bool callDPkg(const char *val, const char *ref, const char &op) {
+static bool callDPkg(const char *val, const char *ref, const char &op) {
pid_t Process = ExecFork();
if (Process == 0)
{
@@ -50,7 +50,7 @@ bool callDPkg(const char *val, const char *ref, const char &op) {
return WIFEXITED(Ret) == true && WEXITSTATUS(Ret) == 0;
}
-void assertVersion(int const &CurLine, string const &A, string const &B, int const &Expected) {
+static void assertVersion(int const &CurLine, string const &A, string const &B, int const &Expected) {
int Res = debVS.CmpVersion(A.c_str(), B.c_str());
bool const dpkg = callDPkg(A.c_str(),B.c_str(), Expected);
Res = (Res < 0) ? -1 : ( (Res > 0) ? 1 : Res);
@@ -61,7 +61,7 @@ void assertVersion(int const &CurLine, string const &A, string const &B, int con
_error->Error("DPkg differ with line: %u. '%s' '%s' '%s' == false",CurLine,A.c_str(),((Expected == 1) ? "<<" : ( (Expected == 0) ? "=" : ">>")),B.c_str());
}
-bool RunTest(const char *File)
+static bool RunTest(const char *File)
{
if (FileExists(File) == false)
return _error->Error("Versiontestfile %s doesn't exist!", File);
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 0300ce929..e79b6d65e 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -9,7 +9,7 @@
char *tempfile = NULL;
int tempfile_fd = -1;
-void remove_tmpfile(void)
+static void remove_tmpfile(void)
{
if (tempfile_fd > 0)
close(tempfile_fd);
diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc
index d12c74c95..effc3244b 100644
--- a/test/libapt/tagfile_test.cc
+++ b/test/libapt/tagfile_test.cc
@@ -9,7 +9,7 @@
char *tempfile = NULL;
int tempfile_fd = -1;
-void remove_tmpfile(void)
+static void remove_tmpfile(void)
{
if (tempfile_fd > 0)
close(tempfile_fd);
--
cgit v1.2.3-70-g09d2
From 655122418d714f342b5d9789f45f8035f3fe8b9a Mon Sep 17 00:00:00 2001
From: David Kalnischkies
Date: Sat, 1 Mar 2014 15:11:42 +0100
Subject: warning: unused parameter ‘foo’ [-Wunused-parameter]
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reported-By: gcc -Wunused-parameter
Git-Dch: Ignore
---
apt-inst/deb/debfile.cc | 2 +-
apt-inst/dirstream.cc | 2 +-
apt-inst/dirstream.h | 4 ++--
apt-inst/extract.cc | 2 +-
apt-pkg/acquire-item.cc | 20 ++++++++++----------
apt-pkg/cachefile.cc | 4 ++--
apt-pkg/cacheset.cc | 28 ++++++++++++++--------------
apt-pkg/cdrom.cc | 2 +-
apt-pkg/deb/debindexfile.h | 2 +-
apt-pkg/deb/dpkgpm.cc | 2 +-
apt-pkg/deb/dpkgpm.h | 4 ++--
apt-pkg/depcache.cc | 10 +++++-----
apt-pkg/depcache.h | 2 +-
apt-pkg/edsp.cc | 10 ++++------
apt-pkg/edsp.h | 6 ++----
apt-pkg/edsp/edspindexfile.cc | 2 +-
apt-pkg/edsp/edsplistparser.cc | 4 ++--
apt-pkg/edsp/edspsystem.cc | 6 +++---
apt-pkg/indexcopy.cc | 2 +-
apt-pkg/indexfile.cc | 6 +++---
apt-pkg/indexfile.h | 4 ++--
apt-pkg/install-progress.cc | 4 ++--
apt-pkg/install-progress.h | 18 +++++++++---------
apt-pkg/packagemanager.h | 4 ++--
apt-pkg/pkgcache.cc | 2 +-
apt-pkg/pkgcachegen.cc | 2 +-
apt-pkg/pkgcachegen.h | 4 ++--
apt-pkg/pkgrecords.h | 2 +-
apt-pkg/policy.cc | 2 +-
apt-pkg/vendor.cc | 2 +-
apt-private/acqprogress.cc | 2 +-
apt-private/private-cacheset.h | 8 ++++----
apt-private/private-moo.cc | 8 ++++----
apt-private/private-output.cc | 6 +++---
cmdline/apt-cache.cc | 12 ++++++------
cmdline/apt-cdrom.cc | 2 +-
cmdline/apt-config.cc | 2 +-
cmdline/apt-extracttemplates.cc | 2 +-
cmdline/apt-get.cc | 10 +++++-----
cmdline/apt-helper.cc | 2 +-
cmdline/apt-internal-solver.cc | 2 +-
cmdline/apt-mark.cc | 2 +-
cmdline/apt.cc | 2 +-
ftparchive/apt-ftparchive.cc | 2 +-
ftparchive/contents.cc | 2 +-
ftparchive/override.cc | 2 +-
ftparchive/writer.cc | 6 +++---
methods/ftp.cc | 2 +-
methods/gzip.cc | 2 +-
methods/https.cc | 8 ++++----
methods/https.h | 16 ++++++++--------
methods/mirror.cc | 2 +-
methods/rsh.cc | 4 ++--
test/interactive-helper/testdeb.cc | 7 ++++++-
test/libapt/cdromreducesourcelist_test.cc | 2 +-
test/libapt/configuration_test.cc | 2 +-
test/libapt/fileutl_test.cc | 2 +-
test/libapt/getarchitectures_test.cc | 2 +-
test/libapt/globalerror_test.cc | 2 +-
test/libapt/hashsums_test.cc | 5 +++++
test/libapt/parsedepends_test.cc | 2 +-
test/libapt/sourcelist_test.cc | 2 +-
test/libapt/strutil_test.cc | 2 +-
test/libapt/tagfile_test.cc | 2 +-
64 files changed, 153 insertions(+), 147 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc
index a811bbe88..8684f03f7 100644
--- a/apt-inst/deb/debfile.cc
+++ b/apt-inst/deb/debfile.cc
@@ -194,7 +194,7 @@ bool debDebFile::MemControlExtract::DoItem(Item &Itm,int &Fd)
// ---------------------------------------------------------------------
/* Just memcopy the block from the tar extractor and put it in the right
place in the pre-allocated memory block. */
-bool debDebFile::MemControlExtract::Process(Item &Itm,const unsigned char *Data,
+bool debDebFile::MemControlExtract::Process(Item &/*Itm*/,const unsigned char *Data,
unsigned long Size,unsigned long Pos)
{
memcpy(Control + Pos, Data,Size);
diff --git a/apt-inst/dirstream.cc b/apt-inst/dirstream.cc
index e06c30a57..085a0dcbf 100644
--- a/apt-inst/dirstream.cc
+++ b/apt-inst/dirstream.cc
@@ -110,7 +110,7 @@ bool pkgDirStream::FinishedFile(Item &Itm,int Fd)
// DirStream::Fail - Failed processing a file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgDirStream::Fail(Item &Itm,int Fd)
+bool pkgDirStream::Fail(Item &/*Itm*/, int Fd)
{
if (Fd < 0)
return true;
diff --git a/apt-inst/dirstream.h b/apt-inst/dirstream.h
index 9d1af2188..1be2688a1 100644
--- a/apt-inst/dirstream.h
+++ b/apt-inst/dirstream.h
@@ -49,8 +49,8 @@ class pkgDirStream
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool Fail(Item &Itm,int Fd);
virtual bool FinishedFile(Item &Itm,int Fd);
- virtual bool Process(Item &Itm,const unsigned char *Data,
- unsigned long Size,unsigned long Pos) {return true;};
+ virtual bool Process(Item &/*Itm*/,const unsigned char * /*Data*/,
+ unsigned long /*Size*/,unsigned long /*Pos*/) {return true;};
virtual ~pkgDirStream() {};
};
diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc
index b3dfccfc6..60edc702e 100644
--- a/apt-inst/extract.cc
+++ b/apt-inst/extract.cc
@@ -79,7 +79,7 @@ pkgExtract::pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver) :
// Extract::DoItem - Handle a single item from the stream /*{{{*/
// ---------------------------------------------------------------------
/* This performs the setup for the extraction.. */
-bool pkgExtract::DoItem(Item &Itm,int &Fd)
+bool pkgExtract::DoItem(Item &Itm, int &/*Fd*/)
{
/* Strip any leading/trailing /s from the filename, then copy it to the
temp buffer and re-apply the leading / We use a class variable
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 88b10d4b1..3b22743e7 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -108,8 +108,8 @@ void pkgAcquire::Item::Start(string /*Message*/,unsigned long long Size)
// Acquire::Item::Done - Item downloaded OK /*{{{*/
// ---------------------------------------------------------------------
/* */
-void pkgAcquire::Item::Done(string Message,unsigned long long Size,string Hash,
- pkgAcquire::MethodConfig *Cnf)
+void pkgAcquire::Item::Done(string Message,unsigned long long Size,string /*Hash*/,
+ pkgAcquire::MethodConfig * /*Cnf*/)
{
// We just downloaded something..
string FileName = LookupTag(Message,"Filename");
@@ -253,10 +253,10 @@ string pkgAcqSubIndex::Custom600Headers()
return "\nIndex-File: true\nFail-Ignore: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
/*}}}*/
-void pkgAcqSubIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
+void pkgAcqSubIndex::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/
{
if(Debug)
- std::clog << "pkgAcqSubIndex failed: " << Desc.URI << std::endl;
+ std::clog << "pkgAcqSubIndex failed: " << Desc.URI << " with " << Message << std::endl;
Complete = false;
Status = StatDone;
@@ -544,10 +544,10 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
return false;
}
/*}}}*/
-void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
+void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/
{
if(Debug)
- std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << std::endl
+ std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
new pkgAcqIndex(Owner, RealURI, Description, Desc.ShortDesc,
@@ -624,10 +624,10 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
}
}
/*}}}*/
-void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
+void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/
{
if(Debug)
- std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << std::endl
+ std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
new pkgAcqIndex(Owner, RealURI, Description,Desc.ShortDesc,
ExpectedHash);
@@ -808,7 +808,7 @@ pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire *Owner,
QueueURI(Desc);
}
/*}}}*/
-void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
+void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/
{
if(Debug)
std::clog << "pkgAcqIndexMergeDiffs failed: " << Desc.URI << " with " << Message << std::endl;
@@ -1698,7 +1698,7 @@ bool pkgAcqMetaIndex::VerifyVendor(string Message) /*{{{*/
// pkgAcqMetaIndex::Failed - no Release file present or no signature file present /*{{{*/
// ---------------------------------------------------------------------
/* */
-void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
+void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)
{
if (AuthPass == true)
{
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index 7c2276185..2401b015e 100644
--- a/apt-pkg/cachefile.cc
+++ b/apt-pkg/cachefile.cc
@@ -99,7 +99,7 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock)
// CacheFile::BuildSourceList - Open and build all relevant sources.list/*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgCacheFile::BuildSourceList(OpProgress *Progress)
+bool pkgCacheFile::BuildSourceList(OpProgress * /*Progress*/)
{
if (SrcList != NULL)
return true;
@@ -113,7 +113,7 @@ bool pkgCacheFile::BuildSourceList(OpProgress *Progress)
// CacheFile::BuildPolicy - Open and build all relevant preferences /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgCacheFile::BuildPolicy(OpProgress *Progress)
+bool pkgCacheFile::BuildPolicy(OpProgress * /*Progress*/)
{
if (Policy != NULL)
return true;
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 6b6fdb5ad..8a30d00a2 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -588,13 +588,13 @@ pkgCache::PkgIterator CacheSetHelper::canNotFindPkgName(pkgCacheFile &Cache,
}
/*}}}*/
// canNotFindTask - handle the case no package is found for a task /*{{{*/
-void CacheSetHelper::canNotFindTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) {
+void CacheSetHelper::canNotFindTask(PackageContainerInterface * const /*pci*/, pkgCacheFile &/*Cache*/, std::string pattern) {
if (ShowError == true)
_error->Insert(ErrorType, _("Couldn't find task '%s'"), pattern.c_str());
}
/*}}}*/
// canNotFindRegEx - handle the case no package is found by a regex /*{{{*/
-void CacheSetHelper::canNotFindRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) {
+void CacheSetHelper::canNotFindRegEx(PackageContainerInterface * const /*pci*/, pkgCacheFile &/*Cache*/, std::string pattern) {
if (ShowError == true)
_error->Insert(ErrorType, _("Couldn't find any package by regex '%s'"), pattern.c_str());
}
@@ -606,25 +606,25 @@ void CacheSetHelper::canNotFindFnmatch(PackageContainerInterface * const pci, pk
}
#endif /*}}}*/
// canNotFindPackage - handle the case no package is found from a string/*{{{*/
-void CacheSetHelper::canNotFindPackage(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &str) {
+void CacheSetHelper::canNotFindPackage(PackageContainerInterface * const /*pci*/, pkgCacheFile &/*Cache*/, std::string const &/*str*/) {
}
/*}}}*/
// canNotFindAllVer /*{{{*/
-void CacheSetHelper::canNotFindAllVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
+void CacheSetHelper::canNotFindAllVer(VersionContainerInterface * const /*vci*/, pkgCacheFile &/*Cache*/,
pkgCache::PkgIterator const &Pkg) {
if (ShowError == true)
_error->Insert(ErrorType, _("Can't select versions from package '%s' as it is purely virtual"), Pkg.FullName(true).c_str());
}
/*}}}*/
// canNotFindInstCandVer /*{{{*/
-void CacheSetHelper::canNotFindInstCandVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
+void CacheSetHelper::canNotFindInstCandVer(VersionContainerInterface * const /*vci*/, pkgCacheFile &/*Cache*/,
pkgCache::PkgIterator const &Pkg) {
if (ShowError == true)
_error->Insert(ErrorType, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg.FullName(true).c_str());
}
/*}}}*/
// canNotFindInstCandVer /*{{{*/
-void CacheSetHelper::canNotFindCandInstVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
+void CacheSetHelper::canNotFindCandInstVer(VersionContainerInterface * const /*vci*/, pkgCacheFile &/*Cache*/,
pkgCache::PkgIterator const &Pkg) {
if (ShowError == true)
_error->Insert(ErrorType, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg.FullName(true).c_str());
@@ -655,13 +655,13 @@ pkgCache::VerIterator CacheSetHelper::canNotFindInstalledVer(pkgCacheFile &Cache
}
/*}}}*/
// showTaskSelection /*{{{*/
-void CacheSetHelper::showTaskSelection(pkgCache::PkgIterator const &pkg,
- std::string const &pattern) {
+void CacheSetHelper::showTaskSelection(pkgCache::PkgIterator const &/*pkg*/,
+ std::string const &/*pattern*/) {
}
/*}}}*/
// showRegExSelection /*{{{*/
-void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const &pkg,
- std::string const &pattern) {
+void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const &/*pkg*/,
+ std::string const &/*pattern*/) {
}
/*}}}*/
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
@@ -672,10 +672,10 @@ void CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator const &pkg,
/*}}}*/
#endif
// showSelectedVersion /*{{{*/
-void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const &Pkg,
- pkgCache::VerIterator const Ver,
- std::string const &ver,
- bool const verIsRel) {
+void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const &/*Pkg*/,
+ pkgCache::VerIterator const /*Ver*/,
+ std::string const &/*ver*/,
+ bool const /*verIsRel*/) {
}
/*}}}*/
}
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index ea5ed7e92..6f946b030 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -369,7 +369,7 @@ bool pkgCdrom::DropRepeats(vector &List,const char *Name)
// ---------------------------------------------------------------------
/* This takes the list of source list expressed entires and collects
similar ones to form a single entry for each dist */
-void pkgCdrom::ReduceSourcelist(string CD,vector &List)
+void pkgCdrom::ReduceSourcelist(string /*CD*/,vector &List)
{
sort(List.begin(),List.end());
diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h
index 9e64d4476..e079d40c2 100644
--- a/apt-pkg/deb/debindexfile.h
+++ b/apt-pkg/deb/debindexfile.h
@@ -33,7 +33,7 @@ class debStatusIndex : public pkgIndexFile
virtual const Type *GetType() const;
// Interface for acquire
- virtual std::string Describe(bool Short) const {return File;};
+ virtual std::string Describe(bool /*Short*/) const {return File;};
// Interface for the Cache Generator
virtual bool Exists() const;
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 91893c4e1..adf59516e 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1581,7 +1581,7 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress)
return true;
}
-void SigINT(int sig) {
+void SigINT(int /*sig*/) {
pkgPackageManager::SigINTStop = true;
}
/*}}}*/
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index 02e12a6d9..c144f78e1 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -109,10 +109,10 @@ class pkgDPkgPM : public pkgPackageManager
void DoDpkgStatusFd(int statusfd);
void ProcessDpkgStatusLine(char *line);
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
- void DoDpkgStatusFd(int statusfd, int unused) {
+ void DoDpkgStatusFd(int statusfd, int /*unused*/) {
DoDpkgStatusFd(statusfd);
}
- void ProcessDpkgStatusLine(int unused, char *line) {
+ void ProcessDpkgStatusLine(int /*unused*/, char *line) {
ProcessDpkgStatusLine(line);
}
#endif
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 946c1e254..b45f5d9b5 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -222,7 +222,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/
return true;
}
/*}}}*/
-bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/
+bool pkgDepCache::writeStateFile(OpProgress * /*prog*/, bool InstalledOnly) /*{{{*/
{
bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false);
@@ -868,7 +868,7 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
return IsDeleteOkProtectInstallRequests(Pkg, rPurge, Depth, FromUser);
}
bool pkgDepCache::IsDeleteOkProtectInstallRequests(PkgIterator const &Pkg,
- bool const rPurge, unsigned long const Depth, bool const FromUser)
+ bool const /*rPurge*/, unsigned long const Depth, bool const FromUser)
{
if (FromUser == false && Pkg->CurrentVer == 0)
{
@@ -1297,7 +1297,7 @@ bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst,
return IsInstallOkMultiArchSameVersionSynced(Pkg,AutoInst, Depth, FromUser);
}
bool pkgDepCache::IsInstallOkMultiArchSameVersionSynced(PkgIterator const &Pkg,
- bool const AutoInst, unsigned long const Depth, bool const FromUser)
+ bool const /*AutoInst*/, unsigned long const Depth, bool const FromUser)
{
if (FromUser == true) // as always: user is always right
return true;
@@ -1685,9 +1685,9 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator const &Dep)
}
/*}}}*/
// Policy::GetPriority - Get the priority of the package pin /*{{{*/
-signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const &Pkg)
+signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const &/*Pkg*/)
{ return 0; }
-signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const &File)
+signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const &/*File*/)
{ return 0; }
/*}}}*/
pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc() /*{{{*/
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index a02a86b87..50f810806 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -61,7 +61,7 @@ class pkgDepCache : protected pkgCache::Namespace
class InRootSetFunc
{
public:
- virtual bool InRootSet(const pkgCache::PkgIterator &pkg) {return false;};
+ virtual bool InRootSet(const pkgCache::PkgIterator &/*pkg*/) {return false;};
virtual ~InRootSetFunc() {};
};
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index e90598392..dbd2dba46 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -44,7 +44,7 @@ bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress)
for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver, ++p)
{
WriteScenarioVersion(Cache, output, Pkg, Ver);
- WriteScenarioDependency(Cache, output, Pkg, Ver);
+ WriteScenarioDependency(output, Ver);
fprintf(output, "\n");
if (Progress != NULL && p % 100 == 0)
Progress->Progress(p);
@@ -64,7 +64,7 @@ bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
{
WriteScenarioVersion(Cache, output, Pkg, Ver);
- WriteScenarioLimitedDependency(Cache, output, Pkg, Ver, pkgset);
+ WriteScenarioLimitedDependency(output, Ver, pkgset);
fprintf(output, "\n");
if (Progress != NULL && p % 100 == 0)
Progress->Progress(p);
@@ -111,8 +111,7 @@ void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgI
}
/*}}}*/
// EDSP::WriteScenarioDependency /*{{{*/
-void EDSP::WriteScenarioDependency(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
- pkgCache::VerIterator const &Ver)
+void EDSP::WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &Ver)
{
std::string dependencies[pkgCache::Dep::Enhances + 1];
bool orGroup = false;
@@ -148,8 +147,7 @@ void EDSP::WriteScenarioDependency(pkgDepCache &Cache, FILE* output, pkgCache::P
}
/*}}}*/
// EDSP::WriteScenarioLimitedDependency /*{{{*/
-void EDSP::WriteScenarioLimitedDependency(pkgDepCache &Cache, FILE* output,
- pkgCache::PkgIterator const &Pkg,
+void EDSP::WriteScenarioLimitedDependency(FILE* output,
pkgCache::VerIterator const &Ver,
APT::PackageSet const &pkgset)
{
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index fd4436f60..828ee3753 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -35,11 +35,9 @@ class EDSP /*{{{*/
void static WriteScenarioVersion(pkgDepCache &Cache, FILE* output,
pkgCache::PkgIterator const &Pkg,
pkgCache::VerIterator const &Ver);
- void static WriteScenarioDependency(pkgDepCache &Cache, FILE* output,
- pkgCache::PkgIterator const &Pkg,
+ void static WriteScenarioDependency(FILE* output,
pkgCache::VerIterator const &Ver);
- void static WriteScenarioLimitedDependency(pkgDepCache &Cache, FILE* output,
- pkgCache::PkgIterator const &Pkg,
+ void static WriteScenarioLimitedDependency(FILE* output,
pkgCache::VerIterator const &Ver,
APT::PackageSet const &pkgset);
public:
diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc
index 98ce4497a..80b9f79ea 100644
--- a/apt-pkg/edsp/edspindexfile.cc
+++ b/apt-pkg/edsp/edspindexfile.cc
@@ -63,7 +63,7 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
class edspIFType: public pkgIndexFile::Type
{
public:
- virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
+ virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const
{
// we don't have a record parser for this type as the file is not presistent
return NULL;
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index bcfdb1017..37959f37b 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -84,8 +84,8 @@ bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
}
/*}}}*/
// ListParser::LoadReleaseInfo - Load the release information /*{{{*/
-bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
- FileFd &File, std::string component)
+bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator & /*FileI*/,
+ FileFd & /*File*/, std::string /*component*/)
{
return true;
}
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc
index aae969d9d..b509fa001 100644
--- a/apt-pkg/edsp/edspsystem.cc
+++ b/apt-pkg/edsp/edspsystem.cc
@@ -49,7 +49,7 @@ bool edspSystem::Lock()
}
/*}}}*/
// System::UnLock - Drop a lock /*{{{*/
-bool edspSystem::UnLock(bool NoErrors)
+bool edspSystem::UnLock(bool /*NoErrors*/)
{
return true;
}
@@ -58,7 +58,7 @@ bool edspSystem::UnLock(bool NoErrors)
// ---------------------------------------------------------------------
/* we can't use edsp input as input for real installations - just a
simulation can work, but everything else will fail bigtime */
-pkgPackageManager *edspSystem::CreatePM(pkgDepCache *Cache) const
+pkgPackageManager *edspSystem::CreatePM(pkgDepCache * /*Cache*/) const
{
return NULL;
}
@@ -81,7 +81,7 @@ bool edspSystem::Initialize(Configuration &Cnf)
}
/*}}}*/
// System::ArchiveSupported - Is a file format supported /*{{{*/
-bool edspSystem::ArchiveSupported(const char *Type)
+bool edspSystem::ArchiveSupported(const char * /*Type*/)
{
return false;
}
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 38356df18..59afa86ec 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -551,7 +551,7 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/
}
/*}}}*/
bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, /*{{{*/
- vector PkgList,vector SrcList)
+ vector /*PkgList*/,vector /*SrcList*/)
{
if (SigList.empty() == true)
return true;
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 642a750d4..875c80336 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -47,7 +47,7 @@ pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type)
// IndexFile::ArchiveInfo - Stub /*{{{*/
// ---------------------------------------------------------------------
/* */
-std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
+std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator /*Ver*/) const
{
return std::string();
}
@@ -63,8 +63,8 @@ pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const
// IndexFile::SourceIndex - Stub /*{{{*/
// ---------------------------------------------------------------------
/* */
-std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
- pkgSrcRecords::File const &File) const
+std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &/*Record*/,
+ pkgSrcRecords::File const &/*File*/) const
{
return std::string();
}
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index a0096fa34..9a5c74200 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -78,10 +78,10 @@ class pkgIndexFile
virtual bool Exists() const = 0;
virtual bool HasPackages() const = 0;
virtual unsigned long Size() const = 0;
- virtual bool Merge(pkgCacheGenerator &Gen, OpProgress* Prog) const { return false; };
+ virtual bool Merge(pkgCacheGenerator &/*Gen*/, OpProgress* /*Prog*/) const { return false; };
__deprecated virtual bool Merge(pkgCacheGenerator &Gen, OpProgress &Prog) const
{ return Merge(Gen, &Prog); };
- virtual bool MergeFileProvides(pkgCacheGenerator &Gen,OpProgress* Prog) const {return true;};
+ virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/,OpProgress* /*Prog*/) const {return true;};
__deprecated virtual bool MergeFileProvides(pkgCacheGenerator &Gen, OpProgress &Prog) const
{return MergeFileProvides(Gen, &Prog);};
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc
index aec744360..657330b60 100644
--- a/apt-pkg/install-progress.cc
+++ b/apt-pkg/install-progress.cc
@@ -41,10 +41,10 @@ PackageManager* PackageManagerProgressFactory()
return progress;
}
-bool PackageManager::StatusChanged(std::string PackageName,
+bool PackageManager::StatusChanged(std::string /*PackageName*/,
unsigned int StepsDone,
unsigned int TotalSteps,
- std::string HumanReadableAction)
+ std::string /*HumanReadableAction*/)
{
int reporting_steps = _config->FindI("DpkgPM::Reporting-Steps", 1);
percentage = StepsDone/(float)TotalSteps * 100.0;
diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h
index 8bcc32927..baf245376 100644
--- a/apt-pkg/install-progress.h
+++ b/apt-pkg/install-progress.h
@@ -29,7 +29,7 @@ namespace Progress {
virtual ~PackageManager() {};
/* Global Start/Stop */
- virtual void Start(int child_pty=-1) {};
+ virtual void Start(int /*child_pty*/=-1) {};
virtual void Stop() {};
/* When dpkg is invoked (may happen multiple times for each
@@ -48,14 +48,14 @@ namespace Progress {
unsigned int StepsDone,
unsigned int TotalSteps,
std::string HumanReadableAction);
- virtual void Error(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string ErrorMessage) {}
- virtual void ConffilePrompt(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string ConfMessage) {}
+ virtual void Error(std::string /*PackageName*/,
+ unsigned int /*StepsDone*/,
+ unsigned int /*TotalSteps*/,
+ std::string /*ErrorMessage*/) {}
+ virtual void ConffilePrompt(std::string /*PackageName*/,
+ unsigned int /*StepsDone*/,
+ unsigned int /*TotalSteps*/,
+ std::string /*ConfMessage*/) {}
};
class PackageManagerProgressFd : public PackageManager
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h
index 853b9bac8..d684463eb 100644
--- a/apt-pkg/packagemanager.h
+++ b/apt-pkg/packagemanager.h
@@ -89,9 +89,9 @@ class pkgPackageManager : protected pkgCache::Namespace
virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
- virtual bool Go(APT::Progress::PackageManager *progress) {return true;};
+ virtual bool Go(APT::Progress::PackageManager * /*progress*/) {return true;};
#else
- virtual bool Go(int statusFd=-1) {return true;};
+ virtual bool Go(int /*statusFd*/=-1) {return true;};
#endif
virtual void Reset() {};
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 7d57640c5..9c14e626e 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -695,7 +695,7 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End)
// ---------------------------------------------------------------------
/* Deps like self-conflicts should be ignored as well as implicit conflicts
on virtual packages. */
-bool pkgCache::DepIterator::IsIgnorable(PkgIterator const &Pkg) const
+bool pkgCache::DepIterator::IsIgnorable(PkgIterator const &/*Pkg*/) const
{
if (IsNegative() == false)
return false;
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 006f3952b..185b9ca45 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1580,7 +1580,7 @@ static bool IsDuplicateDescription(pkgCache::DescIterator Desc,
}
/*}}}*/
// CacheGenerator::FinishCache /*{{{*/
-bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
+bool pkgCacheGenerator::FinishCache(OpProgress * /*Progress*/)
{
return true;
}
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 428e8459b..e8901025e 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -170,8 +170,8 @@ class pkgCacheGenerator::ListParser
virtual bool Step() = 0;
inline bool HasFileDeps() {return FoundFileDeps;};
- virtual bool CollectFileProvides(pkgCache &Cache,
- pkgCache::VerIterator &Ver) {return true;};
+ virtual bool CollectFileProvides(pkgCache &/*Cache*/,
+ pkgCache::VerIterator &/*Ver*/) {return true;};
ListParser() : FoundFileDeps(false) {};
virtual ~ListParser() {};
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index 3658435e8..ca0984bbf 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -70,7 +70,7 @@ class pkgRecords::Parser /*{{{*/
virtual std::string Homepage() {return std::string();}
// An arbitrary custom field
- virtual std::string RecordField(const char *fieldName) { return std::string();};
+ virtual std::string RecordField(const char * /*fieldName*/) { return std::string();};
// The record in binary form
virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index d0f97441d..2176f1f42 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -349,7 +349,7 @@ signed short pkgPolicy::GetPriority(pkgCache::PkgFileIterator const &File)
all over the place rather than forcing a special format */
class PreferenceSection : public pkgTagSection
{
- void TrimRecord(bool BeforeRecord, const char* &End)
+ void TrimRecord(bool /*BeforeRecord*/, const char* &End)
{
for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r' || Stop[0] == '#'); Stop++)
if (Stop[0] == '#')
diff --git a/apt-pkg/vendor.cc b/apt-pkg/vendor.cc
index fc03ec845..f19534171 100644
--- a/apt-pkg/vendor.cc
+++ b/apt-pkg/vendor.cc
@@ -31,7 +31,7 @@ const std::string Vendor::LookupFingerprint(std::string Print) const
return (*Elt).second;
}
-bool Vendor::CheckDist(std::string Dist)
+bool Vendor::CheckDist(std::string /*Dist*/)
{
return true;
}
diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc
index 66e1600f1..d08ed072f 100644
--- a/apt-private/acqprogress.cc
+++ b/apt-private/acqprogress.cc
@@ -93,7 +93,7 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm)
// AcqTextStatus::Done - Completed a download /*{{{*/
// ---------------------------------------------------------------------
/* We don't display anything... */
-void AcqTextStatus::Done(pkgAcquire::ItemDesc &Itm)
+void AcqTextStatus::Done(pkgAcquire::ItemDesc &/*Itm*/)
{
Update = true;
}
diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h
index 322b3be6b..26c7f1ac2 100644
--- a/apt-private/private-cacheset.h
+++ b/apt-private/private-cacheset.h
@@ -42,8 +42,8 @@ typedef APT::VersionContainer<
class Matcher {
public:
- virtual bool operator () (const pkgCache::PkgIterator &P) {
- return true;};
+ virtual bool operator () (const pkgCache::PkgIterator &/*P*/) {
+ return true;}
};
// FIXME: add default argument for OpProgress (or overloaded function)
@@ -111,8 +111,8 @@ public:
Pkg.FullName(true).c_str(), pattern.c_str());
explicitlyNamed = false;
}
- virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver,
- std::string const &ver, bool const verIsRel) {
+ virtual void showSelectedVersion(pkgCache::PkgIterator const &/*Pkg*/, pkgCache::VerIterator const Ver,
+ std::string const &ver, bool const /*verIsRel*/) {
if (ver == Ver.VerStr())
return;
selectedByRelease.push_back(make_pair(Ver, ver));
diff --git a/apt-private/private-moo.cc b/apt-private/private-moo.cc
index 5d247041d..9c4f6bf15 100644
--- a/apt-private/private-moo.cc
+++ b/apt-private/private-moo.cc
@@ -65,7 +65,7 @@ static bool printMooLine() { /*{{{*/
return true;
}
/*}}}*/
-bool DoMoo1(CommandLine &CmdL) /*{{{*/
+bool DoMoo1(CommandLine &) /*{{{*/
{
// our trustworthy super cow since 2001
if (_config->FindI("quiet") >= 2)
@@ -83,7 +83,7 @@ bool DoMoo1(CommandLine &CmdL) /*{{{*/
return true;
}
/*}}}*/
-bool DoMoo2(CommandLine &CmdL) /*{{{*/
+bool DoMoo2(CommandLine &) /*{{{*/
{
// by Fernando Ribeiro in lp:56125
if (_config->FindI("quiet") >= 2)
@@ -117,7 +117,7 @@ bool DoMoo2(CommandLine &CmdL) /*{{{*/
return true;
}
/*}}}*/
-bool DoMoo3(CommandLine &CmdL) /*{{{*/
+bool DoMoo3(CommandLine &) /*{{{*/
{
// by Robert Millan in deb:134156
if (_config->FindI("quiet") >= 2)
@@ -134,7 +134,7 @@ bool DoMoo3(CommandLine &CmdL) /*{{{*/
return true;
}
/*}}}*/
-bool DoMooApril(CommandLine &CmdL) /*{{{*/
+bool DoMooApril(CommandLine &) /*{{{*/
{
// by Christopher Allan Webber and proposed by Paul Tagliamonte
// in a "Community outreach": https://lists.debian.org/debian-devel/2013/04/msg00045.html
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index dec518392..52f65d794 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -63,7 +63,7 @@ bool InitOutput() /*{{{*/
return true;
}
/*}}}*/
-static std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) /*{{{*/
+static std::string GetArchiveSuite(pkgCacheFile &/*CacheFile*/, pkgCache::VerIterator ver) /*{{{*/
{
std::string suite = "";
if (ver && ver.FileList() && ver.FileList())
@@ -107,14 +107,14 @@ static std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIte
return cand ? cand.VerStr() : "(none)";
}
/*}}}*/
-static std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/
+static std::string GetInstalledVersion(pkgCacheFile &/*CacheFile*/, pkgCache::PkgIterator P)/*{{{*/
{
pkgCache::VerIterator inst = P.CurrentVer();
return inst ? inst.VerStr() : "(none)";
}
/*}}}*/
-static std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)/*{{{*/
+static std::string GetVersion(pkgCacheFile &/*CacheFile*/, pkgCache::VerIterator V)/*{{{*/
{
pkgCache::PkgIterator P = V.ParentPkg();
if (V == P.CurrentVer())
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 7e569f2fc..d50e0c724 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -258,7 +258,7 @@ static bool DumpPackage(CommandLine &CmdL)
// Stats - Dump some nice statistics /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool Stats(CommandLine &Cmd)
+static bool Stats(CommandLine &)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -371,7 +371,7 @@ static bool Stats(CommandLine &Cmd)
// Dump - show everything /*{{{*/
// ---------------------------------------------------------------------
/* This is worthless except fer debugging things */
-static bool Dump(CommandLine &Cmd)
+static bool Dump(CommandLine &)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -423,7 +423,7 @@ static bool Dump(CommandLine &Cmd)
// ---------------------------------------------------------------------
/* This is needed to make dpkg --merge happy.. I spent a bit of time to
make this run really fast, perhaps I went a little overboard.. */
-static bool DumpAvail(CommandLine &Cmd)
+static bool DumpAvail(CommandLine &)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -1388,7 +1388,7 @@ static bool Search(CommandLine &CmdL)
}
/*}}}*/
/* ShowAuto - show automatically installed packages (sorted) {{{*/
-static bool ShowAuto(CommandLine &CmdL)
+static bool ShowAuto(CommandLine &)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -1717,7 +1717,7 @@ static bool Madison(CommandLine &CmdL)
// GenCaches - Call the main cache generator /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool GenCaches(CommandLine &Cmd)
+static bool GenCaches(CommandLine &)
{
OpTextProgress Progress(*_config);
@@ -1728,7 +1728,7 @@ static bool GenCaches(CommandLine &Cmd)
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool ShowHelp(CommandLine &Cmd)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index dc0e050c3..8e1d27e52 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -93,7 +93,7 @@ bool pkgCdromTextStatus::AskCdromName(string &name)
}
-void pkgCdromTextStatus::Update(string text, int current)
+void pkgCdromTextStatus::Update(string text, int /*current*/)
{
if(text.size() > 0)
cout << text << flush;
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index e83c4b64b..26f0ea161 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -78,7 +78,7 @@ static bool DoDump(CommandLine &CmdL)
// ShowHelp - Show the help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index 2b01968e3..a27008233 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -137,7 +137,7 @@ bool DebFile::DoItem(Item &I, int &Fd)
// DebFile::Process examine element in package and copy /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool DebFile::Process(Item &I, const unsigned char *data,
+bool DebFile::Process(Item &/*I*/, const unsigned char *data,
unsigned long size, unsigned long pos)
{
switch (Which)
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 253b2f4a5..9a4eb0881 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -475,7 +475,7 @@ static bool DoMarkAuto(CommandLine &CmdL)
// DoDSelectUpgrade - Do an upgrade by following dselects selections /*{{{*/
// ---------------------------------------------------------------------
/* Follows dselect's selections */
-static bool DoDSelectUpgrade(CommandLine &CmdL)
+static bool DoDSelectUpgrade(CommandLine &)
{
CacheFile Cache;
if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
@@ -551,7 +551,7 @@ static bool DoDSelectUpgrade(CommandLine &CmdL)
// DoClean - Remove download archives /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool DoClean(CommandLine &CmdL)
+static bool DoClean(CommandLine &)
{
std::string const archivedir = _config->FindDir("Dir::Cache::archives");
std::string const pkgcache = _config->FindFile("Dir::cache::pkgcache");
@@ -599,7 +599,7 @@ class LogCleaner : public pkgArchiveCleaner
};
};
-static bool DoAutoClean(CommandLine &CmdL)
+static bool DoAutoClean(CommandLine &)
{
// Lock the archive directory
FileFd Lock;
@@ -696,7 +696,7 @@ static bool DoDownload(CommandLine &CmdL)
// ---------------------------------------------------------------------
/* Opening automatically checks the system, this command is mostly used
for debugging */
-static bool DoCheck(CommandLine &CmdL)
+static bool DoCheck(CommandLine &)
{
CacheFile Cache;
Cache.Open();
@@ -1581,7 +1581,7 @@ static bool DoChangelog(CommandLine &CmdL)
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index d8ea0435a..8ff2fa037 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -55,7 +55,7 @@ static bool DoDownloadFile(CommandLine &CmdL)
return true;
}
-static bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 108e86b9a..0c2ff0f43 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -30,7 +30,7 @@
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool ShowHelp(CommandLine &CmdL) {
+static bool ShowHelp(CommandLine &) {
ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index 1af17cd7a..53b5ec158 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -372,7 +372,7 @@ static bool ShowHold(CommandLine &CmdL)
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 040ed6c25..1b7626948 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -61,7 +61,7 @@
-static bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
{
ioprintf(c1out,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index c28ad5c5c..f13e4648a 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -586,7 +586,7 @@ static void LoadBinDir(vector &PkgList,Configuration &Setup)
// ShowHelp - Show the help text /*{{{*/
// ---------------------------------------------------------------------
/* */
-static bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc
index 80fe6e17e..be4d2a61e 100644
--- a/ftparchive/contents.cc
+++ b/ftparchive/contents.cc
@@ -316,7 +316,7 @@ bool ContentsExtract::Read(debDebFile &Deb)
// ContentsExtract::DoItem - Extract an item /*{{{*/
// ---------------------------------------------------------------------
/* This just tacks the name onto the end of our memory buffer */
-bool ContentsExtract::DoItem(Item &Itm,int &Fd)
+bool ContentsExtract::DoItem(Item &Itm, int &/*Fd*/)
{
unsigned long Len = strlen(Itm.Name);
diff --git a/ftparchive/override.cc b/ftparchive/override.cc
index 82cbc4c19..38d76a6a3 100644
--- a/ftparchive/override.cc
+++ b/ftparchive/override.cc
@@ -129,7 +129,7 @@ bool Override::ReadOverride(string const &File,bool const &Source)
// Override::ReadExtraOverride - Read the extra override file /*{{{*/
// ---------------------------------------------------------------------
/* This parses the extra override file and reads it into the map */
-bool Override::ReadExtraOverride(string const &File,bool const &Source)
+bool Override::ReadExtraOverride(string const &File,bool const &/*Source*/)
{
if (File.empty() == true)
return true;
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index 7ecfe78ed..edc0fddea 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -72,9 +72,9 @@ FTWScanner::FTWScanner(string const &Arch): Arch(Arch)
/*}}}*/
// FTWScanner::Scanner - FTW Scanner /*{{{*/
// ---------------------------------------------------------------------
-/* This is the FTW scanner, it processes each directory element in the
+/* This is the FTW scanner, it processes each directory element in the
directory tree. */
-int FTWScanner::ScannerFTW(const char *File,const struct stat *sb,int Flag)
+int FTWScanner::ScannerFTW(const char *File,const struct stat * /*sb*/,int Flag)
{
if (Flag == FTW_DNR)
{
@@ -951,7 +951,7 @@ bool ContentsWriter::ReadFromPkgs(string const &PkgFile,string const &PkgCompres
// ReleaseWriter::ReleaseWriter - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-ReleaseWriter::ReleaseWriter(string const &DB)
+ReleaseWriter::ReleaseWriter(string const &/*DB*/)
{
if (_config->FindB("APT::FTPArchive::Release::Default-Patterns", true) == true)
{
diff --git a/methods/ftp.cc b/methods/ftp.cc
index 5a87ded1c..4108b2da3 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -1098,7 +1098,7 @@ bool FtpMethod::Fetch(FetchItem *Itm)
}
/*}}}*/
-int main(int argc,const char *argv[])
+int main(int, const char *argv[])
{
setlocale(LC_ALL, "");
diff --git a/methods/gzip.cc b/methods/gzip.cc
index a2844e969..3269ffbb8 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -120,7 +120,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
}
/*}}}*/
-int main(int argc, char *argv[])
+int main(int, char *argv[])
{
setlocale(LC_ALL, "");
diff --git a/methods/https.cc b/methods/https.cc
index b0c7ee71d..041214179 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -83,9 +83,9 @@ HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp)
return size*nmemb;
}
-int
-HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow,
- double ultotal, double ulnow)
+int
+HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
+ double /*ultotal*/, double /*ulnow*/)
{
HttpsMethod *me = (HttpsMethod *)clientp;
if(dltotal > 0 && me->Res.Size == 0) {
@@ -95,7 +95,7 @@ HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow,
}
// HttpsServerState::HttpsServerState - Constructor /*{{{*/
-HttpsServerState::HttpsServerState(URI Srv,HttpsMethod *Owner) : ServerState(Srv, NULL)
+HttpsServerState::HttpsServerState(URI Srv,HttpsMethod * /*Owner*/) : ServerState(Srv, NULL)
{
TimeOut = _config->FindI("Acquire::https::Timeout",TimeOut);
Reset();
diff --git a/methods/https.h b/methods/https.h
index ab0dd3407..3199b29f2 100644
--- a/methods/https.h
+++ b/methods/https.h
@@ -25,23 +25,23 @@ class FileFd;
class HttpsServerState : public ServerState
{
protected:
- virtual bool ReadHeaderLines(std::string &Data) { return false; }
- virtual bool LoadNextResponse(bool const ToFile, FileFd * const File) { return false; }
+ virtual bool ReadHeaderLines(std::string &/*Data*/) { return false; }
+ virtual bool LoadNextResponse(bool const /*ToFile*/, FileFd * const /*File*/) { return false; }
public:
- virtual bool WriteResponse(std::string const &Data) { return false; }
+ virtual bool WriteResponse(std::string const &/*Data*/) { return false; }
/** \brief Transfer the data from the socket */
- virtual bool RunData(FileFd * const File) { return false; }
+ virtual bool RunData(FileFd * const /*File*/) { return false; }
virtual bool Open() { return false; }
virtual bool IsOpen() { return false; }
virtual bool Close() { return false; }
- virtual bool InitHashes(FileFd &File) { return false; }
+ virtual bool InitHashes(FileFd &/*File*/) { return false; }
virtual Hashes * GetHashes() { return NULL; }
- virtual bool Die(FileFd &File) { return false; }
- virtual bool Flush(FileFd * const File) { return false; }
- virtual bool Go(bool ToFile, FileFd * const File) { return false; }
+ virtual bool Die(FileFd &/*File*/) { return false; }
+ virtual bool Flush(FileFd * const /*File*/) { return false; }
+ virtual bool Go(bool /*ToFile*/, FileFd * const /*File*/) { return false; }
HttpsServerState(URI Srv, HttpsMethod *Owner);
virtual ~HttpsServerState() {Close();};
diff --git a/methods/mirror.cc b/methods/mirror.cc
index 977eddcf5..b30636758 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -132,7 +132,7 @@ bool MirrorMethod::Clean(string Dir)
}
-bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str)
+bool MirrorMethod::DownloadMirrorFile(string /*mirror_uri_str*/)
{
// not that great to use pkgAcquire here, but we do not have
// any other way right now
diff --git a/methods/rsh.cc b/methods/rsh.cc
index f065f6b89..8088cac38 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -390,7 +390,7 @@ bool RSHMethod::Configuration(std::string Message)
// RSHMethod::SigTerm - Clean up and timestamp the files on exit /*{{{*/
// ---------------------------------------------------------------------
/* */
-void RSHMethod::SigTerm(int sig)
+void RSHMethod::SigTerm(int)
{
if (FailFd == -1)
_exit(100);
@@ -519,7 +519,7 @@ bool RSHMethod::Fetch(FetchItem *Itm)
}
/*}}}*/
-int main(int argc, const char *argv[])
+int main(int, const char *argv[])
{
setlocale(LC_ALL, "");
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc
index 89375af13..9520d1b50 100644
--- a/test/interactive-helper/testdeb.cc
+++ b/test/interactive-helper/testdeb.cc
@@ -6,7 +6,7 @@
class NullStream : public pkgDirStream
{
public:
- virtual bool DoItem(Item &Itm,int &Fd) {return true;};
+ virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) {return true;};
};
static bool Test(const char *File)
@@ -33,6 +33,11 @@ static bool Test(const char *File)
int main(int argc, const char *argv[])
{
+ if (argc != 2) {
+ std::cout << "One parameter expected - given " << argc << std::endl;
+ return 100;
+ }
+
Test(argv[1]);
_error->DumpErrors();
return 0;
diff --git a/test/libapt/cdromreducesourcelist_test.cc b/test/libapt/cdromreducesourcelist_test.cc
index 729da23a6..b0314769d 100644
--- a/test/libapt/cdromreducesourcelist_test.cc
+++ b/test/libapt/cdromreducesourcelist_test.cc
@@ -15,7 +15,7 @@ public:
}
};
-int main(int argc, char const *argv[]) {
+int main() {
Cdrom cd;
std::vector List;
std::string CD("/media/cdrom/");
diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc
index 957e905d5..d2efc1b4b 100644
--- a/test/libapt/configuration_test.cc
+++ b/test/libapt/configuration_test.cc
@@ -5,7 +5,7 @@
#include "assert.h"
-int main(int argc,const char *argv[]) {
+int main() {
Configuration Cnf;
std::vector fds;
diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc
index 462bdefd9..d256ea55a 100644
--- a/test/libapt/fileutl_test.cc
+++ b/test/libapt/fileutl_test.cc
@@ -10,7 +10,7 @@
#include
-int main(int argc,char *argv[])
+int main()
{
std::vector files;
diff --git a/test/libapt/getarchitectures_test.cc b/test/libapt/getarchitectures_test.cc
index 807469263..508d5e458 100644
--- a/test/libapt/getarchitectures_test.cc
+++ b/test/libapt/getarchitectures_test.cc
@@ -7,7 +7,7 @@
#include
-int main(int argc,char *argv[])
+int main()
{
std::vector vec;
diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc
index b6939231d..742fa53bd 100644
--- a/test/libapt/globalerror_test.cc
+++ b/test/libapt/globalerror_test.cc
@@ -5,7 +5,7 @@
#include
#include
-int main(int argc,char *argv[])
+int main()
{
std::string const textOfErrnoZero(strerror(0));
diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc
index 3da89052b..410e2c44d 100644
--- a/test/libapt/hashsums_test.cc
+++ b/test/libapt/hashsums_test.cc
@@ -43,6 +43,11 @@ template void TestMill(const char *Out)
int main(int argc, char** argv)
{
+ if (argc != 6) {
+ std::cout << "Five parameter expected - given " << argc << std::endl;
+ return 100;
+ }
+
// test HashSumValue which doesn't calculate but just stores sums
{
string md5sum = argv[2];
diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc
index 67dbab823..5a2c65573 100644
--- a/test/libapt/parsedepends_test.cc
+++ b/test/libapt/parsedepends_test.cc
@@ -3,7 +3,7 @@
#include "assert.h"
-int main(int argc,char *argv[]) {
+int main() {
std::string Package;
std::string Version;
unsigned int Op = 5;
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index e79b6d65e..0637df03b 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -19,7 +19,7 @@ static void remove_tmpfile(void)
}
}
-int main(int argc, char *argv[])
+int main()
{
_config->Set("APT::Sources::Use-Deb822", true);
diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc
index 8215654d0..a4516e7a1 100644
--- a/test/libapt/strutil_test.cc
+++ b/test/libapt/strutil_test.cc
@@ -2,7 +2,7 @@
#include "assert.h"
-int main(int argc,char *argv[])
+int main()
{
std::string input, output, expected;
diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc
index effc3244b..24f258275 100644
--- a/test/libapt/tagfile_test.cc
+++ b/test/libapt/tagfile_test.cc
@@ -19,7 +19,7 @@ static void remove_tmpfile(void)
}
}
-int main(int argc, char *argv[])
+int main()
{
FileFd fd;
const char contents[] = "FieldA-12345678: the value of the field";
--
cgit v1.2.3-70-g09d2
From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001
From: David Kalnischkies
Date: Wed, 5 Mar 2014 22:11:25 +0100
Subject: cleanup headers and especially #includes everywhere
Beside being a bit cleaner it hopefully also resolves oddball problems
I have with high levels of parallel jobs.
Git-Dch: Ignore
Reported-By: iwyu (include-what-you-use)
---
apt-inst/contrib/arfile.cc | 4 +-
apt-inst/contrib/extracttar.cc | 6 ++-
apt-inst/deb/debfile.cc | 12 +++--
apt-inst/deb/debfile.h | 6 ++-
apt-inst/dirstream.cc | 1 -
apt-inst/extract.cc | 9 +++-
apt-inst/extract.h | 5 +-
apt-inst/filelist.cc | 2 -
apt-pkg/acquire-item.cc | 15 ++++--
apt-pkg/acquire-item.h | 4 ++
apt-pkg/acquire-method.cc | 12 ++++-
apt-pkg/acquire-method.h | 1 +
apt-pkg/acquire-worker.cc | 7 ++-
apt-pkg/acquire-worker.h | 3 ++
apt-pkg/acquire.cc | 6 +++
apt-pkg/acquire.h | 7 ++-
apt-pkg/algorithms.cc | 13 +++--
apt-pkg/algorithms.h | 5 +-
apt-pkg/aptconfiguration.cc | 9 +++-
apt-pkg/cachefile.cc | 9 +++-
apt-pkg/cachefile.h | 9 +++-
apt-pkg/cachefilter.cc | 4 +-
apt-pkg/cachefilter.h | 1 +
apt-pkg/cacheiterators.h | 4 ++
apt-pkg/cacheset.cc | 16 ++++--
apt-pkg/cacheset.h | 7 ++-
apt-pkg/cdrom.cc | 34 ++++++------
apt-pkg/cdrom.h | 2 +
apt-pkg/clean.cc | 4 ++
apt-pkg/clean.h | 7 ++-
apt-pkg/contrib/cdromutl.cc | 5 +-
apt-pkg/contrib/cmndline.cc | 5 ++
apt-pkg/contrib/configuration.cc | 13 +++--
apt-pkg/contrib/error.cc | 4 +-
apt-pkg/contrib/error.h | 27 +++++-----
apt-pkg/contrib/fileutl.cc | 12 +++--
apt-pkg/contrib/fileutl.h | 11 ++--
apt-pkg/contrib/gpgv.cc | 18 ++++---
apt-pkg/contrib/gpgv.h | 14 +++--
apt-pkg/contrib/hashes.cc | 6 ++-
apt-pkg/contrib/hashes.h | 13 +++--
apt-pkg/contrib/hashsum.cc | 3 ++
apt-pkg/contrib/hashsum_template.h | 10 ++--
apt-pkg/contrib/macros.h | 8 +--
apt-pkg/contrib/md5.cc | 6 +--
apt-pkg/contrib/md5.h | 9 ++--
apt-pkg/contrib/mmap.cc | 4 +-
apt-pkg/contrib/netrc.cc | 3 +-
apt-pkg/contrib/netrc.h | 6 ++-
apt-pkg/contrib/progress.cc | 2 +
apt-pkg/contrib/sha1.cc | 5 +-
apt-pkg/contrib/sha1.h | 7 +--
apt-pkg/contrib/sha2.h | 10 ++--
apt-pkg/contrib/sha2_internal.cc | 1 +
apt-pkg/contrib/sha2_internal.h | 1 +
apt-pkg/contrib/strutl.cc | 9 +++-
apt-pkg/contrib/strutl.h | 23 +++++----
apt-pkg/deb/debindexfile.cc | 14 ++++-
apt-pkg/deb/debindexfile.h | 10 +++-
apt-pkg/deb/deblistparser.cc | 9 ++++
apt-pkg/deb/deblistparser.h | 7 +++
apt-pkg/deb/debmetaindex.cc | 11 +++-
apt-pkg/deb/debmetaindex.h | 8 ++-
apt-pkg/deb/debrecords.cc | 8 ++-
apt-pkg/deb/debrecords.h | 3 ++
apt-pkg/deb/debsrcrecords.cc | 11 +++-
apt-pkg/deb/debsrcrecords.h | 7 ++-
apt-pkg/deb/debsystem.cc | 9 +++-
apt-pkg/deb/debsystem.h | 10 +++-
apt-pkg/deb/debversion.cc | 2 +
apt-pkg/deb/debversion.h | 6 +--
apt-pkg/deb/dpkgpm.cc | 52 ++++++++++---------
apt-pkg/deb/dpkgpm.h | 13 ++++-
apt-pkg/depcache.cc | 14 +++--
apt-pkg/depcache.h | 12 ++++-
apt-pkg/edsp.cc | 17 ++++--
apt-pkg/edsp.h | 5 +-
apt-pkg/edsp/edspindexfile.cc | 17 +++---
apt-pkg/edsp/edspindexfile.h | 4 ++
apt-pkg/edsp/edsplistparser.cc | 10 ++--
apt-pkg/edsp/edsplistparser.h | 4 ++
apt-pkg/edsp/edspsystem.cc | 15 +++---
apt-pkg/edsp/edspsystem.h | 9 ++++
apt-pkg/indexcopy.cc | 6 +--
apt-pkg/indexcopy.h | 10 ++--
apt-pkg/indexfile.cc | 10 +++-
apt-pkg/indexfile.h | 15 +++---
apt-pkg/indexrecords.cc | 7 ++-
apt-pkg/indexrecords.h | 6 ++-
apt-pkg/init.cc | 4 +-
apt-pkg/init.h | 2 +
apt-pkg/install-progress.cc | 30 ++++++-----
apt-pkg/metaindex.h | 15 ++++--
apt-pkg/orderlist.cc | 6 ++-
apt-pkg/orderlist.h | 6 ++-
apt-pkg/packagemanager.cc | 11 +++-
apt-pkg/packagemanager.h | 12 +++--
apt-pkg/pkgcache.cc | 7 ++-
apt-pkg/pkgcachegen.cc | 20 ++++---
apt-pkg/pkgcachegen.h | 12 +++--
apt-pkg/pkgrecords.cc | 6 ++-
apt-pkg/pkgrecords.h | 3 +-
apt-pkg/pkgsystem.cc | 1 -
apt-pkg/pkgsystem.h | 2 +-
apt-pkg/policy.cc | 10 +++-
apt-pkg/policy.h | 5 +-
apt-pkg/sourcelist.cc | 11 +++-
apt-pkg/sourcelist.h | 12 ++++-
apt-pkg/srcrecords.cc | 7 ++-
apt-pkg/tagfile.cc | 2 +
apt-pkg/update.cc | 23 +++------
apt-pkg/upgrade.cc | 19 +++----
apt-pkg/upgrade.h | 2 +
apt-pkg/vendor.cc | 8 ++-
apt-pkg/vendor.h | 2 +-
apt-pkg/vendorlist.cc | 9 +++-
apt-pkg/vendorlist.h | 2 +-
apt-pkg/version.cc | 2 +-
apt-pkg/versionmatch.cc | 7 ++-
apt-pkg/versionmatch.h | 3 +-
apt-private/acqprogress.cc | 5 +-
apt-private/private-cachefile.cc | 12 +++--
apt-private/private-cachefile.h | 2 +
apt-private/private-cacheset.cc | 13 ++++-
apt-private/private-cacheset.h | 15 ++++++
apt-private/private-cmndline.cc | 6 +--
apt-private/private-download.cc | 6 +--
apt-private/private-download.h | 2 +-
apt-private/private-install.cc | 68 ++++++++++--------------
apt-private/private-install.h | 18 ++++++-
apt-private/private-list.cc | 43 +++++-----------
apt-private/private-list.h | 2 +-
apt-private/private-main.cc | 12 +++--
apt-private/private-main.h | 3 +-
apt-private/private-moo.cc | 12 +++--
apt-private/private-output.cc | 14 +++--
apt-private/private-output.h | 5 +-
apt-private/private-search.cc | 44 ++++++----------
apt-private/private-search.h | 2 +-
apt-private/private-show.cc | 40 +++++++-------
apt-private/private-show.h | 2 +-
apt-private/private-sources.cc | 21 ++++++--
apt-private/private-sources.h | 7 ++-
apt-private/private-update.cc | 39 +++++---------
apt-private/private-upgrade.cc | 18 ++++---
apt-private/private-upgrade.h | 4 +-
apt-private/private-utils.cc | 8 +--
apt-private/private-utils.h | 2 -
buildlib/apti18n.h.in | 3 +-
buildlib/config.h.in | 1 +
cmdline/acqprogress.cc | 2 +
cmdline/apt-cache.cc | 51 ++++++++++--------
cmdline/apt-cdrom.cc | 9 +---
cmdline/apt-config.cc | 2 +-
cmdline/apt-dump-solver.cc | 6 ++-
cmdline/apt-extracttemplates.cc | 9 ++--
cmdline/apt-extracttemplates.h | 3 +-
cmdline/apt-get.cc | 83 +++++++++++++++---------------
cmdline/apt-helper.cc | 12 ++---
cmdline/apt-internal-solver.cc | 10 +++-
cmdline/apt-mark.cc | 29 +++++++----
cmdline/apt-sortpkgs.cc | 6 +--
cmdline/apt.cc | 40 +++-----------
ftparchive/apt-ftparchive.cc | 17 ++++--
ftparchive/cachedb.cc | 4 ++
ftparchive/cachedb.h | 8 +--
ftparchive/contents.cc | 3 +-
ftparchive/contents.h | 8 +--
ftparchive/multicompress.cc | 6 ++-
ftparchive/multicompress.h | 3 +-
ftparchive/override.cc | 3 ++
ftparchive/writer.cc | 25 ++++++---
ftparchive/writer.h | 4 +-
methods/cdrom.cc | 4 +-
methods/connect.cc | 2 +-
methods/copy.cc | 3 +-
methods/file.cc | 3 +-
methods/ftp.cc | 5 ++
methods/ftp.h | 2 +
methods/gpgv.cc | 16 +++---
methods/gzip.cc | 14 ++---
methods/http.cc | 13 ++---
methods/http.h | 4 ++
methods/http_main.cc | 5 --
methods/https.cc | 9 ++--
methods/https.h | 7 ++-
methods/mirror.cc | 10 ++--
methods/mirror.h | 2 +
methods/rred.cc | 5 +-
methods/rsh.cc | 4 ++
methods/rsh.h | 2 +
methods/server.cc | 27 ++++------
methods/server.h | 3 ++
test/interactive-helper/aptwebserver.cc | 34 ++++++------
test/interactive-helper/extract-control.cc | 3 ++
test/interactive-helper/mthdcat.cc | 2 +
test/interactive-helper/rpmver.cc | 2 +
test/interactive-helper/test_udevcdrom.cc | 8 +--
test/interactive-helper/testdeb.cc | 7 +++
test/libapt/cdromfindpackages_test.cc | 4 ++
test/libapt/cdromreducesourcelist_test.cc | 4 +-
test/libapt/commandline_test.cc | 3 ++
test/libapt/commandlineasstring_test.cc | 2 +
test/libapt/compareversion_test.cc | 9 ++--
test/libapt/configuration_test.cc | 2 +
test/libapt/fileutl_test.cc | 7 ++-
test/libapt/getarchitectures_test.cc | 5 +-
test/libapt/getlanguages_test.cc | 2 +
test/libapt/getlistoffilesindir_test.cc | 7 +--
test/libapt/globalerror_test.cc | 6 ++-
test/libapt/hashsums_test.cc | 15 +++---
test/libapt/indexcopytosourcelist_test.cc | 9 ++--
test/libapt/parsedepends_test.cc | 6 +++
test/libapt/sourcelist_test.cc | 9 +++-
test/libapt/strutil_test.cc | 7 ++-
test/libapt/tagfile_test.cc | 6 ++-
test/libapt/uri_test.cc | 4 ++
217 files changed, 1348 insertions(+), 788 deletions(-)
(limited to 'test/libapt')
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index 77dbc55d6..905110781 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -21,7 +21,9 @@
#include
#include
-#include
+#include
+#include
+#include
#include
/*}}}*/
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index 41c509809..0ba3f0521 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -23,9 +23,11 @@
#include
#include
#include
-#include
+#include
-#include
+#include
+#include
+#include
#include
#include
#include
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc
index 8684f03f7..3803329fa 100644
--- a/apt-inst/deb/debfile.cc
+++ b/apt-inst/deb/debfile.cc
@@ -21,11 +21,17 @@
#include
#include
#include
-#include
#include
-
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
#include
-#include
+
#include
/*}}}*/
diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h
index ecef71d21..880bcf6c5 100644
--- a/apt-inst/deb/debfile.h
+++ b/apt-inst/deb/debfile.h
@@ -27,11 +27,15 @@
#include
#include
#include
-#include
+
+#include
#ifndef APT_8_CLEANER_HEADERS
#include
#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include
+#endif
class FileFd;
diff --git a/apt-inst/dirstream.cc b/apt-inst/dirstream.cc
index 085a0dcbf..39ebb3bb4 100644
--- a/apt-inst/dirstream.cc
+++ b/apt-inst/dirstream.cc
@@ -18,7 +18,6 @@
#include
#include
-#include
#include
#include
#include
diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc
index 60edc702e..b2956d91d 100644
--- a/apt-inst/extract.cc
+++ b/apt-inst/extract.cc
@@ -50,13 +50,20 @@
#include
#include
#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
#include
-#include
#include
#include
#include
+
#include
/*}}}*/
using namespace std;
diff --git a/apt-inst/extract.h b/apt-inst/extract.h
index 7143fa409..8ad9ac629 100644
--- a/apt-inst/extract.h
+++ b/apt-inst/extract.h
@@ -17,11 +17,12 @@
#ifndef PKGLIB_EXTRACT_H
#define PKGLIB_EXTRACT_H
-
-
#include
#include
#include
+#include
+
+#include
class pkgExtract : public pkgDirStream
{
diff --git a/apt-inst/filelist.cc b/apt-inst/filelist.cc
index defc4f4df..b4a4f3d9d 100644
--- a/apt-inst/filelist.cc
+++ b/apt-inst/filelist.cc
@@ -39,8 +39,6 @@
#include
#include
-#include
-#include
#include
#include
#include
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 3b22743e7..44a1f32df 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -22,12 +22,21 @@
#include
#include
#include
-#include
#include
#include
#include
-#include
-
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
#include
#include
#include
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 0524743c6..f48d2a0d7 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -24,6 +24,10 @@
#include
#include
#include
+#include
+
+#include
+#include
#ifndef APT_8_CLEANER_HEADERS
#include
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index 5bc1c159a..746c553f1 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -23,10 +23,18 @@
#include
#include
#include
-
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
#include
#include
-#include
/*}}}*/
using namespace std;
diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h
index 00f99e0a0..f0f2a537a 100644
--- a/apt-pkg/acquire-method.h
+++ b/apt-pkg/acquire-method.h
@@ -21,6 +21,7 @@
#define PKGLIB_ACQUIRE_METHOD_H
#include
+#include
#include
#include
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index de62080da..047a655ce 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -14,20 +14,23 @@
// Include Files /*{{{*/
#include
+#include
#include
#include
#include