[Bug 1077113] [NEW] do-release-upgrade crashes if any directories exist in /etc/apt/sources.list.d
hackel
1077113 at bugs.launchpad.net
Fri Nov 9 18:27:36 UTC 2012
Public bug reported:
This has happened to me on two different machines now when attempting to
upgrade from 12.04 to 12.10. I usually make a backup of my
sources.list.d/*.list files in a subdirectory e.g.
/etc/apt/sources.list.d/old. Every time I tried to do the release
upgrade (from Software Updater) I got the message that "do-release-
upgrade has closed unexpectedly" without any further information. I
finally discovered the cause in /var/log/dist-
upgrade/20121028-2325/main.log:
File "/tmp/update-manager-qYs_K9/quantal", line 10, in <module> sys.exit(main())
File "/tmp/update-manager-qYs_K9/DistUpgrade/DistUpgradeMain.py", line 237, in main save_system_state(logdir)
File "/tmp/update-manager-qYs_K9/DistUpgrade/DistUpgradeMain.py", line 130, in save_system_state scrub_sources=True)
File "/tmp/update-manager-qYs_K9/DistUpgrade/apt_clone.py", line 148, in save_state self._write_state_sources_list(tar, scrub_sources)
File "/tmp/update-manager-qYs_K9/DistUpgrade/apt_clone.py", line 235, in _write_state_sources_list "./etc/apt/sources.list.d/"+source)
File "/tmp/update-manager-qYs_K9/DistUpgrade/apt_clone.py", line 239, in _add_file_to_tar_with_password_check with tempfile.NamedTemporaryFile(mode='w') as source_copy, open(sources, 'r') as f:
IOError: [Errno 21] Is a directory: '/etc/apt/sources.list.d//old'
Moving /etc/apt/sources.list.d/old out of the way allowed the upgrade to
proceed successfully. Like I said, I observed this same behaviour (and
the solution) on two different machines. Should be an easy fix to check
if those files are directories or not before trying to add them to the
tar file.
** Affects: ubuntu-release-upgrader (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1077113
Title:
do-release-upgrade crashes if any directories exist in
/etc/apt/sources.list.d
Status in “ubuntu-release-upgrader” package in Ubuntu:
New
Bug description:
This has happened to me on two different machines now when attempting
to upgrade from 12.04 to 12.10. I usually make a backup of my
sources.list.d/*.list files in a subdirectory e.g.
/etc/apt/sources.list.d/old. Every time I tried to do the release
upgrade (from Software Updater) I got the message that "do-release-
upgrade has closed unexpectedly" without any further information. I
finally discovered the cause in /var/log/dist-
upgrade/20121028-2325/main.log:
File "/tmp/update-manager-qYs_K9/quantal", line 10, in <module> sys.exit(main())
File "/tmp/update-manager-qYs_K9/DistUpgrade/DistUpgradeMain.py", line 237, in main save_system_state(logdir)
File "/tmp/update-manager-qYs_K9/DistUpgrade/DistUpgradeMain.py", line 130, in save_system_state scrub_sources=True)
File "/tmp/update-manager-qYs_K9/DistUpgrade/apt_clone.py", line 148, in save_state self._write_state_sources_list(tar, scrub_sources)
File "/tmp/update-manager-qYs_K9/DistUpgrade/apt_clone.py", line 235, in _write_state_sources_list "./etc/apt/sources.list.d/"+source)
File "/tmp/update-manager-qYs_K9/DistUpgrade/apt_clone.py", line 239, in _add_file_to_tar_with_password_check with tempfile.NamedTemporaryFile(mode='w') as source_copy, open(sources, 'r') as f:
IOError: [Errno 21] Is a directory: '/etc/apt/sources.list.d//old'
Moving /etc/apt/sources.list.d/old out of the way allowed the upgrade
to proceed successfully. Like I said, I observed this same behaviour
(and the solution) on two different machines. Should be an easy fix
to check if those files are directories or not before trying to add
them to the tar file.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1077113/+subscriptions
More information about the foundations-bugs
mailing list