Stop = (const char*) memchr(Stop,'\n',End-Stop);
}
};
-
-
+ /*}}}*/
++// ReadPinDir - Load the pin files from this dir into a Policy /*{{{*/
++// ---------------------------------------------------------------------
++/* */
+ bool ReadPinDir(pkgPolicy &Plcy,string Dir)
+ {
+ if (Dir.empty() == true)
+ Dir = _config->FindDir("Dir::Etc::PreferencesParts");
+
+ DIR *D = opendir(Dir.c_str());
+ if (D == 0)
+ return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());
+
+ vector<string> 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);
- }
++
++ List.push_back(File);
++ }
+ closedir(D);
-
++
+ sort(List.begin(),List.end());
+
+ // Read the files
+ for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++)
+ if (ReadPinFile(Plcy, *I) == false)
+ return false;
+ return true;
+ }
-
+ /*}}}*/
// ReadPinFile - Load the pin file into a Policy /*{{{*/
// ---------------------------------------------------------------------
/* I'd like to see the preferences file store more than just pin information
* add Debug::pkgProblemResolver::ShowScores and make the scores
adjustable
* do not write state file in simulate mode (closes: #433007)
- * add hook for auto-install (closes: #470035)
- * support IsAutoInstallOk in the resolver too
+ * add hook for MarkInstall and MarkDelete (closes: #470035)
* fix typo in apt-pkg/acquire.cc which prevents Dl-Limit to work
correctly when downloading from multiple sites (Closes: #534752)
+ * add the various foldmarkers in apt-pkg & cmdline (no code change)
+ * versions with a pin of -1 shouldn't be a candidate (Closes: #355237)
+ * prefer mmap as memory allocator in MMap instead of a static char
+ array which can (at least in theory) grow dynamic
+ * add a segfault handler to MMap to show the Cache-Limit message, which
+ can be deactivated with MMap::SegfaultHandler=false (Closes: 535218)
[ Michael Vogt ]
- * honor the dpkg hold state in AutoInstOk (closes: #64141)
+ * honor the dpkg hold state in new Marker hooks (closes: #64141)
-
+ * debian/apt.cron.daily:
+ - if the timestamp is too far in the future, delete it
-
++
[ Julian Andres Klode ]
* apt-pkg/contrib/configuration.cc: Fix a small memory leak in
ReadConfigFile.