synaptic won't remember certain preferences

Bug #154349 reported by Tomas Ingo
130
This bug affects 13 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Invalid
Undecided
Unassigned
synaptic
Confirmed
Undecided
Unassigned
synaptic (Debian)
Fix Released
Unknown
synaptic (Ubuntu)
Fix Released
Low
Unassigned
Nominated for Lucid by Oliver Joos

Bug Description

If you set Synaptic to "Consider recommended packages as dependencies" and close Synaptic, the option will be unselected next time you launch the program

Related branches

Revision history for this message
Linoleum (114thw) wrote :

it seems that from the previous /root/.synaptic.conf from feisty, the line
UseRecommends "true";
has diapered.
Still, adding this line to /root/.synaptic.conf doesn't resolve the problem

Revision history for this message
Tomas Ingo (tomas-ingo) wrote :

This has not yet been fixed in Hardy

Revision history for this message
Guo Xi (guoxi349) wrote :

have the same problem in intrepid beta

Revision history for this message
Ameen Demidem (ameen.demidem) wrote :

Actually, enabling the option does work, in fact, for the current session but will be reset for the next one.

Here is how to bypass this bug meanwhile a fix is released.
as root, add the following line to /etc/apt/apt.conf:

APT::Install-Recommends "1";

if /etc/apt/apt.conf does not exist (which is probably the case) create it.

Notice that you can't remove the option from Synaptic. You have to remove it by deleting that line from apt.conf

Cheers.

Revision history for this message
Ameen Demidem (ameen.demidem) wrote :

Here is a patch to fix the problem.
It will make Synaptic remember the user preference through different sessions.
It will not affect apt-get though !
if you use apt-get you still have to add : -o APT::Install-Recommends=1

Mik3 (mc4100)
Changed in synaptic:
status: New → Confirmed
Changed in synaptic:
status: Unknown → New
Revision history for this message
Stefan Bedacht (sfab84) wrote :

The bug still exists in synaptic 0.62.1ubuntu10 which is shipped with Intrepid Ibex (8.10).

Revision history for this message
luigifab (luigifab-deactivatedaccount) wrote :

I have the same problem with Intrepid

Revision history for this message
Thierry B. (thierrybo2) wrote :

Same problem with Intrepid, but the reverse one. Option is checked by default, and I can't uncheck it. By the way, "apt-get" default to consider recommended packages as dependencies too.

Revision history for this message
Jan Claeys (janc) wrote :

I didn't try this in intrepid, but I have the same issue as Thierry in jaunty.

Revision history for this message
Jan Claeys (janc) wrote :

After disabling this manually in /etc/apt/apt.conf, it's disabled in synaptic too.
But after that, enabling it in synaptic doesn't persist...

There is a real need for a central, recognized place to store "apt" preferences that work consistently for all apt-based tools.

Revision history for this message
luigifab (luigifab-deactivatedaccount) wrote :

I'm now on Ubuntu 9.04 Beta, this bug wasn't fixed !

The Synaptic release is 0.62.5

Revision history for this message
goto (gotolaunchpad) wrote :

I made the change to /etc/apt/apt.conf. aptitude skips recommended packages now, but synaptic still enables the option every time.

Revision history for this message
John Doe (jodo-deactivatedaccount) wrote :

This Bug is STILL existing in Karmic! Could anyone take a look at this? It's really a bit nasty that this Bug obviousliy exists since Hardy. Is it that hard to fix it?

Revision history for this message
jfcgauss (jfcgauss) wrote :

on ubuntu 9.04 amd64 desktop, i also have it: Option is checked by default, and I can't uncheck it. when i restart syanptic it comes back..

Revision history for this message
luigifab (luigifab-deactivatedaccount) wrote :

I'm now on Ubuntu 9.10 Beta, and this bug wasn't fixed !
The Synaptic release is 0.62.5

Today is the 15 October 2009, and this bug was reported in 2007 !!!
What is the problem ?

Revision history for this message
reza davoudi (rd1381) wrote :

