mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 12:37:49 +00:00
uucore: make features opt-in rather than opt-out
This commit is contained in:
parent
7b1554cc2c
commit
bd557c87fb
37 changed files with 71 additions and 56 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1882,7 +1882,7 @@ name = "whoami"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.31.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uucore 0.0.1",
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
|
@ -10,10 +10,7 @@ path = "arch.rs"
|
|||
|
||||
[dependencies]
|
||||
platform-info = { git = "https://github.com/uutils/platform-info" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
uucore = { path = "../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name = "arch"
|
||||
|
|
|
@ -8,8 +8,9 @@ build = "../../mkmain.rs"
|
|||
name = "uu_base32"
|
||||
path = "base32.rs"
|
||||
|
||||
[dependencies]
|
||||
uucore = { path="../uucore" }
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["encoding"]
|
||||
|
||||
[dependencies.clippy]
|
||||
version = "0.0.143"
|
||||
|
|
|
@ -8,8 +8,9 @@ build = "../../mkmain.rs"
|
|||
name = "uu_base64"
|
||||
path = "base64.rs"
|
||||
|
||||
[dependencies]
|
||||
uucore = { path="../uucore" }
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["encoding"]
|
||||
|
||||
[[bin]]
|
||||
name = "base64"
|
||||
|
|
|
@ -10,7 +10,10 @@ path = "cat.rs"
|
|||
|
||||
[dependencies]
|
||||
quick-error = "1.1.0"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
unix_socket = "0.5.0"
|
||||
|
|
|
@ -13,7 +13,6 @@ walkdir = "1.0.7"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries", "fs"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -10,9 +10,12 @@ path = "chmod.rs"
|
|||
|
||||
[dependencies]
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
walker = "1.0.0"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["mode"]
|
||||
|
||||
[[bin]]
|
||||
name = "chmod"
|
||||
path = "../../uumain.rs"
|
||||
|
|
|
@ -14,7 +14,6 @@ walkdir = "0.1"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries", "fs"]
|
||||
|
||||
[dependencies.clippy]
|
||||
|
|
|
@ -13,7 +13,6 @@ getopts = "0.2.14"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -17,9 +17,12 @@ libc = "0.2.26"
|
|||
walkdir = "1.0.7"
|
||||
clap = "2.20.0"
|
||||
quick-error = "1.1.0"
|
||||
uucore = { path="../uucore" }
|
||||
filetime = "0.1"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
ioctl-sys = "0.5.2"
|
||||
|
||||
|
|
5
src/env/env.rs
vendored
5
src/env/env.rs
vendored
|
@ -9,7 +9,6 @@
|
|||
*/
|
||||
|
||||
/* last synced with: env (GNU coreutils) 8.13 */
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
@ -25,7 +24,7 @@ static LONG_HELP: &'static str = "
|
|||
A mere - implies -i. If no COMMAND, print the resulting environment
|
||||
";
|
||||
|
||||
struct options {
|
||||
struct Options {
|
||||
ignore_env: bool,
|
||||
null: bool,
|
||||
unsets: Vec<String>,
|
||||
|
@ -52,7 +51,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
)
|
||||
.optopt("u", "unset", "remove variable from the environment", "NAME");
|
||||
|
||||
let mut opts = Box::new(options {
|
||||
let mut opts = Box::new(Options {
|
||||
ignore_env: false,
|
||||
null: false,
|
||||
unsets: vec![],
|
||||
|
|
|
@ -10,7 +10,6 @@ path = "groups.rs"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -10,7 +10,6 @@ path = "id.rs"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries", "process"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -10,7 +10,10 @@ path = "kill.rs"
|
|||
|
||||
[dependencies]
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["signals"]
|
||||
|
||||
[[bin]]
|
||||
name = "kill"
|
||||
|
|
|
@ -19,7 +19,6 @@ unicode-width = "0.1.4"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -11,7 +11,10 @@ path = "nohup.rs"
|
|||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[[bin]]
|
||||
name = "nohup"
|
||||
|
|
|
@ -10,7 +10,6 @@ path = "pinky.rs"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["utmpx", "entries"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -11,7 +11,10 @@ path = "readlink.rs"
|
|||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[[bin]]
|
||||
name = "readlink"
|
||||
|
|
|
@ -10,7 +10,10 @@ path = "realpath.rs"
|
|||
|
||||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[[bin]]
|
||||
name = "realpath"
|
||||
|
|
|
@ -10,7 +10,10 @@ path = "relpath.rs"
|
|||
|
||||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[[bin]]
|
||||
name = "relpath"
|
||||
|
|
|
@ -10,7 +10,10 @@ path = "sleep.rs"
|
|||
|
||||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["parse_time"]
|
||||
|
||||
[[bin]]
|
||||
name = "sleep"
|
||||
|
|
|
@ -12,7 +12,10 @@ path = "sort.rs"
|
|||
getopts = "0.2.14"
|
||||
semver = "0.7.0"
|
||||
itertools = "0.6.0"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[[bin]]
|
||||
name = "sort"
|
||||
|
|
|
@ -14,7 +14,6 @@ time = "0.1.38"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -13,7 +13,10 @@ getopts = "0.2.14"
|
|||
libc = "0.2.26"
|
||||
winapi = { version = "0.3", features = ["handleapi", "winerror"] }
|
||||
kernel32-sys = "0.2.2"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["wide"]
|
||||
|
||||
[[bin]]
|
||||
name = "sync"
|
||||
|
|
|
@ -12,7 +12,10 @@ path = "timeout.rs"
|
|||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
time = "0.1.38"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["parse_time", "process"]
|
||||
|
||||
[[bin]]
|
||||
name = "timeout"
|
||||
|
|
|
@ -15,7 +15,6 @@ time = "0.1.38"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["libc"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -12,10 +12,7 @@ path = "tr.rs"
|
|||
getopts = "0.2.14"
|
||||
bit-set = "0.4.0"
|
||||
fnv = "1.0.5"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
uucore = { path = "../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name = "tr"
|
||||
|
|
|
@ -11,7 +11,10 @@ path = "tty.rs"
|
|||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["fs"]
|
||||
|
||||
[[bin]]
|
||||
name = "tty"
|
||||
|
|
|
@ -11,10 +11,7 @@ path = "uname.rs"
|
|||
[dependencies]
|
||||
clap = "2.20.0"
|
||||
platform-info = { git = "https://github.com/uutils/platform-info" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
uucore = { path = "../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name = "uname"
|
||||
|
|
|
@ -11,7 +11,10 @@ path = "unexpand.rs"
|
|||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
unicode-width = "0.1.4"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
features = ["utf8"]
|
||||
|
||||
[[bin]]
|
||||
name = "unexpand"
|
||||
|
|
|
@ -10,10 +10,7 @@ path = "uniq.rs"
|
|||
|
||||
[dependencies]
|
||||
getopts = "0.2.14"
|
||||
|
||||
[dependencies.uucore]
|
||||
path="../uucore"
|
||||
default-features = false
|
||||
uucore = { path = "../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name = "uniq"
|
||||
|
|
|
@ -13,7 +13,6 @@ getopts = "0.2.14"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["utmpx"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -12,7 +12,6 @@ path = "users.rs"
|
|||
getopts = "0.2.14"
|
||||
|
||||
[dependencies.uucore]
|
||||
default-features = false
|
||||
features = ["utmpx"]
|
||||
path = "../uucore"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ process = ["libc"]
|
|||
signals = []
|
||||
entries = ["libc"]
|
||||
wide = []
|
||||
default = ["fs", "libc", "utf8", "encoding", "parse_time", "mode", "utmpx", "process", "entries", "signals", "wide"]
|
||||
default = []
|
||||
|
||||
[lib]
|
||||
path = "lib.rs"
|
||||
|
|
|
@ -10,7 +10,6 @@ path = "who.rs"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["utmpx"]
|
||||
|
||||
[dependencies.clippy]
|
||||
|
|
|
@ -16,7 +16,6 @@ advapi32-sys = "0.2.0"
|
|||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
features = ["entries", "wide"]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -11,10 +11,7 @@ path = "yes.rs"
|
|||
|
||||
[dependencies]
|
||||
clap = "2.31"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
uucore = { path = "../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name = "yes"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue