std::map<char const * const, std::pair<char const * const, bool> > mapping;
#define APT_PLUSMINUS(X, Y) \
mapping.insert(std::make_pair(X, std::make_pair(Y, true))); \
- mapping.insert(std::make_pair(X "Add", std::make_pair(Y "+", true))); \
- mapping.insert(std::make_pair(X "Remove", std::make_pair(Y "-", true)))
+ mapping.insert(std::make_pair(X "-Add", std::make_pair(Y "+", true))); \
+ mapping.insert(std::make_pair(X "-Remove", std::make_pair(Y "-", true)))
APT_PLUSMINUS("Architectures", "arch");
APT_PLUSMINUS("Languages", "lang");
APT_PLUSMINUS("Targets", "target");
/* Returns: the number of stanzas parsed*/
bool pkgSourceList::ParseFileDeb822(string const &File)
{
- pkgUserTagSection Tags;
unsigned int i = 1;
// see if we can read the file
FileFd Fd(File, FileFd::ReadOnly);
- pkgTagFile Sources(&Fd);
+ pkgTagFile Sources(&Fd, pkgTagFile::SUPPORT_COMMENTS);
if (Fd.IsOpen() == false || Fd.Failed())
return _error->Error(_("Malformed stanza %u in source list %s (type)"),i,File.c_str());
// read step by step
+ pkgTagSection Tags;
while (Sources.Step(Tags) == true)
{
if(Tags.Exists("Types") == false)