New Weeder Instruction to delete new root
Beginnings of a patch.
Weeder.c(v12) has this code, currently
bool inTbl = this->instrRoots->Get(pkgBuild, /*OUT*/ dummy); bool fresh = (root->ts >= this->keepTime); bool keptRoot = (inTbl || fresh);
That could change something like this:
bool inTbl = this->instrRoots->Get(pkgBuild, /*OUT*/ dummy); bool delNew = this->instrRoots->GetDelNew(pkgBuild, /*OUT*/ dummy); bool fresh = (root->ts >= this->keepTime); bool keptRoot = (inTbl || (fresh && !delNew));
GetDelNew would index the part of instrRoots that specfies the 'x' char as the instruction of what to do. 'x' means delete, even if new.
(KenSchalk) A couple thoughts:
Weeder::instrRoots is defined in RootTbl.H and is a sub-class of the Table template class (a generic hash table) from the basics/generics library. The "Get" member function comes from the base hash table class. It probably makes more sense to add a second such hash table, rather than adding a "GetDelNew" member function.
The tricky part will be figuring out how the '+', '-', and 'x' directives interact to populate the "to be kept" and "delete even if new" tables.
Also, this should really be an RFE in the tracker rather than a wiki page.