public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] setup spews too many messages
@ 2018-07-31 19:29 Achim Gratz
  2018-08-04 14:32 ` Jon Turney
  0 siblings, 1 reply; 3+ messages in thread
From: Achim Gratz @ 2018-07-31 19:29 UTC (permalink / raw)
  To: cygwin-apps


--8<---------------cut here---------------start------------->8---
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.

Note: The program logic might now fail to warn about having multiple
vendors providing the same package, I didn't test that yet.

	Modified   package_db.cc
diff --git a/package_db.cc b/package_db.cc
index b74aafd..2921d2f 100644
--- a/package_db.cc
+++ b/package_db.cc
@@ -129,7 +129,7 @@ packagedb::read ()
 
                   // very limited information is available from installed.db, so
                   // we put our best guesses here...
-                  data.vendor = "cygwin";
+                  data.vendor = "@System";
                   data.requires = NULL;
                   data.obsoletes = NULL;
                   data.provides = NULL;
	Modified   package_meta.cc
diff --git a/package_meta.cc b/package_meta.cc
index f765baf..3b578a7 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -184,9 +184,12 @@ packagemeta::add_version (const SolverPool::addPackageData &inpkgdata)
              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;
+          if (pkgdata.vendor != "@System")
+	    {
+	      Log (LOG_PLAIN) << "Version " << pkgdata.version << " of package " <<
+		name << " is present in releases labelled " << pkgdata.vendor <<
+		" and " << i->Vendor() << endLog;
+	    }
         }
 
       versions.erase(i);
--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] setup spews too many messages
  2018-07-31 19:29 [PATCH] setup spews too many messages Achim Gratz
@ 2018-08-04 14:32 ` Jon Turney
  2018-08-04 18:55   ` Achim Gratz
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Turney @ 2018-08-04 14:32 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

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?


[-- Attachment #2: 0001-Fix-message-spam-when-package-vendor-is-something-ot.patch --]
[-- Type: text/plain, Size: 1681 bytes --]

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] setup spews too many messages
  2018-08-04 14:32 ` Jon Turney
@ 2018-08-04 18:55   ` Achim Gratz
  0 siblings, 0 replies; 3+ messages in thread
From: Achim Gratz @ 2018-08-04 18:55 UTC (permalink / raw)
  To: cygwin-apps

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

How about replacing the "bz2" in installed.db with the vendor?  If you
want to be extra obscure, make "bz2" mean "cygwin".  :-P

> 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?

Probably works just as well for me.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-04 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-31 19:29 [PATCH] setup spews too many messages Achim Gratz
2018-08-04 14:32 ` Jon Turney
2018-08-04 18:55   ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).