software-properties-gtk crashes if APT::Periodic::Upgrade-Package-Lists="3"

Bug #1964839 reported by Wes Waugh
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Changing `APT::Periodic::Update-Package-Lists` to a value not in the data model `model_updates_interval` in `/usr/share/software-properties/gtkbuilder/main.ui` calls an invalid method, crashing the program.

```
$ cat /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "3";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
$ software-properties-gtk
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 100, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 231, in __init__
    self.init_auto_update()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 310, in init_auto_update
    self.combobox_update_interval.append_text(_("Every %s days")
AttributeError: 'ComboBox' object has no attribute 'append_text'
```

Occurs in:
```
$ lsb_release -rd
Description: Ubuntu 21.04
Release: 21.04
$ apt-cache policy software-properties-gtk
software-properties-gtk:
  Installed: 0.99.10.2
  Candidate: 0.99.10.2
  Version table:
 *** 0.99.10.2 500
        500 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu hirsute-updates/main i386 Packages
        100 /var/lib/dpkg/status
     0.99.10 500
        500 http://us.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu hirsute/main i386 Packages

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
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.