Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
ebc8d442
Commit
ebc8d442
authored
Jan 06, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_package: InstallationTree class to save multiple packages
parent
77b122bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
product/ERP5/Document/BusinessPackage.py
product/ERP5/Document/BusinessPackage.py
+46
-0
No files found.
product/ERP5/Document/BusinessPackage.py
View file @
ebc8d442
...
@@ -328,3 +328,49 @@ class PathTemplatePackageItem(Implicit, Persistent):
...
@@ -328,3 +328,49 @@ class PathTemplatePackageItem(Implicit, Persistent):
"Updated Local Roles for '%s' (%s)"
"Updated Local Roles for '%s' (%s)"
%
(
portal_type
,
obj
.
getRelativeUrl
()))
%
(
portal_type
,
obj
.
getRelativeUrl
()))
transaction
.
get
().
addBeforeCommitHook
(
updateLocalRolesOnDocument
)
transaction
.
get
().
addBeforeCommitHook
(
updateLocalRolesOnDocument
)
class
InstallationState
(
object
):
"""
Tree implemetation to manage install/update/remove between states.
State Number:
1) ERP5Site
2) ERP5Site + BP1 : BP1 installed on ERP5Site
3) Install state BP2 + BP3 on state 2
Initially:(Each node is a state)
Leaf node: OFS State(with some default BP installed)
Trying to install a new BT5 should be like adding new node to the tree
How to pickle:
http://stackoverflow.com/questions/2134706/hitting-maximum-recursion-depth-using-pythons-pickle-cpickle
How to version control the states:
https://github.com/gitpython-developers/GitPython/tree/master/git
"""
def
__init__
(
self
,
state
):
"""
"""
self
.
root_status
=
False
# Installtion status of the combined packages
self
.
data_list
=
[]
# To be installed/update/deleted list of packages
self
.
current_level
=
1
def
setNewState
(
self
,
state
):
"""
In tree language, should act as setNext node to the tree
This should add package list after comparing the states of
packages with the installed state. So even if we try to install multiple
packages at a time, it should be counted as one state being implented on
another installed state, i.e, the state of ERP5Site
"""
pass
def
install_package_list
(
self
,
package_list
):
"""
Create a new state by comparing all BP combined built and the ERP5Site,
then calls setNewState to update the state
"""
pass
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