Преглед на файлове

Do not use `[roots]` in example `[tokens]`

Use of `[roots]` in `[tokens]` is tricky, because final value of a
`[roots:foo]` will "silently" depend on DESTDIR, while DESTDIR is
only known during install time.  On the other hand, `[tokens]` are used only
during build time.

In other words, YOU CANNOT RELY on the value of keys in `[roots]` to be
consistent.  For example, consider root:

    [roots]
        foo = /bar
        qux = [ENV:PREFIX]:/quux

`[roots:foo]` will be '/bar' at build time, but "$DESTDIR/bar" at
install time, and `[roots:qux]` will be "$PREFIX/quux" at build time,
but "$DESTDIR/$PREFIX/quux" at install time.

Just about only case when you might want to use it is mentioning it in
a document, when you want the value to be rather "standard" than
"correct", while you still want to respect PREFIX.

So let's not lead new users directly into that rabbit hole.
Alois Mahdal преди 7 години
родител
ревизия
950293c86c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1
    1
      src/stub

+ 1
- 1
src/stub Целия файл

@@ -106,7 +106,7 @@ deploy() {
106 106
                 echo "    doc     = [ENV:PREFIX]/share/doc/$PackageName"
107 107
                 echo ""
108 108
                 echo "[tokens]"
109
-                echo "    __BIN_DIR__ = [roots:bin]"
109
+                echo "    __${PackageName^^}_FOO__ = Barr.."
110 110
                 echo ""
111 111
                 echo "[modes]"
112 112
                 echo "    bin     = 755"