Esempio n. 1
0
 def testGetOverlayNameProfilesLayoutConfNoRepoName(self):
   """Verify metadata/layout.conf w/out repo-name is ignored"""
   self._CreateProfilesRepoName('hi!')
   metadata = os.path.join(self.tempdir, 'metadata')
   osutils.SafeMakedirs(metadata)
   layout_conf = os.path.join(metadata, 'layout.conf')
   osutils.WriteFile(layout_conf, 'here = we go')
   self.assertEqual(portage_util.GetOverlayName(self.tempdir), 'hi!')
Esempio n. 2
0
 def testGetOverlayNameProfilesLayoutConf(self):
   """Verify metadata/layout.conf is read before profiles/repo_name"""
   self._CreateProfilesRepoName('hi!')
   metadata = os.path.join(self.tempdir, 'metadata')
   osutils.SafeMakedirs(metadata)
   layout_conf = os.path.join(metadata, 'layout.conf')
   osutils.WriteFile(layout_conf, 'repo-name = bye')
   self.assertEqual(portage_util.GetOverlayName(self.tempdir), 'bye')
Esempio n. 3
0
 def testGetOverlayNameProfilesRepoName(self):
   """Verify profiles/repo_name can be read"""
   self._CreateProfilesRepoName('hi!')
   self.assertEqual(portage_util.GetOverlayName(self.tempdir), 'hi!')
Esempio n. 4
0
 def testGetOverlayNameNone(self):
   """If the overlay has no name, it should be fine"""
   self.assertEqual(portage_util.GetOverlayName(self.tempdir), None)