/usr/share/rustc change from directory to symlink
Bug #2130706 reported by
Skia
This bug affects 1 person
| Affects | Status | Importance | Assigned to | Milestone | ||
|---|---|---|---|---|---|---|
| rustc (Ubuntu) | Status tracked in Resolute | |||||
| Plucky |
In Progress
|
Medium
|
Max Gilmour | |||
| Resolute |
Fix Released
|
Medium
|
Max Gilmour | |||
Bug Description
Hello Max!
Here is your bug about the upgrade path for /usr/share/rustc change from being a directory in whatever older rust-default version to being a symlink in the newest ones.
Basically we'll need to make sure that the newest packages will remove any existing directory to be able to replace it with a symlink.
For the context, I faced that situation on my Ubuntu devel (right now resolute) laptop, that is basically rolling release, so I'm not sure how normal users are affected right now.
Happy bug fixing :-)
Related branches
~maxgmr/ubuntu/+source/rust-defaults:lp2130706-devel
Merged
into
ubuntu/+source/rust-defaults:ubuntu/devel
at
revision 7646e3aebee19f4c8b00630099eb7c927e9a6a0c
- Skia (community): Approve
- Ubuntu Sponsors: Pending requested
-
Diff: 58 lines (+30/-0) (has conflicts)4 files modifieddebian/changelog (+10/-0)
debian/rustc.maintscript (+2/-0)
debian/tests/architecture-mk-works (+13/-0)
debian/tests/control (+5/-0)
| Changed in rustc (Ubuntu Plucky): | |
| status: | New → In Progress |
| importance: | Undecided → Medium |
| assignee: | nobody → Max Gilmour (maxgmr) |
| Changed in rustc (Ubuntu Resolute): | |
| status: | In Progress → Fix Released |
To post a comment you must log in.

Hi Skia, thanks for the report!
Confirmed — the upgrade story is broken when transitioning from pre-versioned rustc (provided by the rustc source package) to versioned rustc (provided by rust-defaults).
Currently, this is only possible when upgrading from Noble to Plucky or Noble to Resolute.
============== upgrade: ~# lsb_release -d upgrade: ~# apt update && apt upgrade -y upgrade: ~# apt install -y rustc upgrade: ~# ls -l /usr/share | grep rustc
24.04 to 25.04
==============
root@rust-
No LSB modules are available.
Description: Ubuntu 24.04.3 LTS
root@rust-
[...]
root@rust-
[...]
root@rust-
drwxr-xr-x 3 root root 4096 Nov 14 16:54 rustc
root@rust- upgrade: ~# sed -i 's/Prompt= lts/Prompt= normal/ g' /etc/update- manager/ release- upgrades upgrade: ~# do-release-upgrade
root@rust-
[...]
root@rust- upgrade: ~# lsb_release -d upgrade: ~# ls -l /usr/share | grep rustc upgrade: ~# ls -Ll /usr/share/rustc
Description: Ubuntu 25.04
root@rust-
drwxr-xr-x 2 root root 4096 Nov 14 16:59 rustc
drwxr-xr-x 3 root root 4096 Nov 14 16:59 rustc-1.84
root@rust-
total 0
============== upgrade- lts:~# lsb_release -d upgrade- lts:~# apt update && apt upgrade -y upgrade- lts:~# apt install -y rustc upgrade- lts:~# ls -l /usr/share | grep rustc
24.04 to devel
==============
root@rust-
No LSB modules are available.
Description: Ubuntu 24.04.3 LTS
root@rust-
[...]
root@rust-
[...]
root@rust-
drwxr-xr-x 3 root root 4096 Nov 14 17:07 rustc
root@rust- upgrade- lts:~# do-release-upgrade -d
[...]
root@rust- upgrade- lts:~# lsb_release -d upgrade- lts:~# ls -l /usr/share | grep rustc upgrade- lts:~# ls -Ll /usr/share/rustc
Description: Ubuntu Resolute Raccoon (development branch)
root@rust-
drwxr-xr-x 2 root root 4096 Nov 14 17:14 rustc
drwxr-xr-x 3 root root 4096 Nov 14 17:14 rustc-1.88
root@rust-
total 0
======= ======= ======= ======= ======= ======= ======= == ======= ======= ======= ======= ======= ======= ==
Expected contents of /usr/share/rustc after upgrade
=======
root@expected:~# lsb_release -d
Description: Ubuntu Resolute Raccoon (development branch)
root@expected:~# apt update && apt upgrade -y
[...]
root@expected:~# apt install rustc -y
[...]
root@expected:~# ls -Ll /usr/share/rustc
total 8
-rw-r--r-- 1 root root 684 Aug 22 22:42 architecture.mk
drwxr-xr-x 2 root root 4096 Nov 14 17:09 bin