Logo Search packages:      
Sourcecode: jockey version File versions  Download package

def sandbox::TestOSLib::_make_modalias (   self  )  [private]

Create a dummy modules.alias and set self.modaliases
appropriately.

Definition at line 358 of file sandbox.py.

00358                             :
        '''Create a dummy modules.alias and set self.modaliases
        appropriately.'''

        # prepare one fake kernel modules.alias and an override directory
        self.modaliases = [
            os.path.join(self.workdir, 'kernelmods', 'modules.alias'),
            os.path.join(self.workdir, 'modalias-overrides'),
            '/nonexisting', # should not stumble over those
        ]
        os.mkdir(os.path.dirname(self.modaliases[0]))
        os.mkdir(self.modaliases[1])

        f = open(self.modaliases[0], 'w')
        print >> f, '# Aliases extracted from modules themselves.'
        for mod in sorted(fake_modinfo.keys()):
            aliases = fake_modinfo[mod].get('alias', [])
            if hasattr(aliases, 'isspace'):
                print >> f, 'alias %s %s' % (aliases, mod)
            else:
                for a in aliases:
                    print >> f, 'alias %s %s' % (a, mod)
        f.close()

    def _make_xorg_conf(self):


Generated by  Doxygen 1.6.0   Back to index