[PATCH setup 2/4] Set the initial state of IDC_ALLOW_USER_URL

2017-12-03 Thread Ken Brown
It starts checked if all_site_list contains a site that is not a cygwin.com mirror. Such a site would have to come from the "last-mirror" user setting, indicating that the user used a non-mirror on the last run. Introduce a new function check_for_user_urls() to help with this. --- site.cc | 26 +

[PATCH setup 1/4] Add checkbox IDC_ALLOW_USER_URL to IDD_SITE dialog

2017-12-03 Thread Ken Brown
Enable the "User URL" edit box and "Add" button only if IDC_ALLOW_USER_URL is checked. --- res.rc | 15 --- resource.h | 1 + site.cc| 14 ++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/res.rc b/res.rc index a4d7e70..b5dcb3e 100644 --- a/res.rc

Re: [PATCH setup 0/4] Distinguish between user URLs and cygwin mirrors in UI

2017-12-03 Thread Ken Brown
On 12/3/2017 1:06 PM, Brian Inglis wrote: On 2017-12-03 08:22, Ken Brown wrote: This is a followup to https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html . In that message Jon suggested splitting site selection into two pages, one for cygwin.com mirrors and one for additional user URLs

Re: [PATCH setup 1/4] Add checkbox IDC_ALLOW_USER_URL to IDD_SITE dialog

2017-12-03 Thread Ken Brown
On 12/3/2017 10:22 AM, Ken Brown wrote: Enable the "User URL" edit box and "Add" button only if IDC_ALLOW_USER_URL is checked. --- res.rc | 15 --- resource.h | 1 + site.cc| 14 ++ 3 files changed, 23 insertions(+), 7 deletions(-) Sorr

[PATCH setup v2 0/5] Distinguish between user URLs and cygwin mirrors in UI

2017-12-04 Thread Ken Brown
This is the same as the previous patch series with one cosmetic improvement: I've now made user URLs sort last, so that the distinction between user URLs and cygwin.com mirrors is visually more clear. Ken Brown (5): Add checkbox IDC_ALLOW_USER_URL to IDD_SITE dialog Set the initial sta

[PATCH setup v2 2/5] Set the initial state of IDC_ALLOW_USER_URL

2017-12-04 Thread Ken Brown
It starts checked if all_site_list contains a site that is not a cygwin.com mirror. Such a site would have to come from the "last-mirror" user setting, indicating that the user used a non-mirror on the last run. Introduce a new function check_for_user_urls() to help with this. --- site.cc | 26 +

[PATCH setup v2 1/5] Add checkbox IDC_ALLOW_USER_URL to IDD_SITE dialog

2017-12-04 Thread Ken Brown
Enable the "User URL" edit box and "Add" button only if IDC_ALLOW_USER_URL is checked. --- res.rc | 15 --- resource.h | 1 + site.cc| 15 +++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/res.rc b/res.rc index a4d7e70..b5dcb3e 100644 --- a/res.rc

[PATCH setup v2 5/5] Make user URLs sort last in the displayed site list

2017-12-04 Thread Ken Brown
Also fix load_site_list() so that when a mirror replaces an existing entry, the sort order is updated. Change site_list_type::operator== to compare URLs instead of sort keys, since the key of a user URL no longer depends solely on the URL. Introduce a new helper function merge_site(). --- site.c

[PATCH setup v2 4/5] Display full URL of non-mirrors in the site list

2017-12-04 Thread Ken Brown
Set displayed_url to full URL in the site_list_type constructor if from_mirrors_lst is false. Modify check_for_user_urls() to change displayed_url back to the short form if a site in all_site_list turns out to be a stale mirror. --- site.cc | 32 +--- 1 file changed, 2

[PATCH setup v2 3/5] Adjust site list if IDC_ALLOW_USER_URL is unchecked

2017-12-04 Thread Ken Brown
If the user unchecks the box, remove all sites except for fresh mirrors and selected stale mirrors. Introduce a new function remove_user_urls() to help with this --- site.cc | 35 +++ 1 file changed, 35 insertions(+) diff --git a/site.cc b/site.cc index 0222ec9..9

[PATCH setup] Make Enter in the user URL box cause ADD instead of NEXT

