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