aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-01-15 20:51:16 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2023-01-15 20:51:25 +0200
commit826c474777a1f0ff1c1051dbbf7196116e5a8cc9 (patch)
tree46d5bfd775de5f14016982d3795139e73bd01d17 /testdata
parentVariableScopeCheck: Disallow D and ED in pkg_postinst (diff)
downloadpkgcheck-826c474777a1f0ff1c1051dbbf7196116e5a8cc9.tar.gz
pkgcheck-826c474777a1f0ff1c1051dbbf7196116e5a8cc9.tar.bz2
pkgcheck-826c474777a1f0ff1c1051dbbf7196116e5a8cc9.zip
ProfilesCheck: check for unknown ARCH in make.defaults
Related: https://github.com/pkgcore/pkgcheck/issues/524 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'testdata')
-rw-r--r--testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/expected.json1
-rw-r--r--testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/fix.patch6
-rw-r--r--testdata/repos/profiledir/profiles/profiles.desc1
-rw-r--r--testdata/repos/profiledir/profiles/unknown_arch/eapi1
-rw-r--r--testdata/repos/profiledir/profiles/unknown_arch/make.defaults1
5 files changed, 10 insertions, 0 deletions
diff --git a/testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/expected.json b/testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/expected.json
new file mode 100644
index 00000000..17c7329f
--- /dev/null
+++ b/testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/expected.json
@@ -0,0 +1 @@
+{"__class__": "UnknownProfileArch", "path": "unknown_arch/make.defaults", "arch": "unknown"}
diff --git a/testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/fix.patch b/testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/fix.patch
new file mode 100644
index 00000000..87aa24a0
--- /dev/null
+++ b/testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/fix.patch
@@ -0,0 +1,6 @@
+diff -Naur profiledir/profiles/unknown_arch/make.defaults fixed/profiles/unknown_arch/make.defaults
+--- profiledir/profiles/unknown_arch/make.defaults 2019-11-12 20:35:43.195830784 -0700
++++ fixed/profiles/unknown_arch/make.defaults 2019-11-12 20:45:16.582848028 -0700
+@@ -1 +1 @@
+-ARCH="unknown"
++ARCH="amd64"
diff --git a/testdata/repos/profiledir/profiles/profiles.desc b/testdata/repos/profiledir/profiles/profiles.desc
index 53c9769b..eb18a172 100644
--- a/testdata/repos/profiledir/profiles/profiles.desc
+++ b/testdata/repos/profiledir/profiles/profiles.desc
@@ -6,6 +6,7 @@ amd64 nonexistent exp
amd64 unknown_pkgs exp
amd64 unknown_kwds exp
amd64 unmatched_unmasks exp
+amd64 unknown_arch exp
amd64 unknown_use exp
amd64 unknown_use/unknown_stable_use exp
diff --git a/testdata/repos/profiledir/profiles/unknown_arch/eapi b/testdata/repos/profiledir/profiles/unknown_arch/eapi
new file mode 100644
index 00000000..b8626c4c
--- /dev/null
+++ b/testdata/repos/profiledir/profiles/unknown_arch/eapi
@@ -0,0 +1 @@
+4
diff --git a/testdata/repos/profiledir/profiles/unknown_arch/make.defaults b/testdata/repos/profiledir/profiles/unknown_arch/make.defaults
new file mode 100644
index 00000000..54c1ff77
--- /dev/null
+++ b/testdata/repos/profiledir/profiles/unknown_arch/make.defaults
@@ -0,0 +1 @@
+ARCH="unknown"