public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: jturney@sourceware.org
To: cygwin-apps-cvs@sourceware.org
Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. bedb9881c8d19b7a537c59ff10446f56f9abf3e4
Date: Tue, 22 Mar 2016 15:27:00 -0000	[thread overview]
Message-ID: <20160322152728.44646.qmail@sourceware.org> (raw)




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=bedb9881c8d19b7a537c59ff10446f56f9abf3e4

commit bedb9881c8d19b7a537c59ff10446f56f9abf3e4
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Mar 22 11:42:15 2016 +0000

    Remove forced capitalization of first word of sdesc

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=ba681e8008b0906f77a0f67e19c4e0574df97898

commit ba681e8008b0906f77a0f67e19c4e0574df97898
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Feb 22 13:39:12 2016 +0000

    Drop special handling of ':' in sdesc
    
    No longer warn if ':' is in sdesc
    Warn if sdesc appears to start with 'package:'
    Don't remove text up to ':' from sdesc in setup.ini
    Update tests

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=bcaaee2946a8ccb6cafe8beae8461eceaa274011

commit bcaaee2946a8ccb6cafe8beae8461eceaa274011
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Mar 22 10:46:09 2016 +0000

    Update package listing base directory .htaccess
    
    Deal with access to /packages/index.html by redirecting to
    package_list.html, rather than letting the server index a very large
    directory
    
    Also fix --force to apply to .htaccess files
    
    Adjust logging capitalization harmonize with everything else
    
    Update tests


Diff:
---
 pkg2html.py                            |   14 +++++++-------
 testdata/htdocs.expected/x86/.htaccess |    4 +---
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/pkg2html.py b/pkg2html.py
index 1335352..e76fa7a 100755
--- a/pkg2html.py
+++ b/pkg2html.py
@@ -72,8 +72,8 @@ def update_package_listings(args, packages):
     #
 
     htaccess = os.path.join(base, '.htaccess')
-    if not os.path.exists(htaccess):
-        logging.info('Writing %s' % htaccess)
+    if not os.path.exists(htaccess) or args.force:
+        logging.info('writing %s' % htaccess)
         if not args.dryrun:
             with open(htaccess, 'w') as f:
 
@@ -102,8 +102,8 @@ def update_package_listings(args, packages):
 
         htaccess = os.path.join(dir, '.htaccess')
         if not os.path.exists(htaccess):
-            logging.info('Writing %s' % htaccess)
-            if not args.dryrun:
+            logging.info('writing %s' % htaccess)
+            if not args.dryrun or args.force:
                 with open(htaccess, 'w') as f:
 
                     print(textwrap.dedent('''\
@@ -127,7 +127,7 @@ def update_package_listings(args, packages):
             # ... if it doesn't already exist, or force
             if not os.path.exists(html) or args.force:
 
-                logging.info('Writing %s' % html)
+                logging.info('writing %s' % html)
 
                 if not args.dryrun:
                     with open(html, 'w') as f:
@@ -167,7 +167,7 @@ def update_package_listings(args, packages):
                                                  </pre></tt>
                                                  </html>'''), file=f)
             else:
-                logging.debug('Not writing %s, already exists' % html)
+                logging.debug('not writing %s, already exists' % html)
 
             # this file should exist, so remove from the toremove list
             if html in toremove:
@@ -178,7 +178,7 @@ def update_package_listings(args, packages):
     #
 
     packages_inc = os.path.join(base, 'packages.inc')
-    logging.info('Writing %s' % packages_inc)
+    logging.info('writing %s' % packages_inc)
     if not args.dryrun:
         with open(packages_inc, 'w') as index:
             os.fchmod(index.fileno(), 0o755)
diff --git a/testdata/htdocs.expected/x86/.htaccess b/testdata/htdocs.expected/x86/.htaccess
index a8da927..1ea7b18 100644
--- a/testdata/htdocs.expected/x86/.htaccess
+++ b/testdata/htdocs.expected/x86/.htaccess
@@ -1,3 +1 @@
-Options Indexes FollowSymLinks Includes
-IndexOptions FancyIndexing DescriptionWidth=* SuppressSize SuppressLastModified IconHeight=10 IconWidth=10
-AddIcon /icons/ball.gray.gif ^^DIRECTORY^^
+Redirect temp /packages/x86/index.html https://cygwin.com/packages/package_list.html


                 reply	other threads:[~2016-03-22 15:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160322152728.44646.qmail@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).