diff -urN yum-2.4.0.orig/cli.py yum-2.4.0/cli.py
--- yum-2.4.0.orig/cli.py	2005-07-14 12:32:51.000000000 +0400
+++ yum-2.4.0/cli.py	2005-09-19 17:42:37.723077456 +0400
@@ -125,6 +125,8 @@
         self.optparser.add_option("", "--installroot", dest="installroot",
                 action="store", default=None, help="set install root", 
                 metavar='[path]')
+        self.optparser.add_option("", "--vps", dest="vps",
+                action="store", type='int', default=None, help="set VPS ID")
         self.optparser.add_option("", "--enablerepo", action='callback',
                 type='string', callback=repo_optcb, dest='repos', default=[],
                 help="enable one or more repositories (wildcards allowed)",
@@ -147,7 +149,7 @@
         try:
             args = _filtercmdline(
                         ('--noplugins',), 
-                        ('-c', '-d', '-e', '--installroot'), 
+                        ('-c', '-d', '-e', '--installroot', '--vps'), 
                         args,
                     )
         except ValueError:
@@ -167,7 +169,7 @@
                     
             # Parse the configuration file
             try:
-                self.doConfigSetup(fn=opts.conffile, root=root)
+                self.doConfigSetup(fn=opts.conffile, root=root, vps=opts.vps)
             except yum.Errors.ConfigError, e:
                 self.errorlog(0, _('Config Error: %s') % e)
                 sys.exit(1)
diff -urN yum-2.4.0.orig/rpmUtils/transaction.py yum-2.4.0/rpmUtils/transaction.py
--- yum-2.4.0.orig/rpmUtils/transaction.py	2005-03-27 08:42:09.000000000 +0400
+++ yum-2.4.0/rpmUtils/transaction.py	2005-09-19 17:39:31.085450688 +0400
@@ -39,6 +39,7 @@
                          'setProbFilter',
                          'hdrFromFdno',
                          'next',
+                         'setVPS',
                          'clean']
         self.tsflags = []
 
diff -urN yum-2.4.0.orig/yum/config.py yum-2.4.0/yum/config.py
--- yum-2.4.0.orig/yum/config.py	2005-07-02 00:40:34.000000000 +0400
+++ yum-2.4.0/yum/config.py	2005-09-19 18:11:50.269649880 +0400
@@ -184,7 +184,7 @@
 class yumconf(object):
     """primary config class for yum"""
     
-    def __init__(self, configfile = '/etc/yum.conf', root='/'):
+    def __init__(self, configfile = '/etc/yum.conf', root='/', vps=None):
         self.cfg = CFParser()
         configh = confpp(configfile)
         try:
@@ -317,12 +317,13 @@
             setattr(self, option, value)
 
         # do the dirs - set the root if there is one (grumble)
-        for option in ['cachedir', 'logfile']:
-            path = self.configdata[option]
-            root = self.configdata['installroot']
-            rootedpath = root + path
-            self.configdata[option] = rootedpath
-            setattr(self, option, rootedpath)
+        #if vps is None:
+        #    for option in ['cachedir', 'logfile']:
+        #        path = self.configdata[option]
+        #        root = self.configdata['installroot']
+        #        rootedpath = root + path
+        #        self.configdata[option] = rootedpath
+        #        setattr(self, option, rootedpath)
         
         # bandwidth limit options require special parsing
         for option, getfunc in [('bandwidth', self.cfg.getbytes), 
diff -urN yum-2.4.0.orig/yum/depsolve.py yum-2.4.0/yum/depsolve.py
--- yum-2.4.0.orig/yum/depsolve.py	2005-07-10 02:57:09.000000000 +0400
+++ yum-2.4.0/yum/depsolve.py	2005-09-19 17:39:31.088450232 +0400
@@ -52,6 +52,8 @@
                 self.ts.addTsFlag(ts_flags_to_rpm[flag])
             else:
                 self.errorlog(0, 'Invalid tsflag in config file: %s' % flag)
+        if self.conf.vps is not None:
+            self.ts.setVPS(self.conf.vps)
 
     def whatProvides(self, name, flags, version):
         """searches the packageSacks for what provides the arguments
diff -urN yum-2.4.0.orig/yum/__init__.py yum-2.4.0/yum/__init__.py
--- yum-2.4.0.orig/yum/__init__.py	2005-08-15 01:33:20.000000000 +0400
+++ yum-2.4.0/yum/__init__.py	2005-09-19 18:10:33.354342784 +0400
@@ -76,10 +76,11 @@
     def filelog(self, value, msg):
         print msg
    
-    def doConfigSetup(self, fn='/etc/yum.conf', root='/'):
+    def doConfigSetup(self, fn='/etc/yum.conf', root='/', vps=None):
         """basic stub function for doing configuration setup"""
-       
-        self.conf = config.yumconf(configfile=fn, root=root)
+
+        self.conf = config.yumconf(configfile=fn, root=root, vps=vps)
+        self.conf.setConfigOption('vps', vps)
         self.getReposFromConfig()
 
     def getReposFromConfig(self):
@@ -102,8 +103,9 @@
         # read each of them in using confpp, then parse them same as any other repo
         # section - as above.
         for reposdir in self.conf.reposdir:
-            if os.path.exists(self.conf.installroot + '/' + reposdir):
-                reposdir = self.conf.installroot + '/' + reposdir
+            if self.conf.vps is None:
+                if os.path.exists(self.conf.installroot + '/' + reposdir):
+                    reposdir = self.conf.installroot + '/' + reposdir
             
             if os.path.isdir(reposdir):
                 repofn = glob.glob(reposdir+'/*.repo')