2017-12-04 Thread Ken Brown
--- site.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site.cc b/site.cc index 641a6bb..64e56a8 100644 --- a/site.cc +++ b/site.cc @@ -759,7 +759,9 @@ bool SitePage::OnMessageCmd (int id, HWND hwndctl, UINT code) { case IDC_EDIT_USER_URL: { - //

Re: [PATCH setup v2 0/5] Distinguish between user URLs and cygwin mirrors in UI

2017-12-04 Thread Ken Brown
On 12/4/2017 10:18 AM, Ken Brown wrote: This is the same as the previous patch series with one cosmetic improvement: I've now made user URLs sort last, so that the distinction between user URLs and cygwin.com mirrors is visually more clear. Sorry for repeatedly responding to myself,

Re: [PATCH setup] Make Enter in the user URL box cause ADD instead of NEXT

2017-12-05 Thread Ken Brown
On 12/5/2017 7:58 AM, Jon Turney wrote: Please apply. Done. The search textbox on the package chooser page needs the same fix. It's not immediately clear to me how to do this, since I don't know what the default pushbutton should be while the user is typing in the search box. One possibi

Re: [PATCH setup] Make Enter in the user URL box cause ADD instead of NEXT

2017-12-05 Thread Ken Brown
On 12/5/2017 11:03 AM, Ken Brown wrote: On 12/5/2017 7:58 AM, Jon Turney wrote: Please apply. Done. The search textbox on the package chooser page needs the same fix. It's not immediately clear to me how to do this, since I don't know what the default pushbutton should be whil

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2017-12-05 Thread Ken Brown
On 12/5/2017 9:32 AM, Jon Turney wrote: On 14/09/2017 21:46, Ken Brown wrote: On 9/14/2017 1:26 PM, Achim Gratz wrote: Ken Brown writes: What I've been struggling with, however, is the UI.  But now that I think about it, maybe it isn't that hard.  It's just a matter of

[PATCH setup v3 2/6] Use SitePage for cygwin.com mirrors only

2017-12-06 Thread Ken Brown
Keep separate lists of mirrors and user URLs. Rename several SiteList variables to indicate that they now contain only mirrors. Introduce a helper function remove_user_urls() to move non-mirrors from the initial list of sites to the list of user URLs. Set the initial state of allow_user_url depe

[PATCH setup v3 0/6] Distinguish between user URLs and cygwin mirrors in UI

2017-12-06 Thread Ken Brown
the full URL of each site to guarantee that there is no ambiguity. Brian Inglis (1): Display area and location of mirrors, and add these to the sort key Ken Brown (5): Use the IDD_SITE dialog for cygwin.com mirrors only Use SitePage for cygwin.com mirrors only Create new page UserSitePage

[PATCH setup v3 1/6] Use the IDD_SITE dialog for cygwin.com mirrors only

2017-12-06 Thread Ken Brown
Remove controls related to adding a user URL. Add a checkbox IDC_ALLOW_USER_URL; checking this sets a new boolean variable allow_user_url. --- res.rc | 14 ++ resource.h | 1 + site.cc| 39 --- 3 files changed, 11 insertions(+), 43 deletion

[PATCH setup v3 5/6] Keep the mirror list sorted properly

2017-12-06 Thread Ken Brown
When site.cc:load_site_list() added a mirror whose URL was already in the list, it put the new entry in the same position as the old. Remove the old entry and merge the new one instead. --- site.cc | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/site.cc b/site.cc index

[PATCH setup v3 6/6] Display area and location of mirrors, and add these to the sort key

2017-12-06 Thread Ken Brown
From: Brian Inglis Also change site_list_type::operator== to compare URLs rather than keys, since the key no longer depends only on the URL. --- site.cc | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/site.cc b/site.cc index 1dd42d8..72e8e80 100644 --- a/site.cc

[PATCH setup v3 3/6] Create new page UserSitePage for user URLs

2017-12-06 Thread Ken Brown
@ bool SitePage::OnMessageCmd (int id, HWND hwndctl, UINT code) selected_usersite_list.clear (); site_list = selected_mirror_list; } + CheckControlsAndDisableAccordingly (); } break; } diff --git a/usersite.cc b/usersite.

[PATCH setup v3 4/6] Display full URLs in the user site list

