Apply apt-0.5.15lorg2-alt-apt-shell-resetconfig.patch

Added in commit e97a90d:
0.5.15lorg2-alt3

- Resolved a few issues introduced after cnc6.
This commit is contained in:
Gleb Fotengauer-Malinovskiy 2014-05-16 21:04:22 +04:00
parent 92fc808040
commit 761d0a0c73
2 changed files with 7 additions and 23 deletions

View File

@ -1,23 +0,0 @@
--- apt-0.5.15lorg2/cmdline/apt-shell.cc.orig 2006-03-30 12:21:31 +0400
+++ apt-0.5.15lorg2/cmdline/apt-shell.cc 2006-03-30 12:22:24 +0400
@@ -4644,6 +4644,7 @@
// Make a copy of the configuration. Each command will modify its
// own copy of the whole configuration.
Configuration GlobalConfig(*_config);
+ Configuration _Config(*_config);
ReadLineInit();
c1out << _("Welcome to the APT shell. Type \"help\" for more information.") << endl;
@@ -4758,6 +4759,12 @@
CmdL.DispatchArg(Cmds);
free(line);
+ if (!_config->FindB("quit"))
+ {
+ // restore saved config
+ delete _config;
+ _config = new Configuration(_Config);
+ }
}
ReadLineFinish();

View File

@ -4643,6 +4643,7 @@ int main(int argc,const char *argv[])
// Make a copy of the configuration. Each command will modify its // Make a copy of the configuration. Each command will modify its
// own copy of the whole configuration. // own copy of the whole configuration.
Configuration GlobalConfig(*_config); Configuration GlobalConfig(*_config);
Configuration _Config(*_config);
ReadLineInit(); ReadLineInit();
c1out << _("Welcome to the APT shell. Type \"help\" for more information.") << endl; c1out << _("Welcome to the APT shell. Type \"help\" for more information.") << endl;
@ -4757,6 +4758,12 @@ int main(int argc,const char *argv[])
CmdL.DispatchArg(Cmds); CmdL.DispatchArg(Cmds);
free(line); free(line);
if (!_config->FindB("quit"))
{
// restore saved config
delete _config;
_config = new Configuration(_Config);
}
} }
ReadLineFinish(); ReadLineFinish();