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
1=== modified file 'common/rconfiguration.cc'
2--- common/rconfiguration.cc 2006-02-24 11:27:00 +0000
3+++ common/rconfiguration.cc 2010-04-12 18:16:22 +0000
4@@ -82,6 +82,31 @@
5 if(_config->FindB("Volatile::Non-Interactive", false) == true)
6 return true;
7
8+ // store option 'consider recommended packages as dependencies'
9+ // to config of apt if we run as root
10+ if (getuid() == 0) {
11+ string aptConfPath = _config->Find("Dir", "/")
12+ + _config->Find("Dir::Etc", "etc/apt/")
13+ + _config->Find("Dir::Etc:parts", "apt.conf.d")
14+ + "/99synaptic";
15+ ofstream aptfile(aptConfPath.c_str(), ios::out);
16+ if (!aptfile != 0) {
17+ cerr << "cannot open " << aptConfPath.c_str() <<
18+ " to write APT::Install-Recommends" << endl;
19+ } else {
20+ if (_config->FindB("APT::Install-Recommends", false))
21+ aptfile << "APT::Install-Recommends \"true\";" << endl;
22+ else
23+ aptfile << "APT::Install-Recommends \"false\";" << endl;
24+ aptfile.close();
25+ }
26+ }
27+ // and backup Install-Recommends to config of synaptic
28+ _config->Set("Synaptic::Install-Recommends",
29+ _config->FindB("APT::Install-Recommends",
30+ _config->FindB("Synaptic::Install-Recommends",
31+ false)));
32+
33 ofstream cfile(ConfigFilePath.c_str(), ios::out);
34 if (!cfile != 0)
35 return _error->Errno("ofstream",
36@@ -211,6 +236,20 @@
37 _error->Discard();
38 }
39
40+ // read Install-Recommends, preferably from APT:: if we run as root
41+ // or from Synaptic:: otherwise
42+ if(getuid() == 0) {
43+ _config->Set("APT::Install-Recommends",
44+ _config->FindB("APT::Install-Recommends",
45+ _config->FindB("Synaptic::Install-Recommends",
46+ false)));
47+ } else {
48+ _config->Set("APT::Install-Recommends",
49+ _config->FindB("Synaptic::Install-Recommends",
50+ _config->FindB("APT::Install-Recommends",
51+ false)));
52+ }
53+
54 return true;
55 }
56
57
58=== modified file 'debian/changelog'
59--- debian/changelog 2010-04-07 14:36:06 +0000
60+++ debian/changelog 2010-04-12 18:16:22 +0000
61@@ -20,7 +20,12 @@
62 * add tooltip to 'properties' and 'search' buttons (LP: #202681)
63 * * gtk/rgpreferenceswindow.cc: escape '@/:%' in proxy auth string (LP: 130289)
64
65- -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 16 Feb 2010 11:13:45 +0100
66+ [ Oliver Joos ]
67+ * common/rconfiguration.cc:
68+ - Fix to store setting "Consider recommended packages as dependencies"
69+ (closes debian #440027 and LP: #154349)
70+
71+ -- Oliver Joos <oliver.joos@hispeed.ch> Sat, 27 Mar 2010 07:07:05 +0100
72
73 synaptic (0.63.1) unstable; urgency=low
74

Subscribers

People subscribed via source and target branches

to status/vote changes: