Package: synaptic
Version: 0.83+nmu1
Severity: normal
Tags: patch
Hi
Attached is the diff file/patch to fix/close this bug (#837074).
In the same step, as per comment in line 90: "// FIXME: use findDir", new
function "FindDir" was used, so i hope the programmer has a little bit of work
:)
I hope it's useful and ok, as it is my first patch submitted.
Regards
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages synaptic depends on:
ii hicolor-icon-theme 0.15-1
ii libapt-inst2.0 1.4~beta2
ii libapt-pkg5.0 1.4~beta2
ii libatk1.0-0 2.22.0-1
ii libc6 2.24-8
ii libcairo-gobject2 1.14.8-1
ii libcairo2 1.14.8-1
ii libept1.5.0 1.1+nmu3+b1
ii libgcc1 1:6.3.0-2
ii libgdk-pixbuf2.0-0 2.36.2-1
ii libglib2.0-0 2.50.2-2
ii libgnutls30 3.5.7-3
ii libgtk-3-0 3.22.5-1
ii libpango-1.0-0 1.40.3-3
ii libpangocairo-1.0-0 1.40.3-3
ii libpcre2-8-0 10.22-2
ii libstdc++6 6.3.0-2
ii libvte-2.91-0 0.46.1-1
ii libx11-6 2:1.6.4-2
ii libxapian30 1.4.2-1
ii zlib1g 1:1.2.8.dfsg-4
Versions of packages synaptic recommends:
ii gksu 2.0.2-9
ii libgtk2-perl 2:1.2499-1
ii policykit-1 0.105-17
ii rarian-compat 0.8.1-6
ii xdg-utils 1.1.1-1
Versions of packages synaptic suggests:
pn apt-xapian-index <none>
ii deborphan 1.7.28.8-0.3
pn dwww <none>
ii menu 2.1.47
pn software-properties-gtk <none>
ii tasksel 3.39
diff -Naur synaptic-0.83+nmu1/common/rconfiguration.cc synaptic-0.83+nmu1+fix837074/common/rconfiguration.cc
--- synaptic-0.83+nmu1/common/rconfiguration.cc 2016-01-11 10:20:13.000000000 +0100
+++ synaptic-0.83+nmu1+fix837074/common/rconfiguration.cc 2017-01-04 17:42:25.032692670 +0100
@@ -87,11 +87,7 @@
// store option 'consider recommended packages as dependencies'
// to config of apt if we run as root
if (getuid() == 0) {
- // FIXME: use findDir
- string aptConfPath = _config->Find("Dir", "/")
- + _config->Find("Dir::Etc", "etc/apt/")
- + _config->Find("Dir::Etc:parts", "apt.conf.d")
- + "/99synaptic";
+ string aptConfPath = _config->FindDir("Dir::Etc::parts") + "99synaptic";
int old_umask = umask(0022);
ofstream aptfile(aptConfPath.c_str(), ios::out);