-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upstream some Alpm
methods
#30
base: master
Are you sure you want to change the base?
Conversation
Right. I don't really know how this ended up like this. I think I have have just been experimenting and accidentally committed the file I don't know. |
alpm-utils/src/alpm.rs
Outdated
/// | ||
/// An orphan is a package that was installed as a dependency, but whose parent | ||
/// package is no longer installed. | ||
pub fn orphans(alpm: &Alpm) -> impl Iterator<Item = Package<'_>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too opinionated to belong here IMO. This won't watch dependency cycles, an issue pacman also suffers from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
required_by
wouldn't be enough to cover the cyclic dependency case?
name: S, | ||
version: V, | ||
) -> bool { | ||
pub fn satisfies_dep<S: AsRef<str>, V: AsRef<Ver>>(dep: impl AsDep, name: S, version: V) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you got some custom cargo fmt config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't, but the last changes to these lines occurred in 2019, so there's a chance that rustfmt
changed since then.
Looks like my email message didn't get delivered to the PR for some reason. Oh well. Anyway I was on vacation for a few days; fixing this now. |
Should be good to go now. |
Is this okay to merge? |
Any further thoughts? |
alpm-utils/src/alpm.rs
Outdated
pub trait AlpmExt { | ||
fn find_local_satisfier<S: Into<String>>(&self, pkg: S) -> Result<Option<Package>>; | ||
} | ||
/// All official packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no concept off "official" packages. Comment should describe the concept of packages that can also be found in a syncdb.
alpm-utils/src/alpm.rs
Outdated
return Ok(Some(alpm_pkg)); | ||
} | ||
} | ||
/// All foreign packages as an `Iterator`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above but the opposite.
Sorry bit busy. Also you removed the alpmext trait (even though it was dead code anyway). I think the trait should remain and these methods be on it. Especially if one day I wish to add these functions back. |
Roger, no problem. Busy here too, settling into a new job in a new country. |
Hey Morgan, just out of town for a few days, I’ll fix this up once I’m back.
iPhoneから送信
… 2022/08/20 18:34、Lulu ***@***.***>のメール:
Right. I don't really know how this ended up like this. I think I have have just been experimenting and accidentally committed the file I don't know.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
This required fixing `find_local_satisfier` which wasn't compiling. This module had been previously left out of the module tree, so the broken code was never compiled and thus never detected.
And rename a few functions.
This required implementing some custom iterator structs, since `impl Foo` is not allowed for the return types of trait methods.
ff025a5
to
4be3dee
Compare
Finally updated! |
This PR upstreams some local functionality I've had for a while, but it's better suited to live here than in Aura.