* Added an unpack w/o installation option to the command-line tool
* Misc. fixes svn: r7337
This commit is contained in:
parent
f293528155
commit
56e74bf7e1
|
@ -20,14 +20,13 @@ The structure of user PLaneT invocations is listed below.
|
|||
|
||||
PLANET-REQUEST ::= (planet FILE-NAME PKG-SPEC [PATH ...])
|
||||
FILE-NAME ::= string
|
||||
PKG-SPEC ::= (FILE-PATH ... PKG-NAME) | (FILE-PATH ... PKG-NAME VER-SPEC)
|
||||
VER-SPEC ::= Nat | (Nat MINOR)
|
||||
PKG-SPEC ::= (OWNER-NAME PKG-NAME) | (OWNER PKG-NAME . VER-SPEC)
|
||||
VER-SPEC ::= (Nat) | (Nat MINOR)
|
||||
MINOR ::= Nat ; the specified revision or above
|
||||
| (Nat Nat) ; a revision between the two specified numbers (inclusive)
|
||||
| (= Nat) ; exactly the revision specified
|
||||
| (+ Nat) ; the specified revision or above
|
||||
| (- Nat) ; the specified revision or below
|
||||
FILE-PATH ::= string ; the path to the given package in the repository
|
||||
PKG-NAME ::= string
|
||||
OWNER-NAME ::= string
|
||||
PATH ::= string ; the subdirectory path to the specified file within the package
|
||||
|
@ -167,6 +166,11 @@ files in the given directory and returns that file's name. If the
|
|||
optional filename argument is provided, that filename will be used as
|
||||
the output file's name.
|
||||
|
||||
> (unpack-planet-archive filename pathname) -> void
|
||||
|
||||
Unpacks the PLaneT archive with the given filename, placing its contents
|
||||
into the given directory (creating that path if necessary).
|
||||
|
||||
> (remove-pkg owner name major-version minor-version) -> void
|
||||
|
||||
Removes the specified package from the local planet cache. Owner and
|
||||
|
@ -317,6 +321,11 @@ of what development links are.)
|
|||
|
||||
Remove any development links from the given package specifier.
|
||||
|
||||
--unpack <plt-file> <path>
|
||||
|
||||
Unpack the given PLaneT archive into the given path, which is
|
||||
created if necessary.
|
||||
|
||||
|
||||
_Development links_
|
||||
-------------------
|
||||
|
|
|
@ -105,6 +105,11 @@ PLANNED FEATURES:
|
|||
owner pkg maj min
|
||||
"Get a URL for the given package"
|
||||
(set! actions (cons (lambda () (get-download-url owner pkg maj min)) actions)))
|
||||
|
||||
(("--unpack")
|
||||
plt-file target
|
||||
"Unpack the contents of the given package into the given directory without installing"
|
||||
(set! actions (cons (lambda () (do-unpack plt-file target)) actions)))
|
||||
|
||||
;; unimplemented so far:
|
||||
#;(("-u" "--unlink")
|
||||
|
@ -252,6 +257,11 @@ PLANNED FEATURES:
|
|||
(let ([fps (params->full-pkg-spec ownerstr pkgstr majstr minstr)])
|
||||
(printf "~a\n" (url->string (pkg->download-url fps)))))
|
||||
|
||||
(define (do-unpack plt-file target)
|
||||
(unless (file-exists? plt-file)
|
||||
(fail (format "The specified file (~a) does not exist" plt-file)))
|
||||
(let ([file (normalize-path plt-file)])
|
||||
(unpack-planet-archive file target)))
|
||||
|
||||
;; ------------------------------------------------------------
|
||||
;; Utility
|
||||
|
|
|
@ -265,8 +265,8 @@ an appropriate subdirectory.
|
|||
(for-each
|
||||
(lambda (already-loaded-pkg-record)
|
||||
(let* ([already-loaded-pkg (car already-loaded-pkg-record)]
|
||||
[stx (cadr already-loaded-pkg-record)]
|
||||
[stx-origin-string (stx->origin-string stx)])
|
||||
[prior-stx (cadr already-loaded-pkg-record)]
|
||||
[prior-stx-origin-string (stx->origin-string prior-stx)])
|
||||
(unless (can-be-loaded-together? pkg already-loaded-pkg)
|
||||
(set!
|
||||
all-violations
|
||||
|
@ -283,7 +283,7 @@ an appropriate subdirectory.
|
|||
(pkg-min pkg)
|
||||
(pkg-maj already-loaded-pkg)
|
||||
(pkg-min already-loaded-pkg)
|
||||
stx-origin-string)
|
||||
prior-stx-origin-string)
|
||||
(current-continuation-marks)))
|
||||
all-violations)))))
|
||||
loaded-packages)])
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
(lib "list.ss")
|
||||
(lib "pack.ss" "setup")
|
||||
(lib "plt-single-installer.ss" "setup")
|
||||
(lib "getinfo.ss" "setup"))
|
||||
(lib "getinfo.ss" "setup")
|
||||
(lib "unpack.ss" "setup"))
|
||||
|
||||
#| The util collection provides a number of useful functions for interacting with the PLaneT system. |#
|
||||
|
||||
|
@ -22,6 +23,7 @@
|
|||
current-cache-contents
|
||||
current-linkage
|
||||
make-planet-archive
|
||||
unpack-planet-archive
|
||||
force-package-building?
|
||||
get-installed-planet-archives
|
||||
get-hard-linked-packages
|
||||
|
@ -259,7 +261,11 @@
|
|||
(reverse warnings)))
|
||||
|
||||
(normalize-path archive-name))]))
|
||||
|
||||
|
||||
(define (unpack-planet-archive plt-file target)
|
||||
(parameterize ([current-directory target])
|
||||
(unpack plt-file)))
|
||||
|
||||
;; check-info.ss-sanity : path (string -> void) (string -> void) (string -> void) -> void
|
||||
;; gets all the info.ss fields that planet will use (using the info.ss file
|
||||
;; from the current directory) and calls the announce, warn, and fail functions with strings
|
||||
|
|
Loading…
Reference in New Issue
Block a user