# Copyright 2025-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # shellcheck shell=bash # shellcheck disable=SC2034 EAPI=8 CRATES=" addr2line@0.25.1 adler2@2.0.1 aho-corasick@1.1.4 android_system_properties@0.1.5 anstream@0.6.21 anstyle-parse@0.2.7 anstyle-query@1.1.5 anstyle-wincon@3.0.11 anstyle@1.0.13 anyhow@1.0.102 arbitrary@1.4.2 arc-swap@1.8.2 async-broadcast@0.7.2 async-channel@2.5.0 async-executor@1.14.0 async-io@2.6.0 async-lock@3.4.2 async-process@2.5.0 async-recursion@1.1.1 async-signal@0.2.13 async-task@4.7.1 async-trait@0.1.89 atomic-waker@1.1.2 autocfg@1.5.0 backtrace@0.3.76 base62@2.2.3 base64@0.22.1 base64ct@1.8.3 bitflags@1.3.2 bitflags@2.11.0 block-buffer@0.10.4 block2@0.6.2 blocking@1.6.2 bstr@1.12.1 bumpalo@3.20.2 byteorder@1.5.0 bytes@1.11.1 cc@1.2.56 cfg-if@1.0.4 cfg_aliases@0.2.1 chrono@0.4.44 clap-cargo@0.18.3 clap@4.5.60 clap_builder@4.5.60 clap_complete@4.5.66 clap_derive@4.5.55 clap_lex@1.0.0 clap_mangen@0.2.31 color-eyre@0.6.5 color-spantrace@0.3.0 colorchoice@1.0.4 concurrent-queue@2.5.0 console@0.16.2 const-oid@0.9.6 const-random-macro@0.1.16 const-random@0.1.18 cookie@0.18.1 cookie_store@0.22.1 core-foundation-sys@0.8.7 cpufeatures@0.2.17 crc32fast@1.5.0 crossbeam-deque@0.8.6 crossbeam-epoch@0.9.18 crossbeam-utils@0.8.21 crunchy@0.2.4 crypto-common@0.1.7 curve25519-dalek-derive@0.1.1 curve25519-dalek@4.1.3 der@0.7.10 deranged@0.5.8 derive_arbitrary@1.4.2 digest@0.10.7 dirs-sys@0.5.0 dirs@6.0.0 dispatch2@0.3.1 displaydoc@0.2.5 dlv-list@0.5.2 document-features@0.2.12 ed25519-dalek@2.2.0 ed25519@2.2.3 edit@0.1.5 either@1.15.0 encode_unicode@1.0.0 encoding_rs@0.8.35 endi@1.1.1 enumflags2@0.7.12 enumflags2_derive@0.7.12 equivalent@1.0.2 errno@0.3.14 etcetera@0.11.0 event-listener-strategy@0.5.4 event-listener@5.4.1 eyre@0.6.12 fastrand@2.3.0 fiat-crypto@0.2.9 filetime@0.2.27 find-msvc-tools@0.1.9 flate2@1.1.9 fnv@1.0.7 foldhash@0.1.5 form_urlencoded@1.2.2 freedesktop-desktop-entry@0.8.1 futures-channel@0.3.32 futures-core@0.3.32 futures-executor@0.3.32 futures-io@0.3.32 futures-lite@2.6.1 futures-macro@0.3.32 futures-sink@0.3.32 futures-task@0.3.32 futures-util@0.3.32 futures@0.3.32 generic-array@0.14.7 getrandom@0.2.17 getrandom@0.3.4 getrandom@0.4.2 gimli@0.32.3 glob@0.3.3 globset@0.4.18 globwalk@0.8.1 h2@0.4.13 hashbrown@0.14.5 hashbrown@0.15.5 hashbrown@0.16.1 heck@0.5.0 hermit-abi@0.5.2 hex@0.4.3 home@0.5.12 http-body-util@0.1.3 http-body@1.0.1 http@1.4.0 httparse@1.10.1 hyper-rustls@0.27.7 hyper-util@0.1.20 hyper@1.8.1 iana-time-zone-haiku@0.1.2 iana-time-zone@0.1.65 icu_collections@2.1.1 icu_locale_core@2.1.1 icu_normalizer@2.1.1 icu_normalizer_data@2.1.1 icu_properties@2.1.2 icu_properties_data@2.1.2 icu_provider@2.1.1 id-arena@2.3.0 idna@1.1.0 idna_adapter@1.2.1 ignore@0.4.25 indenter@0.3.4 indexmap@2.13.0 indicatif@0.18.4 ipnet@2.12.0 iri-string@0.7.10 is_elevated@0.1.2 is_terminal_polyfill@1.70.2 itertools@0.11.0 itertools@0.14.0 itoa@1.0.17 jetbrains-toolbox-updater@6.0.0 js-sys@0.3.91 lazy_static@1.5.0 leb128fmt@0.1.0 libc@0.2.183 libredox@0.1.14 linux-raw-sys@0.12.1 linux-raw-sys@0.4.15 litemap@0.8.1 litrs@1.0.0 log@0.4.29 lru-slab@0.1.2 mac-notification-sys@0.6.12 matchers@0.2.0 memchr@2.8.0 memoffset@0.9.1 merge@0.1.0 merge_derive@0.1.0 miniz_oxide@0.8.9 mio@1.1.1 nix@0.31.2 normpath@1.5.0 notify-rust@4.12.0 ntapi@0.4.3 nu-ansi-term@0.50.3 num-conv@0.2.0 num-traits@0.2.19 objc2-core-foundation@0.3.2 objc2-encode@4.1.0 objc2-foundation@0.3.2 objc2-io-kit@0.3.2 objc2@0.6.4 object@0.37.3 once_cell@1.21.3 once_cell_polyfill@1.70.2 option-ext@0.2.0 ordered-multimap@0.7.3 ordered-stream@0.2.0 owo-colors@4.3.0 parking@2.2.1 parse-changelog@0.6.15 parselnk@0.1.1 percent-encoding@2.3.2 pin-project-lite@0.2.17 pin-utils@0.1.0 piper@0.2.5 pkcs8@0.10.2 plain@0.2.3 polling@3.11.0 portable-atomic@1.13.1 potential_utf@0.1.4 powerfmt@0.2.0 ppv-lite86@0.2.21 prettyplease@0.2.37 proc-macro-crate@3.5.0 proc-macro-error-attr@1.0.4 proc-macro-error@1.0.4 proc-macro2@1.0.106 quick-xml@0.37.5 quick-xml@0.38.4 quinn-proto@0.11.14 quinn-udp@0.5.14 quinn@0.11.9 quote@1.0.45 r-efi@5.3.0 r-efi@6.0.0 rand@0.9.2 rand_chacha@0.9.0 rand_core@0.6.4 rand_core@0.9.5 redox_syscall@0.7.3 redox_users@0.5.2 regex-automata@0.4.14 regex-split@0.1.0 regex-syntax@0.8.10 regex@1.12.3 reqwest@0.12.28 ring@0.17.14 roff@0.2.2 rust-i18n-macro@3.1.5 rust-i18n-support@3.1.5 rust-i18n@3.1.5 rust-ini@0.21.3 rustc-demangle@0.1.27 rustc-hash@2.1.1 rustc_version@0.4.1 rustix@0.38.44 rustix@1.1.4 rustls-pki-types@1.14.0 rustls-webpki@0.103.9 rustls@0.23.37 rustversion@1.0.22 ryu@1.0.23 same-file@1.0.6 self-replace@1.5.0 self_update@0.43.1 semver@1.0.27 serde@1.0.228 serde_core@1.0.228 serde_derive@1.0.228 serde_json@1.0.149 serde_repr@0.1.20 serde_spanned@0.6.9 serde_spanned@1.0.4 serde_urlencoded@0.7.1 serde_yaml@0.9.34+deprecated sha2@0.10.9 sharded-slab@0.1.7 shell-words@1.1.1 shellexpand@3.1.2 shlex@1.3.0 signal-hook-registry@1.4.8 signature@2.2.0 simd-adler32@0.3.8 siphasher@1.0.2 slab@0.4.12 smallvec@1.15.1 socket2@0.6.3 socks@0.3.4 spki@0.7.3 stable_deref_trait@1.2.1 strsim@0.11.1 strum@0.28.0 strum_macros@0.28.0 subtle@2.6.1 syn@1.0.109 syn@2.0.117 sync_wrapper@1.0.2 synstructure@0.13.2 sys-locale@0.3.2 sysinfo@0.36.1 tar@0.4.44 tauri-winrt-notification@0.7.2 tempfile@3.26.0 thiserror-impl@1.0.69 thiserror-impl@2.0.18 thiserror@1.0.69 thiserror@2.0.18 thread_local@1.1.9 time-core@0.1.8 time-macros@0.2.27 time@0.3.47 tiny-keccak@2.0.2 tinystr@0.8.2 tinyvec@1.10.0 tinyvec_macros@0.1.1 tokio-rustls@0.26.4 tokio-util@0.7.18 tokio@1.50.0 toml@0.8.23 toml@1.0.6+spec-1.1.0 toml_datetime@0.6.11 toml_datetime@1.0.0+spec-1.1.0 toml_edit@0.22.27 toml_edit@0.25.4+spec-1.1.0 toml_parser@1.0.9+spec-1.1.0 toml_write@0.1.2 toml_writer@1.0.6+spec-1.1.0 tower-http@0.6.8 tower-layer@0.3.3 tower-service@0.3.3 tower@0.5.3 tracing-attributes@0.1.31 tracing-core@0.1.36 tracing-error@0.2.1 tracing-log@0.2.0 tracing-subscriber@0.3.22 tracing@0.1.44 triomphe@0.1.15 try-lock@0.2.5 typenum@1.19.0 uds_windows@1.2.0 unicase@2.9.0 unicode-ident@1.0.24 unicode-width@0.2.2 unicode-xid@0.2.6 unit-prefix@0.5.2 unsafe-libyaml@0.2.11 untrusted@0.9.0 ureq-proto@0.5.3 ureq@3.2.0 url@2.5.8 urlencoding@2.1.3 utf-8@0.7.6 utf8_iter@1.0.4 utf8parse@0.2.2 uuid@1.22.0 valuable@0.1.1 version_check@0.9.5 walkdir@2.5.0 want@0.3.1 wasi@0.11.1+wasi-snapshot-preview1 wasip2@1.0.2+wasi-0.2.9 wasip3@0.4.0+wasi-0.3.0-rc-2026-01-06 wasm-bindgen-futures@0.4.64 wasm-bindgen-macro-support@0.2.114 wasm-bindgen-macro@0.2.114 wasm-bindgen-shared@0.2.114 wasm-bindgen@0.2.114 wasm-encoder@0.244.0 wasm-metadata@0.244.0 wasmparser@0.244.0 web-sys@0.3.91 web-time@1.1.0 webpki-roots@1.0.6 which@4.4.2 which@8.0.2 widestring@0.4.3 wildmatch@2.6.1 winapi-i686-pc-windows-gnu@0.4.0 winapi-util@0.1.11 winapi-x86_64-pc-windows-gnu@0.4.0 winapi@0.3.9 windows-collections@0.2.0 windows-collections@0.3.2 windows-core@0.61.2 windows-core@0.62.2 windows-future@0.2.1 windows-future@0.3.2 windows-implement@0.60.2 windows-interface@0.59.3 windows-link@0.1.3 windows-link@0.2.1 windows-numerics@0.2.0 windows-numerics@0.3.1 windows-registry@0.6.1 windows-result@0.3.4 windows-result@0.4.1 windows-strings@0.4.2 windows-strings@0.5.1 windows-sys@0.52.0 windows-sys@0.59.0 windows-sys@0.60.2 windows-sys@0.61.2 windows-targets@0.52.6 windows-targets@0.53.5 windows-threading@0.1.0 windows-threading@0.2.1 windows-version@0.1.7 windows@0.61.3 windows@0.62.2 windows_aarch64_gnullvm@0.52.6 windows_aarch64_gnullvm@0.53.1 windows_aarch64_msvc@0.52.6 windows_aarch64_msvc@0.53.1 windows_i686_gnu@0.52.6 windows_i686_gnu@0.53.1 windows_i686_gnullvm@0.52.6 windows_i686_gnullvm@0.53.1 windows_i686_msvc@0.52.6 windows_i686_msvc@0.53.1 windows_x86_64_gnu@0.52.6 windows_x86_64_gnu@0.53.1 windows_x86_64_gnullvm@0.52.6 windows_x86_64_gnullvm@0.53.1 windows_x86_64_msvc@0.52.6 windows_x86_64_msvc@0.53.1 winnow@0.7.15 wit-bindgen-core@0.51.0 wit-bindgen-rust-macro@0.51.0 wit-bindgen-rust@0.51.0 wit-bindgen@0.51.0 wit-component@0.244.0 wit-parser@0.244.0 writeable@0.6.2 xattr@1.6.1 xdg@3.0.0 yoke-derive@0.8.1 yoke@0.8.1 zbus@5.14.0 zbus_macros@5.14.0 zbus_names@4.3.1 zerocopy-derive@0.8.42 zerocopy@0.8.42 zerofrom-derive@0.1.6 zerofrom@0.1.6 zeroize@1.8.2 zerotrie@0.2.3 zerovec-derive@0.11.2 zerovec@0.11.5 zip@6.0.0 zipsign-api@0.1.5 zlib-rs@0.6.3 zmij@1.0.21 zopfli@0.8.3 zvariant@5.10.0 zvariant_derive@5.10.0 zvariant_utils@3.3.0 " RUST_MIN_VER="1.88.0" inherit cargo shell-completion DESCRIPTION="Upgrade all the things" HOMEPAGE="https://github.com/topgrade-rs/topgrade" SRC_URI=" https://github.com/topgrade-rs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz ${CARGO_CRATE_URIS} " LICENSE="GPL-3" # Dependent crate licenses LICENSE+=" Apache-2.0 BSD CC0-1.0 CDLA-Permissive-2.0 GPL-3 ISC MIT MPL-2.0 Unicode-3.0 ZLIB " SLOT="0" KEYWORDS="~amd64" QA_FLAGS_IGNORED="usr/bin/topgrade" src_compile() { cargo_src_compile ( # shellcheck disable=SC2155 export PATH="$(cargo_target_dir)" for shell in bash fish zsh; do topgrade --gen-completion "${shell}" > "${T}/${shell}.completion" || die done topgrade --gen-manpage > "${T}/manpage.1" || die ) } src_install() { cargo_src_install newbashcomp "${T}/bash.completion" "${PN}" newzshcomp "${T}/zsh.completion" "_${PN}" newfishcomp "${T}/fish.completion" "${PN}.fish" newman "${T}/manpage.1" "${PN}.1" }