Check-in [37af467773]
Overview
Comment:Updated to create all possible combination of parameters (still requires strict order)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:37af467773e55ef0c3dab9f712508adaff65e2b8
User & Date: rkeene on 2010-02-10 03:36:50
Other Links: manifest | tags
Context
2010-02-11
13:49
Added the ability to specify a PLATFORM (defaults to auto-detect) Disabled building of binary packages when PLATFORM is "tcl" Added building Tcllib if PLATFORM is "tcl" check-in: c0fd75de7e user: rkeene tags: trunk
2010-02-10
03:36
Updated to create all possible combination of parameters (still requires strict order) check-in: 37af467773 user: rkeene tags: trunk
03:11
Minor cleanup check-in: 88598f958f user: rkeene tags: trunk
Changes

Modified server/teapot_index from [f9a8f2229a] to [4cfb882ebe].

   492    492   	close $fd
   493    493   
   494    494   	file rename -force -- $tmpindexfile $indexfile
   495    495   }
   496    496   
   497    497   proc create_all_entity_files {dstdir pkginfo_arrlist} {
   498    498   	set entfields $::entity_definition(package)
          499  +
          500  +	for {set idx 0} {$idx < [llength $entfields]} {incr idx} {
          501  +		set fieldname [lindex $entfields $idx]
          502  +		set fieldname_to_idx($fieldname) $idx
          503  +	}
          504  +
          505  +	set enttypes_list [list]
          506  +	for {set idx 1} {$idx < int(pow(2, [llength $entfields]))} {incr idx} {
          507  +		set enttypes_list_cur [list]
          508  +
          509  +		for {set subidx 0} {$subidx < [llength $entfields]} {incr subidx} {
          510  +			if {$idx & (1 << $subidx)} {
          511  +				lappend enttypes_list_cur [lindex $entfields $subidx]
          512  +			}
          513  +		}
          514  +
          515  +		lappend enttypes_list $enttypes_list_cur
          516  +	}
   499    517   
   500    518   	array set pkginfo $pkginfo_arrlist
   501    519   
   502    520   	set seen_entities [list]
   503    521   	foreach pkgdata [lsort -dictionary [array names pkginfo]] {
   504         -		unset -nocomplain entity
   505         -		lappend entity entity package
          522  +		foreach enttypes $enttypes_list {
          523  +			unset -nocomplain entity
          524  +			lappend entity entity package
          525  +
          526  +			foreach enttype $enttypes {
          527  +				set entval [lindex $pkgdata $fieldname_to_idx($enttype)]
          528  +				lappend entity $enttype
          529  +				lappend entity $entval
   506    530   
   507         -		for {set endidx 0} {$endidx < [llength $entfields]} {incr endidx} {
   508         -			set enttype [lindex $entfields $endidx]
   509         -			set entval [lindex $pkgdata $endidx]
   510         -			lappend entity $enttype
   511         -			lappend entity $entval
          531  +				if {[lsearch -exact $seen_entities $entity] != -1} {
          532  +					continue
          533  +				}
          534  +				lappend seen_entities $entity
   512    535   
   513         -			if {[lsearch -exact $seen_entities $entity] != -1} {
   514         -				continue
          536  +				create_entity_file $entity $dstdir $pkginfo_arrlist
   515    537   			}
   516         -			lappend seen_entities $entity
   517         -
   518         -			create_entity_file $entity $dstdir $pkginfo_arrlist
   519    538   		}
   520    539   	}
   521    540   }
   522    541   
   523    542   set pkginfo [teapot_index $srcdir]
   524    543   create_output_index $dstdir $pkginfo
   525    544   create_output_pkglist $dstdir $pkginfo
   526    545   create_output_files $dstdir $pkginfo
   527    546   create_all_entity_files $dstdir $pkginfo