diff options
author | Britney Fransen <brfransen@gmail.com> | 2013-12-07 20:03:44 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2013-12-07 20:03:44 (GMT) |
commit | b0893476b0988fdb4eea84fa40be34ef8a549f4f (patch) | |
tree | 64d428180ef6b8dd1a207ad969d0c6b56cd40236 /abs/core/mythinstall/installdialog.cpp.patch | |
parent | dacae1d9673958dbeceae2ec93758cc3d4b9995e (diff) | |
download | linhes_pkgbuild-b0893476b0988fdb4eea84fa40be34ef8a549f4f.zip linhes_pkgbuild-b0893476b0988fdb4eea84fa40be34ef8a549f4f.tar.gz linhes_pkgbuild-b0893476b0988fdb4eea84fa40be34ef8a549f4f.tar.bz2 |
mythinstall: Upgrade gives popup when target isn't R8.0 or above. closes #905.
many other patches to add/change verbage to various screens.
Diffstat (limited to 'abs/core/mythinstall/installdialog.cpp.patch')
-rw-r--r-- | abs/core/mythinstall/installdialog.cpp.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/abs/core/mythinstall/installdialog.cpp.patch b/abs/core/mythinstall/installdialog.cpp.patch new file mode 100644 index 0000000..b188bab --- /dev/null +++ b/abs/core/mythinstall/installdialog.cpp.patch @@ -0,0 +1,75 @@ +--- installdialog.cpp.orig 2013-12-05 21:06:13.358926594 +0000 ++++ installdialog.cpp 2013-12-06 17:26:16.491833828 +0000 +@@ -881,50 +881,32 @@ + } + if ( flag ) + { +- tflag = 1; +- } +- else +- { +- cout << "searching for knoppmyth-versin" << endl; +- //couldn't open /etc/systemconfig, so now look for /tmp/etc/Knoppmyth-version +- QFile file("/tmp/etc/KnoppMyth-version"); +- if ( file.exists() ) +- { //appears to be a knoppmyth version, proceed +- cout << "found knoppmyth-version" << endl; +- QFile kmfile("/tmp/etc/hostname"); +- if ( kmfile.open(QIODevice::ReadOnly | QIODevice::Text) ) +- { +- Q3TextStream t( &kmfile ); // use a text stream +- line = t.readLine(); +- flag=true; +- currentitem = line.stripWhiteSpace(); +- current_hostname = currentitem ; +- //gCoreContext->ActivateSettingsCache(true); +- gCoreContext->ClearSettingsCache(); +- //FixME +- //gCoreContext->SetSetting("HostMyhostname",current_hostname); +- gCoreContext->SaveSetting("HostMyhostname",current_hostname); +- } +- kmfile.close(); +- runNextSetting = ask_validate_network(); +- } +- else ++ //check if LinHES-release is 8.0 or newer ++ cout << "searching for LinHES-release" << endl; ++ //look for /tmp/etc/LinHES-release ++ QFile file("/tmp/etc/LinHES-release"); ++ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { +- //popup things went wrong +- DialogCode returncode = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(), +- QString(""), +- QObject::tr("Couldn't find the old config file, proceed with update?"), +- QObject::tr("No"), QObject::tr("Yes"), kDialogCodeButton1); +- if ( returncode == kDialogCodeButton1 ) ++ Q3TextStream t( &file ); // use a text stream ++ while ( !t.eof() ) + { +- runNextSetting = ask_validate_network(); +- } +- else if ( returncode == kDialogCodeButton0 ) +- { +- runNextSetting = 1; ++ line = t.readLine(); ++ if ( line.contains("8.") ) ++ { ++ tflag = 1; ++ } + } ++ file.close(); + } +- ++ } ++ if ( tflag == 0 ) ++ { ++ //popup install doesn't look like R8 ++ MythPopupBox::showOkPopup( ++ GetMythMainWindow(), ++ QObject::tr(""), ++ QObject::tr("The selected disk cannot be upgraded because it is older than LinHES R8.0.")); ++ runNextSetting = 1; + } + } + } |