4.1 List Up Available Packages
You can list up available packages of server.
- ## pkg-cli list-rpkg [-o <os>] [-u <package server url>]
+ ## pkg-cli list-rpkg -u <package server url> [-o <os>]
## -o : Target OS(ubuntu-32/ubuntu-64/windows-32/windows-64/macos-64)
## -u : Package server URL which contains binary and development packages.
## If ommited, it will use previous server URL.
1. List up packages
- ex)
-
- $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release
-
- ex)
-
- $ pkg-cli list-rpkg
-
- 2. List up packages with updating
ex)
$ pkg-cli list-rpkg -u http://172.21.17.55/dibs/unstable_release
$ pkg-cli list-lpkg -l ~/tizen_sdk
-4.2 Update Package List
-You should have package list of server in your host before listing, installing and downloading packages. So, if you want to install the latest package, then you should update your package list before installing.
-
- ## pkg-cli update [-u <package server url>]
- ## -u : Package server URL which contains binary and development packages.
- ## If ommited, it will use previous server URL.
-
- 1. Update package list from server
- ex)
-
- $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release
-
- 2. Install / download packages from server
- ex)
-
- $ pkg-cli install -p nativeapp-eplugin -l ~/tizen_sdk
-
- ex)
-
- $ pkg-cli install -p unittest-eplugin -l ~/tizen_sdk
-
- ex)
-
- $ pkg-cli download -p base-ide-product -l ~/downloads
-
- 3. If package is updated on server and you want to use is, you should update your package list. If you do not set the server url, it will be set previous server URL.
- ex)
-
- $ pkg-cli update
-
- ex)
-
- $ pkg-cli install -p nativeapp-eplugin -l ~/tizen_sdk
-
-4.3 Upgrade Packages
+4.2 Upgrade Packages
You can upgrade your installed packages from server.
## pkg-cli upgrade -l <location> -u <package server url>
1. Check package for upgrading
ex)
- $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release
- $ pkg-cli check-upgrade -l ~/tizen_sdk
+ $ pkg-cli check-upgrade -l ~/tizen_sdk -u http://172.21.17.55/dibs/unstable_release
2. Upgrade packages
- ex)
-
- $ pkg-cli upgrade -l ~/tizen_sdk
-
- 3. Upgrade packages with updating
ex)
$ pkg-cli upgrade -l ~/tizen_sdk -u http://172.21.17.55/dibs/unstable_release
- 4. If you want to upgrade specific package, you can upgrade it as installing
+ 3. If you want to upgrade specific package, you can upgrade it as installing
ex)
$ pkg-cli install -p common-eplugin -l ~/tizen_sdk -u http://172.21.17.55/dibs/unstable_release
-4.4 Install SDK
+4.3 Install SDK
You can also install new SDK using the network install command. Originally this command is used for installing packages by network. But you can set "TIZEN-SDK" as package name, all Tizen SDK packages will be installed.
- ## pkg-cli install -p <package name> [-u <package server url>] [-l <location>] [-t] [-f]
+ ## pkg-cli install -p <package name> -u <package server url> [-l <location>] [-t] [-f]
## -p : Binary package name which you want to install
## -u : Package server URL which contains binary and development packages.
## If ommited, it will use previous server URL.
1. Install "TIZEN-SDK" by network to new location("~/tizen_sdk2")
ex)
- $ pkg-cli install -p TIZEN-SDK -l ~/tizen_sdk2 -t
+ $ pkg-cli install -p TIZEN-SDK -u http://172.21.17.55/dibs/unstable_release -l ~/tizen_sdk2 -t
2. Change Tizen SDK configuration
ex)
end
case option[:cmd]
-when "update" then
- client = Client.new( option[:url], nil, nil )
- #client.update()
when "clean" then
client = Client.new( nil, option[:loc], nil, false )
client.clean(option[:f])
puts "Info: There is no any package."
end
when "build-dep" then
- client = Client.new( nil, nil, nil )
+ client = Client.new( option[:url], nil, nil )
result = client.get_build_dependent_packages( option[:pkg], option[:os], true )
if result.nil? then
puts "Error: Failed to get remote package list. try update first."
ret[-3..-1] = ""
puts ret
when "install-dep" then
- client = Client.new( nil, nil, nil )
+ client = Client.new( option[:url], nil, nil )
result = client.get_install_dependent_packages( option[:pkg], option[:os], true, false )
if result.nil? then
puts "Error: Failed to get remote package list. try update first."
pkg_checksum = get_attr_from_pkg(p, os, "checksum")
pkg_size = get_attr_from_pkg(p, os, "size")
if pkg_path.nil? or pkg_ver.nil? then
- @log.error "\"#{p}\" package does not exist in package server. If it exist in package server, then try \"pkg-cli update\""
+ @log.error "\"#{p}\" package does not exist in package server. Check if it exist in package server"
return nil
end
url = surl + pkg_path
remote_pkg_hash = pkg_hash_os[os]
if remote_pkg_hash.nil? then
- @log.error "There is no remote package list for #{os}. please pkg-cli update"
+ @log.error "There is no remote package list for #{os}."
return nil
end
case options[:cmd]
- when "update" then
-
when "clean" then
when "upgrade" then
+ if options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli upgrade -u <package server url> [-l <location>] [-o <os>] [--trace]"
+ end
when "check-upgrade" then
-
+ if options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli check-upgrade -u <package server url> [-l <location>] [-o <os>]"
+ end
+
when "download" then
- if options[:pkg].nil? or options[:pkg].empty? then
- raise ArgumentError, "Usage: pkg-cli download -P <package name> [-o <os>] [-l <location>] [-u <package server url>] [--trace]"
+ if options[:pkg].nil? or options[:pkg].empty? or
+ options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli download -P <package name> -u <package server url> [-o <os>] [-l <location>] [--trace]"
end
when "install" then
- if options[:pkg].nil? or options[:pkg].empty? then
- raise ArgumentError, "Usage: pkg-cli install -P <package name> [-o <os>] [-l <location>] [-u <package server url>] [--trace] [--force]"
+ if options[:pkg].nil? or options[:pkg].empty? or
+ options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli install -P <package name> -u <package server url> [-o <os>] [-l <location>] [--trace] [--force]"
end
when "install-file" then
if options[:pkg].nil? or options[:pkg].empty? then
- raise ArgumentError, "Usage: pkg-cli install-lpkg -P <package file> [-l <location>] [-u <package server url>] [--trace] [--force]"
+ raise ArgumentError, "Usage: pkg-cli install-file -P <package file> [-l <location>] [-u <package server url>] [--trace] [--force]"
end
when "uninstall" then
end
when "show-rpkg" then
- if options[:pkg].nil? or options[:pkg].empty? then
- raise ArgumentError, "Usage: pkg-cli show-rpkg -P <package name> [-o <os>] [-u <package server url>]"
+ if options[:pkg].nil? or options[:pkg].empty? or
+ options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli show-rpkg -P <package name> -u <package server url> [-o <os>]"
end
when "list-rpkg" then
+ if options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli list-rpkg -u <package server url> [-o <os>]"
+ end
when "show-lpkg" then
if options[:pkg].nil? or options[:pkg].empty? then
when "list-lpkg" then
when "build-dep" then
- if options[:pkg].nil? or options[:pkg].empty? then
- raise ArgumentError, "Usage: pkg-cli build-dep -P <package name> [-o <os>]"
+ if options[:pkg].nil? or options[:pkg].empty? or
+ options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli build-dep -P <package name> -u <package server url> [-o <os>]"
end
when "install-dep" then
- if options[:pkg].nil? or options[:pkg].empty? then
- raise ArgumentError, "Usage: pkg-cli install-dep -P <package name> [-o <os>]"
+ if options[:pkg].nil? or options[:pkg].empty? or
+ options[:url].nil? or options[:url].empty? then
+ raise ArgumentError, "Usage: pkg-cli install-dep -P <package name> -u <package server url> [-o <os>]"
end
when "register"
banner = "Requiest service to package-server and control packages service command-line tool." + "\n" \
+ "\n" + "Usage: pkg-cli <SUBCOMMAND> [OPTS] or pkg-cli (-h|-v)" + "\n" \
+ "\n" + "Subcommands:" + "\n" \
- + "\t" + "update Update to the latest package in your SDK environment." + "\n" \
+ "\t" + "clean Delete the package in your SDK environment." + "\n" \
+ "\t" + "download Download the package in your SDK environment." + "\n" \
+ "\t" + "install Download the package from package-server and install the package in your SDK environment." + "\n" \
+ "\t" + "build-dep Show build-dependency packages" + "\n" \
+ "\t" + "install-dep Show install-dependency packages" + "\n" \
+ "\n" + "Subcommand usage:" + "\n" \
- + "\t" + "pkg-cli update [-u <remote server url>]" + "\n" \
+ "\t" + "pkg-cli clean [-l <location>] [--force]" + "\n" \
- + "\t" + "pkg-cli download -P <package name> [-o <os>] [-l <location>] [-u <package server url>] [--trace]" + "\n" \
- + "\t" + "pkg-cli install -P <package name> [-o <os>] [-l <location>] [-u <package server url>] [--trace] [--force]" + "\n" \
+ + "\t" + "pkg-cli download -P <package name> -u <package server url> [-o <os>] [-l <location>] [--trace]" + "\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" \
- + "\t" + "pkg-cli upgrade [-l <location>] [-o <os>] [-u <package server url>] [--trace]" + "\n" \
- + "\t" + "pkg-cli check-upgrade [-l <location>] [-o <os>] [-u <package server url>]" + "\n" \
- + "\t" + "pkg-cli show-rpkg -P <package name> [-o <os>] [-u <package server url>]" + "\n" \
- + "\t" + "pkg-cli list-rpkg [-o <os>] [-u <package server url>]" + "\n" \
+ + "\t" + "pkg-cli upgrade -u <package server url> [-l <location>] [-o <os>] [--trace]" + "\n" \
+ + "\t" + "pkg-cli check-upgrade -u <package server url> [-l <location>] [-o <os>]" + "\n" \
+ + "\t" + "pkg-cli show-rpkg -P <package name> -u <package server url> [-o <os>]" + "\n" \
+ + "\t" + "pkg-cli list-rpkg -u <package server url> [-o <os>]" + "\n" \
+ "\t" + "pkg-cli show-lpkg -P <package name> [-l <location>]" + "\n" \
+ "\t" + "pkg-cli list-lpkg [-l <location>]" + "\n" \
- + "\t" + "pkg-cli build-dep -P <package name> [-o <os>]" + "\n" \
- + "\t" + "pkg-cli install-dep -P <package name> [-o <os>]" + "\n" \
+ + "\t" + "pkg-cli build-dep -P <package name> -u <package server url> [-o <os>]" + "\n" \
+ + "\t" + "pkg-cli install-dep -P <package name> -u <package server url> [-o <os>]" + "\n" \
+ "\t" + "pkg-cli register -P <package file path> -a <server address> -d <distribution name> -w <password>" + "\n" \
+ "\n" + "Options:" + "\n"
end
cmd = ARGV[0]
- if cmd.eql? "update" or cmd.eql? "download" or
+ if cmd.eql? "download" or
cmd.eql? "install" or cmd.eql? "show-rpkg" or
cmd.eql? "list-rpkg" or
cmd.eql? "uninstall" or cmd.eql? "show-lpkg" or
if is_remote then
if logger.path.nil? or logger.path.empty? then
ret = system "wget #{url} -O #{fullpath} -nv --tries=3"
- puts ret
else
pid,status = Utils.execute_shell_with_log( "wget #{url} -O #{fullpath} -nv --tries=3", logger.path )
if not status.nil? then
+++ /dev/null
-#PRE-EXEC
-#EXEC
-../pkg-cli update -u http://172.21.111.132/testserver3/unstable
-#POST-EXEC
-#EXPECT
-Update package list from "http://172.21.111.132/testserver3/unstable".. OK
-pkg-cli-update.testcase
pkg-cli-listrpkg.testcase
pkg-cli-showrpkg.testcase
pkg-cli-download.testcase