2017-12-06 Thread Ken Brown
--- site.cc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/site.cc b/site.cc index accc264..98dd756 100644 --- a/site.cc +++ b/site.cc @@ -187,6 +187,12 @@ site_list_type::site_list_type (const string &_url, idx = 0; } while (idx > 0); key += url; + /* Display the full URL

Re: [PATCH setup v3 0/6] Distinguish between user URLs and cygwin mirrors in UI

2017-12-06 Thread Ken Brown
On 12/6/2017 4:07 PM, Brian Inglis wrote: On 2017-12-06 13:45, Ken Brown wrote: This is a followup to https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html, in which Jon suggested splitting site selection into two pages, one for cygwin.com mirrors and one for additional user URLs. The

Re: [PATCH setup v3 0/6] Distinguish between user URLs and cygwin mirrors in UI

2017-12-07 Thread Ken Brown
On 12/7/2017 8:55 AM, Jon Turney wrote: On 06/12/2017 22:15, Brian Inglis wrote: On 2017-12-06 14:55, Ken Brown wrote: On 12/6/2017 4:07 PM, Brian Inglis wrote: On 2017-12-06 13:45, Ken Brown wrote: This is a followup to     https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html, in which

Re: [PATCH setup] Make Enter in the user URL box cause ADD instead of NEXT

2017-12-07 Thread Ken Brown
On 12/7/2017 1:35 PM, Jon Turney wrote: On 05/12/2017 17:32, Ken Brown wrote: On 12/5/2017 11:03 AM, Ken Brown wrote: On 12/5/2017 7:58 AM, Jon Turney wrote: The search textbox on the package chooser page needs the same fix. It's not immediately clear to me how to do this, since I

Re: [PATCH setup v3 0/6] Distinguish between user URLs and cygwin mirrors in UI

2017-12-07 Thread Ken Brown
On 12/7/2017 2:08 PM, Jon Turney wrote: On 07/12/2017 15:07, Ken Brown wrote: On 12/7/2017 8:55 AM, Jon Turney wrote: On 06/12/2017 22:15, Brian Inglis wrote: On 2017-12-06 14:55, Ken Brown wrote: On 12/6/2017 4:07 PM, Brian Inglis wrote: On 2017-12-06 13:45, Ken Brown wrote: This is a

Re: [PATCH setup] Make Enter in the user URL box cause ADD instead of NEXT

2017-12-08 Thread Ken Brown
On 12/7/2017 11:55 PM, Brian Inglis wrote: On 2017-12-07 13:46, Ken Brown wrote: On 12/7/2017 1:35 PM, Jon Turney wrote: On 05/12/2017 17:32, Ken Brown wrote: On 12/5/2017 11:03 AM, Ken Brown wrote: On 12/5/2017 7:58 AM, Jon Turney wrote: The search textbox on the package chooser page needs

Re: [PATCH setup] Make Enter in the user URL box cause ADD instead of NEXT

2017-12-08 Thread Ken Brown
On 12/8/2017 10:48 AM, Jon Turney wrote: On 07/12/2017 20:46, Ken Brown wrote: On 12/7/2017 1:35 PM, Jon Turney wrote: On 05/12/2017 17:32, Ken Brown wrote: On 12/5/2017 11:03 AM, Ken Brown wrote: On 12/5/2017 7:58 AM, Jon Turney wrote: The search textbox on the package chooser page needs

[PATCH setup v4 2/6] Use SitePage for cygwin.com mirrors only

2017-12-10 Thread Ken Brown
Add a bool member 'site_list_type::is_mirror' to indicate whether a site is a mirror (possibly private) rather than a user URL (corresponding to a non-mirror package repo). Display only mirrors in the site chooser listbox. Rename several SiteList variables to indicate that they now contain only m

[PATCH setup v4 4/6] Keep the mirror list sorted properly

2017-12-10 Thread Ken Brown
When site.cc:load_site_list() added a mirror whose URL was already in the list, it put the new entry in the same position as the old. Remove the old entry and merge the new one instead. --- site.cc | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/site.cc b/site.cc index

[PATCH setup v4 0/6] Distinguish between user URLs and cygwin mirrors in UI

2017-12-10 Thread Ken Brown
. Brian Inglis (1): Display area and location of official mirrors Ken Brown (5): Use the IDD_SITE dialog for cygwin.com mirrors only Use SitePage for cygwin.com mirrors only Create new page UserSitePage for user URLs Keep the mirror list sorted properly Display full URLs of user si

[PATCH setup v4 5/6] Display full URLs of user sites and private mirrors

2017-12-10 Thread Ken Brown
--- site.cc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/site.cc b/site.cc index 44cd114..a1a5e3f 100644 --- a/site.cc +++ b/site.cc @@ -207,6 +207,12 @@ site_list_type::site_list_type (const string &_url, idx = 0; } while (idx > 0); key += url; + if (!from_mirrors_lst)

[PATCH setup v4 3/6] Create new page UserSitePage for user URLs

2017-12-10 Thread Ken Brown
,6 +825,7 @@ bool SitePage::OnMessageCmd (int id, HWND hwndctl, UINT code) allow_user_url = IsButtonChecked (IDC_ALLOW_USER_URL); if (!allow_user_url) selected_usersite_list.clear (); + CheckControlsAndDisableAccordingly (); } break; } diff --git a/use

[PATCH setup v4 6/6] Display area and location of official mirrors

2017-12-10 Thread Ken Brown
From: Brian Inglis Mirrors from mirrors.lst have area and location info, which we now display and add to the sort key. For private mirrors, continue to display only the (full) URL, but make them sort last. Change site_list_type::operator== to compare URLs rather than keys, since the key no long

[PATCH setup v4 1/6] Use the IDD_SITE dialog for cygwin.com mirrors only

2017-12-10 Thread Ken Brown
Change wording in the dialog template to make it clear that this dialog is intended for mirrors only. Add a checkbox IDC_ALLOW_USER_URL; checking this sets a new boolean variable allow_user_url. In a future commit, this will enable a new page where the user can enter URLs for non-mirror package r

Re: [PATCH setup v4 0/6] Distinguish between user URLs and cygwin mirrors in UI

2017-12-11 Thread Ken Brown
On 12/10/2017 12:49 PM, Ken Brown wrote: TODO: Implement a way of validating purported mirrors. For example, we could make sure they are signed with the cygwin signing key. Or if the user has used the -X option to turn off signature checking, we could make sure that setup.ini contains "re

[PATCH setup draft 2/4] Insist on cygwin signing key for official mirrors

2017-12-11 Thread Ken Brown
If a mirror comes from mirrors.lst, validate the signature using the cygwin signing key only. --- ini.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ini.cc b/ini.cc index 18ab2e3..4be8263 100644 --- a/ini.cc +++ b/ini.cc @@ -292,8 +292,12 @@ do_remote_ini (HWND owner)

[PATCH setup draft 3/4] Try cygwin signing key for private mirrors

2017-12-11 Thread Ken Brown
If validation with the cygwin signing key fails for a purported private mirror, retry with other supplied keys. If this succeeds, silently change the status of the site to "user site" and put a note in the log file. This change will take effect on the next setup run or if the user selects 'Back'.

[PATCH setup draft 0/4] Improve setup.ini validation

2017-12-11 Thread Ken Brown
; includes all selected sites, whether mirrors or not. Finally, sites specified on the command line are initially assumed to be mirrors until we can perform the above checks. [1] https://sourceware.org/ml/cygwin-apps/2017-12/msg00051.html Ken Brown (4): Allow validation of signatures using the cyg

[PATCH setup draft 1/4] Allow validation of signatures using the cygwin key only

2017-12-11 Thread Ken Brown
Add an optional argument 'main_key_only' to crypto.cc:verify_ini_file_sig() and ini.cc:check_ini_sig(). The argument is 'false' by default. If it is 'true', validation uses the official cygwin signing key only. --- crypto.cc | 5 +++-- crypto.h | 3 ++- ini.cc| 5 +++-- 3 files changed, 8 i

[PATCH setup draft 4/4] If signature validation is turned off, check 'release:' tag

2017-12-11 Thread Ken Brown
If we aren't doing signature validation, look instead for "release: cygwin" in the setup.ini files. If this fails for an official mirror, reject the mirror. If it fails for a purported private mirror, silently change the status of the site to "user site" and put a note in the log file. This chan

setup libsolv: getting rid of ".any"

2017-12-12 Thread Ken Brown
Jon, I've been trying to think of a way to get rid of the suffix ".any" that gets appended to package names. I think users will be confused by this when they see it in log files and, more importantly, in problem reports. The only thing I can come up with is patching libsolv so that pool_sol

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2017-12-13 Thread Ken Brown
On 12/5/2017 9:32 AM, Jon Turney wrote: It seems we're missing something to actually apply the default solution, so "accept default solutions" makes no changes, at the moment. (looks like we have to do this ourselves with solver_take_solution() ?) I've just looked at this again, and I'm not su

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2017-12-13 Thread Ken Brown
On 12/13/2017 1:05 PM, Achim Gratz wrote: Ken Brown writes: 1. Uninstall A. 2. Don't uninstall B. On the surface, it would seem that libsolv chose 2 by default, because it returned an empty transaction list. This was reflected in the log and was also clear when I selected 'Back&#

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2017-12-14 Thread Ken Brown
On 12/13/2017 5:31 PM, Ken Brown wrote: On 12/13/2017 1:05 PM, Achim Gratz wrote: Ken Brown writes: 1. Uninstall A. 2. Don't uninstall B. On the surface, it would seem that libsolv chose 2 by default, because it returned an empty transaction list.  This was reflected in the log and was

[PATCH setup] Query the user if a corrupt local file is found

2017-12-16 Thread Ken Brown
If a corrupt file is found in one of the selected mirror site directories, offer to delete it instead of making this a fatal error. Do this only on the first call to check_for cached(). If the corrupt file is still there on the second call, then the deletion failed, and the user will have to fix t

Re: [PATCH setup] Query the user if a corrupt local file is found

2017-12-18 Thread Ken Brown
On 12/16/2017 1:37 PM, Ken Brown wrote: If a corrupt file is found in one of the selected mirror site directories, offer to delete it instead of making this a fatal error. Do this only on the first call to check_for cached(). If the corrupt file is still there on the second call, then the

Re: [PATCH setup] Query the user if a corrupt local file is found

2017-12-18 Thread Ken Brown
On 12/18/2017 1:40 PM, Ken Brown wrote: On 12/16/2017 1:37 PM, Ken Brown wrote: If a corrupt file is found in one of the selected mirror site directories, offer to delete it instead of making this a fatal error. Do this only on the first call to check_for cached().  If the corrupt file is still

[PATCH setup] Make sure that fatal error messages are visible

2017-12-18 Thread Ken Brown
The message box produced by TOPLEVEL_CATCH could be hidden by whatever window was previously being displayed, so that setup appeared to hang. Fix this by giving fatal error message boxes type MB_SETFOREGROUND. --- msg.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg.cc b/

[PATCH setup] Throw exceptions instead of exiting with error codes

2017-12-19 Thread Ken Brown
--- Exception.h | 1 + PickView.cc | 11 +++ choose.cc | 7 +-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Exception.h b/Exception.h index 7b16612..15a145e 100644 --- a/Exception.h +++ b/Exception.h @@ -36,6 +36,7 @@ private: #define APPERR_CORRUPT_PACKAGE 1

Re: [PATCH setup] Throw exceptions instead of exiting with error codes

2017-12-20 Thread Ken Brown
On 12/20/2017 11:06 AM, Jon Turney wrote: On 19/12/2017 17:20, Ken Brown wrote: ---   Exception.h |  1 +   PickView.cc | 11 +++   choose.cc   |  7 +--   3 files changed, 13 insertions(+), 6 deletions(-) Yeah, silently dying seems like a bad idea. Hmmm... does this not need a

Re: [PATCH setup] Make sure that fatal error messages are visible

2017-12-20 Thread Ken Brown
On 12/20/2017 11:19 AM, Jon Turney wrote: On 19/12/2017 00:53, Ken Brown wrote: The message box produced by TOPLEVEL_CATCH could be hidden by whatever window was previously being displayed, so that setup appeared to hang. Fix this by giving fatal error message boxes type MB_SETFOREGROUND

Re: [PATCH setup] Make sure that fatal error messages are visible

2017-12-21 Thread Ken Brown
On 12/20/2017 10:02 PM, Brian Inglis wrote: On 2017-12-20 10:09, Ken Brown wrote: On 12/20/2017 11:19 AM, Jon Turney wrote: On 19/12/2017 00:53, Ken Brown wrote: The message box produced by TOPLEVEL_CATCH could be hidden by whatever window was previously being displayed, so that setup

Re: [PATCH setup] Make sure that fatal error messages are visible

2017-12-21 Thread Ken Brown
On 12/20/2017 12:09 PM, Ken Brown wrote: On 12/20/2017 11:19 AM, Jon Turney wrote: On 19/12/2017 00:53, Ken Brown wrote: The message box produced by TOPLEVEL_CATCH could be hidden by whatever window was previously being displayed, so that setup appeared to hang. Fix this by giving fatal error

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2017-12-24 Thread Ken Brown
On 12/13/2017 5:31 PM, Ken Brown wrote: On 12/13/2017 1:05 PM, Achim Gratz wrote: Ken Brown writes: 1. Uninstall A. 2. Don't uninstall B. On the surface, it would seem that libsolv chose 2 by default, because it returned an empty transaction list.  This was reflected in the log and was

setup libsolv UI: Silently install dependencies?

2017-12-24 Thread Ken Brown
r selecting the option. One possibility is a checkbox on the chooser page, which then gets saved in setup.rc as a user option. Are there other suggestions? Ken From e3c5d8ac0970d8a6bcb870aff2e6fe0e00ab5b44 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sun, 24 Dec 2017 16:05:33 -0500 Subject: [PATC

Re: setup libsolv UI: Silently install dependencies?

2017-12-25 Thread Ken Brown
On 12/24/2017 6:23 PM, Ken Brown wrote: Currently the libsolv version of setup silently installs added dependencies.  The user gets a chance to review them first only if libsolv finds problems and has to display the prerequisite page. I'm not sure if this was a deliberate design dec

Re: [PATCH setup] Make sure that fatal error messages are visible

2017-12-27 Thread Ken Brown
On 12/21/2017 5:55 PM, Ken Brown wrote: On 12/20/2017 12:09 PM, Ken Brown wrote: On 12/20/2017 11:19 AM, Jon Turney wrote: On 19/12/2017 00:53, Ken Brown wrote: The message box produced by TOPLEVEL_CATCH could be hidden by whatever window was previously being displayed, so that setup appeared

Re: setup libsolv UI: Silently install dependencies?

2018-01-05 Thread Ken Brown
On 1/5/2018 10:48 AM, Jon Turney wrote: On 24/12/2017 23:23, Ken Brown wrote: Currently the libsolv version of setup silently installs added dependencies.  The user gets a chance to review them first only if libsolv finds problems and has to display the prerequisite page. I'm not su

Re: [PATCH setup] Query the user if a corrupt local file is found

2018-01-05 Thread Ken Brown
On 1/5/2018 10:00 AM, Jon Turney wrote: On 16/12/2017 18:37, Ken Brown wrote: If a corrupt file is found in one of the selected mirror site directories, offer to delete it instead of making this a fatal error. Do this only on the first call to check_for cached().  If the corrupt file is still

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2018-01-09 Thread Ken Brown
On 1/9/2018 8:25 AM, Jon Turney wrote: On 24/12/2017 15:00, Ken Brown wrote: On 12/13/2017 5:31 PM, Ken Brown wrote: On 12/13/2017 1:05 PM, Achim Gratz wrote: Ken Brown writes: 1. Uninstall A. 2. Don't uninstall B. On the surface, it would seem that libsolv chose 2 by default, becau

Re: setup libsolv UI: Silently install dependencies?

2018-01-09 Thread Ken Brown
On 1/9/2018 8:32 AM, Jon Turney wrote: On 05/01/2018 16:04, Ken Brown wrote: On 1/5/2018 10:48 AM, Jon Turney wrote: On 24/12/2017 23:23, Ken Brown wrote: Currently the libsolv version of setup silently installs added dependencies.  The user gets a chance to review them first only if libsolv

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2018-01-09 Thread Ken Brown
On 1/9/2018 10:37 AM, Ken Brown wrote: On 1/9/2018 8:25 AM, Jon Turney wrote: On 24/12/2017 15:00, Ken Brown wrote: On 12/13/2017 5:31 PM, Ken Brown wrote: On 12/13/2017 1:05 PM, Achim Gratz wrote: Ken Brown writes: 1. Uninstall A. 2. Don't uninstall B. On the surface, it would seem

[PATCH setup v2] Query the user if a corrupt local file is found

2018-01-09 Thread Ken Brown
Also reorganize package validation. Move the size-validation code in download.cc and the hash-validation code in install.cc into new member functions of the packagesource class. Add a bool member 'validated' to the class to make sure that the checking is done only once. Change download.cc:check_

Re: [PATCH setup v2] Query the user if a corrupt local file is found

2018-01-09 Thread Ken Brown
On 1/9/2018 5:25 PM, Ken Brown wrote: Also reorganize package validation. Move the size-validation code in download.cc and the hash-validation code in install.cc into new member functions of the packagesource class. Add a bool member 'validated' to the class to make sure that the c

[PATCH setup v3] Query the user if a corrupt local file is found

2018-01-09 Thread Ken Brown
Also reorganize package validation. Move the size-validation code in download.cc and the hash-validation code in install.cc into new member functions of the packagesource class. Add a bool member 'validated' to the class to make sure that the checking is done only once. Change download.cc:check_

harfbuzz bug

2018-01-10 Thread Ken Brown
Hi Yaakov, FYI, I just had occasion to build harfbuzz 1.7.4 in connection with upstream TeX Live, and it needed a small tweak. I've filed a bug report here: https://github.com/harfbuzz/harfbuzz/issues/693 Ken

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2018-01-13 Thread Ken Brown
On 1/13/2018 9:14 AM, Jon Turney wrote: On 09/01/2018 15:49, Ken Brown wrote: On 1/9/2018 10:37 AM, Ken Brown wrote: I just did a quick test, trying to uninstall B in the situation above, and it didn't work as expected.  Even though "Uninstall A" was the first solutio

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2018-01-13 Thread Ken Brown
On 1/13/2018 4:29 PM, Brian Inglis wrote: On 2018-01-13 12:56, Ken Brown wrote: 2. We should probably remove, or at least reword, the dire warning about accepting the default solutions.  I'm not sure we want to "strongly recommend" the default solution over the other solution(s)

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2018-01-13 Thread Ken Brown
On 1/13/2018 5:55 PM, Ken Brown wrote: On 1/13/2018 4:29 PM, Brian Inglis wrote: On 2018-01-13 12:56, Ken Brown wrote: 2. We should probably remove, or at least reword, the dire warning about accepting the default solutions.  I'm not sure we want to "strongly recommend" the d

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2018-01-13 Thread Ken Brown
On 1/13/2018 8:52 PM, Brian Inglis wrote: On 2018-01-13 17:00, Ken Brown wrote: On 1/13/2018 5:55 PM, Ken Brown wrote: On 1/13/2018 4:29 PM, Brian Inglis wrote: On 2018-01-13 12:56, Ken Brown wrote: 2. We should probably remove, or at least reword, the dire warning about accepting the

Re: setup libsolv UI: Silently install dependencies?

2018-01-15 Thread Ken Brown
g, but maybe I'm missing something easy. Ken From d183ee53ff0471f22fe2412381e8507e4c109b1e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 15 Jan 2018 12:18:30 -0500 Subject: [PATCH] Let the user review added dependencies If the solver finds no problems but added packages to resolve depen

Re: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)

2018-01-15 Thread Ken Brown
On 1/15/2018 2:01 PM, Jon Turney wrote: On 13/01/2018 19:56, Ken Brown wrote: On 1/13/2018 9:14 AM, Jon Turney wrote: On 09/01/2018 15:49, Ken Brown wrote: On 1/9/2018 10:37 AM, Ken Brown wrote: I just did a quick test, trying to uninstall B in the situation above, and it didn't wo

Re: setup libsolv UI: Silently install dependencies?

2018-01-22 Thread Ken Brown
On 1/15/2018 12:31 PM, Ken Brown wrote: On 1/9/2018 8:32 AM, Jon Turney wrote: I'm not sure it's ideal to make a text report of this, though. Displaying it in the chooser somehow seems a better fit. (i.e. after you've made your selections, you get something like the "

[PATCH setup libsolv, v2] Let the user review added dependencies

2018-01-22 Thread Ken Brown
If the solver found no problems but added packages to resolve dependencies, ask the user whether they want to review the added packages before proceeding. If they answer Yes, go back to the chooser with the 'Pending' view selected. The implementation adds several new members to the PrereqChecker

Re: setup with experimental libsolv-based dependency solving

2018-01-22 Thread Ken Brown
On 1/18/2018 2:15 PM, Jon Turney wrote: On 23/11/2017 18:08, Jon Turney wrote: I'm interested in opinion on what else is needed, before this can be released as 2.885 I think we're in pretty good shape except for the issue of letting the user see what's about to be done before we do it. My la

Re: [PATCH setup libsolv, v2] Let the user review added dependencies

2018-01-22 Thread Ken Brown
On 1/22/2018 4:51 PM, Brian Inglis wrote: On 2018-01-22 10:37, Ken Brown wrote: If the solver found no problems but added packages to resolve dependencies, ask the user whether they want to review the added packages before proceeding. If they answer Yes, go back to the chooser with the

Re: [PATCH setup libsolv, v2] Let the user review added dependencies

2018-01-24 Thread Ken Brown
On 1/24/2018 3:30 PM, Jon Turney wrote: On 22/01/2018 17:37, Ken Brown wrote: If the solver found no problems but added packages to resolve dependencies, ask the user whether they want to review the added packages before proceeding. If they answer Yes, go back to the chooser with the 'Pe

Re: [PATCH setup libsolv, v2] Let the user review added dependencies

2018-01-24 Thread Ken Brown
On 1/24/2018 10:25 PM, Ken Brown wrote: On 1/24/2018 3:30 PM, Jon Turney wrote: On 22/01/2018 17:37, Ken Brown wrote: If the solver found no problems but added packages to resolve dependencies, ask the user whether they want to review the added packages before proceeding. If they answer Yes

Re: stunnel 5.44 build fails

2018-01-29 Thread Ken Brown
On 1/29/2018 3:32 PM, Andrew Schulman wrote: Prior to stunnel 5.42, I could build stunnel in Cygport with no src_compile function, just CYGCONF=--disable-fips Beginning with stunnel 5.42, the build fails with errors about "possibly undefined macro" AC_MSG_NOTICE and AC_DEFINE: I don't know wh

Re: setup 2.887 release candidate - please test

2018-02-14 Thread Ken Brown
uot;automatically added", so if it's NULL, it might not be worth worrying about why. Ken From c860c1ce6045d6c42f0207f5977a269cbf48c53e Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 14 Feb 2018 17:48:44 -0500 Subject: [PATCH] Avoid crash if a source package is installed If a sou

Advice needed on ffcall packaging

2018-02-20 Thread Ken Brown
A few years ago I adopted ffcall (32-bit only) in order to keep it from disappearing from the distro: https://sourceware.org/ml/cygwin-apps/2015-07/msg00092.html The latest upstream release builds on 64-bit Cygwin, so I'd like to update the package, and I'd like to find a sensible way of bre

Re: Advice needed on ffcall packaging

2018-02-20 Thread Ken Brown
On 2/20/2018 1:41 PM, Yaakov Selkowitz wrote: On 2018-02-20 09:47, Ken Brown wrote: A few years ago I adopted ffcall (32-bit only) in order to keep it from disappearing from the distro: The latest upstream release builds on 64-bit Cygwin, so I'd like to update the package, and I'd li

Re: Advice needed on ffcall packaging

2018-02-21 Thread Ken Brown
On 2/21/2018 12:43 AM, Brian Inglis wrote: On 2018-02-20 11:41, Yaakov Selkowitz wrote: NAME=ffcall ... PKG_NAMES="libffcall0 libffcall-devel" libffcall0_CONTENTS=... libffcall_devel_OBSOLETES="ffcall" libffcall_devel_CONTENTS=... Does this generate the ("virtual") package setup entry for: @

clisp/maxima

2018-02-24 Thread Ken Brown
Achim, I'm about to upload a test release of clisp. Since it's a test release, I don't think you necessarily need to make a corresponding release of maxima. But whether you do or not, I'd appreciate it if you would check at some point that there's no maxima problem with the new clisp. Than

setup: problems with local install

2018-03-05 Thread Ken Brown
This is a followup to the thread started here: https://cygwin.com/ml/cygwin/2018-03/msg00027.html There are two problems with installing from a local directory. 1. In the Category view, "No packages found" is displayed where it should say "All" in the first line of the list. This is probabl

Re: setup: problems with local install

2018-03-05 Thread Ken Brown
On 3/5/2018 1:34 PM, Ken Brown wrote: This is a followup to the thread started here:   https://cygwin.com/ml/cygwin/2018-03/msg00027.html There are two problems with installing from a local directory. 1. In the Category view, "No packages found" is displayed where it should say &q

Re: setup: problems with local install

2018-03-06 Thread Ken Brown
On 3/6/2018 10:18 AM, Jon Turney wrote: (I also note we have also have another 'erase an element from a vector while we are iterating over it' here, so that needs fixing, as well) I think this one might be OK. If I'm not mistaken, pkg.versions.erase(i++) passes a copy of i to erase, and then

Re: setup: problems with local install

2018-03-07 Thread Ken Brown
On 3/6/2018 1:47 PM, Jon Turney wrote: On 06/03/2018 15:18, Jon Turney wrote: So yeah, I guess putting some complexity back in accessible() would work, or perhaps the attached?  (This doesn't do the right thing for a few packages, for reasons I'm still looking into...) To be specific it was d

Re: setup: problems with local install

2018-03-08 Thread Ken Brown
On 3/7/2018 4:52 PM, Ken Brown wrote: On 3/6/2018 1:47 PM, Jon Turney wrote: On 06/03/2018 15:18, Jon Turney wrote: So yeah, I guess putting some complexity back in accessible() would work, or perhaps the attached?  (This doesn't do the right thing for a few packages, for reasons I&#x

Re: setup: problems with local install

2018-03-08 Thread Ken Brown
On 3/8/2018 10:59 AM, Ken Brown wrote: On 3/7/2018 4:52 PM, Ken Brown wrote: On 3/6/2018 1:47 PM, Jon Turney wrote: On 06/03/2018 15:18, Jon Turney wrote: So yeah, I guess putting some complexity back in accessible() would work, or perhaps the attached?  (This doesn't do the right thin

Re: setup: problems with local install

2018-03-12 Thread Ken Brown
On 3/8/2018 4:59 PM, Ken Brown wrote: On 3/8/2018 10:59 AM, Ken Brown wrote: On 3/7/2018 4:52 PM, Ken Brown wrote: On 3/6/2018 1:47 PM, Jon Turney wrote: On 06/03/2018 15:18, Jon Turney wrote: So yeah, I guess putting some complexity back in accessible() would work, or perhaps the attached

Re: setup: problems with local install

2018-03-14 Thread Ken Brown
On 3/14/2018 12:07 PM, Jon Turney wrote: On 12/03/2018 13:22, Ken Brown wrote: On 3/8/2018 4:59 PM, Ken Brown wrote: On 3/8/2018 10:59 AM, Ken Brown wrote: On 3/7/2018 4:52 PM, Ken Brown wrote: On 3/6/2018 1:47 PM, Jon Turney wrote: On 06/03/2018 15:18, Jon Turney wrote: So yeah, I guess

Problem with packagesource::sites in setup

2018-03-15 Thread Ken Brown
I think we're currently mishandling packagesource::sites when several libsolv repos contain the same version of a package. If I'm not mistaken, we create a new packageversion pv for each repo, and pv.source()->sites contains a single site, corresponding to that repo. So we never take advantag

Re: Problem with packagesource::sites in setup

2018-03-15 Thread Ken Brown
On 3/15/2018 6:07 PM, Jon Turney wrote: On 15/03/2018 21:23, Ken Brown wrote: I think we're currently mishandling packagesource::sites when several libsolv repos contain the same version of a package.  If I'm not mistaken, we create a new packageversion pv for each repo, and

Re: Problem with packagesource::sites in setup

2018-03-16 Thread Ken Brown
On 3/15/2018 10:42 PM, Ken Brown wrote: On 3/15/2018 6:07 PM, Jon Turney wrote: On 15/03/2018 21:23, Ken Brown wrote: I think we're currently mishandling packagesource::sites when several libsolv repos contain the same version of a package.  If I'm not mistaken, we create a new pack

Re: Problem with packagesource::sites in setup

2018-03-17 Thread Ken Brown
On 3/16/2018 7:44 AM, Ken Brown wrote: On 3/15/2018 10:42 PM, Ken Brown wrote: On 3/15/2018 6:07 PM, Jon Turney wrote: On 15/03/2018 21:23, Ken Brown wrote: I think we're currently mishandling packagesource::sites when several libsolv repos contain the same version of a package.  If I&#

[PATCH setup 1/3] Make sure that the IniDBBuilderPackage destructor is called when needed

2018-03-17 Thread Ken Brown
The IniDBBuilderPackage destructor contains code that is intended to be run after each setup.ini file is processed. But the IniDBBuilderPackage variables in do_local_ini() and do_remote_ini were declared outside the loop that processed the files. Move the declaration inside the loop so that the d

[PATCH setup 0/3] Improve the handling of packagesource::sites

2018-03-17 Thread Ken Brown
the course of working on this, I found a problem with the way the IniDBBuilderPackage destructor is called. The first patch fixes that problem. Ken Brown (3): Make sure that the IniDBBuilderPackage destructor is called when needed Internalize the libsolv repo attribute data after each

[PATCH setup 3/3] Keep track of all known sites for a given version of a package

2018-03-17 Thread Ken Brown
When adding a packageversion for an entry in setup.ini, make its packagesource::sites vector include the sites from previously processed ini files. Also remove from the libsolv pool the previous packageversions, so that libsolv will always find the one that lists all the sites. --- IniDBBuilderPa

<    3   4   5   6   7   8   9   10   11   >