summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/strutl.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-02-18 11:22:26 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-02-18 11:22:26 +0100
commit5e02df826dc8e1f2a1d687f2cc4e55daba4c5452 (patch)
treeb3f942c5a30818c387ed80e8d8a914c432511038 /apt-pkg/contrib/strutl.cc
parent937bc486b9ce42e144e00467658bd431ef826664 (diff)
Change the package index Info methods to allow apt-cache policy to be
useful when using several different archives on the same host. (Closes: #329814, LP: #22354)
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r--apt-pkg/contrib/strutl.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 2913fbf44..8e8820949 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1323,3 +1323,15 @@ string URI::SiteOnly(const string &URI)
return U;
}
/*}}}*/
+// URI::NoUserPassword - Return the schema, site and path for the URI /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+string URI::NoUserPassword(const string &URI)
+{
+ ::URI U(URI);
+ U.User.clear();
+ U.Password.clear();
+ U.Port = 0;
+ return U;
+}
+ /*}}}*/