public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: jturney@sourceware.org
To: cygwin-apps-cvs@sourceware.org
Subject: [setup - the official Cygwin setup program] branch topic/libsolv, updated. release_2.881-38-gf51bbe6
Date: Sun, 01 Oct 2017 13:39:00 -0000	[thread overview]
Message-ID: <20171001133902.6799.qmail@sourceware.org> (raw)




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f51bbe6b1fbbf96d25560aa9e0f2ba8b023e846e

commit f51bbe6b1fbbf96d25560aa9e0f2ba8b023e846e
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sat Sep 30 23:23:29 2017 +0100

    Non-existent source packages aren't accessible for installation
    
    Prevent the src checkbox appearing for source packages which don't exist


Diff:
---
 libsolv.cc |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/libsolv.cc b/libsolv.cc
index 6b40716..70d6ab4 100644
--- a/libsolv.cc
+++ b/libsolv.cc
@@ -220,12 +220,19 @@ SolvableVersion::source() const
 bool
 SolvableVersion::accessible () const
 {
-  // XXX: accessible if archive is locally available, or we know a mirror
+  // (This seems utterly pointless.
   //
-  // (This seems utterly pointless.  Packages which aren't locally available are
-  // removed from the package list.  Packages we don't know a mirror for don't
-  // appear in the packagelist.)
-  return TRUE;
+  // For binary pacakges, if we aren't downloading, packages which aren't
+  // locally available are removed from the package list.  If we are
+  // downloading, packages we don't know a mirror for never get to appear in the
+  // package list.
+  //
+  // For source packages, it's equivalent to the bool conversion operator.)
+  //
+  if (id != 0)
+    return TRUE;
+  else
+    return FALSE;
 }
 
 package_stability_t


                 reply	other threads:[~2017-10-01 13:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171001133902.6799.qmail@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).