Index: openacs-4/packages/acs-admin/www/apm/build-repository.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/build-repository.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-admin/www/apm/build-repository.tcl 26 Jan 2004 13:06:04 -0000 1.7 +++ openacs-4/packages/acs-admin/www/apm/build-repository.tcl 11 Feb 2004 16:28:05 -0000 1.8 @@ -10,6 +10,7 @@ set cvs_command "cvs" set cvs_root ":pserver:anonymous@openacs.org:/cvsroot" +set dotlrn_cvs_root ":pserver:anonymous@dotlrn.openacs.org:/dotlrn-cvsroot" set work_dir "[acs_root_dir]/repository-builder/" @@ -34,12 +35,12 @@ #---------------------------------------------------------------------- # Prepare work dir -publish::mkdirs $work_dir +file mkdir $work_dir cd $work_dir catch { exec $cvs_command -d $cvs_root -z3 co openacs-4/readme.txt } -catch { exec $cvs_command -d $cvs_root -z3 log -h openacs-4/ } output +catch { exec $cvs_command -d $cvs_root -z3 log -h openacs-4/readme.txt } output set lines [split $output \n] for { set i 0 } { $i < [llength $lines] } { incr i } { @@ -53,29 +54,25 @@ array set channel_bugfix_version [list] for { } { $i < [llength $lines] } { incr i } { + # Tag lines have the form tag: cvs-version + # openacs-5-0-0-final: 1.25.2.5 + if { ![regexp {^\s+([^:]+):\s+([0-9.]+)} [lindex $lines $i] match tag_name version_name] } { break } - if { [regexp {^(oacs|openacs)-(.*)-final$} $tag_name match ignore oacs_version] } { + + # Look for tags named 'openacs-x-y-compat' + if { [regexp {^openacs-([1-9][0-9]*-[0-9]+)-compat$} $tag_name match oacs_version] } { set major_version [lindex [split $oacs_version "-"] 0] set minor_version [lindex [split $oacs_version "-"] 1] - set bugfix_version [lindex [split $oacs_version "-"] 2] - if { ![regexp {^[0-9]*$} $bugfix_version] } { - set bugfix_version 0 - } if { $major_version >= 5 } { set channel "${major_version}-${minor_version}" - ns_write "
  • Processing channel $channel - tag $tag_name\n" + ns_write "
  • Found channel $channel using tag $tag_name\n" - if { ![info exists channel_bugfix_version($channel)] || $channel_bugfix_version($channel) < $bugfix_version } { - set channel_tag($channel) $tag_name - set channel_bugfix_version($channel) $bugfix_version - } else { - ns_write "(skipping because we already have a later tag on this channel)" - } + set channel_tag($channel) $tag_name } } } @@ -90,23 +87,22 @@ # Read all package .info files, building manifest file #---------------------------------------------------------------------- -# Wipe the repository dir -file delete -force "${work_dir}repository/" - # Wipe and re-create the working directory file delete -force $work_dir -publish::mkdirs $work_dir +file mkdir ${work_dir} cd $work_dir foreach channel [lsort -decreasing [array names channel_tag]] { ns_write "
  • Starting channel $channel with tag $channel_tag($channel)\n" # Wipe and re-create the checkout directory file delete -force "${work_dir}openacs-4" + file delete -force "${work_dir}dotlrn" + file mkdir -force "${work_dir}dotlrn/packages" # Prepare channel directory set channel_dir "${work_dir}repository/${channel}/" - publish::mkdirs $channel_dir + file mkdir $channel_dir # Store the list of packages we've seen for this channel, so we don't include the same package twice # Seems odd, but we have to do this given the forked packages sitting in /contrib @@ -116,15 +112,25 @@ if { ![string equal $channel_tag($channel) HEAD] } { catch { exec $cvs_command -d $cvs_root -z3 co -r $channel_tag($channel) openacs-4/packages } output catch { exec $cvs_command -d $cvs_root -z3 co -r $channel_tag($channel) openacs-4/contrib/packages } output + cd ${work_dir}dotlrn/packages/ + catch { exec $cvs_command -d $dotlrn_cvs_root -z3 co -r $channel_tag($channel) dotlrn-core } output + cd $work_dir } else { catch { exec $cvs_command -d $cvs_root -z3 co openacs-4/packages } output catch { exec $cvs_command -d $cvs_root -z3 co openacs-4/contrib/packages } output + cd ${work_dir}dotlrn/packages/ + catch { exec $cvs_command -d $dotlrn_cvs_root -z3 co dotlrn-core } output + cd $work_dir } - + set manifest {} append manifest \n - foreach packages_dir [list "${work_dir}openacs-4/packages" "${work_dir}openacs-4/contrib/packages"] { + foreach packages_dir \ + [list "${work_dir}openacs-4/packages" \ + "${work_dir}openacs-4/contrib/packages" \ + "${work_dir}dotlrn/packages"] { + foreach spec_file [lsort [apm_scan_packages $packages_dir]] { set package_path [eval file join [lrange [file split $spec_file] 0 end-1]]