Deduplicate adapter-of-instaled-packages code - derp

Change-Id: Iddf8205744b194b475194415eb8863a311ac3f75