Commit Graph
50 Commits
Author SHA1 Message Date
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
innocentzero 34a428f280 refactor(minor code changes) 2024-01-28 03:11:41 +05:30
innocentzero fb21691e64 fix(remove collection of dependencies)
https://github.com/steven-omaha/pacdef/pull/50#issuecomment-1912284202

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-01-27 23:52:48 +05:30
innocentzero b8cfd9e24f feat(pipx support): Fully supports pipx features
Now able to support packages installed via pipx with the exception of
packages that do not provide a binary themselves. Install those
explicitly via `pipx install --include-deps <package>`.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-01-27 23:35:37 +05:30
innocentzero 2a7c5d5288 FIX refactored switches and output parsing
Removed inlined switches to a separate function for both explicit
installs and all installs and added a match statement to parse the
outputs accordingly.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-01-25 11:52:16 +05:30
innocentzero 242af523b4 FIX iterate through json generated by pipx
While it is now able to iterate through JSON created by pipx, it is
unable to read the JSON with the error `EOF while parsing a value
at line 1 column 0`

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-01-24 20:21:05 +05:30
innocentzero 050a844bc2 feat(pipx support): Add support for pipx
This is a series of commits intended to add support for pipx in pacdef.
WIP.

Signed-off-by: innocentzero <isfarulhaque@proton.me>
2024-01-23 20:42:54 +05:30
theo court c59f22a427 Fix typo 2023-08-07 18:04:24 +02:00
steven-omaha 3b8e8c180f fix(rust): handle missing crates file
When no packages have been installed yet using cargo-install, the rust
backend has errored out until now when trying to load the file. If the
file does not exist, we assume it is empty and that no packages have
been installed for cargo.
2023-05-31 13:08:46 +02:00
steven-omaha b6c2ccaf48 refact(backend): make macro crate-public 2023-05-22 12:33:25 +02:00
steven-omaha 4a1d67847e fix: don't overwrite config file
So far we have written a default config file if we encountered any error
when trying to read the one that should exist. That included:
* missing key-value-pairs,
* empty file, and
* a non-existant file.

Therefore, when a field is added to the Config struct, the entire config
file was overwritten with a default config. This occured during #20.

Instead, we now provide default values in form of generator functions to
serde. Any value that is present in the config is then parsed and
replaces the default value. Only if the config file does not exist we
create an empty one.

Closes #26.
2023-05-19 17:41:33 +02:00
steven-omaha e74368df7f docs(grouping): add docstrings 2023-05-19 16:05:27 +02:00
steven-omaha 40fb1066e8 fix: privilege escalation for debian (#25) 2023-05-17 14:23:08 +02:00
teackot 54acb132b5 Revert the switches_runtime change; implement flatpak-specific functions. 2023-05-16 20:15:10 +03:00
teackot a38a1865f5 Alphabetical order 2023-05-16 19:48:54 +03:00
teackot 39496e836e Fix formatting 2023-05-16 19:42:53 +03:00
teackot 0d509fdfa6 Remove the unnecessary flatpak feature flag 2023-05-16 19:22:56 +03:00
teackot b413ef00be Merge branch 'flatpak-per-user' into flatpak-backend 2023-05-16 19:08:15 +03:00
teackot a017a4ee75 Implement flatpak_systemwide option 2023-05-16 19:07:39 +03:00
teackot d559edc577 Fix flatpak-list skipping the first entry 2023-05-16 18:35:20 +03:00
teackot 6f10c789eb Add flatpak_systemwide option 2023-05-16 18:32:29 +03:00
teackot d03c338503 Support flatpak info 2023-05-16 16:58:18 +03:00
teackot 3f239795b7 Add the ability to list installed flatpaks 2023-05-16 14:28:20 +03:00
teackot 26352160be Add a minimal flatpak backend 2023-05-16 12:11:23 +03:00
steven-omaha 7d9f444ea6 feat: implement --noconfirm 2023-05-12 16:05:49 +02:00
steven-omaha 12c9a743ff docs: add docstrings to two methods 2023-04-28 14:28:17 +02:00
steven-omaha 4fe412ffca refact(backend): use sort_unstable 2023-03-29 14:20:03 +02:00
steven-omaha b01d5ea9df refact(python): replace unwrap 2023-03-29 14:18:51 +02:00
steven-omaha 9b8f2712d3 refact(backend): get_group_packages_map 2023-03-17 17:01:21 +01:00
steven-omaha c27eb35575 docs: add panics section 2023-03-16 15:32:38 +01:00
steven-omaha f79fad454c refact(backend): remove dead code 2023-03-03 17:58:17 +01:00
steven-omaha e164416d33 docs: complete Backend trait 2023-03-03 17:57:05 +01:00
steven-omaha 83865e21e9 fix(review): as dependency using wrong binary
The order of Backend::{get_binary,get_binary_inner} was wrong.
The binary was actually never overwritten.
2023-03-03 17:32:34 +01:00
steven-omaha 9827fcc28f panic on {Rust,Python}::make_dependency 2023-02-28 14:37:32 +01:00
steven-omaha e3e193f7e1 disable 'as dependency' if backend does not support it 2023-02-27 19:54:52 +01:00
steven-omaha 184f86ebae add python support 2023-02-27 19:39:25 +01:00
steven-omaha 7c4741753e add debian backend 2023-02-27 17:21:56 +01:00
steven-omaha 0affcff900 make arch an optional backend 2023-02-27 16:12:46 +01:00
steven-omaha c700784d52 rename Backend::as_any to as_any_mut 2023-02-23 15:37:43 +01:00
steven-omaha e7177364dd make todo use section for reporting 2023-02-23 15:33:05 +01:00
steven-omaha 2b7c2b39a6 make arch report actual binary in use 2023-02-23 15:32:55 +01:00
steven-omaha 4a0ced581d clean up overwriting arch config 2023-02-23 15:32:02 +01:00
steven-omaha ee4fd5da37 use downcasting for configuring backend objects 2023-02-23 14:23:04 +01:00
steven-omaha 6e52b6d3d9 add clippy::map_entry 2023-02-15 17:39:55 +01:00
steven-omaha 947101eb07 rename backend from pacman to arch 2023-02-15 10:51:52 +01:00
steven-omaha 5bf662dbc4 clean up imports 2023-02-14 17:16:24 +01:00
steven-omaha 2a3fc57014 fix formatting for sync, clean, unmanaged 2023-02-14 15:51:35 +01:00
steven-omaha c490c660b4 add missing docs 2023-02-14 15:01:01 +01:00
steven-omaha 38a44f1745 fix some pedantic lints 2023-02-14 14:02:37 +01:00
steven-omaha e7cb7d9321 rename all crates 2023-02-14 13:12:08 +01:00