Lines Matching full:packages
110 def _install_package_precheck(packages): argument
112 packages installation should be skipped.
116 environment, chroot or a machine, has the desired packages installed
119 @param packages: A list of names of the packages to install.
127 'skipped.', packages)
137 def _remove_banned_packages(packages, banned_packages): argument
138 """Filter out packages.
140 @param packages: A set of packages names that have been requested.
143 @return: A sanatized set of packages names to install.
145 return {package for package in packages if package not in banned_packages}
152 python packages should be installed.
165 def install_packages(packages=[], python_packages=[], force_latest=False): argument
174 @param packages: A list of names of the packages to install.
175 @param python_packages: A list of names of the python packages to install
187 if not _install_package_precheck(packages or python_packages):
190 # If force_latest is False, only install packages that are not already
193 packages = [p for p in packages
197 if not packages and not python_packages:
199 'All packages are installed already, skip reinstall.')
207 packages = [] if not packages else packages
209 packages = set(packages)
212 # segmentation faults. Some tests request these packages, ensure they
214 packages = _remove_banned_packages(packages, ['python-pip', 'python-dev'])
216 if packages:
219 '--force-yes' % ' '.join(packages))
220 logging.debug('Packages are installed: %s.', packages)
223 # For containers running in Moblab, /usr/local/lib/python2.7/dist-packages/
225 # be installed in /usr/lib/python2.7/dist-packages/
226 # Containers created in Moblab does not have autotest/site-packages folder.
227 if not os.path.exists('/usr/local/autotest/site-packages'):
228 target_setting = '--target="/usr/lib/python2.7/dist-packages/"'
235 logging.debug('Python packages are installed: %s.', python_packages)