Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/action_list.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use crate::alpm_wrapper::new_alpm_wrapper;

pub fn list_real() {
let alpm = new_alpm_wrapper();
let packages = match alpm.get_non_pacman_packages() {
Ok(packages) => packages,
Err(err) => {
eprintln!("Error: {}", err);
return;
}
};
for (name, version) in packages.iter() {
println!("{} {}", name, version);
}
}
2 changes: 2 additions & 0 deletions src/cli_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ Sources are downloaded using .SRCINFO only"
#[structopt(help = "Archive to check", required = true)]
target: PathBuf,
},
#[structopt(about = "List packages installed with rua")]
List,
#[structopt(
about = "Upgrade AUR packages. To ignore packages, add them to IgnorePkg in /etc/pacman.conf"
)]
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mod action_builddir;
mod action_install;
mod action_list;
mod action_search;
mod action_upgrade;
mod alpm_wrapper;
Expand Down Expand Up @@ -66,6 +67,9 @@ fn main() {
);
eprintln!("Finished checking package: {:?}", target);
}
Action::List => {
action_list::list_real();
}
Action::Upgrade {
devel,
printonly,
Expand Down