aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/resolver_TEST_suggestions_setup.sh
blob: 58b6695a5ab5d2f2edc9faee6973891f5a5e6db0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :

mkdir resolver_TEST_suggestions_dir || exit 1
cd resolver_TEST_suggestions_dir || exit 1

mkdir -p build
mkdir -p distdir
mkdir -p installed

mkdir -p repo/{profiles/profile,metadata}

cd repo
echo "repo" > profiles/repo_name
: > metadata/categories.conf

# suggestion
echo 'suggestion' >> metadata/categories.conf

mkdir -p 'packages/suggestion/target'
cat <<END > packages/suggestion/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    ( suggestion: suggestion/dep )
    "
END

mkdir -p 'packages/suggestion/dep'
cat <<END > packages/suggestion/dep/dep-1.exheres-0
SUMMARY="dep"
PLATFORMS="test"
SLOT="0"
END

# unmeetable-suggestion
echo 'unmeetable-suggestion' >> metadata/categories.conf

mkdir -p 'packages/unmeetable-suggestion/target'
cat <<END > packages/unmeetable-suggestion/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    ( suggestion: unmeetable-suggestion/unmeetable-dep )
    "
END

mkdir -p 'packages/unmeetable-suggestion/unmeetable-dep'
cat <<END > packages/unmeetable-suggestion/unmeetable-dep/unmeetable-dep-1.exheres-0
SUMMARY="unmeetable dep"
PLATFORMS=""
SLOT="0"
END

# suggestion-then-dependency
echo 'suggestion-then-dependency' >> metadata/categories.conf

mkdir -p 'packages/suggestion-then-dependency/target'
cat <<END > packages/suggestion-then-dependency/target/target-1.exheres-0
SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    ( build: suggestion-then-dependency/hard-dep )
    ( suggestion: suggestion-then-dependency/a-suggested-dep )
    "
END

mkdir -p 'packages/suggestion-then-dependency/hard-dep'
cat <<END > packages/suggestion-then-dependency/hard-dep/hard-dep-1.exheres-0
SUMMARY="hard dep"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
    build: suggestion-then-dependency/a-suggested-dep
    "
END

mkdir -p 'packages/suggestion-then-dependency/a-suggested-dep'
cat <<END > packages/suggestion-then-dependency/a-suggested-dep/a-suggested-dep-1.exheres-0
SUMMARY="suggested dep"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES=""
END

cd ..