summaryrefslogtreecommitdiff
path: root/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_2_ab81471e6466944810906284f9a523cc._comment
blob: a9b50d8197a0521f173b7a0b2acc037064de5fdc (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
[[!comment format=mdwn
 username="picca"
 avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c"
 subject="comment 2"
 date="2017-11-27T15:50:08Z"
 content="""
Hello, joey

I try this but It ends up with an error during the compilation

    blabla' :: Property (HasInfo + DebianLike)
    blabla' = withPrivData (Password \"xxxxxxxxxxxxxx\") (Context \"yyyyyyyyyyyyy\") $ \getdata ->
      property' \"blabla\" $ \w -> getdata $ \privdata -> ensureProperty w
      (buildAndInstall (Git (\"https://toto:\" ++ (privDataVal privdata) ++ \"@xxxxxxxxxxxxxx\") Nothing \"blabla\"))

    blabla :: Property (HasInfo + DebianLike)
    blabla = withOS \"Install BlaBla Stack\" $ \w o -> case o of
            (Just (System (Debian _ Unstable) _)) -> ensureProperty w $ unstable
            (Just (System (Debian _ (Stable \"jessie\")) _)) -> ensureProperty w $ jessie
            (Just (System (Debian _ (Stable \"stretch\")) _)) -> ensureProperty w $ stretch
            _ -> error $ \"Blabla installation not yet implemented on \" ++ show o
        where
              unstable :: Property (HasInfo + DebianLike)
              unstable = propertyList \"Stretch Blabla\" $ props
                         & Apt.installed [\"python3-gpyfft\"]
                         & blabla'

              jessie :: Property (HasInfo + Debian)
              jessie = propertyList \"Jessie Blabla\" $ props
                       & Apt.installedBackport [\"cython\", \"cython3\"]
                       & Apt.installedBackport [\"python-sphinx\", \"python3-sphinx\"]
                       & buildAndInstall (Backport \"appdirs\" Nothing Nothing)
                       & buildAndInstall (Backport \"pytools\" Nothing Nothing)
                       & buildAndInstall (Backport \"pyopencl\" Nothing (Just \"nodocs\"))
                       & buildAndInstall (Backport \"clfft\" Nothing Nothing)
                       & buildAndInstall (Backport \"gpyfft\" (Just \"nostrip\") Nothing)
                       & blabla'

              stretch :: Property (HasInfo + DebianLike)
              stretch = propertyList \"Stretch Blabla\" $ props
                        & buildAndInstall (Backport \"gpyfft\" (Just \"nostrip\") Nothing)
                        & blabla'



here the error

    src/propellor-config.hs:810:60-75: error:
    • Couldn't match type ‘'False’ with ‘'True’
        arising from a use of ‘ensureProperty’
    • In the expression: ensureProperty w
      In the expression: ensureProperty w $ unstable
      In a case alternative:
          (Just (System (Debian _ (Unstable)) _))
            -> ensureProperty w $ stretch

It seems to me that this is an error with the HasInfo, but I could not manage to solve this problem by myself.

do you have a Idea in ordert o solve this ?

thanks

Frederic


"""]]