summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorIshan Jayawardena <udeshike@gmail.com>2011-07-08 21:09:25 +0530
committerIshan Jayawardena <udeshike@gmail.com>2011-07-08 21:09:25 +0530
commitad9364e4f0e8a65c2ae16fab9508485e5d915bd2 (patch)
tree3def3ae36d17d140b16614cc50f24f1b357b1d30 /apt-pkg/deb
parent1792371c2700e42a18c934a91442340c4fce7924 (diff)
added support for a 'debdelta' entry in the sources.list file and modified existing implementation of replacement rule.
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debindexfile.cc12
-rw-r--r--apt-pkg/deb/debmetaindex.cc21
2 files changed, 28 insertions, 5 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index 4c8a6719d..4f549b7db 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -176,10 +176,14 @@ debPackagesIndex::debPackagesIndex(string const &URI, string const &Dist, string
bool const &Trusted, string const &Arch) :
pkgIndexFile(Trusted), URI(URI), Dist(Dist), Section(Section), Architecture(Arch)
{
- if (Architecture == "native")
- Architecture = _config->Find("APT::Architecture");
- _config->Set("Aquire::Debdelta::Replace-Rule::URI-Space::"+URI,
- _config->Find("Aquire::Debdelta::Replace-Rule::Replace-URI"));
+ if (Architecture == "native")
+ Architecture = _config->Find("APT::Architecture");
+ string ReplacementItem = "Aquire::Debdelta::Replace-Rule::" + URI;//::URI::URI(URI);
+ string ReplacementDefault = _config->Find("Aquire::Debdelta::Replace-Rule::Default");
+ _config->Set(ReplacementItem, _config->Find(ReplacementItem, ReplacementDefault));
+
+ //std::cerr << "==== Replacement rule: " << ReplacementItem
+ // << " => "<< ReplacementDefault << std::endl;
}
/*}}}*/
// PackagesIndex::ArchiveInfo - Short version of the archive url /*{{{*/
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index a91cc34e9..5c4a591f1 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -425,8 +425,27 @@ class debSLTypeDebSrc : public debSLTypeDebian
{
Name = "deb-src";
Label = "Standard Debian source tree";
- }
+ }
+};
+
+class debSLTypeDebdelta : public debSLTypeDebian
+{
+public:
+
+ bool CreateItem(vector<metaIndex *> &List, string const &URI,
+ string const &Dist, string const &Section,
+ std::map<string, string> const &Options) const
+ {
+ return CreateItemInternal(List, URI, Dist, Section, false, Options);
+ }
+
+ debSLTypeDebdelta()
+ {
+ Name = "debdelta";
+ Label = "Standard Debdelta tree";
+ }
};
debSLTypeDeb _apt_DebType;
debSLTypeDebSrc _apt_DebSrcType;
+debSLTypeDebdelta _apt_DebdeltaType;