diff -Nru software-properties-0.96.20.12/.bzr-builddeb/default.conf software-properties-0.96.20.13/.bzr-builddeb/default.conf --- software-properties-0.96.20.12/.bzr-builddeb/default.conf 1970-01-01 00:00:00.000000000 +0000 +++ software-properties-0.96.20.13/.bzr-builddeb/default.conf 2024-03-12 09:06:55.000000000 +0000 @@ -0,0 +1,3 @@ +[BUILDDEB] +native = True + diff -Nru software-properties-0.96.20.12/debian/changelog software-properties-0.96.20.13/debian/changelog --- software-properties-0.96.20.12/debian/changelog 2023-11-17 11:16:01.000000000 +0000 +++ software-properties-0.96.20.13/debian/changelog 2024-03-12 09:06:55.000000000 +0000 @@ -1,3 +1,11 @@ +software-properties (0.96.20.13) xenial; urgency=medium + + * Fix autopkgtest: Make sure directory exists before trying to create file + in it. (lp: #2058035) + * d/control: Add python-pathlib. + + -- Nathan Pratta Teodosio Tue, 12 Mar 2024 10:06:55 +0100 + software-properties (0.96.20.12) xenial; urgency=medium * Fix invalid syntax for old Python and unused import (lp: #2029473). diff -Nru software-properties-0.96.20.12/debian/control software-properties-0.96.20.13/debian/control --- software-properties-0.96.20.12/debian/control 2023-11-17 11:16:01.000000000 +0000 +++ software-properties-0.96.20.13/debian/control 2024-03-12 09:06:55.000000000 +0000 @@ -20,7 +20,7 @@ Section: python Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python, python-apt (>= - 0.6.20ubuntu16), python-pycurl, lsb-release, iso-codes + 0.6.20ubuntu16), python-pathlib, python-pycurl, lsb-release, iso-codes Recommends: unattended-upgrades Description: manage the repositories that you install software from This software provides an abstraction of the used apt repositories. diff -Nru software-properties-0.96.20.12/softwareproperties/SoftwareProperties.py software-properties-0.96.20.13/softwareproperties/SoftwareProperties.py --- software-properties-0.96.20.12/softwareproperties/SoftwareProperties.py 2023-11-17 11:16:01.000000000 +0000 +++ software-properties-0.96.20.13/softwareproperties/SoftwareProperties.py 2024-03-12 09:06:55.000000000 +0000 @@ -34,6 +34,7 @@ import threading import atexit import tempfile +import pathlib try: from string import maketrans except ImportError: @@ -620,6 +621,9 @@ break else: print("No config found, creating one") + dirname = os.path.dirname(f) + if not os.path.exists(dirname): + pathlib.Path(dirname).mkdir(parents=True) open(conffiles[0], "w") # ensure /etc/cron.daily/apt is executable diff -Nru software-properties-0.96.20.12/tests/test_dbus.py software-properties-0.96.20.13/tests/test_dbus.py --- software-properties-0.96.20.12/tests/test_dbus.py 2023-11-17 11:16:01.000000000 +0000 +++ software-properties-0.96.20.13/tests/test_dbus.py 2024-03-12 09:06:55.000000000 +0000 @@ -14,6 +14,7 @@ import sys import time import unittest +import pathlib sys.path.insert(0, "../") from softwareproperties.dbus.SoftwarePropertiesDBus import ( @@ -45,6 +46,9 @@ s = get_test_source_line() + "\n" name = os.path.join(os.path.dirname(__file__), "aptroot", "etc", "apt", "sources.list") + dirname = os.path.dirname(name) + if not os.path.exists(dirname): + pathlib.Path(dirname).mkdir(parents=True) with open(name, "w") as f: f.write(s) return name