bug still going strong
personally i think synaptic i too stupid for its own good.but its good for new users,and i haven't found a good gui replacement ,I heard about aptitude and tried it but it's still CLI( though in debian it has aptitude-gtk with it (come on ubuntu!) .
i come from opensuse and its yast package manager is superior to synaptic in every way imaginable ,it just didn't have one option i wanted :)

Revision history for this message
Gene Caldwell (gene-caldwell) wrote :

I don't report bugs anymore because they don't get fixed. I reported this bug as well as many others, I got the same result on the other bugs reported as this one, nothing. There are bugs I reported 4 years ago that STILL are not fixed. no excuse.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

My experience is different. I see many competent and friendly discussions on Launchpad, and often they soon came to a nice result - especially in smaller sub-projects.

This bug seems small, but it may spread over multiple core components like synaptics and apt. Perhaps that's why nobody risks to mess with it?

I hope that its age, number of duplicates and upstream report are enough to make it a "One Hundred Paper Cut". So it may be fixed for Lucid (LTS). IMHO it meets the definition on https://wiki.ubuntu.com/PaperCut.

Revision history for this message
Vish (vish) wrote :

Thank you for bringing this bug to our attention. However, a paper cut should be a small usability issue, in the default Ubuntu install, that affects many people and is quick and easy to fix. So this bug can't be addressed as part of this project.

- These option in synaptic are advanced options . And We do not expect an average user to be using these options or even understand their purpose..
For further information about papercuts criteria, please read https://wiki.ubuntu.com/PaperCut.

Don't worry though, this bug has been marked as "Invalid" only in the papercuts project.

Changed in hundredpapercuts:
status: New → Invalid
Revision history for this message
Gene Caldwell (gene-caldwell) wrote :

Weather its a paper cut issue or a functionality failure, why are reported bugs left open and not addressed for years at a time ? Maybe someone should think about an Ubuntu release that focuses on catching up on all the outstanding bugs reported over the last 4 or 5 years ? I know for a fact that some of them I reported are STILL there and leaves the impression that I'm wasting time testing and reporting if only the important bugs have time to get fixed. Ever hear of spit and polish ? tighten up the ship ? crossing the T's and dotting the I's ? Some bugs get fixed only to return in the next release even, thats frustrating to AVERAGE users who don't know advanced CLI work arounds.

Revision history for this message
Gene Caldwell (gene-caldwell) wrote :

oh, and how do I know they don't get fixed ? because I'm receiving emails on launchpad bugs I opened several years ago where people are reporting them still to this day.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

@Vish: Please reconsider it as a papercut - whether for Lucid or later. I agree that a lot of desktop novices can live with it. But think of users with Netbooks, small SSDs or GSM modems. Installing "eclipse" with or without recommended dependencies makes a difference of about 100MB! Further this bug affects one of the big plus of Linux: the package management. And I think apart from calling this feature "advanced" the other criteria of a papercut are full-filled.

Meanwhile I use the workaround of Muhammad (comment #3). Just remember that since Jaunty the default is "1" so you might want to create /etc/apt/apt.conf with the line:

APT::Install-Recommends "0";

Revision history for this message
Vish (vish) wrote :

Bug confirmed with synaptic:
  Installed: 0.63.1ubuntu1
  Candidate: 0.63.1ubuntu1
  Version table:
 *** 0.63.1ubuntu1 0
        600 http://archive.ubuntu.com lucid/main Packages

Changed in synaptic (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Vish (vish) wrote :

@Oliver Joos , Papercuts doesnt have a dedicated team of devs to fix bugs. It identifies simple/easy common usability bugs for the community to work on.

On the other hand , synaptic was supposed to be fully replaced by the software-store with all the synaptic features in Lucid itself. But that has been delayed. And synaptic will be installed in Lucid too.

I'd suggest you file a bug in software-store for this feature to be implemented in S-S for Lucid+1 where hopefully software store will replace synaptic with all these advanced features.

Revision history for this message
Jan Claeys (janc) wrote :

@Vish: I agree with Oliver that this is not a papercut (that project is for fixing bugs that affect almost everybody using a defa)

Revision history for this message
Jan Claeys (janc) wrote :

*grrr* let's try again ;)

@Vish: I agree with Oliver that this is not a papercut (that project is for fixing bugs that affect almost everybody using a default install).

But at the same time, it's an important issue. Did anybody look into the source code why & where this bug happens?

Revision history for this message
Jan Claeys (janc) wrote :

eh, @Joos I agree with Vish I mean... (*sigh*, I need some sleep)

Revision history for this message
Oliver Joos (oliver-joos) wrote :

Ok, I look forward to the software-store and will have a look at its feature list. But until then I need synaptic to roam through the trees of dependencies. So I took the challenge and made a patch for this over-aged bug.

The problem I found: synaptic once changed its config location to /root/.synaptic/synaptic.conf. And because no other tool would ever read this file, synaptic filters out all config tags that do not start with "Synaptic::". That's why "APT::Install-Recommends" does not get stored anymore.

Since about Ubuntu 8.10 it was decided that the built-in default "false" is not optimal. Therefore the file /etc/apt/apt.conf.d/01ubuntu was created, containing one line:

APT::Install-Recommends "true";

With that in mind I tried to make my patch as minimal-invasive and robust as possible: whenever synaptic stores its config, a file /etc/apt/apt.conf.d/03synaptic is also written, containing the above line ending with "true" if the corresponding checkbox is checked or "false" otherwise. This file overrides preceding files like ../01ubuntu. And if writing fails for some reason then the only consequence is a message sent to stderr.

I tested this patch against synaptic-0.62.7ubuntu6 of Ubuntu 9.10 and it works for me. Now comments of testers are welcome and then I hope there'll be someone who does the packaging in time for Lucid.

A note for testers:
You can dare to "./configure ; make ; sudo make install". This will only write to /usr/local/ and a "sudo make uninstall" is also available.

tags: added: patch
Revision history for this message
Oliver Joos (oliver-joos) wrote :

Sorry, I am new to Debian patching and the attachment of the last comment contains the same diffs twice.

Here is the corrected patch including diffs of changelog, this time against the latest bzr update (0.63.1ubuntu2).

Revision history for this message
John Doe (jodo-deactivatedaccount) wrote :

Many, many thanks for taking the time for this!

Revision history for this message
Oliver Joos (oliver-joos) wrote :

Please help committing this fix before Lucid is released.

Changed in synaptic (Ubuntu):
status: Confirmed → In Progress
Changed in synaptic (Ubuntu):
assignee: nobody → Dmitrijs Ledkovs (dmitrij.ledkov)
Changed in synaptic (Ubuntu):
assignee: Dmitrijs Ledkovs (dmitrij.ledkov) → nobody
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I'm part of ~ubuntu-reviewers team helping out to process bugs with patches.

1) Synaptic upstream is managed in $ bzr branch lp:synaptic

I've branched the latest revision, imported your patch and committed it. You can branch lp:~dmitrij.ledkov/synaptic/lp154349 to continue working on your patch.

2) The problem still exists. Confirming.

3) Patch applies (mostly had to fix up changelog cause it has new entries)

