Skip to content

Commit

Permalink
eclass: Update for RUST_DEPEND
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Nov 22, 2024
1 parent c32c3d4 commit e4bbab1
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/pkgcheck/checks/eclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ class RubyMissingDeps(results.VersionResult, results.Warning):


class RustMissingDeps(results.VersionResult, results.Warning):
"""Package sets ``CARGO_OPTIONAL`` but does not depend on ``virtual/rust``."""
"""Package sets ``CARGO_OPTIONAL`` but does not use ``${RUST_DEPEND}``."""

desc = "sets CARGO_OPTIONAL but does not depend on virtual/rust"
desc = "sets CARGO_OPTIONAL but does not use ${RUST_DEPEND}"


class TmpfilesMissingDeps(results.VersionResult, results.Warning):
Expand All @@ -542,7 +542,7 @@ class EclassManualDepsCheck(Check):

dependencies = (
# eclass, variable, one of deps, class
("cargo", "CARGO_OPTIONAL", {"virtual/rust"}, RustMissingDeps),
("cargo", "CARGO_OPTIONAL", {"dev-lang/rust", "dev-lang/rust-bin"}, RustMissingDeps),
("go-module", "GO_OPTIONAL", {"dev-lang/go"}, GoMissingDeps),
(
"ruby-ng",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ diff -Naur standalone/EclassManualDepsCheck/RustMissingDeps/RustMissingDeps-1.eb
LICENSE="BSD"
SLOT="0"
+
+BDEPEND="virtual/rust"
+BDEPEND="${RUST_DEPEND}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DESCRIPTION="Stub ebuild"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD"
SLOT="${PV}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DESCRIPTION="Stub ebuild"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD"
SLOT="${PV}"
4 changes: 4 additions & 0 deletions testdata/repos/standalone/dev-lang/rust/rust-1.81.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DESCRIPTION="Stub ebuild"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD"
SLOT="${PV}"
4 changes: 4 additions & 0 deletions testdata/repos/standalone/dev-lang/rust/rust-1.82.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DESCRIPTION="Stub ebuild"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD"
SLOT="${PV}"
2 changes: 2 additions & 0 deletions testdata/repos/standalone/eclass/cargo.eclass
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# cargo eclass

inherit rust

CARGO_CRATE_URIS=${CRATES}

cargo_crate_uris() { :; }
10 changes: 10 additions & 0 deletions testdata/repos/standalone/eclass/rust.eclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# rust eclass

RUST_DEPEND="
|| (
dev-lang/rust-bin:1.82.0
dev-lang/rust:1.82.0
dev-lang/rust-bin:1.81.0
dev-lang/rust:1.81.0
)
"
2 changes: 0 additions & 2 deletions testdata/repos/standalone/virtual/rust/rust-0.ebuild

This file was deleted.

0 comments on commit e4bbab1

Please sign in to comment.