[PATCH] setup spews too many messages

Jon Turney jon.turney@dronecode.org.uk
Sat Aug 4 14:32:00 GMT 2018


On 31/07/2018 20:29, Achim Gratz wrote:
> fix excessive message spewage when package vendor is something other than "cygwin"
> 
> Installed packages are getting coerced to vendor "cygwin", so there will
> be warnings if the vendor string of the single repo is something other
> than that.  Use "@System" like zypper for these and suppress the warning
> if it would concern an installed package.

Yeah, this is a bit unfortunate.

Ideally we'd be remembering the vendor (along with other information we 
currently guess) for installed packages.

I'm not sure about fixing it this way, though, as it will mean that 
normally (when the repo label is 'cygwin') all upgraded packages will be 
shown as vendorchanged in the full log (or when using -v)

How about the attached, which should have the same effect?

-------------- next part --------------
From 3103d94026056f0ba07548dab8ff9f04f4dccb70 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Tue, 31 Jul 2018 21:29:02 +0200
Subject: [PATCH setup] Fix message spam when package vendor is something other
 than "cygwin"

Installed packages are getting coerced to vendor "cygwin", so there will be
warnings if the vendor string of the single repo is something other than
that.
---
 package_meta.cc | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/package_meta.cc b/package_meta.cc
index f765baf..a7f4cfd 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -183,10 +183,17 @@ packagemeta::add_version (const SolverPool::addPackageData &inpkgdata)
           /* Otherwise... if we had a way to set repo priorities, that could be
              used to control which packageversion the solver picks. For the
              moment, just warn that you might not be getting what you think you
-             should... */
-          Log (LOG_PLAIN) << "Version " << pkgdata.version << " of package " <<
-            name << " is present in releases labelled " << pkgdata.vendor <<
-            " and " << i->Vendor() << endLog;
+             should...
+
+             (suppress this for installed packages, as we are only guessing the
+             vendor, currently)
+          */
+          if (pkgdata.reponame != "_installed")
+            {
+              Log (LOG_PLAIN) << "Version " << pkgdata.version << " of package " <<
+                name << " is present in releases labelled " << pkgdata.vendor <<
+                " and " << i->Vendor() << endLog;
+            }
         }
 
       versions.erase(i);
-- 
2.17.0



More information about the Cygwin-apps mailing list