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 master, updated. release_2.891-4-g0ffb779 Date: Wed, 06 Jun 2018 20:42:00 -0000 [thread overview] Message-ID: <20180606204253.47443.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=0ffb77947cadfe6a6113a5972064ef291a9aa588 commit 0ffb77947cadfe6a6113a5972064ef291a9aa588 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Wed Jun 6 19:57:56 2018 +0100 Handle test-only packages better Don't create a current version with an empty version string when parsing a package which doesn't have a current version. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=55654e1f3a785e9f2cc2b5a37a89773064210159 commit 55654e1f3a785e9f2cc2b5a37a89773064210159 Author: Ken Brown <kbrown@cornell.edu> Date: Sun Mar 18 12:31:37 2018 -0400 Sort the packages listed in the "confirm" dialog Diff: --- IniDBBuilderPackage.cc | 3 +++ confirm.cc | 44 ++++++++++++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/IniDBBuilderPackage.cc b/IniDBBuilderPackage.cc index d560cb7..d5f167d 100644 --- a/IniDBBuilderPackage.cc +++ b/IniDBBuilderPackage.cc @@ -363,6 +363,9 @@ IniDBBuilderPackage::process () if (!name.size()) return; + if (cbpv.version.empty()) + return; + #if DEBUG Log (LOG_BABBLE) << "Finished with package " << name << endLog; Log (LOG_BABBLE) << "Version " << cbpv.version << endLog; diff --git a/confirm.cc b/confirm.cc index eb6bd99..cd749c0 100644 --- a/confirm.cc +++ b/confirm.cc @@ -19,6 +19,8 @@ #include "package_db.h" #include "package_meta.h" +#include <algorithm> + extern ThreeBarProgressPage Progress; // Sizing information. @@ -61,26 +63,34 @@ ConfirmPage::OnActivate() // first list things we will erase if (source != IDC_SOURCE_DOWNLOAD) { + std::vector<std::string> erase; for (SolverTransactionList::const_iterator i = trans.begin (); i != trans.end (); i++) { if (i->type == SolverTransaction::transErase) { + std::string line; packageversion pv = i->version; packagemeta *pkg = db.findBinary (PackageSpecification (pv.Name ())); - s += "Uninstall "; - s += i->version.Name(); - s += " "; - s += i->version.Canonical_version(); + line += "Uninstall "; + line += i->version.Name(); + line += " "; + line += i->version.Canonical_version(); if (pkg && pkg->desired) - s += " (automatically added)"; - s += "\r\n"; + line += " (automatically added)"; + line += "\r\n"; + erase.push_back (line); } } + sort (erase.begin(), erase.end()); + for (std::vector<std::string>::const_iterator i = erase.begin (); + i != erase.end(); i++) + s += *i; } // then list things downloaded or installed + std::vector<std::string> install; for (SolverTransactionList::const_iterator i = trans.begin (); i != trans.end (); i++) { @@ -89,20 +99,26 @@ ConfirmPage::OnActivate() if (i->type == SolverTransaction::transInstall) { + std::string line; if (source != IDC_SOURCE_DOWNLOAD) - s += "Install "; + line += "Install "; else - s += "Download "; - s += i->version.Name(); - s += " "; - s += i->version.Canonical_version(); + line += "Download "; + line += i->version.Name(); + line += " "; + line += i->version.Canonical_version(); if (i->version.Type() == package_source) - s += " (source)"; + line += " (source)"; else if (pkg && !pkg->desired) - s += " (automatically added)"; - s += "\r\n"; + line += " (automatically added)"; + line += "\r\n"; + install.push_back (line); } } + sort (install.begin(), install.end()); + for (std::vector<std::string>::const_iterator i = install.begin (); + i != install.end(); i++) + s += *i; // be explicit about doing nothing if (s.empty())
reply other threads:[~2018-06-06 20:42 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=20180606204253.47443.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: linkBe 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).