mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
feature #4215: Update marketapps from external marketplaces when MD5 or
VERSION changes
This commit is contained in:
1 parent
875f0362c0
commit
0799819c84
2 files changed
+11
-1
No files matched your search
@@ -423,6 +423,8 @@ int MarketPlaceApp::from_template64(const std::string &info64, std::string& err)
|
||||
|
||||
char * error_msg;
|
||||
|
||||
obj_template->clear();
|
||||
|
||||
int rc = obj_template->parse(*info, &error_msg);
|
||||
|
||||
delete info;
|
||||
|
||||
@@ -234,10 +234,18 @@ int MarketPlaceAppPool::import(const std::string& t64, int mp_id,
|
||||
}
|
||||
}
|
||||
|
||||
MarketPlaceApp * mp_aux = get(app->name, 0, false);
|
||||
MarketPlaceApp * mp_aux = get(app->name, 0, true);
|
||||
|
||||
if( mp_aux != 0 ) //Marketplace app already imported
|
||||
{
|
||||
if ( mp_aux->version != app->version || mp_aux->md5 != app->version )
|
||||
{
|
||||
mp_aux->from_template64(t64, error_str);
|
||||
update(mp_aux);
|
||||
}
|
||||
|
||||
mp_aux->unlock();
|
||||
|
||||
delete app;
|
||||
return -2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user