[Title] Removed download packages for os
authordonghyuk.yang <donghyuk.yang@samsung.com>
Tue, 21 Aug 2012 05:10:40 +0000 (14:10 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Tue, 21 Aug 2012 05:10:40 +0000 (14:10 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

src/pkg_server/client.rb

index 9644cc9fee4e5a2be64000e72d93fec56bb656c7..b6cfdeef0503cbcddb835087aa67cc063755edfb 100644 (file)
@@ -235,8 +235,8 @@ class Client
        end
 
        private
-       def remove_downloaded_pkgs(pkg_name)
-               pkg_file_prefix = "#{@download_path}/#{pkg_name}_*"
+       def remove_downloaded_pkgs(pkg_name, os)
+               pkg_file_prefix = "#{@download_path}/#{pkg_name}_*_#{os}.zip"
                pkg_files = Dir.glob(pkg_file_prefix).sort {|x,y| y <=> x }
 
                if not pkg_files.nil? and pkg_files.length >= 4 then 
@@ -1333,7 +1333,7 @@ class Client
                else
                        filepath = download(pkg_name, os, false, @download_path)
             ret = FileInstaller.install(pkg_name, filepath[0], type, @location, @log)
-                       remove_downloaded_pkgs(pkg_name)                                
+                       remove_downloaded_pkgs(pkg_name, os)                            
                end                     
         return ret
        end