package: consolidate get_packages logic

Refactor get_package logic.
With this refactoring, code like
"if is_ubuntu; then install_package xxx elif is_fedora..."
can be simplified later.

Change-Id: I489bfd4cc12cc6b0b8201837f2bfb78c6881c82c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
diff --git a/tools/info.sh b/tools/info.sh
index ef1f338..14ab8f6 100755
--- a/tools/info.sh
+++ b/tools/info.sh
@@ -88,17 +88,7 @@
 # - We are going to check packages only for the services needed.
 # - We are parsing the packages files and detecting metadatas.
 
-if is_ubuntu; then
-    PKG_DIR=$FILES/apts
-elif is_fedora; then
-    PKG_DIR=$FILES/rpms
-elif is_suse; then
-    PKG_DIR=$FILES/rpms-suse
-else
-    exit_distro_not_supported "list of packages"
-fi
-
-for p in $(get_packages $PKG_DIR); do
+for p in $(get_packages $ENABLED_SERVICES); do
     if [[ "$os_PACKAGE" = "deb" ]]; then
         ver=$(dpkg -s $p 2>/dev/null | grep '^Version: ' | cut -d' ' -f2)
     elif [[ "$os_PACKAGE" = "rpm" ]]; then