OpenVZ Forum


Home » General » Support » yum.repo per VE
Re: yum.repo per VE [message #21826 is a reply to message #21728] Tue, 16 October 2007 15:48 Go to previous messageGo to previous message
ntenev is currently offline  ntenev
Messages: 13
Registered: December 2005
Location: Bulgaria
Junior Member

By presumption that say "something is better for nothing" will post my solution og this case. It's ugly but useful for me Smile

In file /usr/share/vzyum/lib/yum/__init__.py in YumBase -> getReposFromConfig somewhere after line 105 ~ 106 I added next code:

  vpsrepospath = ('/etc/yum.repos.vps/%s' % self.conf.vps)

  if os.path.isdir(vpsrepospath):
      self.conf.reposdir.append(vpsrepospath)


Then in /etc/yum.repos.vps/1003/ I can create .repo file that contain required additional repos and ... I'm happy Smile

vzyum 1001/1002 ... read repo only from /vz/template/centos/4/i386/config/yum.conf but vzyum 1003 adds and repos from /etc/yum.repos.vps/1003/*.repo filed. Cashe is still the same for one OS tempalte.

I'm not skilled python developer ... even I'm not developer at all. May be have some other good solutions for this case. First I was try to make it like a vzyum plugin (yum plugin ideed) but fail ... maybe because old API (version 2.1), maybe because I don't have enough developer skills


That's all folks Smile




 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fail to compile 2.6.18-028stab049.1 on amd64 machine
Next Topic: sysctl, kernel.sem, kernel.shmmax etc.
Goto Forum:
  


Current Time: Fri Sep 19 17:31:21 GMT 2025

Total time taken to generate the page: 0.06418 seconds