root/trunk/contrib/yum-3.2.1-chroot.patch

Revision 2556, 6.6 kB (checked in by ensc, 1 year ago)

added patch for yum-3.2.1; this one should retain API
compatibility by using a dummy argument for the *Lock()
methods

  • yum-3.2.1/yum/__init__.py

    old new  
    201201        # (typically /etc/yum/repos.d) 
    202202        parser = ConfigParser() 
    203203        for reposdir in self.conf.reposdir: 
    204             if os.path.exists(self.conf.installroot+'/'+reposdir): 
    205                 reposdir = self.conf.installroot + '/' + reposdir 
     204            reposdir  = self.conf.getRootedPath(reposdir) 
    206205 
    207206            if os.path.isdir(reposdir): 
    208207                for repofn in glob.glob('%s/*.repo' % reposdir): 
     
    616615        # if we're not root then we don't lock - just return nicely 
    617616        if self.conf.uid != 0: 
    618617            return 
    619              
    620         root = self.conf.installroot 
    621         lockfile = root + '/' + lockfile # lock in the chroot 
    622         lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra / 
    623          
     618 
     619        lockfile = self.conf.lockfile 
     620 
    624621        mypid=str(os.getpid())     
    625622        while not self._lock(lockfile, mypid, 0644): 
    626623            fd = open(lockfile, 'r') 
     
    652649        if self.conf.uid != 0: 
    653650            return 
    654651         
    655         root = self.conf.installroot 
    656         lockfile = root + '/' + lockfile # lock in the chroot 
    657          
     652        lockfile=self.conf.lockfile 
     653 
    658654        self._unlock(lockfile) 
    659655         
    660656    def _lock(self, filename, contents='', mode=0777): 
  • yum-3.2.1/docs/yum.conf.5

    old new  
    2323following options: 
    2424 
    2525.IP \fBcachedir\fR 
    26 Directory where yum should store its cache and db files. The default is 
    27 `/var/cache/yum'. 
     26Directory where yum should store its cache and db files. The default 
     27is `/var/cache/yum'. Unless the prefixes `hostfs://' or `chrootfs://' 
     28are used, some magic will be applied to determine the real path in 
     29combination with `--installroot'. 
    2830 
    2931.IP \fBkeepcache\fR 
    3032Either `1' or `0'. Determines whether or not yum keeps the cache 
     
    4042repositories defined in /etc/yum/yum.conf to form the complete set of 
    4143repositories that yum will use. 
    4244 
     45Unless the prefixes `hostfs://' or `chrootfs://' are used, some magic 
     46will be applied to determine the real path in combination with 
     47`--installroot'. 
     48 
    4349.IP \fBdebuglevel\fR 
    4450Debug message output level. Practical range is 0\-10. Default is `2'. 
    4551 
     
    4753Error message output level. Practical range is 0\-10. Default is `2'. 
    4854 
    4955.IP \fBlogfile\fR 
    50 Full directory and file name for where yum should write its log file. 
     56Full directory and file name for where yum should write its log 
     57file. Unless the prefixes `hostfs://' or `chrootfs://' are used, 
     58some magic will be applied to determine the real path in combination 
     59with `--installroot'. 
    5160 
    5261.IP \fBgpgcheck\fR 
    5362Either `1' or `0'. This tells yum whether or not it should perform a GPG 
Note: See TracBrowser for help on using the browser.