This is the mail archive of the
cygwin-apps-cvs
mailing list for the cygwin-apps project.
[calm - Cygwin server-side packaging maintenance script] branch master, updated. bedb9881c8d19b7a537c59ff10446f56f9abf3e4
- From: jturney at sourceware dot org
- To: cygwin-apps-cvs at sourceware dot org
- Date: 22 Mar 2016 15:27:28 -0000
- Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. bedb9881c8d19b7a537c59ff10446f56f9abf3e4
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