planet command-line tool changes to keep it from spuriously rejecting packages that now make sense; doc updates

svn: r5855
This commit is contained in:
Jacob Matthews 2007-04-02 05:10:07 +00:00
parent df5495188c
commit c8be8b8e79
4 changed files with 60 additions and 21 deletions

View File

@ -19,7 +19,6 @@
(DEFAULT-PACKAGE-LANGUAGE (version)) (DEFAULT-PACKAGE-LANGUAGE (version))
(USE-HTTP-DOWNLOADS? #t) (USE-HTTP-DOWNLOADS? #t)
(HTTP-DOWNLOAD-SERVLET-URL "http://planet.plt-scheme.org/servlets/planet-servlet.ss" (HTTP-DOWNLOAD-SERVLET-URL "http://planet.plt-scheme.org/servlets/planet-servlet.ss")
#;"http://coach.cs.uchicago.edu/servlets/planet/planet-servlet.ss")
(PLANET-ARCHIVE-FILTER #f))) (PLANET-ARCHIVE-FILTER #f)))

View File

@ -408,6 +408,13 @@ encoded as x-expressions (see the xml collection for details) that
PLaneT will use as a short description of your project. This field PLaneT will use as a short description of your project. This field
is also used by the Help Desk. is also used by the Help Desk.
The _'release-notes field_
If present, the release-notes field should contain a list of XHTML
fragments encoded as x-expressions (see the xml collection for
details) that PLaneT will use as a short description of what's new
in this release of your package.
The _'categories field_ The _'categories field_
If present, the categories field should be a list of symbols If present, the categories field should be a list of symbols
@ -499,10 +506,17 @@ package on the main PLaneT web page.
The _'primary-file field_ The _'primary-file field_
If present, the primary-file field should be a string corresponding to If present, the primary-file field should be a either a string
the name (without path) of the main Scheme source file of your corresponding to the name (without path) of the main Scheme source
package. PLaneT will direct casual users of your library to require file of your package, or a list of such strings. The PLaneT web page
this file. corresponding to this package will present all files listed here as
interface files for your package; it will give direct links to each
package and a listing of all names provided by the package along with
their contracts (if present).
If you include only a single string, it will be used as the require
line printed on your package's page. If you include a list of strings,
then the first legal file string in the list will be used.
The _'required-core-version field_ The _'required-core-version field_
@ -595,17 +609,19 @@ problems.)
4. SUBMIT THE PACKAGE 4. SUBMIT THE PACKAGE
E-mail the .plt file you built to jacobm+planet@plt-scheme.org If the Go to http://planet.plt-scheme.org/ and click on the link marked
package is an upgrade to a prior package, then tell me so and tell me "contribute a package / log in" in the upper-right-hand corner. If you
whether or not this package is backwards-compatible with the package have not yet created an account, then do so on that page by providing
it's upgrading. Also tell me what PLT Scheme version this package is your name, a user name, an email address, and a password and then
intended for. There's no particular format for this message; the responding to the confirmation message delivered to the email address
system isn't automated yet so I'll just be reading these and you provide.
processing them by hand.
Once I've added your package to the repository, I'll e-mail you Once you have an account, then if this is a new package then upload it
back and tell you the require-line users will need to type in to get using the "Contribute a package" section in your user account page. If
it. this is a package update then click "update this package" next to its
name in the "Manage your packages" section of your user account page,
then upload the .plt file and indicate on the form whether your update
is backwards-compatible with the prior version or not.
WARNING: WARNING:

View File

@ -31,6 +31,12 @@ PLANNED FEATURES:
(command-line (command-line
"planet" "planet"
(current-command-line-arguments) (current-command-line-arguments)
(once-each
(("--force")
""
"Used in conjunction with --create-package; force a package to be"
"created even its info.ss file contains errors."
(force-package-building? #t)))
(once-any (once-any
(("-f" "--file") (("-f" "--file")
plt-file owner maj min plt-file owner maj min

View File

@ -22,6 +22,7 @@
current-cache-contents current-cache-contents
current-linkage current-linkage
make-planet-archive make-planet-archive
force-package-building?
get-installed-planet-archives get-installed-planet-archives
get-hard-linked-packages get-hard-linked-packages
remove-pkg remove-pkg
@ -180,6 +181,7 @@
[else (error 'regexp->filter "not a regular expression")])]) [else (error 'regexp->filter "not a regular expression")])])
(lambda (p) (regexp-match re (path->bytes p))))) (lambda (p) (regexp-match re (path->bytes p)))))
(define force-package-building? (make-parameter #f))
;; make-planet-archive: directory [file] -> file ;; make-planet-archive: directory [file] -> file
;; Makes a .plt archive file suitable for PLaneT whose contents are ;; Makes a .plt archive file suitable for PLaneT whose contents are
@ -205,7 +207,10 @@
(λ (bad) (set! warnings (cons bad warnings))) (λ (bad) (set! warnings (cons bad warnings)))
(λ (err) (set! critical-errors (cons err critical-errors)))) (λ (err) (set! critical-errors (cons err critical-errors))))
(unless (null? critical-errors) (error '|PLaneT packager| "~a Refusing to continue packaging." (car critical-errors))) (unless
(or (null? critical-errors)
(force-package-building?))
(error '|PLaneT packager| "~a Refusing to continue packaging." (car critical-errors)))
(pack archive-name (pack archive-name
"archive" "archive"
@ -253,9 +258,14 @@
] ]
[blurb [blurb
(λ (b) (and (list? b) (andmap xexpr? b))) (λ (b) (and (list? b) (andmap xexpr? b)))
(announce "Blurb: ~s\n" blurb) (announce "Package blurb: ~s\n" blurb)
(unless blurb (unless blurb
(warn "Package's info.ss does not contain a blurb field. Without a blurb field, the package will have no description on planet.plt-scheme.org."))] (warn "Package's info.ss does not contain a blurb field. Without a blurb field, the package will have no description on planet.plt-scheme.org."))]
[release-notes
(λ (b) (and (list? b) (andmap xexpr? b)))
(announce "Release notes: ~s\n" release-notes)
(unless release-notes
(warn "Package's info.ss does not contain a release-notes field. Without a release-notes field, the package will not have any listed release information on planet.plt-scheme.org beyond the contents of the blurb field."))]
[categories [categories
(λ (s) (and (list? s) (andmap symbol? s))) (λ (s) (and (list? s) (andmap symbol? s)))
(cond (cond
@ -284,10 +294,18 @@
[else [else
(fail (format "The value of the package's info.ss homepage field, ~s, does not appear to be a legal URL." homepage))])] (fail (format "The value of the package's info.ss homepage field, ~s, does not appear to be a legal URL." homepage))])]
[primary-file [primary-file
string? (λ (x) (or (string? x) (and (list? x) (andmap string? x))))
(begin (begin
(unless (file-in-current-directory? primary-file) (cond
(warn (format "Package's info.ss primary-file field is ~s, a file that does not exist in the package." primary-file))) [(string? primary-file)
(unless (file-in-current-directory? primary-file)
(warn (format "Package's info.ss primary-file field is ~s, a file that does not exist in the package."
primary-file)))]
[(pair? primary-file)
(let ([bad-files (filter (λ (f) (not (file-in-current-directory? f))) primary-file)])
(unless (null? bad-files)
(warn (format "Package's info.ss primary-file field is ~s, which contains non-existant files ~s."
primary-file bad-files))))])
(announce "Primary file: ~a\n" primary-file)) (announce "Primary file: ~a\n" primary-file))
(unless primary-file (unless primary-file
(warn "Package's info.ss does not contain a primary-file field. The package's listing on planet.plt-scheme.org will not have a valid require line for your package."))] (warn "Package's info.ss does not contain a primary-file field. The package's listing on planet.plt-scheme.org will not have a valid require line for your package."))]