From 23b793769871d09ff3a85638f6465cea8f948bae Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 19 Mar 2026 08:32:07 +0700 Subject: [PATCH 1/5] Update deps --- Cargo.lock | 475 ++++++++++++++++++++++++++++++-------------- Cargo.toml | 6 +- src/bin/repo.rs | 9 +- src/cook/package.rs | 2 +- 4 files changed, 336 insertions(+), 156 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 35c265ac5..e2d991ba4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,15 +25,15 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "ansi-to-tui" -version = "7.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67555e1f1ece39d737e28c8a017721287753af3f93225e4a445b29ccb0f5912c" +checksum = "e42366bb9d958f042bf58f0a85e1b2d091997c1257ca49bddd7e4827aadc65fd" dependencies = [ "nom", - "ratatui", + "ratatui-core", "simdutf8", "smallvec", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -42,6 +42,12 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +[[package]] +name = "arg_parser" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9bcdf9185a4ea0d8afa7c8ad387cc3a93c3ecfa918125e000a57a42e71268d7" + [[package]] name = "arrayref" version = "0.3.9" @@ -114,12 +120,6 @@ dependencies = [ "syn", ] -[[package]] -name = "cassowary" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" - [[package]] name = "castaway" version = "0.2.4" @@ -169,9 +169,9 @@ dependencies = [ [[package]] name = "compact_str" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" +checksum = "3fdb1325a1cece981e8a296ab8f0f9b63ae357bd0784a9faaf548cc7b480707a" dependencies = [ "castaway", "cfg-if", @@ -310,6 +310,15 @@ dependencies = [ "syn", ] +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", +] + [[package]] name = "digest" version = "0.10.7" @@ -343,9 +352,9 @@ dependencies = [ [[package]] name = "dryoc" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e73e0fee365832cd9b9a53ea62f944cc0d7a4c71f2b9c96a28fc74749517afa" +checksum = "4684d84cc4dc1a8705dcbe8be0e258581dfdbb308477ed604f52797c336bb3d2" dependencies = [ "bitflags", "chacha20", @@ -403,9 +412,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "generic-array" @@ -417,17 +426,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.16" @@ -436,7 +434,19 @@ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", ] [[package]] @@ -454,21 +464,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.5" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", "foldhash", ] -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - [[package]] name = "heck" version = "0.5.0" @@ -513,7 +517,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown", ] [[package]] @@ -549,9 +553,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] @@ -562,6 +566,17 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "kasuari" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" +dependencies = [ + "hashbrown", + "portable-atomic", + "thiserror", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -585,6 +600,15 @@ dependencies = [ "redox_syscall", ] +[[package]] +name = "line-clipping" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4de44e98ddbf09375cbf4d17714d18f39195f4f4894e8524501726fd9a8a4a" +dependencies = [ + "bitflags", +] + [[package]] name = "log" version = "0.4.29" @@ -593,11 +617,11 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lru" -version = "0.12.5" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" dependencies = [ - "hashbrown 0.15.5", + "hashbrown", ] [[package]] @@ -626,12 +650,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -644,12 +662,26 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.3" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" dependencies = [ "memchr", - "minimal-lexical", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", ] [[package]] @@ -660,13 +692,13 @@ checksum = "6aa2c4e539b869820a2b82e1aef6ff40aa85e65decdd5185e83fb4b1249cd00f" [[package]] name = "object" -version = "0.36.7" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "271638cd5fa9cca89c4c304675ca658efc4e64a66c716b7cfe1afb4b9611dbbc" dependencies = [ "crc32fast", "flate2", - "hashbrown 0.15.5", + "hashbrown", "indexmap", "memchr", "ruzstd", @@ -678,12 +710,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pbr" version = "1.1.1" @@ -698,20 +724,20 @@ dependencies = [ [[package]] name = "pkgar" version = "0.2.1" -source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#b544d6b6612b58524de2ea9d857c5a349f1c99e2" +source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#8835aab69a164a5610737e6f595b9681db9fba0b" dependencies = [ "blake3", "bytemuck", "lzma-rust2", "pkgar-core", "pkgar-keys", - "thiserror 2.0.17", + "thiserror", ] [[package]] name = "pkgar-core" version = "0.2.1" -source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#b544d6b6612b58524de2ea9d857c5a349f1c99e2" +source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#8835aab69a164a5610737e6f595b9681db9fba0b" dependencies = [ "bitflags", "blake3", @@ -722,7 +748,7 @@ dependencies = [ [[package]] name = "pkgar-keys" version = "0.2.1" -source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#b544d6b6612b58524de2ea9d857c5a349f1c99e2" +source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#8835aab69a164a5610737e6f595b9681db9fba0b" dependencies = [ "dirs", "hex", @@ -731,10 +757,22 @@ dependencies = [ "seckey", "serde", "termion", - "thiserror 2.0.17", + "thiserror", "toml", ] +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "proc-macro2" version = "1.0.103" @@ -754,33 +792,80 @@ dependencies = [ ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "r-efi" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.3.4", ] [[package]] name = "ratatui" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" +checksum = "d1ce67fb8ba4446454d1c8dbaeda0557ff5e94d39d5e5ed7f10a65eb4c8266bc" +dependencies = [ + "instability", + "ratatui-core", + "ratatui-termion", + "ratatui-widgets", +] + +[[package]] +name = "ratatui-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef8dea09a92caaf73bff7adb70b76162e5937524058a7e5bff37869cbbec293" dependencies = [ "bitflags", - "cassowary", "compact_str", + "hashbrown", + "indoc", + "itertools", + "kasuari", + "lru", + "strum", + "thiserror", + "unicode-segmentation", + "unicode-truncate", + "unicode-width", +] + +[[package]] +name = "ratatui-termion" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cade85a8591fbc911e147951422f0d6fd40f4948b271b6216c7dc01838996f8" +dependencies = [ + "instability", + "ratatui-core", + "termion", +] + +[[package]] +name = "ratatui-widgets" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7dbfa023cd4e604c2553483820c5fe8aa9d71a42eea5aa77c6e7f35756612db" +dependencies = [ + "bitflags", + "hashbrown", "indoc", "instability", "itertools", - "lru", - "paste", + "line-clipping", + "ratatui-core", "strum", - "termion", + "time", "unicode-segmentation", - "unicode-truncate", - "unicode-width 0.2.0", + "unicode-width", ] [[package]] @@ -796,13 +881,13 @@ dependencies = [ [[package]] name = "redox-pkg" version = "0.3.0" -source = "git+https://gitlab.redox-os.org/redox-os/pkgutils.git#80e0196ef0ef940ca2b243d3c10ffecbd37f11cc" +source = "git+https://gitlab.redox-os.org/redox-os/pkgutils.git#fafeff11365ad57eb7e12bd5945287ed18eab102" dependencies = [ "hex", "ignore", "serde", "serde_derive", - "thiserror 1.0.69", + "thiserror", "toml", ] @@ -835,12 +920,14 @@ dependencies = [ [[package]] name = "redox_installer" -version = "0.2.37" -source = "git+https://gitlab.redox-os.org/redox-os/installer.git#990d9d343eefbcdc4cecc5f204164b69cc70de41" +version = "0.2.42" +source = "git+https://gitlab.redox-os.org/redox-os/installer.git#ed6013c2953c7e2117bd2d1c9cfd13425cb59741" dependencies = [ "anyhow", + "arg_parser", "libc", "libredox", + "ring", "serde", "serde_derive", "toml", @@ -863,13 +950,13 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.16", "libredox", - "thiserror 2.0.17", + "thiserror", ] [[package]] name = "redoxer" -version = "0.2.62" -source = "git+https://gitlab.redox-os.org/redox-os/redoxer.git#4a68a03d517015b2776284a99609d01d3373fa28" +version = "0.2.63" +source = "git+https://gitlab.redox-os.org/redox-os/redoxer.git#67af2b7543ff8fb2eaba6699ac9d331dfe2d0f8c" dependencies = [ "anyhow", "dirs", @@ -905,6 +992,21 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rustc_version" version = "0.4.1" @@ -922,9 +1024,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ruzstd" -version = "0.7.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f" +checksum = "e5ff0cc5e135c8870a775d3320910cd9b564ec036b4dc0b8741629020be63f01" dependencies = [ "twox-hash", ] @@ -955,11 +1057,10 @@ dependencies = [ [[package]] name = "seckey" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b371a3e46636d13277af1daacbecb6f5acbe653bd378a4822ecd1c67790fbb" +checksum = "cd64b8649b6038d9ea27fde99aeded1c5571c00af18a6bc54ed6c1e01d7d2083" dependencies = [ - "getrandom 0.1.16", "memsec", ] @@ -1033,6 +1134,12 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "static_assertions" version = "1.1.0" @@ -1056,23 +1163,22 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.3" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.4" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ "heck", "proc-macro2", "quote", - "rustversion", "syn", ] @@ -1103,33 +1209,13 @@ dependencies = [ "numtoa", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ - "thiserror-impl 2.0.17", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "thiserror-impl", ] [[package]] @@ -1143,6 +1229,27 @@ dependencies = [ "syn", ] +[[package]] +name = "time" +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +dependencies = [ + "deranged", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + [[package]] name = "toml" version = "0.8.23" @@ -1186,13 +1293,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "twox-hash" -version = "1.6.3" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] +checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" [[package]] name = "typenum" @@ -1214,27 +1317,27 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-truncate" -version = "1.1.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5" dependencies = [ "itertools", "unicode-segmentation", - "unicode-width 0.1.14", + "unicode-width", ] -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "version_check" version = "0.9.5" @@ -1260,18 +1363,21 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1294,7 +1400,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1315,7 +1421,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -1333,13 +1448,29 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -1348,42 +1479,90 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winnow" version = "0.7.14" @@ -1393,6 +1572,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + [[package]] name = "zeroize" version = "1.8.2" diff --git a/Cargo.toml b/Cargo.toml index 6ece893aa..1d63ca528 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ blake3 = "1" globset = "0.4" libc = "0.2" ignore = "0.4" -object = { version = "0.36", features = ["build_core"] } +object = { version = "0.38", features = ["build_core"] } pbr = "1.0.2" pkgar = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" } pkgar-core = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" } @@ -48,11 +48,11 @@ serde = { version = "=1.0.197", features = ["derive"] } termion = "4" toml = "0.8" walkdir = "2.3.1" -ansi-to-tui = { version = "7.0.0", optional = true } +ansi-to-tui = { version = "8", optional = true } strip-ansi-escapes = { version = "0.2.1", optional = true } [dependencies.ratatui] -version = "0.29.0" +version = "0.30" default-features = false features = ["termion"] optional = true diff --git a/src/bin/repo.rs b/src/bin/repo.rs index e0afa1f91..09e3e36eb 100644 --- a/src/bin/repo.rs +++ b/src/bin/repo.rs @@ -348,7 +348,7 @@ fn repo_inner( let (status_tx, status_rx) = mpsc::channel::(); let (mut stdout_writer, mut stderr_writer) = setup_logger(&status_tx, &recipe.name); let mut app = TuiApp::new(vec![recipe.clone()]); - app.dump_logs_anyway = config.cook.verbose || !config.cook.nonstop; + app.dump_logs_anyway = config.cook.verbose; let dump_fail_logs = !app.dump_logs_anyway; let th = thread::spawn(move || { while let Ok(update) = status_rx.recv() { @@ -480,11 +480,6 @@ fn parse_args(args: Vec) -> anyhow::Result<(CliConfig, CliCommand, Vec) -> anyhow::Result<(CliConfig, CliCommand, Vec Date: Thu, 19 Mar 2026 15:30:54 +0700 Subject: [PATCH 2/5] Implement push update diff --- src/bin/repo.rs | 26 +++++++++++------- src/cook/fs.rs | 5 ++++ src/cook/package.rs | 47 ++++++++++++++++++++++++++++++- src/lib.rs | 67 +++++++++++++++++++++++++++++++++++++++++++++ src/recipe.rs | 11 +++----- 5 files changed, 138 insertions(+), 18 deletions(-) diff --git a/src/bin/repo.rs b/src/bin/repo.rs index 09e3e36eb..130efdb18 100644 --- a/src/bin/repo.rs +++ b/src/bin/repo.rs @@ -5,13 +5,13 @@ use cookbook::cook::cook_build::{build, get_stage_dirs, remove_stage_dir}; use cookbook::cook::fetch::{fetch, fetch_offline}; use cookbook::cook::fs::{create_target_dir, run_command}; use cookbook::cook::ident; -use cookbook::cook::package::package; +use cookbook::cook::package::{package, package_handle_push}; use cookbook::cook::pty::{PtyOut, UnixSlavePty, flush_pty, setup_pty}; use cookbook::cook::script::KILL_ALL_PID; use cookbook::cook::tree::{self, WalkTreeEntry}; use cookbook::log_to_pty; use cookbook::recipe::{CookRecipe, recipes_flatten_package_names, recipes_mark_as_deps}; -use pkg::PackageName; +use pkg::{PackageName, PackageState}; use ratatui::Terminal; use ratatui::layout::{Constraint, Direction, Layout, Position, Rect}; use ratatui::prelude::TermionBackend; @@ -798,15 +798,17 @@ fn handle_push(recipes: &Vec, config: &CliConfig) -> anyhow::Result< _is_last: bool, entry: &WalkTreeEntry| -> anyhow::Result<()> { - let public_path = "build/id_ed25519.pub.toml"; let r = match entry { WalkTreeEntry::Built(archive_path, _) => { - let sysroot_dir = PUSH_SYSROOT_DIR.get().unwrap(); - pkgar::extract(public_path, archive_path.as_path(), sysroot_dir).context(format!( - "failed to install '{}' in '{}'", - archive_path.display(), - sysroot_dir.display(), - )) + let install_path = PUSH_SYSROOT_DIR.get().unwrap(); + let mut state = + PackageState::from_sysroot(install_path).map_err(|e| anyhow!("{e:?}"))?; + let r = package_handle_push(&mut state, archive_path, &install_path, false) + .map_err(|e| anyhow!("{e:?}")); + if matches!(r, Ok(false)) { + state.to_sysroot(install_path)?; + } + r } WalkTreeEntry::NotBuilt => Err(anyhow!( "Package {} has not been built", @@ -817,7 +819,11 @@ fn handle_push(recipes: &Vec, config: &CliConfig) -> anyhow::Result< } }; match r { - Ok(()) => { + Ok(true) => { + print_cached(&CliCommand::Push, Some(package_name)); + Ok(()) + } + Ok(false) => { print_success(&CliCommand::Push, Some(package_name)); Ok(()) } diff --git a/src/cook/fs.rs b/src/cook/fs.rs index 3d81d77de..fc7135d2e 100644 --- a/src/cook/fs.rs +++ b/src/cook/fs.rs @@ -12,6 +12,7 @@ use walkdir::{DirEntry, WalkDir}; use crate::{ config::translate_mirror, cook::pty::{PtyOut, spawn_to_pipe}, + wrap_io_err, }; //TODO: pub(crate) for all of these functions @@ -314,6 +315,10 @@ pub fn download_wget(url: &str, dest: &PathBuf, logger: &PtyOut) -> Result<(), S Ok(()) } +pub fn read_to_string(path: &Path) -> crate::Result { + fs::read_to_string(path).map_err(wrap_io_err!(path, "Reading file to string")) +} + /// get commit rev and return if it's detached or not pub fn get_git_head_rev(dir: &PathBuf) -> Result<(String, bool), String> { let git_head = dir.join(".git/HEAD"); diff --git a/src/cook/package.rs b/src/cook/package.rs index e63a92413..ba8a177f4 100644 --- a/src/cook/package.rs +++ b/src/cook/package.rs @@ -3,7 +3,7 @@ use std::{ path::{Path, PathBuf}, }; -use pkg::{Package, PackageName, PackagePrefix}; +use pkg::{InstallState, Package, PackageName, PackagePrefix, PackageState}; use pkgar::ext::PackageSrcExt; use pkgar_core::HeaderFlags; @@ -252,3 +252,48 @@ fn get_package_name_inner(name: &str, package: Option<&str>) -> String { } prefix_name } + +pub fn package_handle_push( + state: &mut PackageState, + archive_path: &Path, + sysroot_dir: &Path, + reinstall: bool, +) -> crate::Result { + let archive_toml = archive_path.with_extension("toml"); + let pkey_path = "build/id_ed25519.pub.toml"; + let pkg_toml = Package::from_file(&archive_toml)?; + match state.installed.get(&pkg_toml.name) { + Some(s) if !reinstall && pkg_toml.blake3 == s.blake3 => Ok(true), + Some(s) => { + // "local" is what remote name from installer is hardcoded into + let remote_name = "local".to_string(); + + let install_state = + InstallState::from_package(&pkg_toml, remote_name, s.manual, s.dependents.clone()); + + // TODO: use pkgar::replace unless forced reinstall + pkgar::extract(pkey_path, &archive_path, sysroot_dir)?; + + state.installed.insert(pkg_toml.name.clone(), install_state); + + Ok(false) + } + None => { + // "local" is what remote name from installer is hardcoded into + let remote_name = "local".to_string(); + + // TODO: Handle manual & depedents + let install_state = + InstallState::from_package(&pkg_toml, remote_name, true, BTreeSet::new()); + + pkgar::extract(pkey_path, &archive_path, sysroot_dir)?; + + // TODO: Inject dependencies + // TODO: Check if we need to inject remote key + + state.installed.insert(pkg_toml.name.clone(), install_state); + + Ok(false) + } + } +} diff --git a/src/lib.rs b/src/lib.rs index bcb4b2dea..7e3676a37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,3 +15,70 @@ pub const REMOTE_PKG_SOURCE: &str = "https://static.redox-os.org/pkg"; pub fn is_redox() -> bool { cfg!(target_os = "redox") } + +// Errors + +use std::io; +use std::path::PathBuf; + +#[derive(Debug)] +pub enum Error { + Io { + source: io::Error, + path: Option, + context: &'static str, + }, + Package(pkg::PackageError), + Pkgar(pkgar::Error), + Other(String), +} + +macro_rules! wrap_io_err { + ($context:expr) => { + |source| crate::Error::Io { + source, + path: None, + context: $context, + } + }; + ($path:expr, $context:expr) => { + |source| crate::Error::Io { + source, + path: Some($path.to_path_buf()), + context: $context, + } + }; +} + +impl From for Error { + fn from(value: String) -> Self { + Error::Other(value) + } +} + +impl From for Error { + fn from(value: pkg::PackageError) -> Self { + Error::Package(value) + } +} + +impl From for Error { + fn from(value: pkgar::Error) -> Self { + match value { + pkgar::Error::Io { + source, + path, + context, + } => Error::Io { + source, + path, + context, + }, + _ => Error::Pkgar(value), + } + } +} + +pub(crate) type Result = std::result::Result; + +pub(crate) use wrap_io_err; diff --git a/src/recipe.rs b/src/recipe.rs index 97bbc06c9..03dafaea3 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -7,10 +7,7 @@ use std::{ use pkg::{PackageError, PackageName, recipes}; use regex::Regex; -use serde::{ - Deserialize, Serialize, - de::{Error as DeErrorT, value::Error as DeError}, -}; +use serde::{Deserialize, Serialize}; use crate::{WALK_DEPTH, cook::package as cook_package}; @@ -198,9 +195,9 @@ impl Recipe { return Err(PackageError::FileMissing(file.clone())); } let toml = fs::read_to_string(&file) - .map_err(|err| PackageError::Parse(DeError::custom(err), Some(file.clone())))?; - let recipe: Recipe = toml::from_str(&toml) - .map_err(|err| PackageError::Parse(DeError::custom(err), Some(file.clone())))?; + .map_err(|err| PackageError::FileError(err.raw_os_error(), file.clone()))?; + let recipe: Recipe = + toml::from_str(&toml).map_err(|err| PackageError::Parse(err, Some(file.clone())))?; Ok(recipe) } From c6044249976ba86e680d63d4f39c928f2fcf159b Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 19 Mar 2026 16:14:01 +0700 Subject: [PATCH 3/5] Always imply with package deps on push --- mk/repo.mk | 16 ++---- src/bin/repo.rs | 135 ++++++++++++++++++++--------------------------- src/cook/tree.rs | 32 ++++++----- 3 files changed, 81 insertions(+), 102 deletions(-) diff --git a/mk/repo.mk b/mk/repo.mk index a476f3fed..a5608fc85 100644 --- a/mk/repo.mk +++ b/mk/repo.mk @@ -133,22 +133,14 @@ ifeq ($(ALLOW_FSTOOLS),1) fi endif -# Push compiled package with their package dependencies -pp.%: $(FSTOOLS_TAG) FORCE - $(MAKE) p.$*,--with-package-deps - # Show what to push pt.%: $(FSTOOLS_TAG) FORCE ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ else - $(REPO_BIN) push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS) + $(REPO_BIN) push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS) --with-package-deps endif -# Show what to push (with deps) -ppt.%: prefix $(FSTOOLS_TAG) FORCE - $(MAKE) pt.$*,--with-package-deps - # Push all recipes specified by the filesystem config push: $(FSTOOLS_TAG) FORCE ifeq ($(ALLOW_FSTOOLS),1) @@ -217,17 +209,17 @@ endif # Invoke repo.sh and push for one of more targets separated by comma # Don't use podman here, as the p target cannot mount inside podman rp.%: $(FSTOOLS_TAG) FORCE - $(MAKE) r.$* + $(MAKE) r.$*,--with-package-deps $(MAKE) p.$* # Invoke clean, repo.sh and push for one of more targets separated by comma crp.%: $(FSTOOLS_TAG) FORCE - $(MAKE) cr.$* + $(MAKE) cr.$*,--with-package-deps $(MAKE) p.$* # Invoke unfetch. clean, repo.sh and push for one of more targets separated by comma ucrp.%: $(FSTOOLS_TAG) FORCE - $(MAKE) ucr.$* + $(MAKE) ucr.$*,--with-package-deps $(MAKE) p.$* export DEBUG_BIN?= diff --git a/src/bin/repo.rs b/src/bin/repo.rs index 130efdb18..04deef4ce 100644 --- a/src/bin/repo.rs +++ b/src/bin/repo.rs @@ -57,7 +57,7 @@ const REPO_HELP_STR: &str = r#" --repo= the "repo" folder, default to $PWD/repo --sysroot= the "root" folder used for "push" command For Redox, defaults to "/", else default to $PWD/sysroot - --with-package-deps include package deps + --with-package-deps include package deps (always implied in push command) --all apply to all recipes in --category= apply to all recipes in / --filesystem= override recipes config using installer file @@ -601,48 +601,46 @@ fn parse_args(args: Vec) -> anyhow::Result<(CliConfig, CliCommand, Vec source -> binary -> dev - // in this case, we need to move that "source" to "binary", because - // that would include dev from its binary child, which is unnecessary - let mut i = 0; - while i < source_recipe_names.len() { - let name = &source_recipe_names[i]; - match special_rules.get(name) { - Some(s) if s.as_str() == "source" => { - if binary_names.contains(name) { - let bin = source_recipe_names.remove(i); - binary_recipe_names.push(bin); - continue; - } + let mut recipes = if command.is_building() || command.is_pushing() { + // Pushing do not need dev deps, so does binary recipes at building + let include_dev = command.is_building(); + if include_dev && default_rule == "source" { + // let's cover a very specific case, binary -> source -> binary -> dev + // in this case, we need to move that "source" to "binary", because + // that would include dev from its binary child, which is unnecessary + let mut i = 0; + while i < source_recipe_names.len() { + let name = &source_recipe_names[i]; + match special_rules.get(name) { + Some(s) if s.as_str() == "source" => { + if binary_names.contains(name) { + let bin = source_recipe_names.remove(i); + binary_recipe_names.push(bin); + continue; } - _ => {} } - i += 1; + _ => {} } + i += 1; } - CookRecipe::get_build_deps_recursive(&source_recipe_names, include_dev)? - } else { - CookRecipe::from_list(source_recipe_names.clone())? - }; + } + CookRecipe::get_build_deps_recursive(&source_recipe_names, include_dev)? + } else { + CookRecipe::from_list(source_recipe_names.clone())? + }; - let binary_recipes = - if command.is_building() || (command.is_pushing() && config.with_package_deps) { - CookRecipe::get_build_deps_recursive(&binary_recipe_names, false)? - } else { - CookRecipe::from_list(binary_recipe_names.clone())? - }; + let binary_recipes = if command.is_building() || command.is_pushing() { + CookRecipe::get_build_deps_recursive(&binary_recipe_names, false)? + } else { + CookRecipe::from_list(binary_recipe_names.clone())? + }; let ignore_recipes = CookRecipe::from_list(ignore_recipe_names.clone())?; @@ -677,10 +675,10 @@ fn parse_args(args: Vec) -> anyhow::Result<(CliConfig, CliCommand, Vec) -> anyhow::Result<(CliConfig, CliCommand, Vec, config: &CliConfig) -> anyhow::Result< let recipe_map: HashMap<&PackageName, &CookRecipe> = recipes.iter().map(|r| (&r.name, r)).collect(); let mut total_size: u64 = 0; + let mut total_count: u64 = 0; let mut visited: HashSet = HashSet::new(); - let roots: Vec<&CookRecipe> = recipes.iter().filter(|r| !r.is_deps).collect(); - let num_roots = roots.len(); + let num_recipes = recipes.len(); PUSH_SYSROOT_DIR.set(config.sysroot_dir.clone()).unwrap(); let handle_push_inner = move |package_name: &PackageName, _prefix: &str, _is_last: bool, entry: &WalkTreeEntry| - -> anyhow::Result<()> { + -> anyhow::Result { let r = match entry { WalkTreeEntry::Built(archive_path, _) => { let install_path = PUSH_SYSROOT_DIR.get().unwrap(); @@ -815,62 +813,41 @@ fn handle_push(recipes: &Vec, config: &CliConfig) -> anyhow::Result< package_name.name() )), WalkTreeEntry::Deduped | WalkTreeEntry::Missing => { - return Ok(()); + // does not matter + return Ok(false); } }; match r { Ok(true) => { print_cached(&CliCommand::Push, Some(package_name)); - Ok(()) + Ok(true) } Ok(false) => { print_success(&CliCommand::Push, Some(package_name)); - Ok(()) + Ok(false) } Err(e) => { print_failed(&CliCommand::Push, package_name); if get_config().cook.nonstop { - Ok(()) + Ok(true) } else { Err(e) } } } }; - if config.with_package_deps { - for (i, root) in roots.iter().enumerate() { - tree::walk_tree_entry( - &root.name, - &recipe_map, - "", - i == num_roots - 1, - false, - &mut visited, - &mut total_size, - handle_push_inner, - )?; - } - } else { - for (i, root) in roots.iter().enumerate() { - let archive_path = config - .repo_dir - .join(redoxer::target()) - .join(format!("{}.pkgar", root.name)); - let metadata = std::fs::metadata(&archive_path); - handle_push_inner( - &root.name, - "", - i == num_roots - 1, - &match metadata { - Ok(m) => { - total_size += m.len(); - visited.insert(root.name.clone()); - WalkTreeEntry::Built(&archive_path, m.len()) - } - Err(_) => WalkTreeEntry::NotBuilt, - }, - )?; - } + for (i, recipe) in recipes.iter().enumerate() { + tree::walk_tree_entry( + &recipe.name, + &recipe_map, + "", + i == num_recipes - 1, + false, + &mut visited, + &mut total_size, + &mut total_count, + handle_push_inner, + )?; } if config.cook.verbose { @@ -878,8 +855,8 @@ fn handle_push(recipes: &Vec, config: &CliConfig) -> anyhow::Result< println!( "Pushed {} of {} {}", tree::format_size(total_size), - visited.len(), - if visited.len() == 1 { + total_count, + if total_count == 1 { "package" } else { "packages" @@ -898,6 +875,7 @@ fn handle_tree( let recipe_map: HashMap<&PackageName, &CookRecipe> = recipes.iter().map(|r| (&r.name, r)).collect(); let mut total_size: u64 = 0; + let mut total_count: u64 = 0; let mut visited: HashSet = HashSet::new(); let roots: Vec<&CookRecipe> = recipes.iter().filter(|r| !r.is_deps).collect(); let num_roots = roots.len(); @@ -910,6 +888,7 @@ fn handle_tree( is_build_tree, &mut visited, &mut total_size, + &mut total_count, )?; } diff --git a/src/cook/tree.rs b/src/cook/tree.rs index f4bb935d7..a37fb29a2 100644 --- a/src/cook/tree.rs +++ b/src/cook/tree.rs @@ -24,6 +24,7 @@ pub fn display_tree_entry( is_build_tree: bool, visited: &mut HashSet, total_size: &mut u64, + total_count: &mut u64, ) -> anyhow::Result<()> { walk_tree_entry( package_name, @@ -33,6 +34,7 @@ pub fn display_tree_entry( is_build_tree, visited, total_size, + total_count, display_pkg_fn, ) } @@ -45,7 +47,8 @@ pub fn walk_tree_entry( is_build_tree: bool, visited: &mut HashSet, total_size: &mut u64, - op: fn(&PackageName, &str, bool, &WalkTreeEntry) -> anyhow::Result<()>, + total_count: &mut u64, + op: fn(&PackageName, &str, bool, &WalkTreeEntry) -> anyhow::Result, ) -> anyhow::Result<()> { let cook_recipe = match recipe_map.get(package_name) { Some(r) => r, @@ -65,21 +68,24 @@ pub fn walk_tree_entry( (Err(_), _) => WalkTreeEntry::NotBuilt, }; - op(package_name, prefix, is_last, &entry)?; + let cached = op(package_name, prefix, is_last, &entry)?; - if deduped { + if deduped || cached { return Ok(()); } visited.insert(package_name.clone()); - if is_build_tree { - if matches!(entry, WalkTreeEntry::NotBuilt) { - *total_size += 1; - } - } else { - if let WalkTreeEntry::Built(_p, pkg_size) = &entry { - *total_size += pkg_size; + if !cached { + if is_build_tree { + if matches!(entry, WalkTreeEntry::NotBuilt) { + *total_size += 1; + } + } else { + if let WalkTreeEntry::Built(_p, pkg_size) = &entry { + *total_size += pkg_size; + } } + *total_count += 1; } let pkg_meta: Package; @@ -112,6 +118,7 @@ pub fn walk_tree_entry( is_build_tree, visited, total_size, + total_count, op, )?; } @@ -124,7 +131,7 @@ pub fn display_pkg_fn( prefix: &str, is_last: bool, entry: &WalkTreeEntry, -) -> anyhow::Result<()> { +) -> anyhow::Result { let size_str = match entry { WalkTreeEntry::Built(_path_buf, size) => format!("[{}]", format_size(*size)), WalkTreeEntry::NotBuilt => "(not built)".to_string(), @@ -133,7 +140,8 @@ pub fn display_pkg_fn( }; let line_prefix = if is_last { "└── " } else { "├── " }; println!("{}{}{} {}", prefix, line_prefix, package_name, size_str); - Ok(()) + // TODO: check dirty build by checking source ident + Ok(false) } pub fn walk_file_tree(dir: &PathBuf, prefix: &str, buffer: &mut String) -> std::io::Result { From 360a6ff884f9a72cec171b5adf19e2aa3a946434 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 19 Mar 2026 16:29:15 +0700 Subject: [PATCH 4/5] Add rebuild-push --- mk/repo.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mk/repo.mk b/mk/repo.mk index a5608fc85..93d96d933 100644 --- a/mk/repo.mk +++ b/mk/repo.mk @@ -26,7 +26,7 @@ image-tree: $(FSTOOLS_TAG) $(CONTAINER_TAG) ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ else - @$(REPO_BIN) push-tree $(COOKBOOK_OPTS) --with-package-deps + @$(REPO_BIN) push-tree $(COOKBOOK_OPTS) endif # Clean specific target to all recipes, similar to repo_clean but more specific @@ -138,7 +138,7 @@ pt.%: $(FSTOOLS_TAG) FORCE ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ else - $(REPO_BIN) push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS) --with-package-deps + $(REPO_BIN) push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS) endif # Push all recipes specified by the filesystem config @@ -162,6 +162,12 @@ ifeq ($(ALLOW_FSTOOLS),1) fi endif +# Rebuild and push all recipes specified by the filesystem config +rebuild-push: $(FSTOOLS_TAG) FORCE + rm -f $(REPO_TAG) + $(MAKE) repo + $(MAKE) push + # Invoke unfetch for one or more targets separated by comma u.%: $(FSTOOLS_TAG) FORCE ifeq ($(PODMAN_BUILD),1) From 130b780b01b2f25fe764eb242338af754aa9811a Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 19 Mar 2026 18:23:53 +0700 Subject: [PATCH 5/5] Update deps --- Cargo.lock | 135 +++++------------------------------------------------ 1 file changed, 11 insertions(+), 124 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e2d991ba4..21ab09a1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -597,7 +597,6 @@ checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags", "libc", - "redox_syscall", ] [[package]] @@ -881,7 +880,7 @@ dependencies = [ [[package]] name = "redox-pkg" version = "0.3.0" -source = "git+https://gitlab.redox-os.org/redox-os/pkgutils.git#fafeff11365ad57eb7e12bd5945287ed18eab102" +source = "git+https://gitlab.redox-os.org/redox-os/pkgutils.git#e46f60d7be2341ccee2ea3cae6e7a4ac27aa8744" dependencies = [ "hex", "ignore", @@ -921,27 +920,15 @@ dependencies = [ [[package]] name = "redox_installer" version = "0.2.42" -source = "git+https://gitlab.redox-os.org/redox-os/installer.git#ed6013c2953c7e2117bd2d1c9cfd13425cb59741" +source = "git+https://gitlab.redox-os.org/redox-os/installer.git#0ace1223e41f08602d5622957d017b1ab3deac68" dependencies = [ "anyhow", "arg_parser", - "libc", - "libredox", - "ring", "serde", "serde_derive", "toml", ] -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags", -] - [[package]] name = "redox_users" version = "0.5.2" @@ -992,21 +979,6 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.16", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "rustc_version" version = "0.4.1" @@ -1134,12 +1106,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "static_assertions" version = "1.1.0" @@ -1332,12 +1298,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "version_check" version = "0.9.5" @@ -1400,7 +1360,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1421,16 +1381,7 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1448,29 +1399,13 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -1479,90 +1414,42 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - [[package]] name = "winnow" version = "0.7.14"