[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#329814: patch to change apt-cache policy display to show the path on hosts.



Hope this helps,
Rob
=== modified file 'AUTHORS'
--- AUTHORS	2005-03-07 20:08:33 +0000
+++ AUTHORS	2010-02-18 02:39:30 +0000
@@ -12,6 +12,10 @@
 Michael Vogt <mvo@debian.org>
 - Development and bug fixes
 
+Robert Collins <robert.collins@canonical.com>
+- Change the package index Info methods to allow apt-cache policy to be useful
+  when using several different archives on the same host.
+
 Past Contributors:
 
 CVS:che Ben Gertzfield <che@debian.org>

=== modified file 'apt-pkg/contrib/strutl.cc'
--- apt-pkg/contrib/strutl.cc	2009-12-14 09:27:26 +0000
+++ apt-pkg/contrib/strutl.cc	2010-02-18 02:39:30 +0000
@@ -1306,3 +1306,15 @@
    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;
+}
+									/*}}}*/

=== modified file 'apt-pkg/contrib/strutl.h'
--- apt-pkg/contrib/strutl.h	2009-12-22 09:44:08 +0000
+++ apt-pkg/contrib/strutl.h	2010-02-18 02:39:30 +0000
@@ -120,6 +120,7 @@
    inline void operator =(const string &From) {CopyFrom(From);};
    inline bool empty() {return Access.empty();};
    static string SiteOnly(const string &URI);
+   static string NoUserPassword(const string &URI);
    
    URI(string Path) {CopyFrom(Path);};
    URI() : Port(0) {};

=== modified file 'apt-pkg/deb/debindexfile.cc'
--- apt-pkg/deb/debindexfile.cc	2008-11-24 10:52:20 +0000
+++ apt-pkg/deb/debindexfile.cc	2010-02-18 02:39:30 +0000
@@ -35,12 +35,12 @@
 // SourcesIndex::SourceInfo - Short 1 liner describing a source		/*{{{*/
 // ---------------------------------------------------------------------
 /* The result looks like:
-     http://foo/ stable/main src 1.1.1 (dsc) */
+     http://foo/debian/ stable/main src 1.1.1 (dsc) */
 string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record,
 				   pkgSrcRecords::File const &File) const
 {
    string Res;
-   Res = ::URI::SiteOnly(URI) + ' ';
+   Res = ::URI::NoUserPassword(URI) + ' ';
    if (Dist[Dist.size() - 1] == '/')
    {
       if (Dist != "/")
@@ -88,7 +88,7 @@
 /* */
 string debSourcesIndex::Info(const char *Type) const
 {
-   string Info = ::URI::SiteOnly(URI) + ' ';
+   string Info = ::URI::NoUserPassword(URI) + ' ';
    if (Dist[Dist.size() - 1] == '/')
    {
       if (Dist != "/")
@@ -159,7 +159,7 @@
 /* This is a shorter version that is designed to be < 60 chars or so */
 string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator Ver) const
 {
-   string Res = ::URI::SiteOnly(URI) + ' ';
+   string Res = ::URI::NoUserPassword(URI) + ' ';
    if (Dist[Dist.size() - 1] == '/')
    {
       if (Dist != "/")
@@ -195,7 +195,7 @@
 /* */
 string debPackagesIndex::Info(const char *Type) const 
 {
-   string Info = ::URI::SiteOnly(URI) + ' ';
+   string Info = ::URI::NoUserPassword(URI) + ' ';
    if (Dist[Dist.size() - 1] == '/')
    {
       if (Dist != "/")
@@ -384,7 +384,7 @@
 /* */
 string debTranslationsIndex::Info(const char *Type) const 
 {
-   string Info = ::URI::SiteOnly(URI) + ' ';
+   string Info = ::URI::NoUserPassword(URI) + ' ';
    if (Dist[Dist.size() - 1] == '/')
    {
       if (Dist != "/")

=== modified file 'debian/changelog'
--- debian/changelog	2010-02-02 16:58:59 +0000
+++ debian/changelog	2010-02-18 02:39:30 +0000
@@ -1,3 +1,11 @@
+apt (0.7.25ubuntu5) lucid; urgency=low
+
+  * 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)
+
+ -- Robert Collins <robertc@robertcollins.net>  Thu, 18 Feb 2010 13:36:54 +1100
+
 apt (0.7.25ubuntu4) lucid; urgency=low
 
   * cmdline/apt-cdrom.cc:

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: