[racket] install-pkg
It isn't clear to me why the functions are doing what they are doing
in some of the details, but I've documented the relevant missing ones
(now pushed, also as below). Here is an example to help you get going.
#lang racket
(require planet/util)
(install-pkg
(get-package-spec "planet"
"test-connection.plt"
1 0)
"test-connection.plt" ;; this is the .plt file (here as a relative path)
1 0)
Robby
@defproc[(install-pkg [pkg pkg-spec?]
[file path-string?]
[maj natural-number/c]
[min natural-number/c])
(or/c pkg? #f)]{
Installs the package represented by the arguments, using
only the @scheme[pkg-spec-path] and @racket[pkg-spec-name]
fields of @scheme[pkg].
Returns a new @racket[pkg-spec?] corresponding to the package
that was actually installed.
}
@defproc[(get-package-spec [owner string?]
[pkg string?]
[maj (or/c #f natural-number/c) #f]
[min (or/c #f natural-number/c) #f])
pkg-spec?]{
Builds a @racket[pkg-spec?] corresponding to the package specified by
@racket[owner], @racket[pkg], @scheme[maj], and @scheme[min].
}
@defproc[(pkg-spec? [v any/c]) boolean?]{
Recognizes the result of @racket[get-package-spec].
}
On Sat, Jun 19, 2010 at 1:05 PM, Laurent <laurent.orseau at gmail.com> wrote:
> Hi,
>
> Is there a function in planet/util that does the same job as "fileinject"?
> There is a remove-pkg function but I don't see a install-pkg.
>
> Actually, I found one such (undocumented) function in "resolver.rkt", but
> I'm not sure how to use the 'pkg' argument :
> (install-pkg pkg path maj min)
>
> Can anyone help me?
>
> Thanks,
> Laurent
>
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users
>