Index: server/teapot_index ================================================================== --- server/teapot_index +++ server/teapot_index @@ -20,11 +20,11 @@ # Index all packages proc teapot_index {srcdir} { array set pkginfo [list] - foreach pkgdir [glob -directory $srcdir -type d */out/*] { + foreach pkgdir [glob -directory $srcdir -type d */*/*] { unset -nocomplain currpkginfo set currpkginfo(pkgdir) $pkgdir set teapot [file join $pkgdir teapot.txt] @@ -85,11 +85,11 @@ } "META" { set var [string tolower [lindex $line 1]] set val [lrange $line 2 end] - set currpkginfo($var) $val + lappend currpkginfo($var) $val } } } set pkginfo([list $currpkginfo(name) $currpkginfo(vers) $currpkginfo(platform)]) [array get currpkginfo] @@ -215,10 +215,11 @@ lappend pkglist $addent } set pkglist [lsort -dictionary $pkglist] + file mkdir [file dirname $indexfile] set fd [open $indexfile w] puts $fd "" puts $fd " " puts $fd " List of all entities" puts $fd " " @@ -230,12 +231,12 @@ puts $fd " " puts $fd " " puts $fd "" close $fd - file delete -- $altindexfile file mkdir [file dirname $altindexfile] + file delete -force -- $altindexfile file link -hard $altindexfile $indexfile } # Create "package/list" proc create_output_pkglist {dstdir pkginfo_arrlist} { @@ -317,11 +318,11 @@ exec zip -r $extfile . -x build.log } err]} { puts "Error while zipping: $err" } } else { - set origfile [lindex [glob $pkgdir *] 0] + set origfile [lindex [glob -directory $pkgdir *] 0] file copy -force -- $origfile $extfile } file delete -- $regfile @@ -455,33 +456,32 @@ set pathname_uri "/$pathname_dir/$pathname_tail" puts $fd "

Details of $entity_type [join $dispname_list]

" puts $fd "

Package archive

" puts $fd "

Details

" - puts $fd " " + puts $fd "
" puts $fd " " puts $fd " " puts $fd " " puts $fd " " - foreach descfield [list rsk::build::date category description license platform require summary] { + foreach descfield [list rsk::build::date as::author as::build::date as::origin category description license platform require summary] { if {![info exists currpkginfo($descfield)]} { continue } set descval $currpkginfo($descfield) switch -- $descfield { - "require" { + "require" - "as::author" - "as::origin" { catch { - set descval [join $descval {, }] + set descval [join $descval] } } } puts $fd " " puts $fd " " - - puts $fd " " + puts $fd " " puts $fd " " } puts $fd "
KeyValue
$descfield$descval[join $descval "
"]
" }