[setup - the official Cygwin setup program] branch topic/libsolv, updated. release_2.881-38-gf51bbe6
jturney-9JcytcrH/[email protected]
| Newsgroups | gmane.os.cygwin.cvs.apps |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f51bbe6b1fbbf96d25560aa9e0f2ba8b023e846e commit f51bbe6b1fbbf96d25560aa9e0f2ba8b023e846e Author: Jon Turney <[email protected]> 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