Index: openacs-4/packages/acs-admin/www/install/install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/install/install.tcl,v diff -u -r1.8.2.5 -r1.8.2.6 --- openacs-4/packages/acs-admin/www/install/install.tcl 2 Oct 2016 16:44:44 -0000 1.8.2.5 +++ openacs-4/packages/acs-admin/www/install/install.tcl 18 Oct 2016 08:10:41 -0000 1.8.2.6 @@ -16,7 +16,7 @@ set channel $current_channel } if {$head_channel eq ""} { - set head_channel [lindex [apm_get_repository_channels] 0] + set head_channel [lindex [apm_get_repository_channels] 0 0] } # @@ -57,30 +57,44 @@ set upgrades_p 0 array set package [list] -if {$channel eq ""} {set channel $current_channel} -if {[regexp {/(\d+-\d+)/$} $repository_url . passed_in_channel]} { +if {$channel eq ""} { + set channel $current_channel +} + +if {[regexp {^(.*/)(\d+-\d+)/$} $repository_url . base_url passed_in_channel]} { + # + # The passed in repository_url has already a channel + # set fetch_url $repository_url } else { - set fetch_url $repository_url/$channel/ + # + # The passed in repository_url has no channel + # + set base_url $repository_url + set fetch_url $base_url/$channel/ } -ns_log notice "fetch_url=<$fetch_url>,channel=<$channel>" - apm_get_package_repository -repository_url $fetch_url -array repository +if {$channel ne $current_channel} { + apm_get_package_repository -repository_url $base_url/$current_channel/ -array current_repository +} + foreach package_key [array names repository] { set version $repository($package_key) - + # # Ignore the package in the following cases: # - maturity is below specified level # - package is deprecated # - package is not supported by the installed database - # - don't offer "-portlet" alone (currently only useful in - # connection with DotLRN) + # - don't offer "-portlet" alone (currently only useful in connection with DotLRN) + # - dont't offer packages of HEAD, when these are included in the current channel + # if {[dict get $version maturity] < $maturity || [dict get $version maturity] == 4 || ![apm_package_supports_rdbms_p -package_key $package_key] || [string match "*-portlet" $package_key] + || ($channel ne $current_channel && [info exists current_repository($package_key)]) } continue if { $package_type eq "" || [dict get $version package.type] eq $package_type } { @@ -183,19 +197,19 @@ channel { label "Channel" values { - {Current $current_channel} - {Head $head_channel} + {"$current_channel" $current_channel} + {"Supplemental" $head_channel} } default_value $current_channel } maturity { label "Maturity at least" values { - {New 0} - {Immature 1} - {Mature 2} - {"Mature and Standard" 3} + {"[_ acs-tcl.maturity_new_submission]" 0} + {"[_ acs-tcl.maturity_immature]" 1} + {"[_ acs-tcl.maturity_mature]" 2} + {"[_ acs-tcl.maturity_mature_and_standard]" 3} } default_value default_maturity }