public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch topic/libsolv, updated. release_2.881-38-gf51bbe6
@ 2017-10-01 13:39 jturney
0 siblings, 0 replies; only message in thread
From: jturney @ 2017-10-01 13:39 UTC (permalink / raw)
To: cygwin-apps-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-01 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-01 13:39 [setup - the official Cygwin setup program] branch topic/libsolv, updated. release_2.881-38-gf51bbe6 jturney
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).