diff --git a/Cargo.toml b/Cargo.toml index 53bc72a..c2e8436 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ name = "sysroot-cleaner" authors = ["Matteo Settenvini "] version = "0.1.0" -edition = "2024" +edition = "2021" license = "EUPL-1.2" readme = "README.md" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bd781f6..41447a0 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -3,6 +3,6 @@ [toolchain] -channel = "1.85" +channel = "1.84" profile = "default" components = ["rustfmt"] diff --git a/src/cleaners.rs b/src/cleaners.rs index 925937e..f6c8f08 100644 --- a/src/cleaners.rs +++ b/src/cleaners.rs @@ -82,14 +82,14 @@ impl Runner { async fn paths_producer(tasks: &mut JoinSet>) -> mpsc::Receiver { let (input_tx, input_rx) = mpsc::channel(CHANNEL_SIZE); - let walker = WalkDir::new(".").follow_links(false).same_file_system(true); + let walker = WalkDir::new(".").follow_links(false); tasks.spawn(async move { for entry in walker { match entry { Ok(e) if !Self::is_dir(&e) => { input_tx .send(Decision { - path: e.into_path().strip_prefix(".")?.to_path_buf(), + path: e.into_path(), action: Action::Undecided, }) .await?; diff --git a/src/cleaners/dso.rs b/src/cleaners/dso.rs index 7aea0fe..965a513 100644 --- a/src/cleaners/dso.rs +++ b/src/cleaners/dso.rs @@ -77,6 +77,7 @@ impl Cleaner for DsoCleaner { if decision.action == Action::Keep { let ino = nix::sys::stat::lstat(&decision.path)?.st_ino; inodes_to_keep.insert(ino); + dbg!(&decision.path, ino); } // If something was marked as "keep" or "remove" before, @@ -110,6 +111,10 @@ impl Cleaner for DsoCleaner { }; for path in paths { + if path.display().to_string().contains("libjsonrpccpp-server") { + dbg!(inode, &path, action); + } + output.send(Decision { path, action }).await?; } }