[Bug 1817559] Re: update-notifier ignores update-manager's settings

Ivan Zorin 1817559 at bugs.launchpad.net
Thu Feb 28 21:41:13 UTC 2019


The trick with setting zero or negative number for interval_days won't
be working since it will be meaning to trigger updater right away (see
the attached screenshot with the related setting) - here is the related
code (it's still the same in 18.10/Cosmic):

https://git.launchpad.net/ubuntu/+source/update-
notifier/tree/src/update.c?h=ubuntu/cosmic#n510

// check if the auto launch interval is over and its 
// time to launch again and if the dpkg lock is currently 
// not taken
static gboolean 
auto_launch_now (TrayApplet *ta)
{
...
   if (interval_days <= 0) 
      return TRUE;
...
}


Setting the large number for interval_days won't be working all the time either because there is "bypass" for security updates:

   if (auto_launch_security_now(priv, now, last_launch))
      return TRUE;


There is another one setting for update-notifier through gsettings/dconf ( see the previous screenshot here - https://launchpadlibrarian.net/413216259/software_updater_notifier_notifications.png ): no-show-notifications/SETTINGS_KEY_NO_UPDATE_NOTIFICATIONS (which has nothing to do with notifications about updates, I got it). But, as far as I understand, according even to current source code, it doesn't do much since:
- it is checked in the last turn when main routine (related to check/show info about updates) will be completed already
- even if it will be set as true, the related function will return TRUE (not FALSE) anyway via pass-thru further execution

https://git.launchpad.net/ubuntu/+source/update-
notifier/tree/src/update.c?h=ubuntu/cosmic#n654

gboolean
update_check (TrayApplet *ta)
{
...
   // the user does not no notification messages
   if(g_settings_get_boolean(ta->un->settings,
                             SETTINGS_KEY_NO_UPDATE_NOTIFICATIONS))
      return TRUE;
...
   ...
   return TRUE;
}

// yes, the user does not no notification messages, exactly, but seems
that the code doesn't care about it too much :)

Once again, I may be wrong (should double check the routines behind
g_settings_*), but if it's the reason for calling `update-manager' and
if
g_settings_get_boolean(ta->un->settings,SETTINGS_KEY_NO_UPDATE_NOTIFICATIONS)
returns TRUE when SETTINGS_KEY_NO_UPDATE_NOTIFICATIONS is set then there
should be FALSE on return. Something like that:

   if(g_settings_get_boolean(ta->un->settings,
                             SETTINGS_KEY_NO_UPDATE_NOTIFICATIONS))
      return FALSE;

And the check itself should be much early inside of `gboolean
update_check (TrayApplet *ta)', before any other checks. In case if it's
really the right direction for the issue.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1817559

Title:
  update-notifier ignores update-manager's settings

Status in update-notifier package in Ubuntu:
  New

Bug description:
  
  > 1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu

  $ lsb_release -rd
  Description:	Ubuntu 16.04.6 LTS
  Release:	16.04

  
  > 2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center

  $ apt-cache policy update-manager
  update-manager:
    Installed: 1:16.04.15
    Candidate: 1:16.04.15
    Version table:
   *** 1:16.04.15 500
          500 https://mirror.one.com/ubuntu xenial-updates/main amd64 Packages
          500 https://mirror.one.com/ubuntu xenial-updates/main i386 Packages
          100 /var/lib/dpkg/status
       1:16.04.12 500
          500 https://mirror.one.com/ubuntu xenial-security/main amd64 Packages
          500 https://mirror.one.com/ubuntu xenial-security/main i386 Packages
       1:16.04.3 500
          500 https://mirror.one.com/ubuntu xenial/main amd64 Packages
          500 https://mirror.one.com/ubuntu xenial/main i386 Packages

  ----

  Steps to reproduce:

  - Run `update-manager' manually, via `update-manager' from a terminal for example
  - Press "Settings..." button
  - Configure the following settings to hide all update-manager's pop-ups respectively:

  Automatically check for updates: Never
  When there are security updates: <blank>
  When there are other updates: Display every two weeks
  Notify me of a new Ubuntu version: Never

  - Close settings
  - Exit `update-manager'

  ----
  Expected behaviour:

  - update-manager won't be checking any updates at all
  - but even if there are some "other updates" then it must be displayed not more often than "every two weeks"

  ----
  Actual behaviour:

  - update-manager checks for updates from time to time by itself
  - update-manager shows notifications *all* *the* *time*: every single day and much more times per day than even twice
  - update-manager keeps to show notifications even if it has been seen & closed manually (just because there wasn't time for maintenance window currently, for example)

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: update-manager 1:16.04.15
  ProcVersionSignature: Ubuntu 4.4.0-143.169-generic 4.4.170
  Uname: Linux 4.4.0-143-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.20.1-0ubuntu2.18
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Mon Feb 25 16:32:29 2019
  GsettingsChanges:
   b'com.ubuntu.update-manager' b'show-details' b'true'
   b'com.ubuntu.update-manager' b'window-height' b'365'
   b'com.ubuntu.update-manager' b'first-run' b'false'
   b'com.ubuntu.update-manager' b'window-width' b'303'
   b'com.ubuntu.update-manager' b'launch-time' b'int64 1551101458'
  InstallationDate: Installed on 2016-07-19 (951 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
  PackageArchitecture: all
  SourcePackage: update-manager
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1817559/+subscriptions



More information about the foundations-bugs mailing list