"image.info" file will be generated automatically. This file is used to decision for update.
Change-Id: Iea610e26ea1d75fa2f5173e49c6f7ce4d777359c
Signed-off-by: jonghwan2.park <jonghwan2.park@samsung.com>
+* 2.1.54
+- added make-image option [-i] for installmanager
+== jonghwan park <jonghwan2.park@samsung.com> 2013-12-06
* 2.1.53
- Fixed bug that transferred job failed when it has no "master" branch
== donghee yang <donghee.yang@samsung.com> 2013-11-19
Source : dibs
-Version :2.1.53
+Version :2.1.54
Maintainer : taejun ha<taejun.ha@samsung.com>, jiil hyoun <jiil.hyoun@samsung.com>, donghyuk yang <donghyouk.yang@samsung.com>, donghee yang <donghee.yang@samsung.com>, sungmin kim <dev.sungmin.kim@samsung.com
Package : tizen-dibs-test
puts "Error: Cannot create package client!"
exit 1
end
- client.make_img( option[:os] )
+ client.make_img( option[:os], option[:info] )
when "install" then
client = Client.create( option[:url], option[:loc], nil )
if client.nil? then
end
public
- def make_img(os)
+ def make_img(os, img_info)
if (os == "all") then
- @support_os_list.each do |os| image_generator(os) end
+ @support_os_list.each do |os| image_generator(os, img_info) end
else
- image_generator(os)
+ image_generator(os, img_info)
end
end
private
# make sdk image
- def image_generator(os)
+ def image_generator(os, img_info)
# get package list
all_pkg_list = @pkg_hash_os[os].values
# init workspace
workspace = @location+"/temp_for_tizen_sdk_imgs_#{os}"
if File.directory? workspace then FileUtils.remove_dir(workspace, true) end
-
+
# download packages
img_pkg_list.each do |pkg| download(pkg, os, false, "#{workspace}/binary") end
# write os_info file
File.open("#{workspace}/#{OS_INFO_FILE}", 'w') do |f| f.puts os end
+ # set image.info
+ message = "";
+ message = img_info;
+
+ if message.to_s.eql? "" then
+ server = @server_addr;
+ origin = File.dirname( server );
+ dist = get_distribution
+ else
+ # chop server address, if end with "/"
+ if message.strip.end_with? "/" then message = message.chop end
+ message.strip!
+ server = message;
+ origin = File.dirname( server );
+ dist = File.basename( server );
+ end
+
+ # write image.info
+ f = File.new("#{workspace}/image.info", "w");
+ f.write("origin : #{origin}\ndistribution : #{dist}\n");
+ f.close
+
# compress files
snapshot = snapshot_path.split('/')[-1]
img_name = "TIZEN-SDK-IMG_#{snapshot}_#{os}.zip"
end
when "make-img" then
if options[:url].nil? or options[:url].empty? then
- raise ArgumentError, "Usage: pkg-cli make-img -u <package server url> [-o <os>]"
+ raise ArgumentError, "Usage: pkg-cli make-img -u <package server url> [-o <os>] [-m <image info>]"
end
when "install" then
if options[:pkg].nil? or options[:pkg].empty? or
+ "\n" + "Subcommand usage:" + "\n" \
+ "\t" + "pkg-cli clean [-l <location>] [--force]" + "\n" \
+ "\t" + "pkg-cli download -P <package name> -u <package server url> [-o <os>] [-l <location>] [--trace]" + "\n" \
- + "\t" + "pkg-cli make-img -u <package server url> [-o <os>]" + "\n" \
+ + "\t" + "pkg-cli make-img -u <package server url> [-o <os>] [-i <image info>]" + "\n" \
+ "\t" + "pkg-cli install -P <package name> -u <package server url> [-o <os>] [-l <location>] [--trace] [--force]" + "\n" \
+ "\t" + "pkg-cli install-file -P <package file> [-l <location>] [-u <package server url>] [--trace] [--force]" + "\n" \
+ "\t" + "pkg-cli uninstall -P <package name> [-l <location>] [--trace]" + "\n" \
options[:f] = true
end
+ opts.on( '-i', '--info <image info>', 'sdk image information : http://download.tizen.org/sdk/packages/official' ) do |image_info|
+ options[:info] = image_info
+ end
+
opts.on( '-h', '--help', 'display help' ) do
puts opts
exit