Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
mhwd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
30
Issues
30
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
2
Merge Requests
2
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
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
Applications
mhwd
Commits
372a6c97
Commit
372a6c97
authored
May 18, 2015
by
Filipe Marques
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in Mhwd file
parent
3754935c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
src/Mhwd.cpp
src/Mhwd.cpp
+15
-10
src/Mhwd.hpp
src/Mhwd.hpp
+0
-2
No files found.
src/Mhwd.cpp
View file @
372a6c97
...
...
@@ -552,6 +552,7 @@ MHWD::STATUS Mhwd::installConfig(std::shared_ptr<Config> config)
MHWD
::
STATUS
Mhwd
::
uninstallConfig
(
Config
*
config
)
{
std
::
shared_ptr
<
Config
>
installedConfig
{
getInstalledConfig
(
config
->
name_
,
config
->
type_
)};
std
::
vector
<
std
::
shared_ptr
<
Config
>>
localRequirements
{
data_
.
getAllLocalRequirements
(
installedConfig
)};
// Check if installed
if
(
nullptr
==
installedConfig
)
...
...
@@ -564,21 +565,25 @@ MHWD::STATUS Mhwd::uninstallConfig(Config *config)
}
else
{
// TODO: Should we check for local requirements here?
// Run script
if
(
!
runScript
(
installedConfig
,
MHWD
::
TRANSACTIONTYPE
::
REMOVE
))
// Should we check for local requirements here?
if
(
!
localRequirements
.
empty
())
{
return
MHWD
::
STATUS
::
ERROR_SCRIPT_FAILED
;
}
// Run script
if
(
!
runScript
(
installedConfig
,
MHWD
::
TRANSACTIONTYPE
::
REMOVE
))
{
return
MHWD
::
STATUS
::
ERROR_SCRIPT_FAILED
;
}
if
(
!
removeDirectory
(
installedConfig
->
basePath_
))
{
return
MHWD
::
STATUS
::
ERROR_SET_DATABASE
;
if
(
!
removeDirectory
(
installedConfig
->
basePath_
))
{
return
MHWD
::
STATUS
::
ERROR_SET_DATABASE
;
}
}
// Installed config vectors have to be updated manual with updateInstalledConfigData(Data*)
data_
.
updateInstalledConfigData
();
return
MHWD
::
STATUS
::
SUCCESS
;
}
}
...
...
@@ -614,7 +619,7 @@ bool Mhwd::runScript(std::shared_ptr<Config> config, MHWD::TRANSACTIONTYPE opera
for
(
auto
&&
foundDevice
=
foundDevices
.
begin
();
foundDevice
!=
foundDevices
.
end
();
++
foundDevice
)
{
bool
found
=
false
;
static
bool
found
=
false
;
// Check if already in list
for
(
auto
&&
dev
=
devices
.
begin
();
dev
!=
devices
.
end
();
++
dev
)
...
...
src/Mhwd.hpp
View file @
372a6c97
...
...
@@ -83,8 +83,6 @@ private:
std
::
shared_ptr
<
Config
>
getDatabaseConfig
(
const
std
::
string
&
configName
,
const
std
::
string
&
configType
);
std
::
shared_ptr
<
Config
>
getAvailableConfig
(
const
std
::
string
&
configName
,
const
std
::
string
&
configType
);
std
::
vector
<
Config
*>
getAllLocalRequirements
(
Config
*
config
);
MHWD
::
STATUS
performTransaction
(
const
Transaction
&
transaction
);
bool
proceedWithInstallation
(
const
std
::
string
&
input
)
const
;
...
...
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