install-check-procs.tcl

Callback proc for operations before and after installs.

Location:
packages/xotcl-core/tcl/install-check-procs.tcl
Author:
Gustaf Neumann <neumann@wu-wien.ac.at>

Procedures in this file

Detailed information

xotcl-core::after-upgrade (private)

 xotcl-core::after-upgrade -from_version_name from_version_name \
    -to_version_name to_version_name

Callback for upgrading

Switches:
-from_version_name (required)
-to_version_name (required)
Author:
Gustaf Neumann <neumann@wu-wien.ac.at>

Partial Call Graph (max 5 caller/called nodes):
%3 acs_package_root_dir acs_package_root_dir (public) ad_file ad_file (public) apm_version_names_compare apm_version_names_compare (public) xotcl-core::after-upgrade xotcl-core::after-upgrade xotcl-core::after-upgrade->acs_package_root_dir xotcl-core::after-upgrade->ad_file xotcl-core::after-upgrade->apm_version_names_compare

Testcases:
No testcase defined.

xotcl-core::before-install (private)

 xotcl-core::before-install

Callback for checking whether XOTcl is installed for OpenACS

Author:
Gustaf Neumann <neumann@wu-wien.ac.at>

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
[ hide source ] | [ make this the default ]

Content File Source

::xo::library doc {

  Callback proc for operations before and after installs.

  @author Gustaf Neumann (neumann@wu-wien.ac.at)
}

namespace eval ::xotcl-core {

  ad_proc -private ::xotcl-core::before-install {} {

    Callback for checking whether XOTcl is installed for OpenACS

    @author Gustaf Neumann (neumann@wu-wien.ac.at)
  } {
    ns_log notice "-- before-install callback"
    if {![nsf::is object ::xotcl::Class]} {
      error " XOTcl does not appear to be installed on your system!\n\
     Please follow the install instructions on http://www.openacs.org/xowiki/xotcl-core"
    } elseif {$::xotcl::version < 1.5} {
      error " XOTcl 1.5 or newer required. You are using $::xotcl::version$::xotcl::patchlevel.\n\
      Please install a new version of XOTcl (see http://www.openacs.org/xowiki/xotcl-core)"
    } else {
      ns_log notice "XOTcl $::xotcl::version$::xotcl::patchlevel is installed on your system."
    }
  }

  d_proc -private ::xotcl-core::after-upgrade {
    {-from_version_name:required}
    {-to_version_name:required}
  } {

    Callback for upgrading

    @author Gustaf Neumann (neumann@wu-wien.ac.at)
  } {
    ns_log notice "-- UPGRADE $from_version_name -> $to_version_name"
    set v 0.88
    if {[apm_version_names_compare $from_version_name $v] == -1 &&
        [apm_version_names_compare $to_version_name $v] > -1} {
      ns_log notice "-- upgrading to $v"
      set dir [acs_package_root_dir xotcl-core]
      foreach file {
        tcl/05-doc-procs.tcl
        tcl/10-recreation-procs.tcl-old
        tcl/thread_mod-procs.tcl
      } {
        if {[ad_file exists $dir/$file]} {
          ns_log notice "Deleting obsolete file $dir/$file"
          file delete -- $dir/$file
        }
      }
    }
  }

}


#
# Local variables:
#    mode: tcl
#    tcl-indent-level: 2
#    indent-tabs-mode: nil
# End: