On 7/15/2013 2:58 PM, Christopher Faylor wrote:
On Mon, Jul 15, 2013 at 02:32:24PM -0400, Charles Wilson wrote:
What changes did you have to make to upset, to teach it about the new
format? I'd like to replicate those changes in genini...

        
http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/genini/genini?rev=1.13&cvsroot=cygwin-apps

... so I can test the new setup-exe's with my to-be-uploaded packages.

The new setup.exe will still understand old setup.ini's, just not the
reverse.

However, all that I did to upset (for this particular change there were
a few more other changes required) was add --release and --arch options
to produce the setup.ini with those tags.

Feel free to add those to genini if you want.

Works fine installing from the mirrors [1] or from local repo, with the following patch to genini [2]:

2013-07-16  Charles Wilson  <...>

    * genini: Accept 'Debug' category. Add support for
    --release and --arch commandline options, and emit
    the appropriate entries (default release='cygwin',
    default arch='x86').

[1] With the already-reported issue regarding empty/src-only packages.

[2] This patch does not address the recently-reported issue with genini that (might be?) related to the above empty/src-only thing:
http://cygwin.com/ml/cygwin-apps/2013-07/msg00207.html

OK to commit this patch (I think I have write access to the genini module in the cygwin-apps repo)?

--
Chuck

Index: genini
===================================================================
RCS file: /cvs/cygwin-apps/genini/genini,v
retrieving revision 1.13
diff -u -p -r1.13 genini
--- genini      21 Jul 2010 15:02:30 -0000      1.13
+++ genini      16 Jul 2013 21:55:17 -0000
@@ -14,16 +14,26 @@ use strict;
 sub mywarn(@);
 sub myerror(@);
 sub usage();
+sub arch_handler(@);
 
 my @okmissing = qw'message ldesc';
 my ($outfile, $help, $recursive);
+my $arch = 'x86';
+my $release = 'cygwin';
 my @cmp_fmts = qw(gz bz2 lzma xz);
 
-GetOptions('okmissing=s'=>\@okmissing, 'output=s'=>\$outfile, 'help'=>\$help, 
'recursive'=>\$recursive) or usage;
+GetOptions('okmissing=s'=>\@okmissing, 'output=s'=>\$outfile, 'help'=>\$help, 
'release=s'=>\$release, 'arch=s'=>\&arch_handler, 'recursive'=>\$recursive) or 
usage;
 $help and usage;
 
 @main::okmissing{@okmissing} = @okmissing;
 
+sub arch_handler (@) {
+   my ($opt_name, $opt_value) = @_;
+   die "invalid arch specified: '$opt_value'"
+      unless $main::valid_arch{lc $opt_value};
+   $arch = $opt_value;
+}
+
 if (defined($outfile)) {
     open(STDOUT, '>', $outfile) or die "$0: can't open $outfile - $!\n";
 }
@@ -46,6 +56,8 @@ print <<'EOF';
 EOF
 
 my $ts = time();
+print "release: $release\n";
+print "arch: $arch\n";
 print "setup-timestamp: $ts\n";
 print "$main::setup_version\n" if $main::setup_version;
 
@@ -277,6 +289,9 @@ Create cygwin setup.ini from setup.ini, 
                        missing tarballs. --okmissing=source is useful for
                        LOCAL-ONLY[*] srcless install media.
     --recursive        recurse all subdirectories of specified dirs
+    --arch=x86|x64_86  Must be either x86 or x64_86. Defaults to x86.
+    --release=string   repository id: cygwin, cygwinports, etc. Defaults
+                       to cygwin.
     --output=file      output setup.ini info to file
     --help             display this message
 
@@ -289,10 +304,13 @@ EOF
 
 BEGIN {
     my @cats = qw'
-     Admin Archive Audio Base Comm Database Devel Doc Editors Games
+     Admin Archive Audio Base Comm Database Debug Devel Doc Editors Games
      Gnome Graphics Interpreters KDE Libs Mail Math Mingw Net Perl
      Publishing Python Science Shells Sound System Text Utils Web X11
      _obsolete _PostInstallLast
      ';
     @main::categories{map {lc $_} @cats} = @cats;
+
+    my @archs = qw'x86 x86_64';
+    @main::valid_arch{map {lc $_} @archs} = @archs;
 }

Reply via email to