Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
acs-admin
Commits
4ffd6994
Commit
4ffd6994
authored
Jan 23, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Package Manger:
Patched the OpenACS package manager in order to deal with one-ULR package installs
parent
d646523b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
packages-install-2.tcl
www/apm/packages-install-2.tcl
+53
-0
No files found.
www/apm/packages-install-2.tcl
View file @
4ffd6994
...
...
@@ -21,6 +21,59 @@ set install $enable
ad_set_client_property -clob t apm pkg_install_list
""
ad_set_client_property -clob t apm pkg_enable_list
""
if
{
""
==
$spec
_files
}
{
### Get all the spec files
# If a package is in the apm_workspace dir
then
we assume that that is the package that
# should be installed and we ignore any such package in the packages dir.
# TODO: make sure that it's a later version than that in the packages dir?
set packages_root_dir
"
[
acs_root_dir
]
/packages"
set packages_spec_files
[
apm_scan_packages
$packages
_root_dir
]
set workspace_spec_files
[
apm_scan_packages
[
apm_workspace_install_dir
]]
set workspace_filenames
[
list
]
foreach spec_path
$workspace
_spec_files
{
lappend workspace_filenames
[
file
tail
$spec
_path
]
}
set all_spec_files
$workspace
_spec_files
foreach spec_path
$packages
_spec_files
{
set spec_filename
[
file
tail
$spec
_path
]
if
{
[
lsearch
-exact
$workspace
_filenames
$spec
_filename
]
== -1
}
{
lappend all_spec_files
$spec
_path
}
}
# Determine which spec files are new installs
;
install all of the new items.
set spec_files
[
list
]
set already_installed_list
[
list
]
set not_compatible_list
[
list
]
foreach spec_file
$all
_spec_files
{
ns_log Notice
"packages-install-2: spec_file=
$spec
_file"
array set version
[
apm_read_package_info_file
$spec
_file
]
set version_name
$version
(
name
)
set package_name
$version
(
package-name
)
set package_key
$version
(
package.key
)
if
{
[
apm_package_supports_rdbms_p -package_key
$package
_key
]
}
{
if
{
[
apm_package_registered_p
$package
_key
]
}
{
# This package is already on the system
if
{
[
apm_higher_version_installed_p
$package
_key
$version
_name
]
}
{
ns_log Notice
"higher version installed of
$package
_key
$version
_name"
lappend spec_files
$spec
_file
}
else
{
ns_log Notice
"need upgrade of package
$package
_key
$version
_name"
lappend already_installed_list
"Package "
$package
_name" (
$package
_key) version
$version
_name or higher i
\
s already installed."
}
}
else
{
lappend spec_files
$spec
_file
}
}
else
{
lappend not_compatible_list
"Package "
$package
_name" (
$package
_key) doesn't support
[
db_type
]
."
}
}
}
foreach
spec_file
$spec
_files
{
# Get package info, and find out if this is a package we should install
if
{
[
catch
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment