fix(fedora): AS_DEPENDENCY and package_info
Set SUPPORTS_AS_DEPENDENCY and rewrite show_package_info for dnf Signed-off-by: innocentzero <isfarulhaque@proton.me>
This commit is contained in:
@@ -23,6 +23,7 @@ const SWITCHES_MAKE_DEPENDENCY: Switches = &[];
|
|||||||
const SWITCHES_NOCONFIRM: Switches = &["--assumeyes"];
|
const SWITCHES_NOCONFIRM: Switches = &["--assumeyes"];
|
||||||
const SWITCHES_REMOVE: Switches = &["remove"];
|
const SWITCHES_REMOVE: Switches = &["remove"];
|
||||||
|
|
||||||
|
const SUPPORTS_AS_DEPENDENCY: bool = false;
|
||||||
|
|
||||||
const SWITCHES_FETCH_USER: Switches = &[
|
const SWITCHES_FETCH_USER: Switches = &[
|
||||||
"repoquery",
|
"repoquery",
|
||||||
@@ -38,7 +39,6 @@ const SWITCHES_FETCH_GLOBAL: Switches = &[
|
|||||||
"%{from_repo}/%{name}",
|
"%{from_repo}/%{name}",
|
||||||
];
|
];
|
||||||
|
|
||||||
const SUPPORTS_AS_DEPENDENCY: bool = true;
|
|
||||||
/// fill stuff here
|
/// fill stuff here
|
||||||
const DEFAULT_REPOS: [&str; 5] = ["koji", "fedora", "updates", "anaconda", "@"];
|
const DEFAULT_REPOS: [&str; 5] = ["koji", "fedora", "updates", "anaconda", "@"];
|
||||||
|
|
||||||
@@ -105,6 +105,14 @@ impl Backend for Fedora {
|
|||||||
run_external_command(cmd)
|
run_external_command(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn show_package_info(&self, package: &Package) -> Result<()> {
|
||||||
|
let mut cmd = Command::new(self.get_binary());
|
||||||
|
cmd.args(self.get_switches_info());
|
||||||
|
cmd.arg(&package.name);
|
||||||
|
|
||||||
|
run_external_command(cmd)
|
||||||
|
}
|
||||||
|
|
||||||
fn make_dependency(&self, _: &[Package]) -> Result<()> {
|
fn make_dependency(&self, _: &[Package]) -> Result<()> {
|
||||||
panic!("Not supported by the package manager!")
|
panic!("Not supported by the package manager!")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user