/usr/bin/add-apt-repository:OSError:/usr/bin/add-apt-repository@163:add_source_from_shortcut:set_modified_sourceslist:save_sourceslist:backup:copy:copyfile

Bug #1365759 reported by errors.ubuntu.com bug bridge
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding software-properties. This problem was most recently seen with version 0.92.37.1, the problem page at https://errors.ubuntu.com/problem/2b8bba9b95a33d09f53d20dbb0664e85d407d788 contains more details.

Tags: trusty utopic
Revision history for this message
Brian Murray (brian-murray) wrote :

Traceback:

Traceback (most recent call last):
  File "/usr/bin/apt-add-repository", line 163, in <module>
    if not sp.add_source_from_shortcut(shortcut, options.enable_source):
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 750, in add_source_from_shortcut
    self.set_modified_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 484, in set_modified_sourceslist
    self.save_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 649, in save_sourceslist
    self.sourceslist.backup(".save")
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 383, in backup
    shutil.copy(source.file, "%s%s" % (source.file, backup_ext))
  File "/usr/lib/python3.4/shutil.py", line 228, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.4/shutil.py", line 108, in copyfile
    with open(dst, 'wb') as fdst:
OSError: [Errno 30] Read-only file system: '/etc/apt/sources.list.save'

Revision history for this message
Brian Murray (brian-murray) wrote :

This is because it is being run on a device where the partition containing /etc/apt is read-only.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
Changed in software-properties (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

@ Brian Murray

If you think this bug is caused by an user misconfiguration, please set its status to "invalid".

Changed in software-properties (Ubuntu):
status: In Progress → Confirmed
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu devices are setup with a read-only root file system so this is a supported use case and software-properties should not crash in this situation. I seem to recall it being fixed but couldn't find anything in the software-properties changelog supporting that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.