server_pkg_name_list = client.pkg_hash_os[os].keys
local_pkg_name_list = @pkg_hash_os[os].keys
full_pkg_name_list = server_pkg_name_list + local_pkg_name_list
+ full_pkg_name_list.uniq!
full_pkg_name_list.each do |pkg_name|
ret = sync_package( pkg_name, client, os, force )
# if package is update when sync time then skip
if Utils.compare_version(local_pkg.version, pkg.version) == -1 then
next
+ else
+ @log.info( "update package [#{pkg.package_name}] in #{pkg.os}", Log::LV_USER)
end
end
when "REMOVE"
if not force then
if @pkg_hash_os[os][pkg.package_name].origin.eql? "local" then
+ else
+ @log.info( "remove package [#{pkg.package_name}] in #{pkg.os}", Log::LV_USER)
next
end
end
return nil
end
+ if ( version_cmp == -1 ) then
+ # local package's version is higher than server packages's version then skip update
+ return nil
+ end
+
if ( local_pkg.origin.eql? "local" ) and (not force) then
# local_pkg is generated from local and not force mode then skip update
return nil