From 46e39c8e14dc98045107cfb38af8cecb8a4773b0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 8 Jan 2010 22:28:49 +0100 Subject: * French manpage translation update * spot & fix various typos in all manpages * German manpage translation update * cmdline/apt-cache.cc: - remove translatable marker from the "%4i %s\n" string * buildlib/po4a_manpage.mak: - instruct debiandoc to build files with utf-8 encoding * buildlib/tools.m4: - fix some warning from the buildtools * apt-pkg/acquire-item.cc: - add configuration PDiffs::Limit-options to not download too many or too big patches (Closes: #554349) * debian/control: - let all packages depend on ${misc:Depends} * share/*-archive.gpg: - remove the horrible outdated files. We already depend on the keyring so we don't need to ship our own version * cmdline/apt-key: - errors out if wget is not installed (Closes: #545754) - add --keyring option as we have now possibly many * methods/gpgv.cc: - pass all keyrings (TrustedParts) to gpgv instead of using only one trusted.gpg keyring (Closes: #304846) * methods/https.cc: - finally merge the rest of the patchset from Arnaud Ebalard with the CRL and Issuers options, thanks! (Closes: #485963) --- apt-pkg/policy.cc | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) (limited to 'apt-pkg/policy.cc') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 81fdb0431..393181b6d 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -27,14 +27,12 @@ #include #include #include +#include #include #include - + #include -#include -#include -#include #include #include /*}}}*/ @@ -282,36 +280,7 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir) return true; } - DIR *D = opendir(Dir.c_str()); - if (D == 0) - return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str()); - - vector List; - - for (struct dirent *Ent = readdir(D); Ent != 0; Ent = readdir(D)) - { - if (Ent->d_name[0] == '.') - continue; - - // Skip bad file names ala run-parts - const char *C = Ent->d_name; - for (; *C != 0; C++) - if (isalpha(*C) == 0 && isdigit(*C) == 0 && *C != '_' && *C != '-') - break; - if (*C != 0) - continue; - - // Make sure it is a file and not something else - string File = flCombine(Dir,Ent->d_name); - struct stat St; - if (stat(File.c_str(),&St) != 0 || S_ISREG(St.st_mode) == 0) - continue; - - List.push_back(File); - } - closedir(D); - - sort(List.begin(),List.end()); + vector const List = GetListOfFilesInDir(Dir, "", true); // Read the files for (vector::const_iterator I = List.begin(); I != List.end(); I++) -- cgit v1.2.3 From b39c18596d05cea1b3c0f0445b17080e9a2e4c19 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 23 Jan 2010 00:37:21 +0100 Subject: * apt-pkg/contrib/fileutl.cc: - Fix the newly introduced method GetListOfFilesInDir to not accept every file if no extension is enforced (= restore old behaviour). (Closes: #565213) * apt-pkg/policy.cc: - accept also partfiles with "pref" file extension as valid * apt-pkg/contrib/configuration.cc: - accept also partfiles with "conf" file extension as valid * doc/apt.conf.5.xml: - reorder description and split out syntax - add partfile name convention (Closes: #558348) * doc/apt_preferences.conf.5.xml: - describe partfile name convention also here * apt-pkg/deb/dpkgpm.cc: - don't segfault if term.log file can't be opened. Thanks Sam Brightman for the patch! (Closes: #475770) * doc/*: - replace the per language addendum with a global addendum - add a explanation why translations include (maybe) english parts to the new global addendum (Closes: #561636) * apt-pkg/contrib/strutl.cc: - fix malloc asseration fail with ja_JP.eucJP locale in apt-cache search. Thanks Kusanagi Kouichi! (Closes: #548884) --- apt-pkg/policy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/policy.cc') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 393181b6d..f9901bc9a 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -280,7 +280,7 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir) return true; } - vector const List = GetListOfFilesInDir(Dir, "", true); + vector const List = GetListOfFilesInDir(Dir, "pref", true, true); // Read the files for (vector::const_iterator I = List.begin(); I != List.end(); I++) -- cgit v1.2.3