1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 0007-preferences-dir.dpatch by <Rolf Leggewie <foss@rolf.leggewie.biz>>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Support preferences.d directory.
6
## DP: Author: Tim Retout <diocles@debian.org>
7
## DP: Bug-Debian: http://bugs.debian.org/557580
11
--- aptitude-0.6.3.orig/src/cmdline/cmdline_do_action.cc
12
+++ aptitude-0.6.3/src/cmdline/cmdline_do_action.cc
13
@@ -200,6 +200,7 @@ int cmdline_do_action(int argc, char *ar
15
pkgPolicy policy(&(*apt_cache_file)->GetCache());
19
pkgset to_upgrade, to_install, to_hold, to_remove, to_purge;
21
--- aptitude-0.6.3.orig/src/generic/apt/aptcache.cc
22
+++ aptitude-0.6.3/src/generic/apt/aptcache.cc
23
@@ -2179,7 +2179,7 @@ bool aptitudeCacheFile::Open(OpProgress
24
Policy=new aptitudePolicy(Cache);
25
if(_error->PendingError())
27
- if(!ReadPinFile(*Policy))
28
+ if(ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false)
31
DCache=new aptitudeDepCache(Cache, Policy);
32
--- aptitude-0.6.3.orig/src/generic/apt/dump_packages.cc
33
+++ aptitude-0.6.3/src/generic/apt/dump_packages.cc
34
@@ -744,6 +744,7 @@ namespace aptitude
36
// $(Dir::Etc::parts)/*
37
// $(Dir::Etc::preferences)
38
+ // $(Dir::Etc::preferencesparts)/*
40
// Dir::State::* are truncated copies; the others are copied
42
@@ -837,6 +838,12 @@ namespace aptitude
43
copy_truncated(preferences, outDir + "/" + preferences,
48
+ const std::string preferencesParts = _config->FindDir("Dir::Etc::preferencesparts");
49
+ if(!preferencesParts.empty())
50
+ recursive_copy_dir(preferencesParts, outDir + "/" + preferencesParts);
54
void dump_truncated_packages(const std::set<pkgCache::PkgIterator> &packages,