getversionedpkgs() code cleanup
fixed empty local version elements shift in prompt