Merge lp:~oliver-joos/synaptic/lp154349 into lp:synaptic

Proposed by Oliver Joos
Status: Merged
Merged at revision: 1771
Proposed branch: lp:~oliver-joos/synaptic/lp154349
Merge into: lp:synaptic
Diff against target: 73 lines (+45/-1)
2 files modified
common/rconfiguration.cc (+39/-0)
debian/changelog (+6/-1)
To merge this branch: bzr merge lp:~oliver-joos/synaptic/lp154349
Reviewer Review Type Date Requested Status
synaptic-developers Pending
Review via email: mp+23250@code.launchpad.net

Description of the change

Fix to store setting "Consider recommended packages as dependencies" (Bug #154349)

(BTW: don't forget to update version number in the About dialog before next release. It still shows 0.62.5)

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks! I merged it into the lucid branch, the next step is to merge into trunk/ and upload to debian.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'common/rconfiguration.cc'
--- common/rconfiguration.cc 2006-02-24 11:27:00 +0000
+++ common/rconfiguration.cc 2010-04-12 18:16:22 +0000
@@ -82,6 +82,31 @@
82 if(_config->FindB("Volatile::Non-Interactive", false) == true) 82 if(_config->FindB("Volatile::Non-Interactive", false) == true)
83 return true;83 return true;
8484
85 // store option 'consider recommended packages as dependencies'
86 // to config of apt if we run as root
87 if (getuid() == 0) {
88 string aptConfPath = _config->Find("Dir", "/")
89 + _config->Find("Dir::Etc", "etc/apt/")
90 + _config->Find("Dir::Etc:parts", "apt.conf.d")
91 + "/99synaptic";
92 ofstream aptfile(aptConfPath.c_str(), ios::out);
93 if (!aptfile != 0) {
94 cerr << "cannot open " << aptConfPath.c_str() <<
95 " to write APT::Install-Recommends" << endl;
96 } else {
97 if (_config->FindB("APT::Install-Recommends", false))
98 aptfile << "APT::Install-Recommends \"true\";" << endl;
99 else
100 aptfile << "APT::Install-Recommends \"false\";" << endl;
101 aptfile.close();
102 }
103 }
104 // and backup Install-Recommends to config of synaptic
105 _config->Set("Synaptic::Install-Recommends",
106 _config->FindB("APT::Install-Recommends",
107 _config->FindB("Synaptic::Install-Recommends",
108 false)));
109
85 ofstream cfile(ConfigFilePath.c_str(), ios::out);110 ofstream cfile(ConfigFilePath.c_str(), ios::out);
86 if (!cfile != 0)111 if (!cfile != 0)
87 return _error->Errno("ofstream",112 return _error->Errno("ofstream",
@@ -211,6 +236,20 @@
211 _error->Discard();236 _error->Discard();
212 }237 }
213238
239 // read Install-Recommends, preferably from APT:: if we run as root
240 // or from Synaptic:: otherwise
241 if(getuid() == 0) {
242 _config->Set("APT::Install-Recommends",
243 _config->FindB("APT::Install-Recommends",
244 _config->FindB("Synaptic::Install-Recommends",
245 false)));
246 } else {
247 _config->Set("APT::Install-Recommends",
248 _config->FindB("Synaptic::Install-Recommends",
249 _config->FindB("APT::Install-Recommends",
250 false)));
251 }
252
214 return true;253 return true;
215}254}
216255
217256
=== modified file 'debian/changelog'
--- debian/changelog 2010-04-07 14:36:06 +0000
+++ debian/changelog 2010-04-12 18:16:22 +0000
@@ -20,7 +20,12 @@
20 * add tooltip to 'properties' and 'search' buttons (LP: #202681)20 * add tooltip to 'properties' and 'search' buttons (LP: #202681)
21 * * gtk/rgpreferenceswindow.cc: escape '@/:%' in proxy auth string (LP: 130289)21 * * gtk/rgpreferenceswindow.cc: escape '@/:%' in proxy auth string (LP: 130289)
22 22
23 -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 16 Feb 2010 11:13:45 +010023 [ Oliver Joos ]
24 * common/rconfiguration.cc:
25 - Fix to store setting "Consider recommended packages as dependencies"
26 (closes debian #440027 and LP: #154349)
27
28 -- Oliver Joos <oliver.joos@hispeed.ch> Sat, 27 Mar 2010 07:07:05 +0100
2429
25synaptic (0.63.1) unstable; urgency=low30synaptic (0.63.1) unstable; urgency=low
2631

Subscribers

People subscribed via source and target branches

to status/vote changes: