commit 0f56ea84ee708564e122662881d31803fe6f294e
parent adf27c4888bf0f23cbb657b66a8cb6ba1fefd55f
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Mon, 1 Sep 2014 14:40:27 +0200
distro-build/readme: adjust content of generated README files
Relevant to PR 14714
(I think the remaining suggestions in the PR are about the build
configuration.)
original commit: 0d9bb1367ee5e0f2e867d848b9463b52f5cca5ad
Diffstat:
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/pkgs/distro-build-pkgs/distro-build-client/doc.txt b/pkgs/distro-build-pkgs/distro-build-client/doc.txt
@@ -393,7 +393,7 @@ configuration keywords to values.
(make-macosx-notes config) -> string
config : hash?
Produces "README" content to tell Mac OS X users how to install a
- distirbution folder. This function is used by `make-readme' when
+ distribution folder. This function is used by `make-readme' when
`#:platform' in `config' is 'macosx.
Names and Download Pages
diff --git a/pkgs/distro-build-pkgs/distro-build-server/readme.rkt b/pkgs/distro-build-pkgs/distro-build-server/readme.rkt
@@ -18,7 +18,7 @@
===============================
This is the
- @|(hash-ref config '#:name "Racket")|
+ @|(drop-sort-annotations (hash-ref config '#:name "Racket"))|
distribution for version @(version)@(maybe-stamp config).@;
@(if (let ([src? (hash-ref config '#:source? #f)])
@@ -43,27 +43,33 @@
[is (if (= 1 (length catalogs)) "is" "are")])
(if (null? catalogs)
""
- @~a{@"\n"The distribution has been configured so that when you install or
+ @~a{
+
+ The distribution has been configured so that when you install or
update packages, the package catalog@|s| at@;
@(apply ~a (for/list ([catalog (in-list catalogs)])
@~a{@"\n" @|catalog|}))
- @|is| consulted, first.@"\n"}))@;
+ @|is| consulted first.
+
+ }))@;
@(let* ([name (hash-ref config '#:install-name "")])
(if (or (equal? name "")
(equal? name (version)))
""
- @~a{@"\n"The distribution has been configured so that the installation
+ @~a{
+
+ The distribution has been configured so that the installation
name is
@name
Multiple installations with this name share `user'-scoped packages,
which makes it easier to upgrade from such an installation to this one.
To avoid sharing (which is better for keeping multiple installations
active) use `raco pkg config -i --set name ...' to choose a different
- name for this installation.@"\n"}))@;
+ name for this installation.
+
+ }))@;
- Visit
- http://racket-lang.org/
- for more Racket resources.
+ Visit http://racket-lang.org/ for more Racket resources.
License
@@ -80,6 +86,13 @@
that you must release the source code for the modified software. See
share/COPYING_LESSER.txt for more information.})
+(define (drop-sort-annotations s)
+ ;; Any number of spaces is allowed around "{...}" and "|",
+ ;; so normalize that space while also removing "{...}":
+ (regexp-replace* #rx" *[|] *"
+ (regexp-replace* #rx" *{[^}]*} *" s "")
+ " | "))
+
(define (make-source-notes config)
(define src? (hash-ref config '#:source? #f))
(define rt-src