inconsistent file list / missing libcore

Bug #1920018 reported by Giulio
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
rustc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In packages.ubuntu.com, for focal 20.04 release.
https://packages.ubuntu.com/focal/all/rust-src/filelist

reading through the list of installed files, it looks the package
``1.47.0+dfsg1+llvm-1ubuntu1~20.04.1``
 is installing source files for rustc version 1.41.

. After installing the package via apt-get
$ sudo apt-get install rust-src

I get different answers from the following commands

from ``apt-file list``

```
$ apt-file list rust-src | grep libcore
[...]
rust-src: /usr/src/rustc-1.41.0/src/libcore/alloc.rs
rust-src: /usr/src/rustc-1.41.0/src/libcore/any.rs
rust-src: /usr/src/rustc-1.41.0/src/libcore/array/iter.rs
rust-src: /usr/src/rustc-1.41.0/src/libcore/array/mod.rs
rust-src: /usr/src/rustc-1.41.0/src/libcore/ascii.rs
rust-src: /usr/src/rustc-1.41.0/src/libcore/benches/any.rs
rust-src: /usr/src/rustc-1.41.0/src/libcore/benches/ascii.rs
[...]
```
( I am cutting out a long list of files in the libcore subfolder)

while with dpkg
```
$ dpkg -L rust-src | grep libcore
/usr/src/rustc-1.47.0/src/doc/edition-guide/src/rust-2018/platform-and-target-support/libcore-for-low-level-rust.md
/usr/src/rustc-1.47.0/src/etc/natvis/libcore.natvis
/usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore.rs
/usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore.stderr
/usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore_main.rs
/usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr
/usr/src/rustc-1.47.0/src/test/ui/consts/unstable-const-fn-in-libcore.rs
/usr/src/rustc-1.47.0/src/test/ui/consts/unstable-const-fn-in-libcore.stderr
/usr/src/rustc-1.47.0/src/test/ui/threads-sendsync/sync-send-iterators-in-libcore.rs
/usr/src/rustc-1.47.0/src/test/ui/variance-iterators-in-libcore.rs

```
no trace of any libcore subfolder

to prove ``dpkg`` is the one telling the truth
```
$ ls /usr/src/ -1
linux-headers-5.4.0-66
linux-headers-5.4.0-66-generic
linux-headers-5.4.0-67
linux-headers-5.4.0-67-generic
rustc-1.47.0
```
no trace of any ``rustc-1.41`` folder

also:
```
$ dpkg-deb -c /var/cache/apt/archives/rust-src_1.47.0+dfsg1+llvm-1ubuntu1~20.04.1_all.deb | grep libcore
-rw-r--r-- root/root 1079 2020-10-07 10:04 ./usr/src/rustc-1.47.0/src/doc/edition-guide/src/rust-2018/platform-and-target-support/libcore-for-low-level-rust.md
-rw-r--r-- root/root 1607 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/etc/natvis/libcore.natvis
-rw-r--r-- root/root 315 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore.rs
-rw-r--r-- root/root 1320 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore.stderr
-rw-r--r-- root/root 486 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore_main.rs
-rw-r--r-- root/root 1352 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr
-rw-r--r-- root/root 839 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/consts/unstable-const-fn-in-libcore.rs
-rw-r--r-- root/root 1075 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/consts/unstable-const-fn-in-libcore.stderr
-rw-r--r-- root/root 2578 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/threads-sendsync/sync-send-iterators-in-libcore.rs
-rw-r--r-- root/root 244 2020-10-07 09:53 ./usr/src/rustc-1.47.0/src/test/ui/variance-iterators-in-libcore.rs

```

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

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

Changed in rustc (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
I jsut came by and rechecked this.
At least on rustc-1.57.0 apt-file and dpkg and the build-log agree.
libcore is in none of them, but at least the consistency issue is gone.

root@j:~/ubuntu-helpers/cpaelzer# apt-file list rust-src | grep libcore
rust-src: /usr/src/rustc-1.57.0/src/etc/natvis/libcore.natvis
rust-src: /usr/src/rustc-1.57.0/src/test/ui/consts/const-eval/const_panic_libcore_bin.rs
rust-src: /usr/src/rustc-1.57.0/src/test/ui/consts/const-eval/const_panic_libcore_bin.stderr
rust-src: /usr/src/rustc-1.57.0/src/test/ui/consts/stable-precise-live-drops-in-libcore.rs
rust-src: /usr/src/rustc-1.57.0/src/test/ui/consts/stable-precise-live-drops-in-libcore.stderr
rust-src: /usr/src/rustc-1.57.0/src/test/ui/consts/unstable-const-fn-in-libcore.rs
rust-src: /usr/src/rustc-1.57.0/src/test/ui/consts/unstable-const-fn-in-libcore.stderr
rust-src: /usr/src/rustc-1.57.0/src/test/ui/consts/unstable-precise-live-drops-in-libcore.rs
rust-src: /usr/src/rustc-1.57.0/src/test/ui/threads-sendsync/sync-send-iterators-in-libcore.rs
rust-src: /usr/src/rustc-1.57.0/src/test/ui/variance-iterators-in-libcore.rs

root@j:~# dpkg -L rust-src | grep libcore
/usr/src/rustc-1.57.0/src/etc/natvis/libcore.natvis
/usr/src/rustc-1.57.0/src/test/ui/consts/const-eval/const_panic_libcore_bin.rs
/usr/src/rustc-1.57.0/src/test/ui/consts/const-eval/const_panic_libcore_bin.stderr
/usr/src/rustc-1.57.0/src/test/ui/consts/stable-precise-live-drops-in-libcore.rs
/usr/src/rustc-1.57.0/src/test/ui/consts/stable-precise-live-drops-in-libcore.stderr
/usr/src/rustc-1.57.0/src/test/ui/consts/unstable-const-fn-in-libcore.rs
/usr/src/rustc-1.57.0/src/test/ui/consts/unstable-const-fn-in-libcore.stderr
/usr/src/rustc-1.57.0/src/test/ui/consts/unstable-precise-live-drops-in-libcore.rs
/usr/src/rustc-1.57.0/src/test/ui/threads-sendsync/sync-send-iterators-in-libcore.rs
/usr/src/rustc-1.57.0/src/test/ui/variance-iterators-in-libcore.rs

https://launchpad.net/ubuntu/+source/rustc/1.57.0+dfsg1+llvm-0ubuntu2/+build/23104054/+files/buildlog_ubuntu-jammy-amd64.rustc_1.57.0+dfsg1+llvm-0ubuntu2_BUILDING.txt.gz

Revision history for this message
Simon Chopin (schopin) wrote :

In the current version (and probably back in 1.57) you'll find the libcore sources at /usr/src/rustc-$VERSION/library/core which would explain why paelzer's grep failed (no "libcore" in the path).

Marking this as "Fix released" since we have both consistency and the libcore sources :)

Changed in rustc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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