4) It builds (both using debuild and plain make) (note some of the debian/patches/*ubuntu*.dpatch need refreshing)

5) The problem still exists.

With and without your patch Synaptic crashes when I try to deselect the option to treat recommends as dependencies. (I'm running Lucid with latest updates). Although at slightly different time intervals without patch it crashes after i deselect the tick box, with patch it crashes when I click apply/ok.

I have subscribed to this bug and I will keep an eye on all future updates.

Thanks for your work. And I hope you will manage to make it work =)

With regards,

Dima.

tags: added: patch-needswork
removed: patch
Revision history for this message
Oliver Joos (oliver-joos) wrote :

Thanks for your time to help fixing this!

You wrote: "With and without your patch Synaptic crashes". In all comments to this bug since 2 years nobody ever wrote about crashes. So I guess you found a new bug. Please open a new bug report to enter your findings about the crashes. (Some suspects for crashes like this: compiz, kernel mode setting or new desktop themes. Although on my ATI-based HP laptop this all works stable in Lucid beta 1 :-)

I checked out you bzr branch, built and tested it and it works as expected. I used a Live-CD of Lucid beta 1, installed all build-deps and gnome-common.

Please test my patch again when your Synaptic does not crash anymore without it.

tags: added: patch
removed: patch-needswork
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

@Dmitrijs: did you test it as root or a normal user ?
A normal user won't be allowed to write to /etc/apt/apt.conf.d and a message is printed to stderr. However it's working correctly as root but still disappointing for a normal user since the setting is lost upon restart.

An improved version would be to load/save from the system's setting if run as superuser and from user's preferences if run as a normal user.

As a side note, Dmitrijs, could you please file a new report for the crash with a backtrace if apport doesn't trigger please. Thanks in advance.

Revision history for this message
Simon Ruggier (simon80) wrote : Re: [Bug 154349] Re: synaptic won't remember certain preferences

On Tue, Mar 23, 2010 at 1:45 PM, Jean-Baptiste Lallement
<email address hidden> wrote:
> @Dmitrijs: did you test it as root or a normal user ?
> A normal user won't be allowed to write to /etc/apt/apt.conf.d and a message is printed to stderr. However it's working correctly as root but still disappointing for a normal user since the setting is lost upon restart.
>
> An improved version would be to load/save from the system's setting if
> run as superuser and from user's preferences if run as a normal user.

Is it still worth it to implement this, given that unprivileged users
cannot install packages?

Revision history for this message
Oliver Joos (oliver-joos) wrote :

I always run synaptic as root. But if run as normal user there is a difference if Install-Recommends is true or false. So I agree with Jean-Baptiste and enhanced my patch the way he proposed. I carefully tested every situation that came into my mind (3 files involved, each can be true, false or non existent). Please test the patch with your common use-cases and comment here if you get surprised.

@reviewers/releasers: don't forget to update version info in ./configure.in - it's still 0.62.5! And please help to include this patch into Lucid LTS. It is quite low-risk and has no consequences on translations or gui.

Revision history for this message
John Doe (jodo-deactivatedaccount) wrote :

Oliver, I've tested your patch. What should I say? Works fine. Only the Menu-entry doesn't works because of :

Childprocess »su-to-root« couldn't been started (No such file or directory)

Running "sudo synaptic" from a Terminal works fine. But maybe I've made something wrong when compiling.

I did:

bzr branch lp:ubuntu/synaptic
cd synaptic/
patch -p0 < synaptic-0.63.2-store_install_recommends.patch
./configure --prefix=/usr
make
sudo make install

Revision history for this message
John Doe (jodo-deactivatedaccount) wrote :

Ok, found something thats not right: the compiled Version don't has an Option for pinning packages. Has this something to do with the patch? Maybe someone could compile and test this too. One Person for testing may be not that helpful...

Revision history for this message
Oliver Joos (oliver-joos) wrote :

Thank you for helping to fix this bug! Your procedure to compile is 100% correct.

The missing option is simply disabled in the latest bzr version - see debian/changelog:
  * disable 'Lock Version' and 'Automatically installed' menu entries for a
    normal user (LP: #309906)

I could reproduce the issue with the menu-entry and su-to-root. The Ubuntu package seems to patch these menu entries to change "su-to-root " to "gksu" (see debian/patches/06_ubuntu_su_to_root.dpatch). The "sudo make install" seems to replace but not patch an existing menu entry in your user profile. Right-clicking the menu I found "su-to-root", which is wrong! The problem might be related to Bug #512577.

In short: missing option and failing menu entry is not caused by my patch.

Could you test my patch again in a terminal with "gksudo synaptic" (for root) and with "synaptic" (for users)?

Revision history for this message
John Doe (jodo-deactivatedaccount) wrote :

Works as it should. No Problems here.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package synaptic - 0.63.1ubuntu4

---------------
synaptic (0.63.1ubuntu4) lucid; urgency=low

  [ Michael Vogt ]
  * po/it.po:
    - updated, thanks to Milo Casagrande (closes: #575685)

  [ Jean-Baptiste Lallement ]
  * common/rpackage.{cc,h}:
    - Use simplified URI for third party changelogs (LP: #45129)
  * debian/patches/01_ubuntu_changelog.dpatch:
    - update patch to support third party changelogs
  * common/rpackage.{cc,h}:
    - Support third party changelogs by using ArchiveURI() (LP: #153966)
    - Display LP links when changelog is not available for download
      (LP: #452564)
  * gtk/rgmainwindow.cc:
    - check package flags when applying an action to a package list
      (LP: #513460)
  * common/rpackagelister.cc
    - workaround to allow searching for terms with an hyphen (LP: #282995)
  * common/rpackagelister.cc:
    - xapianSearch: do not expand the first term when replacing the hyphen
    to reduce size of the resultse

  [ Oliver Joos ]
  * common/rconfiguration.cc:
    - Fix to store setting "Consider recommended packages as dependencies"
      (closes debian #440027 and LP: #154349)
 -- Michael Vogt <email address hidden> Thu, 15 Apr 2010 01:59:51 +0200

Changed in synaptic (Ubuntu):
status: In Progress → Fix Released
Philip Muškovac (yofel)
tags: added: patch-forwarded-upstream
Changed in synaptic (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.