[Bug 1077113] Re: do-release-upgrade crashes if any directories exist in /etc/apt/sources.list.d

Brian Murray brian at ubuntu.com
Fri Mar 22 19:22:48 UTC 2013


The release upgrader includes its own version of apt_clone.py and so the
raring upgrader, used to upgrade from quantal to raring includes this
fix.

If you download the release upgrader from here:
http://archive.ubuntu.com/ubuntu/dists/raring/main/dist-upgrader-
all/current/raring.tar.gz you can examine the tarball and the source for
apt_clone.py to confirm this.

Having said that when you ran the release upgrade and updater version of
apt_clone.py was not included in the upgrader, but it is now so I am
setting this to Fix Released.

** Changed in: ubuntu-release-upgrader (Ubuntu)
       Status: New => Fix Released

-- 
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:
  Fix Released
Status in “ubuntu-release-upgrader” package in Ubuntu:
  Fix Released

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