Running ./test_remove_unused.py with python3
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=lucid-security
APT::VersionedKernelPackages is not set
Checking: test-package ([<Origin component:'main' archive:'lucid-security' origin:'Ubuntu' label:'Ubuntu' site:'archive.ubuntu.com' isTrusted:True>])
pkgs that look like they should be upgraded: test-package
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
<apt_pkg.AcquireItem object:Status: 2 Complete: 1 Local: 1 IsTrusted: 1 FileSize: 624 DestFile:'/tmp/autopkgtest.SPDe54/build.D9P/src/test/root.unused-deps/var/cache/apt/archives/test-package_2.0_all.deb' DescURI: 'http://archive.ubuntu.com/ubuntu/test-package_2.0_all.deb' ID:0 ErrorText: ''>
check_conffile_prompt(/tmp/autopkgtest.SPDe54/build.D9P/src/test/root.unused-deps/var/cache/apt/archives/test-package_2.0_all.deb)
found pkg: test-package
blacklist: []
whitelist: []
Packages that will be upgraded: test-package
Writing dpkg log to ./root.unused-deps/var/log/unattended-upgrades/unattended-upgrades-dpkg.log
applying set ['test-package']
left to upgrade set()
All upgrades installed
marking old-unused-dependency for removal
marking test-package-dependency for removal
marking linux-image-4.05.0-1021-kvm for removal
marking any-old-unused-modules for removal
Packages that were successfully auto-removed: any-old-unused-modules linux-image-4.05.0-1021-kvm old-unused-dependency test-package-dependency
Packages that are kept back:
InstCount=0 DelCount=0 BrokenCount=0
Extracting content from ./root.unused-deps/var/log/unattended-upgrades/unattended-upgrades-dpkg.log since 2019-02-21 18:01:34
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=13 mode='w' encoding='UTF-8'>
options.verbose or options.debug)
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=12 mode='r' encoding='UTF-8'>
options.verbose or options.debug)
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=10 mode='w' encoding='UTF-8'>
res, error = cache_commit(cache, logfile_dpkg, verbose)
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=9 mode='r' encoding='UTF-8'>
res, error = cache_commit(cache, logfile_dpkg, verbose)
.Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=lucid-security
Using (^linux-image-[0-9]+\.[0-9\.]+-.*|^.*-modules-[0-9]+\.[0-9\.]+-.*|^linux-headers-[0-9]+\.[0-9\.]+-.*) regexp to find kernel packages
Using (^linux-image-4\.15\.0\-45\-generic$|^.*-modules-4\.15\.0\-45\-generic$|^linux-headers-4\.15\.0\-45\-generic$) regexp to find running kernel packages
Checking: test-package ([<Origin component:'main' archive:'lucid-security' origin:'Ubuntu' label:'Ubuntu' site:'archive.ubuntu.com' isTrusted:True>])
pkgs that look like they should be upgraded: test-package
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
<apt_pkg.AcquireItem object:Status: 2 Complete: 1 Local: 1 IsTrusted: 1 FileSize: 624 DestFile:'/tmp/autopkgtest.SPDe54/build.D9P/src/test/root.unused-deps/var/cache/apt/archives/test-package_2.0_all.deb' DescURI: 'http://archive.ubuntu.com/ubuntu/test-package_2.0_all.deb' ID:0 ErrorText: ''>
check_conffile_prompt(/tmp/autopkgtest.SPDe54/build.D9P/src/test/root.unused-deps/var/cache/apt/archives/test-package_2.0_all.deb)
found pkg: test-package
blacklist: []
whitelist: []
Removing unused kernel packages: linux-image-4.05.0-1021-kvm
marking linux-image-4.05.0-1021-kvm for removal
Keeping auto-removable linux-image-4.05.0-1021-kvm package(s) because it would also remove the following packages which should be kept in this step: test-package
Packages that were successfully auto-removed:
Packages that are kept back: linux-image-4.05.0-1021-kvm
Packages that will be upgraded: test-package
Writing dpkg log to ./root.unused-deps/var/log/unattended-upgrades/unattended-upgrades-dpkg.log
applying set ['test-package']
left to upgrade set()
All upgrades installed
marking test-package-dependency for removal
Packages that were successfully auto-removed: test-package-dependency
Packages that are kept back:
InstCount=0 DelCount=0 BrokenCount=0
Extracting content from ./root.unused-deps/var/log/unattended-upgrades/unattended-upgrades-dpkg.log since 2019-02-21 18:01:35
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=16 mode='w' encoding='UTF-8'>
options.verbose or options.debug)
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=15 mode='r' encoding='UTF-8'>
options.verbose or options.debug)
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=16 mode='w' encoding='UTF-8'>
res, error = cache_commit(cache, logfile_dpkg, verbose)
/tmp/autopkgtest.SPDe54/build.D9P/src/test/unattended_upgrade.py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=15 mode='r' encoding='UTF-8'>
res, error = cache_commit(cache, logfile_dpkg, verbose)
.
----------------------------------------------------------------------
Ran 2 tests in 1.320s
...
Verified with unattended- upgrades/ 1.1ubuntu1. 18.04.9 on Bionic:
https:/ /objectstorage. prodstack4- 5.canonical. com/v1/ AUTH_77e2ada1e7 a84929a74ba3b87 153c0ac/ autopkgtest- bionic/ bionic/ amd64/u/ unattended- upgrades/ 20190221_ 190835_ 4cafb@/ log.gz :
...
Running ./test_ remove_ unused. py with python3 a=lucid- security ernelPackages is not set 'lucid- security' origin:'Ubuntu' label:'Ubuntu' site:'archive. ubuntu. com' isTrusted:True>])
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,
APT::VersionedK
Checking: test-package ([<Origin component:'main' archive:
pkgs that look like they should be upgraded: test-package
Fetched 0 B in 0s (0 B/s) AcquireItem object:Status: 2 Complete: 1 Local: 1 IsTrusted: 1 FileSize: 624 DestFile: '/tmp/autopkgte st.SPDe54/ build.D9P/ src/test/ root.unused- deps/var/ cache/apt/ archives/ test-package_ 2.0_all. deb' DescURI: 'http:// archive. ubuntu. com/ubuntu/ test-package_ 2.0_all. deb' ID:0 ErrorText: ''> prompt( /tmp/autopkgtes t.SPDe54/ build.D9P/ src/test/ root.unused- deps/var/ cache/apt/ archives/ test-package_ 2.0_all. deb) unused- deps/var/ log/unattended- upgrades/ unattended- upgrades- dpkg.log dependency for removal dependency for removal 4.05.0- 1021-kvm for removal unused- modules for removal unused- modules linux-image- 4.05.0- 1021-kvm old-unused- dependency test-package- dependency unused- deps/var/ log/unattended- upgrades/ unattended- upgrades- dpkg.log since 2019-02-21 18:01:34 t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=13 mode='w' encoding='UTF-8'> t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=12 mode='r' encoding='UTF-8'> t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=10 mode='w' encoding='UTF-8'> t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=9 mode='r' encoding='UTF-8'> a=lucid- security image-[ 0-9]+\. [0-9\.] +-.*|^. *-modules- [0-9]+\ .[0-9\. ]+-.*|^ linux-headers- [0-9]+\ .[0-9\. ]+-.*) regexp to find kernel packages image-4\ .15\.0\ -45\-generic$ |^.*-modules- 4\.15\. 0\-45\- generic$ |^linux- headers- 4\.15\. 0\-45\- generic$ ) regexp to find running kernel packages 'lucid- security' origin:'Ubuntu' label:'Ubuntu' site:'archive. ubuntu. com' isTrusted:True>])
fetch.run() result: 0
<apt_pkg.
check_conffile_
found pkg: test-package
blacklist: []
whitelist: []
Packages that will be upgraded: test-package
Writing dpkg log to ./root.
applying set ['test-package']
left to upgrade set()
All upgrades installed
marking old-unused-
marking test-package-
marking linux-image-
marking any-old-
Packages that were successfully auto-removed: any-old-
Packages that are kept back:
InstCount=0 DelCount=0 BrokenCount=0
Extracting content from ./root.
/tmp/autopkgtes
options.verbose or options.debug)
/tmp/autopkgtes
options.verbose or options.debug)
/tmp/autopkgtes
res, error = cache_commit(cache, logfile_dpkg, verbose)
/tmp/autopkgtes
res, error = cache_commit(cache, logfile_dpkg, verbose)
.Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,
Using (^linux-
Using (^linux-
Checking: test-package ([<Origin component:'main' archive:
pkgs that look like they should be upgraded: test-package
Fetched 0 B in 0s (0 B/s) AcquireItem object:Status: 2 Complete: 1 Local: 1 IsTrusted: 1 FileSize: 624 DestFile: '/tmp/autopkgte st.SPDe54/ build.D9P/ src/test/ root.unused- deps/var/ cache/apt/ archives/ test-package_ 2.0_all. deb' DescURI: 'http:// archive. ubuntu. com/ubuntu/ test-package_ 2.0_all. deb' ID:0 ErrorText: ''> prompt( /tmp/autopkgtes t.SPDe54/ build.D9P/ src/test/ root.unused- deps/var/ cache/apt/ archives/ test-package_ 2.0_all. deb) 4.05.0- 1021-kvm 4.05.0- 1021-kvm for removal 4.05.0- 1021-kvm package(s) because it would also remove the following packages which should be kept in this step: test-package 4.05.0- 1021-kvm unused- deps/var/ log/unattended- upgrades/ unattended- upgrades- dpkg.log dependency for removal dependency unused- deps/var/ log/unattended- upgrades/ unattended- upgrades- dpkg.log since 2019-02-21 18:01:35 t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=16 mode='w' encoding='UTF-8'> t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1129: ResourceWarning: unclosed file <_io.TextIOWrapper name=15 mode='r' encoding='UTF-8'> t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=16 mode='w' encoding='UTF-8'> t.SPDe54/ build.D9P/ src/test/ unattended_ upgrade. py:1474: ResourceWarning: unclosed file <_io.TextIOWrapper name=15 mode='r' encoding='UTF-8'> ------- ------- ------- ------- ------- ------- ------- ------- -------
fetch.run() result: 0
<apt_pkg.
check_conffile_
found pkg: test-package
blacklist: []
whitelist: []
Removing unused kernel packages: linux-image-
marking linux-image-
Keeping auto-removable linux-image-
Packages that were successfully auto-removed:
Packages that are kept back: linux-image-
Packages that will be upgraded: test-package
Writing dpkg log to ./root.
applying set ['test-package']
left to upgrade set()
All upgrades installed
marking test-package-
Packages that were successfully auto-removed: test-package-
Packages that are kept back:
InstCount=0 DelCount=0 BrokenCount=0
Extracting content from ./root.
/tmp/autopkgtes
options.verbose or options.debug)
/tmp/autopkgtes
options.verbose or options.debug)
/tmp/autopkgtes
res, error = cache_commit(cache, logfile_dpkg, verbose)
/tmp/autopkgtes
res, error = cache_commit(cache, logfile_dpkg, verbose)
.
-------
Ran 2 tests in 1.320s
...