Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 306405 Details for
Bug 447657
RFE: use cachedir setting from yum in preupgrade
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to yuminstall.py
cache.patch (text/plain), 2.42 KB, created by
Jerry Vonau
on 2008-05-22 17:16:05 UTC
(
hide
)
Description:
patch to yuminstall.py
Filename:
MIME Type:
Creator:
Jerry Vonau
Created:
2008-05-22 17:16:05 UTC
Size:
2.42 KB
patch
obsolete
>--- yuminstall.py.orig 2008-05-21 19:37:36.000000000 -0500 >+++ yuminstall.py 2008-05-22 10:21:14.000000000 -0500 >@@ -65,6 +65,17 @@ > > import whiteout > >+def findyumcache(self): >+ f = open("/mnt/sysimage/etc/yum.conf", 'r') >+ if not f: >+ pass >+ lines = f.readlines() >+ for line in lines: >+ if line startswith("cachedir="): >+ cachedir = line.split("=", 2) >+ else: >+ cachedir = "/var/cache/yum" >+ > def size_string (size): > def number_format(s): > return locale.format("%s", s, 1) >@@ -243,7 +254,7 @@ > if mirrorlist: > self.mirrorlist = mirrorlist > >- self.setAttribute('cachedir', os.path.join(root, "var/cache/yum", self.id)) >+ self.setAttribute('cachedir', "%s%s", self.id %(root, (findyumcache(self)))) > > def dirSetup(self): > # FIXME: this is terrible, awful and shouldn't be allowed to see >@@ -492,7 +503,7 @@ > self.conf.logfile="/tmp/yum.log" > self.conf.obsoletes=True > self.conf.cache=0 >- self.conf.cachedir = "%s/var/cache/yum" % self.anaconda.rootPath >+ self.conf.cachedir= ("%s%s" %(root, findyumcache(self))) > self.conf.metadata_expire = 0 > > if self.anaconda.methodstr.startswith("nfs:"): >@@ -539,6 +550,12 @@ > repo.cachedir = "%s/var/cache/yum/anaconda-upgrade" % self.anaconda.rootPath > repo.metadata_expire = -1 > log.info("setting cachedir for %s to %s based on preupgrade flag" %(rid, repo.cachedir)) >+ else: >+ nscache = findyumcache(self) >+ if os.path.exists("%s%sanaconda-upgrade" %(self.anaconda.rootPath, nscache)): >+ repo.cachedir = "%s%sanaconda-upgrade" %(self.anaconda.rootPath, nscache)) >+ repo.metadata_expire = -1 >+ log.info("setting cachedir for %s to %s based on preupgrade flag and original yum.conf" %(rid, repo.nscache)) > > if self.anaconda.mediaDevice or self.isodir: > repo.mediaid = getMediaId(self.tree) >@@ -595,7 +612,7 @@ > "/mnt/source/RHupdates/pluginconf.d"]) > self.plugins.run('init') > >- self.repos.setCacheDir("%s/var/cache/yum" % self.anaconda.rootPath) >+ self.repos.setCacheDir("%s%s" %(self.anaconda.rootPath, findyumcache(self))) > > def downloadHeader(self, po): > while True:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 447657
: 306405