9 Commits

Author SHA1 Message Date
90feca00b6 default to Eapi 0 if no eapi file exists
All checks were successful
Gentoo Utils / build-oci-image (pull_request) Successful in 9s
Gentoo Utils / build (pull_request) Successful in 36s
2025-12-11 23:50:12 +00:00
71e413b986 add docs to profile module 2025-12-11 23:49:16 +00:00
12d70664a4 read deprecated file in profiles 2025-12-11 23:49:16 +00:00
607da348af read eapi file in profiles 2025-12-11 23:49:16 +00:00
25ebcd10da add profile related source files to sources variable 2025-12-11 23:49:16 +00:00
f86b1dbf84 impl profile evaluation 2025-12-11 23:49:16 +00:00
8fabd409ad fix warnings in src/atom/mod.rs
All checks were successful
Gentoo Utils / build-oci-image (pull_request) Successful in 9s
Gentoo Utils / build (pull_request) Successful in 32s
Gentoo Utils / build-oci-image (push) Successful in 9s
Gentoo Utils / build (push) Successful in 33s
2025-12-11 21:57:59 +00:00
031dd71cf3 fix warnings in fuzzers 2025-12-11 21:55:12 +00:00
a8e2bfbb3c commit rust-project.json
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 8s
Gentoo Utils / build (push) Successful in 34s
2025-12-11 21:51:45 +00:00
5 changed files with 10 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
#![deny(unused_imports)]
#![allow(clippy::missing_safety_doc)]
use core::slice;

View File

@@ -1,9 +1,8 @@
#![deny(unused_imports)]
use core::slice;
use gentoo_utils::{
Parseable,
atom::{Atom, Version},
};
use mon::{Parser, ParserFinishedError, input::InputIter};
use gentoo_utils::{Parseable, atom::Version};
use mon::{Parser, input::InputIter};
use std::{
cmp::Ordering,
io::{BufRead, BufReader, Write},

1
rust-project.json Symbolic link
View File

@@ -0,0 +1 @@
build/rust-project.json

View File

@@ -646,14 +646,6 @@ mod test {
use crate::Parseable;
macro_rules! assert_eq_display {
($a:expr, $b:expr) => {
if $a != $b {
panic!("{} != {}", $a, $b);
}
};
}
macro_rules! assert_cmp_display {
($a:expr, $b:expr, $ordering:expr) => {
if $a.cmp(&$b) != $ordering {
@@ -768,6 +760,7 @@ mod test {
.parse_finished(InputIter::new("1.2.0a_alpha1_beta2-r1-8"))
.unwrap();
#[allow(clippy::single_element_loop)]
for (version_str, expected) in [("1.2.0", Ordering::Greater)] {
let version = Version::parser()
.parse_finished(InputIter::new(version_str))

View File

@@ -64,7 +64,7 @@ pub enum Error {
pub struct Profile {
#[get(kind = "deref")]
path: PathBuf,
eapi: Option<Eapi>,
eapi: Eapi,
deprecated: Option<String>,
#[get(kind = "deref")]
parents: Vec<Profile>,
@@ -108,9 +108,9 @@ impl Profile {
let eapi = match fs::read_to_string(&eapi_path)
.map(|s| Eapi::parse(s.trim()).map_err(str::to_string))
{
Ok(Ok(eapi)) => Some(eapi),
Ok(Ok(eapi)) => eapi,
Ok(Err(rest)) => return Err(Error::Parser(rest)),
Err(e) if matches!(e.kind(), io::ErrorKind::NotFound) => None,
Err(e) if matches!(e.kind(), io::ErrorKind::NotFound) => Eapi::parse("0").unwrap(),
Err(e) => return Err(Error::Io(eapi_path, e)),
};