mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-03 06:38:52 +00:00
fix: switch to searching for the xml for deb based distros
This commit is contained in:
parent
0adf894b45
commit
4767a4eb13
2 changed files with 8 additions and 2 deletions
|
@ -16,6 +16,7 @@ pub enum DepType {
|
||||||
Executable,
|
Executable,
|
||||||
Include,
|
Include,
|
||||||
UdevRule,
|
UdevRule,
|
||||||
|
Share,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
@ -49,6 +50,7 @@ impl Dependency {
|
||||||
.collect(),
|
.collect(),
|
||||||
DepType::Include => include_paths(),
|
DepType::Include => include_paths(),
|
||||||
DepType::UdevRule => udev_rules_paths(),
|
DepType::UdevRule => udev_rules_paths(),
|
||||||
|
DepType::Share => share_paths(),
|
||||||
} {
|
} {
|
||||||
let path_s = &format!("{dir}/{fname}", dir = dir, fname = self.filename);
|
let path_s = &format!("{dir}/{fname}", dir = dir, fname = self.filename);
|
||||||
let path = Path::new(&path_s);
|
let path = Path::new(&path_s);
|
||||||
|
@ -145,6 +147,10 @@ fn udev_rules_paths() -> Vec<String> {
|
||||||
vec!["/usr/lib/udev/rules.d".into()]
|
vec!["/usr/lib/udev/rules.d".into()]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn share_paths() -> Vec<String> {
|
||||||
|
vec!["/usr/share".into()]
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::{DepType, Dependency};
|
use super::{DepType, Dependency};
|
||||||
|
|
|
@ -32,8 +32,8 @@ fn monado_deps() -> Vec<Dependency> {
|
||||||
},
|
},
|
||||||
Dependency {
|
Dependency {
|
||||||
name: "wayland-protocols".into(),
|
name: "wayland-protocols".into(),
|
||||||
dep_type: DepType::Include,
|
dep_type: DepType::Share,
|
||||||
filename: "wayland-protocols/drm-lease-v1-enum.h".into(),
|
filename: "wayland-protocols/staging/drm-lease/drm-lease-v1.xml".into(),
|
||||||
packages: HashMap::from([
|
packages: HashMap::from([
|
||||||
(LinuxDistro::Arch, "wayland-protocols".into()),
|
(LinuxDistro::Arch, "wayland-protocols".into()),
|
||||||
(LinuxDistro::Debian, "wayland-protocols".into()),
|
(LinuxDistro::Debian, "wayland-protocols".into()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue