[RFC] Removing .la files from x86

2016-08-02 Thread Yaakov Selkowitz
Libtool .la files are generally a waste of time and space.  They slow 
down linking of other libraries with libtool, and they cause otherwise 
unnecessary private dependencies to be pulled in by -devel packages. 
Therefore, the major distros generally remove them from their packages 
unless they are really necessary.


When we first enabled Cygwin for x86_64, as we had no backwards 
compatibility to worry about, I made removing all .la files the default. 
 AFAIK this has worked well, and any missing link libraries that the 
presence thereof would have masked have already been fixed.


In order to do the same for x86 without breaking builds of other 
packages, AFAICS we would need a perpetual postinstall script which will 
continually remove them.  The downside is that (unless the script is 
made a *LOT* more complicated) a number of -devel packages will show up 
as "Incomplete" until such time they are rebuilt with a new version of 
cygport.


Any objections?

--
Yaakov


[PATCH setup 10/10] Reserve paths starting "." for package metadata

2016-08-02 Thread Jon Turney
Reserve pathnames starting "." (i.e. dotfiles in the root directory) for
package metadata, so don't extract them.

There are no current uses of these pathnames
---
 install.cc | 9 +
 1 file changed, 9 insertions(+)

diff --git a/install.cc b/install.cc
index f54acdc..8aad3a5 100644
--- a/install.cc
+++ b/install.cc
@@ -471,6 +471,15 @@ Installer::installOne (packagemeta , const 
packageversion ,
   while ((fn = tarstream->next_file_name ()).size ())
 {
   std::string canonicalfn = prefixPath + fn;
+
+  // pathnames starting "." (i.e. dotfiles in the root directory) are
+  // reserved for package metadata.  Don't extract them.
+  if (fn[0] == '.')
+{
+  tarstream->skip_file ();
+  continue;
+}
+
   Progress.SetText3 (canonicalfn.c_str ());
   Log (LOG_BABBLE) << "Installing file " << prefixURL << prefixPath
   << fn << endLog;
-- 
2.8.3



[PATCH setup 09/10] Add an additional filter view, showing packages which were user picked

2016-08-02 Thread Jon Turney
Add an additional filter view, showing installed packages which were
selected for installation by the user, not installed as dependencies.

Future work:

Why is PickView::views is not an enum?

The view button would make more sense as a pop-up menu, allowing a specific
filter view to be directly selected, rather than cycling around the possible
filter views (and this situation is made worse by adding another filter
view)
---
 PickView.cc | 16 
 PickView.h  |  4 ++--
 res.rc  |  5 -
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/PickView.cc b/PickView.cc
index 4630ee9..c784a2a 100644
--- a/PickView.cc
+++ b/PickView.cc
@@ -57,8 +57,9 @@ const PickView::views PickView::views::Unknown (0);
 const PickView::views PickView::views::PackageFull (1);
 const PickView::views PickView::views::Package (2);
 const PickView::views PickView::views::PackageKeeps (3);
-const PickView::views PickView::views::PackageSkips = PickView::views (4);
-const PickView::views PickView::views::Category (5);
+const PickView::views PickView::views::PackageSkips (4);
+const PickView::views PickView::views::PackageUserPicked (5);
+const PickView::views PickView::views::Category (6);
 
 ATOM PickView::WindowClassAtom = 0;
 
@@ -92,7 +93,8 @@ PickView::set_header_column_order (views vm)
   if (vm == views::Unknown)
 return -1;
   else if (vm == views::PackageFull || vm == views::Package
-  || vm == views::PackageKeeps || vm == views::PackageSkips)
+   || vm == views::PackageKeeps || vm == views::PackageSkips
+   || vm == views::PackageUserPicked)
 {
   headers = pkg_headers;
   current_col = 0;
@@ -197,7 +199,11 @@ PickView::setViewMode (views mode)
 
   // "Not installed"
   || (view_mode == PickView::views::PackageSkips &&
-  (!pkg.desired && !pkg.installed)))
+  (!pkg.desired && !pkg.installed))
+
+  // "UserPick" : installed packages that were picked by user
+  || (view_mode == PickView::views::PackageUserPicked &&
+  (pkg.installed && pkg.user_picked)))
 {
   // Filter by package name
   if (packageFilterString.empty ()
@@ -246,6 +252,8 @@ PickView::views::caption ()
 case 4:
   return "Not Installed";
 case 5:
+  return "Picked";
+case 6:
   return "Category";
 default:
   return "";
diff --git a/PickView.h b/PickView.h
index 0ce7581..fd20dc9 100644
--- a/PickView.h
+++ b/PickView.h
@@ -104,15 +104,15 @@ public:
 static const views Package;
 static const views PackageKeeps;
 static const views PackageSkips;
+static const views PackageUserPicked;
 static const views Category;
-static const views NView;
   views ():_value (0)
 {
 };
 views (int aInt)
 {
   _value = aInt;
-  if (_value < 0 || _value > 5)
+  if (_value < 0 || _value > 6)
_value = 0;
 }
 views & operator++ ();
diff --git a/res.rc b/res.rc
index f1cf406..de75da8 100644
--- a/res.rc
+++ b/res.rc
@@ -551,7 +551,10 @@ BEGIN
"are at the desired version already.\r\n"
"\r\n"
"Not installed: Show packages that are are not currently installed "
-   "and haven't been selected for installation."
+   "and haven't been selected for installation.\r\n"
+   "\r\n"
+   "Picked: Show installed packages that were selected, not installed "
+   "as a dependency."
 IDS_HIDEOBS_TOOLTIP "If selected, setup will hide packages in 
categories "
"with names that begin with '_'.  Such packages are usually empty "
"placeholders for packages that have been removed or renamed, or are "
-- 
2.8.3



[PATCH setup 04/10] Downgrade "Running preremove script" logging to debug

2016-08-02 Thread Jon Turney
This is emitted for every package, regardless of it has any scripts or not.
Actual script execution is logged separately.

Also a cosmetic fix to remove a doubled space.
---
 install.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install.cc b/install.cc
index 2b714bc..f54acdc 100644
--- a/install.cc
+++ b/install.cc
@@ -159,7 +159,7 @@ Installer::preremoveOne (packagemeta & pkg)
 {
   Progress.SetText1 ("Running preremove script...");
   Progress.SetText2 (pkg.name.c_str());
-  Log (LOG_PLAIN) << "Running preremove script for  " << pkg.name << endLog;
+  Log (LOG_BABBLE) << "Running preremove script for " << pkg.name << endLog;
   const unsigned numexts = 4;
   const char* exts[numexts] = { ".dash", ".sh", ".bat", ".cmd" };
   for (unsigned i = 0; i < numexts; i++)
-- 
2.8.3



[PATCH setup 05/10] Properly report progress in PrereqChecker::isMet

2016-08-02 Thread Jon Turney
Properly report progress in PrereqChecker::isMet after additional dependency
work is found.
---
 prereq.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/prereq.cc b/prereq.cc
index bdc609e..a5083ed 100644
--- a/prereq.cc
+++ b/prereq.cc
@@ -238,6 +238,7 @@ PrereqChecker::isMet ()
 {
   // newly found dependency: add to worklist
   todo.push (dep);
+  max++;
 }
   unmet[dep].push_back (pack);
 }
-- 
2.8.3



[PATCH setup 06/10] Remove obsolete installed_from member from packagemeta

2016-08-02 Thread Jon Turney
This just stores a made-up tarfile name read from installed.db, and is never
used.
---
 package_db.cc   |  2 +-
 package_meta.cc |  2 +-
 package_meta.h  | 11 ++-
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/package_db.cc b/package_db.cc
index 73dfbf6..87da922 100644
--- a/package_db.cc
+++ b/package_db.cc
@@ -96,7 +96,7 @@ packagedb::packagedb ()
  packagemeta *pkg = findBinary (PackageSpecification(pkgname));
  if (!pkg)
{
- pkg = new packagemeta (pkgname, inst);
+ pkg = new packagemeta (pkgname);
  packages.insert 
(packagedb::packagecollection::value_type(pkgname, pkg));
  /* we should install a new handler then not check this...
   */
diff --git a/package_meta.cc b/package_meta.cc
index 34ff78c..21b21ef 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -91,7 +91,7 @@ packagemeta::_actions::caption ()
 }
 
 packagemeta::packagemeta (packagemeta const ) :
-  name (rhs.name), key (rhs.name), installed_from (), 
+  name (rhs.name), key (rhs.name),
   categories (rhs.categories), versions (rhs.versions),
   installed (rhs.installed), prev (rhs.prev),
   curr (rhs.curr),
diff --git a/package_meta.h b/package_meta.h
index b24d4fc..3d6ccd2 100644
--- a/package_meta.h
+++ b/package_meta.h
@@ -35,17 +35,11 @@ public:
   static void ScanDownloadedFiles (bool);
   packagemeta (packagemeta const &);
   packagemeta (const std::string& pkgname)
-  : name (pkgname), key(pkgname), installed_from (), user_picked (false),
+  : name (pkgname), key(pkgname), user_picked (false),
 architecture (), priority(), visited_(false)
   {
   }
 
-  packagemeta (const std::string& pkgname, const std::string& installedfrom)
-  : name (pkgname), key(pkgname), installed_from (installedfrom),
-user_picked (false), architecture (), priority(), visited_(false)
-  {
-  }
-
   ~packagemeta ();
 
   void add_version (packageversion &);
@@ -118,8 +112,7 @@ public:
 
   std::string name;/* package name, like "cygwin" */
   std::string key;
-  /* legacy variable used to output data for installed.db versions <= 2 */
-  std::string installed_from;
+
   /* true if package was selected on command-line. */
   bool isManuallyWanted() const;
   /* true if package was deleted on command-line. */
-- 
2.8.3



[PATCH setup 03/10] Add lex and yacc generated files to .gitignore

2016-08-02 Thread Jon Turney
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
index 2186aac..8b81166 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,6 @@ make.out
 CVS
 tags
 autoconf.h.in*
+inilex.cc
+iniparse.cc
+iniparse.hh
-- 
2.8.3



Re: [PATCH setup] (Usability improvement) Implement half-second wait for user to finish typing before searching packages

2016-08-02 Thread Jon Turney

On 02/08/2016 04:17, Ronald Ramos wrote:

@@ -397,10 +396,10 @@ ChooserPage::OnMessageCmd (int id, HWND hwndctl,
UINT code)
 {
 case IDC_CHOOSE_CLEAR_SEARCH:
   {
-std::string value;
-eset (GetHWND (), IDC_CHOOSE_SEARCH_EDIT, value);
-chooser->SetPackageFilter (value);
-chooser->refresh ();
+std::string value;
+eset (GetHWND (), IDC_CHOOSE_SEARCH_EDIT, value);
+chooser->SetPackageFilter (value);
+chooser->refresh ();


Shouldn't the timer be cancelled here, to avoid potentially doing a 
refresh() twice?





Re: [PATCH setup] (Usability improvement) Implement half-second wait for user to finish typing before searching packages

2016-08-02 Thread Thomas Wolff

Am 02.08.2016 um 11:22 schrieb Corinna Vinschen:

On Aug  1 23:17, Ronald Ramos wrote:

commit 357c1e7576586349efb8514dc9d8d03950e225ee
Author: Ronald Ramos 
Date:   Mon Aug 1 23:05:44 2016 -0400

 * proppage.h (PropertyPage)
 New member OnTimerMessage (delegates similarly to OnMouseWheel)

 * proppage.cc
 (DialogProc) Added handling of WM_TIMER

 * choose.h (ChooserPage)
 (OnTimerMessage) New function prototype
 (timer_id) New member variable
 Added DEFINE-ed default values for timer_id and search timer delay
 Reorganized private members for consistency

 * choose.cc
 (constructor) Initialize timer_id
 (OnMessageCmd) Replaced search-refresh with a SetTimer
 (OnSearchTimer) New; contains search-refresh removed from
OnMessageCmd

Neat!  Applied.  Personally I would rather see a shorter timeout like,
say, 300ms, but I guess we shouldn't take for granted that everybody is
typing fast.  Even with 500ms timeout it's now much more convenient than
the old "search after each keypress" method.
I agree with Corinna. Great enhancement, but 300ms should be a good 
trade-off for unpatient people...

Thomas


Re: [PATCH setup] (Usability improvement) Implement half-second wait for user to finish typing before searching packages

2016-08-02 Thread Corinna Vinschen
On Aug  1 23:17, Ronald Ramos wrote:
> commit 357c1e7576586349efb8514dc9d8d03950e225ee
> Author: Ronald Ramos 
> Date:   Mon Aug 1 23:05:44 2016 -0400
> 
> * proppage.h (PropertyPage)
> New member OnTimerMessage (delegates similarly to OnMouseWheel)
> 
> * proppage.cc
> (DialogProc) Added handling of WM_TIMER
> 
> * choose.h (ChooserPage)
> (OnTimerMessage) New function prototype
> (timer_id) New member variable
> Added DEFINE-ed default values for timer_id and search timer delay
> Reorganized private members for consistency
> 
> * choose.cc
> (constructor) Initialize timer_id
> (OnMessageCmd) Replaced search-refresh with a SetTimer
> (OnSearchTimer) New; contains search-refresh removed from
> OnMessageCmd

Neat!  Applied.  Personally I would rather see a shorter timeout like,
say, 300ms, but I guess we shouldn't take for granted that everybody is
typing fast.  Even with 500ms timeout it's now much more convenient than
the old "search after each keypress" method.

However.  Your MUA seems to scramble patches as part of the mail text,
e.g., it adds line breaks which break `patch' or `git am'.

It would be nice if you could fix this.  Alternatively, just attach the
output from `git format-patch' as mail attachment.  That usually works
nicely.


Thanks,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


Re: [PATCH setup] README: Fixed mailing list address (typo)

2016-08-02 Thread Corinna Vinschen
On Aug  1 20:24, Ronald Ramos wrote:
> commit 5d7c3beee3317926eb3256dd7a1bed8f55a6952b
> Author: Ronald Ramos 
> Date:   Mon Aug 1 20:21:47 2016 -0400
> 
> * README: Fixed which mailing list this app belongs to
> 
> diff --git a/README b/README
> index 9ad78b6..a05b18f 100644
> --- a/README
> +++ b/README
> @@ -70,7 +70,7 @@ Follow the general directions given in the Cygwin
> contributions document:
>  The appropriate mailing list for this project is cygwin-apps
>  (rather than cygwin-patches). Thus, the appropriate final command would be:
> 
> -   $ git send-email --to="cygwin-patc...@cygwin.com"
> +   $ git send-email --to="cygwin-apps@cygwin.com"
> 
> 
>  WISHLIST:

Applied.


Thanks,
Corinna
-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature