[Bug 1077113] Re: do-release-upgrade crashes if any directories exist in /etc/apt/sources.list.d
Brian Murray
brian at ubuntu.com
Thu Jan 10 00:37:28 UTC 2013
This is actually a bug in apt-clone, which the release upgrader uses.
** Package changed: ubuntu-release-upgrader (Ubuntu) => apt-clone
(Ubuntu)
** Changed in: apt-clone (Ubuntu)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt-clone 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 “apt-clone” 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/apt-clone/+bug/1077113/+subscriptions
More information about the foundations-bugs
mailing list