From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6846 invoked by alias); 1 Oct 2017 13:39:02 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 6825 invoked by uid 9795); 1 Oct 2017 13:39:02 -0000 Date: Sun, 01 Oct 2017 13:39:00 -0000 Message-ID: <20171001133902.6799.qmail@sourceware.org> 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 X-Git-Refname: refs/heads/topic/libsolv X-Git-Reftype: branch X-Git-Oldrev: 1808d40ab46627f4002d3ef7946ace8a5ed62aea X-Git-Newrev: f51bbe6b1fbbf96d25560aa9e0f2ba8b023e846e X-SW-Source: 2017-q4/txt/msg00000.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f51bbe6b1fbbf96d25560aa9e0f2ba8b023e846e commit f51bbe6b1fbbf96d25560aa9e0f2ba8b023e846e Author: Jon Turney 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