tags 557580 patch thanks I have built a package with the following patch, and it seems to work. I would appreciate some code review from someone with experience of the aptitude code base.
(I haven't checked what calls the dump_packages.cc code, but it seemed
like a good idea to update that as well.)
If I don't hear anything by the time I've convinced myself the patch is
correct, I'll upload a delayed NMU for this bug and #594505.
--- aptitude-0.6.3.orig/src/generic/apt/aptcache.cc
+++ aptitude-0.6.3/src/generic/apt/aptcache.cc
@@ -2179,7 +2179,7 @@ bool aptitudeCacheFile::Open(OpProgress
Policy=new aptitudePolicy(Cache);
if(_error->PendingError())
return false;
- if(!ReadPinFile(*Policy))
+ if(ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false)
return false;
DCache=new aptitudeDepCache(Cache, Policy);
--- aptitude-0.6.3.orig/src/generic/apt/dump_packages.cc
+++ aptitude-0.6.3/src/generic/apt/dump_packages.cc
@@ -744,6 +744,7 @@ namespace aptitude
// $(Dir::Etc::main)
// $(Dir::Etc::parts)/*
// $(Dir::Etc::preferences)
+ // $(Dir::Etc::preferencesparts)/*
//
// Dir::State::* are truncated copies; the others are copied
// literally.
@@ -837,6 +838,12 @@ namespace aptitude
copy_truncated(preferences, outDir + "/" + preferences,
visited_packages);
}
+
+ {
+ const std::string preferencesParts =
_config->FindDir("Dir::Etc::preferencesparts");
+ if(!preferencesParts.empty())
+ recursive_copy_dir(preferencesParts, outDir + "/" + preferencesParts);
+ }
}
void dump_truncated_packages(const std::set<pkgCache::PkgIterator>
&packages,
Regards,
--
Tim Retout <[email protected]>
signature.asc
Description: This is a digitally signed message part

