diff -Nru cube-server-0.1+r95/data/cube-system/data/server/js/main.js cube-server-0.1+r98/data/cube-system/data/server/js/main.js --- cube-server-0.1+r95/data/cube-system/data/server/js/main.js 2015-05-17 01:10:39.000000000 +0000 +++ cube-server-0.1+r98/data/cube-system/data/server/js/main.js 2015-05-30 06:37:47.000000000 +0000 @@ -568,7 +568,7 @@ function process_modal_hide() { - $("#process-modal").modal('hide'); + $("#process-modal").modal('hide'); } function yes_no_modal_show(title,message) @@ -1643,13 +1643,15 @@ } function on_install_started() -{ - process_modal_show("Installing Packages","Please wait while we install your selected applications..."); +{ var handler = setInterval ( function() { + + process_modal_show("Installing Packages","Please wait while we install your selected applications..."); + if ( _system_status.package_installing == "false" ) { clearInterval(handler); - on_install_finished(); + on_install_finished(); } },1000); } diff -Nru cube-server-0.1+r95/debian/bzr-builder.manifest cube-server-0.1+r98/debian/bzr-builder.manifest --- cube-server-0.1+r95/debian/bzr-builder.manifest 2015-05-17 01:10:39.000000000 +0000 +++ cube-server-0.1+r98/debian/bzr-builder.manifest 2015-05-30 06:37:47.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}+r95-0 -lp:cube-server revid:camicrisystems@gmail.com-20150517010134-38l16tfoqrxuo432 +# bzr-builder format 0.3 deb-version {debupstream}+r98-0 +lp:cube-server revid:camicrisystems@gmail.com-20150530063040-syu6krkhry463f8l diff -Nru cube-server-0.1+r95/debian/changelog cube-server-0.1+r98/debian/changelog --- cube-server-0.1+r95/debian/changelog 2015-05-17 01:10:39.000000000 +0000 +++ cube-server-0.1+r98/debian/changelog 2015-05-30 06:37:47.000000000 +0000 @@ -1,8 +1,8 @@ -cube-server (0.1+r95-0~ubuntu14.10.1) utopic; urgency=low +cube-server (0.1+r98-0~ubuntu14.10.1) utopic; urgency=low * Auto build. - -- Camicri Systems Sun, 17 May 2015 01:10:39 +0000 + -- Camicri Systems Sat, 30 May 2015 06:37:47 +0000 cube-server (0.1) precise; urgency=low diff -Nru cube-server-0.1+r95/src/cube-information.vala cube-server-0.1+r98/src/cube-information.vala --- cube-server-0.1+r95/src/cube-information.vala 2015-05-17 01:10:39.000000000 +0000 +++ cube-server-0.1+r98/src/cube-information.vala 2015-05-30 06:37:47.000000000 +0000 @@ -21,7 +21,7 @@ public static const string application_name = "Camicri Cube Server"; public static const string application_version = "0.1"; - public static const string application_revision = "95"; + public static const string application_revision = "98"; public static const string project_version = "2"; public static const string description = "Download Linux applications to any internet connected computers, and install it back to your original computer, offline."; diff -Nru cube-server-0.1+r95/src/cube_server.vala cube-server-0.1+r98/src/cube_server.vala --- cube-server-0.1+r95/src/cube_server.vala 2015-05-17 01:10:39.000000000 +0000 +++ cube-server-0.1+r98/src/cube_server.vala 2015-05-30 06:37:47.000000000 +0000 @@ -35,7 +35,7 @@ if ( initialize_server() ) server.start_server(); else - stdout.printf("Error: Failed to start server!\n"); + stdout.printf("Error : Failed to start server!\n"); return 0; } @@ -79,7 +79,14 @@ port = 8080; } - server = new CubeServer(port); + server = new CubeServer(); + + if ( !server.use_port(port) ) + { + stdout.printf("Error : Unable to use port %d. It is either cube-server is already running or the port is used by another application. Please use another port instead.\n",port); + return false; + } + server_system.server_port = port; server.started.connect( server_started ); diff -Nru cube-server-0.1+r95/src/repository-manager.vala cube-server-0.1+r98/src/repository-manager.vala --- cube-server-0.1+r95/src/repository-manager.vala 2015-05-17 01:10:39.000000000 +0000 +++ cube-server-0.1+r98/src/repository-manager.vala 2015-05-30 06:37:47.000000000 +0000 @@ -286,7 +286,10 @@ //Foreach target package in source constraint foreach(string str in constraint.packages) - return SimpleRegex.check ( str.strip(), p.name ); + { + if(SimpleRegex.check ( str.strip(), p.name )) + return true; + } return false; } diff -Nru cube-server-0.1+r95/src/server.vala cube-server-0.1+r98/src/server.vala --- cube-server-0.1+r95/src/server.vala 2015-05-17 01:10:39.000000000 +0000 +++ cube-server-0.1+r98/src/server.vala 2015-05-30 06:37:47.000000000 +0000 @@ -32,18 +32,25 @@ public signal void error_occurred ( string message ); public signal void request_occurred ( string location, TreeMap get_data_map ); - public CubeServer( uint16 port ) + public CubeServer() + { + } + + public bool use_port(uint16 port) { try { _service = new SocketService (); - _service.add_inet_port (port, null); + _service.add_inet_port (port, null); } catch (Error e) { stdout.printf("Error : %s\n",e.message); error_occurred ( e.message ); + return false; } + + return true; } public bool start_server() @@ -107,7 +114,6 @@ public TreeMap get_data_map ( owned string request_data ) { string url = request_data; - int times = 0; TreeMap data_map = new TreeMap( ); if ( request_data.has_prefix ("GET") ) //GET request