This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to automatically install all local packages


Max and Brian

Max Bowsher wrote:
Brian Dessent wrote:


Please let me know if there is a way to force cygwin to install all
packages in the local package directory. Ideally a command line option to
change the

I don't think there's any way to do this directly. It's been requested before the ability to specify on the command line certain packages to install, and I think that would be a useful feature to have for people in your situation.

You might be able to kludge it though.  If you provided an
/etc/setup/installed.db that listed each desired package with a version
of '0', then setup should see that the package is already installed and
try to upgrade it to the current available version.  E.g. place a line
"foo foo-0-0.tar.bz2 0" for each package that you wish to be 'upgraded'
(i.e. installed.)  If there are no mounts on the system, though, I'm not
sure if setup will know where to find /etc/setup/, so you might have to
add the mounts before running setup.  Since you already know the
location where Cygwin will be installed, that should be feasible.

The above should work, but there is another option:


Edit the local setup.ini, placing everything you want installed into the category "Misc". (They can be in other categories too). Anything in either "Misc" or "Base" will always be selected for installation.

Max.



I appreciate both of your helpful replies. I guessed there would be ways to 'trick' the setup using configuration files and looked a little bit, but hadn't figured out how to do it. I understand both of your answers and will consider them if my patch (see next) takes some time to be accepted.


I did determine how to change the setup code in order to set the initial installation mode to 'install' instead of 'default'. Once I found the place, it turned out to be a very small change. Basically I added a new command line option '-I, --install' that installs all available patches, rather than only installing the 'default' patches.

The patch is included below. This patch is relative to the HEAD version, but the same patch can be applied to the current release code without any changes. From what I could tell, posting the patch to this list is the appropriate first step to its possible inclusion in the code. I hope the patch can be included, as it will be very helpful to me and my user base, and seems to have a very small probability of introducing problems.

If there is a better way to submit this patch, please let me know.

On a related note, could someone explain the release schedule for 'setup' or point me to the place that it is documented? I am asking so I might estimate when this patch could become official, if it is accepted. Ideally, I would like to start using it right away, as a small update to the 2.457.2.2 release (as well as adding it to future releases from HEAD). Is that possible?

Regards
Tod


2005-05-13 Tod Courtney <tcourtne@uiuc.edu>


	Add 'Install All' command line option (-I, --install) to change the
	initial installation mode from 'default to 'install'.

	* PickCategoryLine.h (PickCategoryLine): Read InstallAll
	BoolOption and change initial installation mode appropriately.
	* PickCategoryLine.cc: Define InstallAll BoolOption





--
Tod Courtney                         Senior Research Programmer
Coordinated Science Lab                      | Ph:(217)244-3203
University of Illinois at Urbana, Champaign  | Fx:(217)244-3359
231 CSL, 1308 W. Main St., Urbana, IL 61801  |tod@crhc.uiuc.edu
Index: PickCategoryLine.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/PickCategoryLine.cc,v
retrieving revision 2.7
diff -u -p -r2.7 PickCategoryLine.cc
--- PickCategoryLine.cc	5 May 2005 22:48:34 -0000	2.7
+++ PickCategoryLine.cc	13 May 2005 18:50:54 -0000
@@ -17,6 +17,9 @@
 #include "package_db.h"
 #include "PickView.h"
 
+BoolOption InstallAll (false, 'I', "install", 
+                       "Install all available packages");
+
 void
 PickCategoryLine::empty (void)
 {
Index: PickCategoryLine.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/PickCategoryLine.h,v
retrieving revision 2.7
diff -u -p -r2.7 PickCategoryLine.h
--- PickCategoryLine.h	23 Jun 2003 20:48:59 -0000	2.7
+++ PickCategoryLine.h	13 May 2005 18:50:54 -0000
@@ -21,6 +21,9 @@ class PickView;
 #include <vector>
 #include "PickLine.h"
 #include "package_meta.h"
+#include "getopt++/BoolOption.h"
+
+extern BoolOption InstallAll;
 
 class PickCategoryLine:public PickLine
 {
@@ -41,6 +44,12 @@ public:
 	collapsed = false;
 	show_label = aBool2;
       }
+
+    
+    // allow user to force installation of all packages
+    if (InstallAll) 
+      current_default=packagemeta::Install_action;
+
   };
   ~PickCategoryLine ()
   {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]