aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-19 00:35:53 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-19 00:35:53 +0000
commit8d8065fe61a6cd21f5d3012afc11e3a97c32d283 (patch)
treea2dc1a6ebb79c83b276841c400d12e5379c62e4e
parent7963b14a0642e096368210ebafab81bca0870971 (diff)
downloadpaludis-8d8065fe61a6cd21f5d3012afc11e3a97c32d283.tar.gz
paludis-8d8065fe61a6cd21f5d3012afc11e3a97c32d283.tar.xz
Allow bin_uri prefixing. Fixes: ticket:92
-rw-r--r--paludis/repositories/gentoo/ebin_entries.cc2
-rw-r--r--paludis/repositories/gentoo/make_ebin_repository.cc5
-rw-r--r--paludis/repositories/gentoo/make_ebuild_repository.cc1
-rw-r--r--paludis/repositories/gentoo/portage_repository_params.sr1
4 files changed, 8 insertions, 1 deletions
diff --git a/paludis/repositories/gentoo/ebin_entries.cc b/paludis/repositories/gentoo/ebin_entries.cc
index b424977..95087d2 100644
--- a/paludis/repositories/gentoo/ebin_entries.cc
+++ b/paludis/repositories/gentoo/ebin_entries.cc
@@ -407,7 +407,7 @@ EbinEntries::merge(const MergeOptions & m)
stringify(m.package.name.package) + "-" +
stringify(m.package.version) + ".tar.bz2"));
- ebin_file << "BIN_URI=" << pkg_file_name.basename() << std::endl;
+ ebin_file << "BIN_URI=" << _imp->params.write_bin_uri_prefix << pkg_file_name.basename() << std::endl;
if (pkg_file_name.exists())
pkg_file_name.unlink();
diff --git a/paludis/repositories/gentoo/make_ebin_repository.cc b/paludis/repositories/gentoo/make_ebin_repository.cc
index ba9bcbf..e5a4a7c 100644
--- a/paludis/repositories/gentoo/make_ebin_repository.cc
+++ b/paludis/repositories/gentoo/make_ebin_repository.cc
@@ -116,6 +116,10 @@ paludis::make_ebin_repository(
if (m->end() != m->find("sync"))
sync = m->find("sync")->second;
+ std::string write_bin_uri_prefix;
+ if (m->end() != m->find("write_bin_uri_prefix"))
+ write_bin_uri_prefix = m->find("write_bin_uri_prefix")->second;
+
std::string sync_options;
if (m->end() != m->find("sync_options"))
sync_options = m->find("sync_options")->second;
@@ -151,6 +155,7 @@ paludis::make_ebin_repository(
.sync_options(sync_options)
.master_repository(master_repository)
.enable_destinations(true)
+ .write_bin_uri_prefix(write_bin_uri_prefix)
.buildroot(buildroot)));
}
diff --git a/paludis/repositories/gentoo/make_ebuild_repository.cc b/paludis/repositories/gentoo/make_ebuild_repository.cc
index 13d882b..8206227 100644
--- a/paludis/repositories/gentoo/make_ebuild_repository.cc
+++ b/paludis/repositories/gentoo/make_ebuild_repository.cc
@@ -183,6 +183,7 @@ paludis::make_ebuild_repository(
.sync_options(sync_options)
.master_repository(master_repository)
.enable_destinations(false)
+ .write_bin_uri_prefix("")
.buildroot(buildroot)));
}
diff --git a/paludis/repositories/gentoo/portage_repository_params.sr b/paludis/repositories/gentoo/portage_repository_params.sr
index 09b9495..d6f5db3 100644
--- a/paludis/repositories/gentoo/portage_repository_params.sr
+++ b/paludis/repositories/gentoo/portage_repository_params.sr
@@ -21,6 +21,7 @@ make_class_PortageRepositoryParams()
key buildroot FSEntry
key master_repository "std::tr1::shared_ptr<const PortageRepository>"
key enable_destinations bool
+ key write_bin_uri_prefix std::string
doxygen_comment << "END"
/**