Commit Graph
559 Commits
Author SHA1 Message Date
steven-omaha 9ce6dfb3ce doc(issue-template): reproduction, formatting 2024-04-03 11:54:57 +02:00
steven-omaha 5ddc33a355 doc(issue-template): add bug report form 2024-04-03 11:42:01 +02:00
steven-omaha 743c9555bc doc(README): rustup 2024-04-03 09:44:19 +02:00
innocentzero cddb471719 chore(README): Update README with Rustup details
Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-03 06:35:40 +05:30
steven-omaha 94146e3c4c ci: build binary on release
Upon release of a new version, automatically build a separate version of
pacdef for each backend that requires a feature flag. Attach all the
artifacts to the Github release.

Implemented by @thechubbypanda. Fixes #58. PR in #63.
2024-04-02 22:36:10 +02:00
Keval Kapdee efe19d4e61 Fix tarball 2024-04-02 19:24:13 +01:00
innocentzero c9136a7941 chore(README): Update README with rustup
Update the README with information about rustup support, in particular
the different group file syntax.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 19:42:29 +05:30
steven-omaha 631a9afb7f feat(rustup): add rustup backend
This commit adds support for rustup and was provided by @InnocentZero.
The main change under the hood is that rustup packages require up to
three path elements, either 'toolchain/<VERSION>' or
'component/<VERSION>/<component>', where <VERSION> can be stable,
nightly, or any explicit rust version. This change was facilitated by
making Package::repo crate-public.

The README still needs to be updated.

Related to #54. Merges #55.
2024-04-02 15:04:34 +02:00
innocentzero a5a0765928 fix(rustup): Fix individual component uninstall
Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 17:36:00 +05:30
innocentzero 75709a7ed9 refact(rustup): Use match statements and bail
Use match statements for Option types and use bail! macro to utilize
recoverable errors.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:58:19 +05:30
innocentzero fd47659959 refact(rustup): Use bail instead of panic
Use anyhow::bail to return an Err type instead of panicking and exiting
the program.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero 6f92e66777 refact(rustup): Use RepoType instead of strings
Use RepoType enums instead of strings to match in various places.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero fc83c43997 refact(packaging): remove unused function
Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero 0c731fa54b refact(rustup): Apply clippy suggestions
Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero ff25f2f55d refact(rustup): Refactor component installation
Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero c03baf221f refact(rustup): change methods to functions
Remove the methods that don't require access to the backend into
separate functions rather than have them as methods.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero a963d6a2db refact(rustup): Remove clippy warnings
Clippy warnings were not enabled at the time of the previous commits.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero c7596f62b7 refact(rustup): Use anyhow::Error
Remove repeated instances of anyhow::Error and make the code sparser.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero 4e2ef50df7 fix(rustup): remove standalone components
This patch targets the removal of standalone components that are not
removed as a part of a toolchain. This was previously ignored.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero 97b4077b02 feat(rustup): Remove packages
Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero f9528241e7 refact(rustup): Refector install_packages
Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero fbedd6da49 feat(rustup): install packages
Rustup is now able to install toolchains and
components and works with multiple toolchains and
components for each toolchain.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero ea2c51620a refact(rustup): fetch installed toolchains and components
Refactor the functions used for fetching installed
components and toolchains.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero d4551a6a2b feat(rustup): add rustup as a module 2024-04-02 04:51:15 +05:30
innocentzero 1ad93cec96 refact(package.rs): Expose repo field publicly
Expose repo field publicly for install_packages in
rustup backend to utilize, otherwise very ugly
hacks need to be used to handle toolchains and
components.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
innocentzero ccd108591f feat(rustup): Add rustup as a backend
Adds rustup as a backend for pacdef. Only works on
components listed for now.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-04-02 04:51:15 +05:30
steven-omaha 8cc4791a9c doc: bump MSRV to 1.74
required by clap
2024-04-01 14:21:25 +02:00
steven-omaha afa8e7f55a doc: remove invalid link 2024-04-01 14:08:58 +02:00
steven-omaha 9767cc374d doc: minimum supported apt version 2024-04-01 14:08:45 +02:00
steven-omaha e37cf03349 ci: enable tests for all features 2024-04-01 14:01:17 +02:00
steven-omaha 6bba968897 ci: build, clippy for all features 2024-04-01 13:58:21 +02:00
steven-omaha 9f6f758a8d ci: fail on any clippy warning 2024-04-01 13:31:26 +02:00
Keval Kapdee fe260fe515 Add git 2024-03-28 16:50:05 +00:00
Keval Kapdee 73d21ae7f5 Update upload action version 2024-03-28 16:50:05 +00:00
Keval Kapdee c3aaf5ffbd More spelling 2024-03-28 16:50:05 +00:00
Keval Kapdee 8caad2ae5a Spelling mistake 2024-03-28 16:50:05 +00:00
Keval Kapdee c06626663e Default features and install apt 2024-03-28 16:50:05 +00:00
Keval Kapdee cd5e0a800a Remove bad install 2024-03-28 16:50:05 +00:00
Keval Kapdee ddfeb58264 Libalpm 2024-03-28 16:50:05 +00:00
Keval Kapdee 3b7ddf5331 Simpler setup 2024-03-28 16:50:05 +00:00
Keval Kapdee 8097b2f6a3 Switch back to ubuntu runner 2024-03-28 16:50:05 +00:00
Keval Kapdee 7853098460 Fix syntax 2024-03-28 16:50:05 +00:00
Keval Kapdee 54a95b7722 Matrix over feature flags 2024-03-28 16:50:05 +00:00
Keval Kapdee 2cd6baca1e Release action 2024-03-28 16:50:05 +00:00
steven-omaha 3f8468c660 fix(debian): build against rust-apt-0.7.0
1bcb7f8 bumped rust-apt from 0.5 to 0.7. This change made
Cache::packages(&self, &sort) a fallible function. The required change in
the Debian backend was missed.

This commit propagates the error in get_all_installed_packages and
get_explicitly_installed_packages for the Debian backend.

Fixes #64.
2024-03-26 14:22:00 +01:00
steven-omaha 4b7a497dda fix(review): typo 2024-03-24 20:57:32 +01:00
steven-omaha 34afcb0fd1 feat(review): add 'apply' reply
Add the 'a(p)ply' part to the review prompt, which applies all actions
that were put in so far. When the user has too many packages to review,
this allows them to process the packages in chunks of arbitrary sizes.

Related to #36.
2024-03-24 19:17:35 +01:00
Mike Lloyd ad624bce70 Add 'apply' option to review 2024-03-23 23:34:36 -07:00
star-szr e1354438bb fix: minor typo in review text 2024-03-21 12:05:07 -04:00
steven-omaha 52f615324a chore: Release 2024-03-20 11:32:29 +01:00