diff options
author | Yulia Poyarkova <ypoyarko@redhat.com> | 2008-03-26 06:28:45 +0000 |
---|---|---|
committer | Yulia Poyarkova <ypoyarko@redhat.com> | 2008-03-26 06:28:45 +0000 |
commit | e7287311bf205c9d5eea6ef6c2a42f6e20172a6f (patch) | |
tree | 525e796e3e0f9cda3c4f5545d1fe381311bfad6d | |
parent | 9dc44ea21b2041ade0d4dcf304a4df48b63b1822 (diff) | |
parent | 53545920882df8511fd8783495a3c9c7d925a229 (diff) | |
download | anaconda-e7287311bf205c9d5eea6ef6c2a42f6e20172a6f.tar.gz anaconda-e7287311bf205c9d5eea6ef6c2a42f6e20172a6f.tar.xz anaconda-e7287311bf205c9d5eea6ef6c2a42f6e20172a6f.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/anaconda
-rw-r--r-- | anaconda.spec | 13 | ||||
-rw-r--r-- | fsset.py | 17 | ||||
-rw-r--r-- | instdata.py | 2 | ||||
-rw-r--r-- | loader2/net.c | 6 | ||||
-rw-r--r-- | loader2/nfsinstall.c | 4 | ||||
-rw-r--r-- | partRequests.py | 2 | ||||
-rw-r--r-- | po/ru.po | 2 | ||||
-rw-r--r-- | yuminstall.py | 54 |
8 files changed, 69 insertions, 31 deletions
diff --git a/anaconda.spec b/anaconda.spec index 8978fe699..b0083166a 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -2,7 +2,7 @@ Summary: Graphical system installer Name: anaconda -Version: 11.4.0.56 +Version: 11.4.0.58 Release: 1 License: GPLv2+ Group: Applications/System @@ -205,6 +205,17 @@ desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications %{bu /sbin/chkconfig --del reconfig >/dev/null 2>&1 || : %changelog +* Tue Mar 25 2008 Jeremy Katz <katzj@redhat.com> - 11.4.0.58-1 +- Fuzzy broken string (katzj) + +* Tue Mar 25 2008 Jeremy Katz <katzj@redhat.com> - 11.4.0.57-1 +- Use anaconda-upgrade dir in the preupgrade case (katzj) +- Have 'preupgrade' key doing an upgrade (katzj) +- Fix what we expect to be the message from ntfsprogs (katzj) +- Fix up compile error for new newt (katzj) +- Don't traceback if we have little freespace partitions (#438696) (katzj) +- Translation updates (ko, ru) + * Mon Mar 24 2008 Jeremy Katz <katzj@redhat.com> - 11.4.0.56-1 - Translation updates (hi, fr, kn, de, ml, es, mr, ko, te) - Fix up more unicode shenanigans (#437993) (katzj) @@ -1031,12 +1031,17 @@ class NTFSFileSystem(FileSystemType): buf = iutil.execWithCapture("ntfsresize", ["-m", devicePath], stderr = "/dev/tty5") - try: - return int(buf) + 250 - except Exception, e: - log.warning("Unable to discover minimum size of filesystem on %s" %(device,)) - log.debug("error was %s\n", e) - return 1 + for l in buf.split("\n"): + if not l.startswith("Minsize"): + continue + try: + min = l.split(":")[1].strip() + return int(min) + 250 + except Exception, e: + log.warning("Unable to parse output for minimum size on %s: %s" %(device, e)) + + log.warning("Unable to discover minimum size of filesystem on %s" %(device,)) + return 1 fileSystemTypeRegister(NTFSFileSystem()) diff --git a/instdata.py b/instdata.py index 3bc79fc9d..32c5124bd 100644 --- a/instdata.py +++ b/instdata.py @@ -75,7 +75,7 @@ class InstallData: self.auth = "--enableshadow --passalgo=sha512" self.desktop = desktop.Desktop() self.upgrade = None - if flags.cmdline.has_key("doupgrade"): + if flags.cmdline.has_key("preupgrade"): self.upgrade = True # XXX move fsset and/or diskset into Partitions object? self.fsset.reset() diff --git a/loader2/net.c b/loader2/net.c index cc30b809b..3bbe77bd7 100644 --- a/loader2/net.c +++ b/loader2/net.c @@ -269,8 +269,8 @@ static int getWirelessConfig(struct networkDeviceConfig *cfg, char * ifname) { "is needed, leave this field blank and the " "install will continue."), ifname); do { - struct newtWinEntry entry[] = { { N_("ESSID"), (const char **)&essid, 0 }, - { N_("Encryption Key"), (const char **) &wepkey, 0 }, + struct newtWinEntry entry[] = { { N_("ESSID"), &essid, 0 }, + { N_("Encryption Key"), &wepkey, 0 }, { NULL, NULL, 0 } }; rc = newtWinEntries(_("Wireless Settings"), buf, @@ -307,7 +307,7 @@ static int getDnsServers(struct networkDeviceConfig * cfg) { int rc; struct in_addr addr; struct in6_addr addr6; - const char * ns = ""; + char * ns = ""; struct newtWinEntry entry[] = { { N_("Nameserver IP"), &ns, 0 }, { NULL, NULL, 0 } }; diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c index 67f0cda37..00f3a3eba 100644 --- a/loader2/nfsinstall.c +++ b/loader2/nfsinstall.c @@ -55,10 +55,10 @@ int nfsGetSetup(char ** hostptr, char ** dirptr) { int rc; entries[0].text = _("NFS server name:"); - entries[0].value = (const char **) &newServer; + entries[0].value = &newServer; entries[0].flags = NEWT_FLAG_SCROLL; rc = asprintf(&entries[1].text, _("%s directory:"), getProductName()); - entries[1].value = (const char **) &newDir; + entries[1].value = &newDir; entries[1].flags = NEWT_FLAG_SCROLL; entries[2].text = NULL; entries[2].value = NULL; diff --git a/partRequests.py b/partRequests.py index 5ef4f804d..750ef5ead 100644 --- a/partRequests.py +++ b/partRequests.py @@ -204,7 +204,7 @@ class RequestSpec: def isResizable(self, partitions): if self.isEncrypted(partitions): # FIXME: can't resize crypted devs yet return False - return self.resizable and self.fstype.isResizable() + return self.resizable and self.fstype is not None and self.fstype.isResizable() def isEncrypted(self, partitions, parentOnly = False): if self.encryption and self.encryption.getScheme() is not None: @@ -3130,7 +3130,7 @@ msgid "Packages in %s" msgstr "Пакеты в %s" #: ../iw/GroupSelector.py:482 -#, python-format +#fuzzy, python-format msgid "%d of %d optional package selected" msgid_plural "%d of %d optional packages selected" msgstr[0] "Выбран %d дополнительный пакет из %d" diff --git a/yuminstall.py b/yuminstall.py index 75b17f7d8..cb6d5f877 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -168,15 +168,6 @@ class AnacondaCallback: self.instLog.flush() self.openfile = None - if os.path.exists("%s/var/cache/yum/anaconda-upgrade/packages/%s" - %(self.rootPath,os.path.basename(po.localPkg()))): - try: - f = open("%s/var/cache/yum/anaconda-upgrade/packages/%s" %(self.rootPath,os.path.basename(po.localPkg())), 'r') - self.openfile = f - log.info("using already downloaded package for %s" %(po,)) - except: - pass - while self.openfile is None: try: fn = repo.getPackage(po) @@ -254,14 +245,32 @@ class AnacondaYumRepo(YumRepository): if mirrorlist: self.mirrorlist = mirrorlist - self.setAttribute('cachedir', "%s/tmp/cache/" % root) - self.setAttribute('pkgdir', root) - self.setAttribute('hdrdir', "%s/tmp/cache/headers" % root) + self.setAttribute('cachedir', os.path.join(root, "/tmp/cache", self.id)) def dirSetup(self): - YumRepository.dirSetup(self) + # FIXME: this is terrible, awful and shouldn't be allowed to see + # the light of day. but if we use YumRepository.dirSetup(), then + # our value of cachedir is overridden. So just make sure we do + # the bits that are done in that parent class for now :-/ + self.setAttribute('pkgdir', os.path.join(self.cachedir, "packages")) + self.setAttribute('hdrdir', os.path.join(self.cachedir, "headers")) + self.setAttribute('metadata_cookie', os.path.join(self.cachedir, self.metadata_cookie_fn)) + if not os.path.isdir(self.hdrdir): os.makedirs(self.hdrdir, mode=0755) + if not os.path.isdir(self.pkgdir): + os.makedirs(self.pkgdir, mode=0755) + if not os.path.isdir(self.cachedir): + os.makedirs(self.cachedir, mode=0755) + + def _getFile(self, url=None, relative=None, local=None, start=None, end=None, + copy_local=None, checkfunc=None, text=None, reget='simple', cache=True): + # FIXME: we end up doing a regrab in the preupgrade case here for some + # reason I can't figure out + if os.path.exists(local): + return local + return YumRepository._getFile(self, url, relative, local, start, end, copy_local, checkfunc, text, reget, cache) + class YumSorter(yum.YumBase): def _transactionDataFactory(self): @@ -488,6 +497,7 @@ class AnacondaYum(YumSorter): ylog = logging.getLogger("yum") map(lambda x: ylog.addHandler(x), log.handlers) + _preupgset = False # add default repos for (name, uri) in self.anaconda.id.instClass.getPackagePaths(methodstr).items(): rid = name.replace(" ", "") @@ -497,6 +507,21 @@ class AnacondaYum(YumSorter): repo.name = name repo.cost = 100 + # if we've been booted with 'preupgrade', then we want to + # use the cache on the hd for the upgrade info and thus avoid + # needing to use the network. + # FIXME: longer-term, I'd like to see + # the anaconda-upgrade dir just become a full-fledged repo + # (maybe combining input from multiple repos) that we add + # in addition to the base repos. then we catch a depcheck error + # and ask if you want to add more repos. + if flags.cmdline.has_key("preupgrade") and _preupgset == False: + _preupgset = True + if os.path.exists("%s/var/cache/yum/anaconda-upgrade" % self.anaconda.rootPath): + 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)) + if self.anaconda.mediaDevice or self.isodir: repo.mediaid = getMediaId(self.tree) log.info("set mediaid of repo to: %s" % repo.mediaid) @@ -910,9 +935,6 @@ class YumBackend(AnacondaBackend): else: repos.extend(self.ayum.repos.listEnabled()) - if not os.path.exists("%s/tmp/cache" % anaconda.rootPath): - iutil.mkdirChain("%s/tmp/cache/headers" % anaconda.rootPath) - self.ayum.doMacros() longtasks = ( (self.ayum.doRepoSetup, 4), |