error: no version of package ... provided

150 views
Skip to first unread message

Zbigniew Diaczyszyn

unread,
Dec 11, 2009, 6:19:35 AM12/11/09
to sta...@googlegroups.com
Sorry, me once again..

tclkit is now starting the application with the first GUI-Opendialog.
When it is finished the application starts main GUI: Building menus etc, and
then appears an error window with the message:

attempt to provide package app-gorilla15alpha 1.0 failed:
no version of package app-gorilla15alpha provided

Perhaps the structure of the gorilla15alpha.vfs will help something:

The package is named "gorilla15alpha.kit" and has the following content:

.
|-- lib
| |-- app-gorilla15alpha
| |-- blowfish
| |-- msgs
| |-- pics
| |-- pwsafe
| |-- sha1
| `-- twofish
`-- main.tcl

gorilla15alpha.vfs/lib/app-gorilla15alpha/
|-- CHANGES.txt
|-- LICENSE.txt
|-- gorilla15alpha.tcl
|-- help.txt
|-- isaac.tcl
`-- pkgIndex.tcl

The content of main.tcl is:

package require starkit
starkit::startup
package require app-gorilla15alpha

The content of gorilla15alpha.vfs/lib/app-gorilla15alpha/pkgIndex.tcl is

package ifneeded app-gorilla15alpha 1.0 \
[list source [file join $dir gorilla15alpha.tcl]]

If I'm deleting the version "1.0" parameter then I get the following error:

$ tclkit gorilla15alpha.kit

error reading package index file

[...]/gorilla-1.5alpha/gorilla15alpha.kit/lib/app-gorilla15alpha/pkgIndex.tcl:

expected version number but got "source
[...]/lib/app-gorilla15alpha gorilla15alpha.tcl"
can't find package app-gorilla15alpha
while executing
"package require app-gorilla15alpha"
(file ".../main.tcl" line 4)
invoked from within
"source /home/dia/Projekte/gorilla-1.5alpha/gorilla15alpha.kit/main.tcl"

thanks in advance



Harald Oehlmann

unread,
Dec 11, 2009, 7:32:07 AM12/11/09
to Zbigniew Diaczyszyn, sta...@googlegroups.com
Zbigniew Diaczyszyn schrieb:
> attempt to provide package app-gorilla15alpha 1.0 failed:
> no version of package app-gorilla15alpha provided
Do you have a package provide in gorilla15alpha.tcl ?

package provide app-gorilla15alpha 1.0

Zbigniew Diaczyszyn

unread,
Dec 11, 2009, 11:17:53 AM12/11/09
to sta...@googlegroups.com
Harald Oehlmann <Harald.Oehlmann <at> Elmicron.de> writes:

> Do you have a package provide in gorilla15alpha.tcl ?
>
> package provide app-gorilla15alpha 1.0

No, I haven't.

I added the line and now there is no error message any more :-)))

And after having put the subdirectory with the translation files in the
app-gorilla15alpha directory then msgcat found the necessary language files, too.

Thank you very much for the quick help!





Pat Thoyts

unread,
Dec 12, 2009, 8:30:34 AM12/12/09
to Zbigniew Diaczyszyn, sta...@googlegroups.com
2009/12/11 Zbigniew Diaczyszyn <z....@gmx.de>:
I will point out here that applications are not packages. This
business of generating app-ApplicationName packages used by the qwrap
subcommand of sdx is not a good example to follow.
It makes more sense to structure your application files in one subtree
and put real packages under the lib tree.
I recommend
app.vfs/
bin/
application.tcl
<app files>
lib/
<library packages>
and the use of a main.tcl at the toplevel that looks more like:
package require starkit
if {[starkit::startup] ne "sourced"} {
source [file join $starkit::topdir bin application.tcl]
}

This will load your application whether you run a starkit, starpack or
run the application in-place with tclkit app.vfs/main.tcl
It also permits you to source the kit into an editor which some people
find useful.

I hate how qwrap does this.

Pat Thoyts

Pat Thoyts

unread,
Dec 12, 2009, 3:51:02 PM12/12/09
to Harald Oehlmann, starkit
2009/12/12 Harald Oehlmann <Harald....@elmicron.de>:
> Pat Thoyts schrieb:
>> and the use of a main.tcl at the toplevel that looks more like:
>> package require starkit
>> if {[starkit::startup] ne "sourced"} {
>> source [file join $starkit::topdir bin application.tcl]
>> }
>>
>> This will load your application whether you run a starkit, starpack or
>> run the application in-place with tclkit app.vfs/main.tcl
>> It also permits you to source the kit into an editor which some people
>> find useful.
>
> Could you explain more when starkit::startup will return "sourced" ?

You can create starkits that just have things under lib/* (like the
tls.kit on sourceforge). These kits can be sourced to make the
packages inside available:
source tls.kit
package require tls ;# load tls package from the kit

anytime you source a starkit then startup will return sourced.
It can also return from {starpack starkit unwrapped tclhttpd plugin service}

Look at [info body starkit::_startup] for the details.
Reply all
Reply to author
Forward
0 new messages