Add contitional update package repositories to install_package()

This helps us ensure that we update the repositories only the first time
we need to install packages

Rebased and incorporated into install_package()

Change-Id: Id987aa7742f5d6807bc97eb6784cf18557c919d2
diff --git a/functions b/functions
index c109eae..8ed9960 100644
--- a/functions
+++ b/functions
@@ -536,7 +536,11 @@
     if [[ -z "$os_PACKAGE" ]]; then
         GetOSVersion
     fi
+
     if [[ "$os_PACKAGE" = "deb" ]]; then
+        [[ "$NO_UPDATE_REPOS" = "True" ]] || apt_get update
+        NO_UPDATE_REPOS=True
+
         apt_get install "$@"
     else
         yum_install "$@"