Check-in [69fb00861c]
Overview
Comment:Updated to give more information for ActiveState packages
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:69fb00861cf4e937404d858cde42508c0ad1949d
User & Date: rkeene on 2010-02-10 03:00:11
Other Links: manifest | tags
Context
2010-02-10
03:11
Minor cleanup check-in: 88598f958f user: rkeene tags: trunk
03:00
Updated to give more information for ActiveState packages check-in: 69fb00861c user: rkeene tags: trunk
2010-02-09
21:19
Updated to only produce TPM header if the package info is complete check-in: a29f966f9d user: rkeene tags: trunk
Changes

Modified server/teapot_index from [67f47fd5d7] to [bf14c565da].

    18     18   set entity_fieldnames([list package arch]) "Platform"
    19     19   set entity_fieldnames([list entity]) "What"
    20     20   
    21     21   # Index all packages
    22     22   proc teapot_index {srcdir} {
    23     23   	array set pkginfo [list]
    24     24   
    25         -	foreach pkgdir [glob -directory $srcdir -type d */out/*] {
           25  +	foreach pkgdir [glob -directory $srcdir -type d */*/*] {
    26     26   		unset -nocomplain currpkginfo
    27     27   		set currpkginfo(pkgdir) $pkgdir
    28     28   
    29     29   		set teapot [file join $pkgdir teapot.txt]
    30     30   
    31     31   		set multifile 1
    32     32   		if {![file exists $teapot]} {
................................................................................
    83     83   					set currpkginfo(name) $name
    84     84   					set currpkginfo(vers) $vers
    85     85   				}
    86     86   				"META" {
    87     87   					set var [string tolower [lindex $line 1]]
    88     88   					set val [lrange $line 2 end]
    89     89   
    90         -					set currpkginfo($var) $val
           90  +					lappend currpkginfo($var) $val
    91     91   				}
    92     92   			}
    93     93   		}
    94     94   
    95     95   		set pkginfo([list $currpkginfo(name) $currpkginfo(vers) $currpkginfo(platform)]) [array get currpkginfo]
    96     96   	}
    97     97   
................................................................................
   213    213   		}
   214    214   
   215    215   		lappend pkglist $addent
   216    216   	}
   217    217   
   218    218   	set pkglist [lsort -dictionary $pkglist]
   219    219   
          220  +	file mkdir [file dirname $indexfile]
   220    221   	set fd [open $indexfile w]
   221    222   	puts $fd "<html>"
   222    223   	puts $fd "  <head>"
   223    224   	puts $fd "    <title>List of all entities</title>"
   224    225   	puts $fd "  </head>"
   225    226   	puts $fd "  <body>"
   226    227   	puts $fd [generate_tpm $pkglist]
................................................................................
   228    229   	puts $fd "    <table>"
   229    230   	puts $fd [generate_table $pkglist 1]
   230    231   	puts $fd "    </table>"
   231    232   	puts $fd "  </body>"
   232    233   	puts $fd "</html>"
   233    234   	close $fd
   234    235   
   235         -	file delete -- $altindexfile
   236    236   	file mkdir [file dirname $altindexfile]
          237  +	file delete -force -- $altindexfile
   237    238   	file link -hard $altindexfile $indexfile
   238    239   }
   239    240   
   240    241   # Create "package/list"
   241    242   proc create_output_pkglist {dstdir pkginfo_arrlist} {
   242    243   	array set pkginfo $pkginfo_arrlist
   243    244   
................................................................................
   315    316   
   316    317   				file delete -- $extfile
   317    318   				exec zip -r $extfile . -x build.log
   318    319   			} err]} {
   319    320   				puts "Error while zipping: $err"
   320    321   			}
   321    322   		} else {
   322         -			set origfile [lindex [glob $pkgdir *] 0]
          323  +			set origfile [lindex [glob -directory $pkgdir *] 0]
   323    324   
   324    325   			file copy -force -- $origfile $extfile
   325    326   		}
   326    327   
   327    328   		file delete -- $regfile
   328    329   		file link -hard $regfile $extfile
   329    330   	}
................................................................................
   453    454   			set pathname_tail "file"
   454    455   		}
   455    456   		set pathname_uri "/$pathname_dir/$pathname_tail"
   456    457   
   457    458   		puts $fd "    <h1>Details of $entity_type [join $dispname_list]</h1>"
   458    459   		puts $fd "    <p><a href=\"$pathname_uri\">Package archive</a></p>"
   459    460   		puts $fd "    <p>Details</p>"
   460         -		puts $fd "    <table border=\"1\">"
          461  +		puts $fd "    <table border=\"1\" cellpadding=\"5\">"
   461    462   		puts $fd "      <tr>"
   462    463   		puts $fd "        <th>Key</th>"
   463    464   		puts $fd "        <th>Value</th>"
   464    465   		puts $fd "      </tr>"
   465    466   
   466         -		foreach descfield [list rsk::build::date category description license platform require summary] {
          467  +		foreach descfield [list rsk::build::date as::author as::build::date as::origin category description license platform require summary] {
   467    468   			if {![info exists currpkginfo($descfield)]} {
   468    469   				continue
   469    470   			}
   470    471   			set descval $currpkginfo($descfield)
   471    472   			switch -- $descfield {
   472         -				"require" {
          473  +				"require" - "as::author" - "as::origin" {
   473    474   					catch {
   474         -						set descval [join $descval {, }]
          475  +						set descval [join $descval]
   475    476   					}
   476    477   				}
   477    478   			}
   478    479   
   479    480   			puts $fd "      <tr>"
   480    481   			puts $fd "        <td>$descfield</td>"
   481         -
   482         -			puts $fd "        <td>$descval</td>"
          482  +			puts $fd "        <td>[join $descval "<br>"]</td>"
   483    483   			puts $fd "      </tr>"
   484    484   		}
   485    485   		puts $fd "    </table>"
   486    486   	}
   487    487   
   488    488   	puts $fd "  </body>"
   489    489   	puts $fd "</html>"