2 ===================================================================
3 RCS file: /cvsroot/poldek/poldek/conf.c,v
4 retrieving revision 1.84
6 --- conf.c 27 Jun 2007 21:47:43 -0000 1.84
7 +++ conf.c 28 Jun 2007 15:47:04 -0000
9 addparam_flags |= ADD_PARAM_FOREIGN;
12 + if (flags & POLDEK_LDCONF_NOVALIDATE)
15 if (flags & POLDEK_LDCONF_UPDATE)
19 ===================================================================
20 RCS file: /cvsroot/poldek/poldek/conf.h,v
21 retrieving revision 1.18
23 --- conf.h 27 Jun 2007 00:44:47 -0000 1.18
24 +++ conf.h 28 Jun 2007 15:47:04 -0000
26 #include <trurl/narray.h>
27 #include <trurl/nhash.h>
29 -#define POLDEK_LDCONF_FOREIGN (1 << 0) /* not a poldek file */
30 -#define POLDEK_LDCONF_UPDATE (1 << 1) /* resync with remote config */
31 -#define POLDEK_LDCONF_NOINCLUDE (1 << 2) /* ignore %include directives */
32 -#define POLDEK_LDCONF_GLOBALONLY (1 << 9) /* for early cachedir setup */
33 +#define POLDEK_LDCONF_FOREIGN (1 << 0) /* not a poldek config file */
34 +#define POLDEK_LDCONF_NOVALIDATE (1 << 1) /* do not validate config variables */
35 +#define POLDEK_LDCONF_UPDATE (1 << 2) /* resync with remote config */
36 +#define POLDEK_LDCONF_NOINCLUDE (1 << 3) /* ignore %include directives */
37 +#define POLDEK_LDCONF_GLOBALONLY (1 << 4) /* for early cachedir setup */
39 /* default localization is used if path is NULL */
40 tn_hash *poldek_conf_load(const char *path, unsigned flags);
42 ===================================================================
43 RCS file: /cvsroot/poldek/poldek/cli/main.c,v
44 retrieving revision 1.56
46 --- cli/main.c 27 Jun 2007 00:44:47 -0000 1.56
47 +++ cli/main.c 28 Jun 2007 15:47:05 -0000
49 } else if (noautosu == 0 && getuid() == 0) { /* check config's runas */
52 - cnf = poldek_conf_load_default(POLDEK_LDCONF_NOINCLUDE | POLDEK_LDCONF_FOREIGN);
53 + cnf = poldek_conf_load_default(POLDEK_LDCONF_GLOBALONLY |
54 + POLDEK_LDCONF_NOVALIDATE);
58 Index: tests/sh/04-conf
59 ===================================================================
60 RCS file: /cvsroot/poldek/poldek/tests/sh/04-conf,v
61 retrieving revision 1.2
63 --- tests/sh/04-conf 27 Jun 2007 21:47:42 -0000 1.2
64 +++ tests/sh/04-conf 28 Jun 2007 15:47:05 -0000
67 is_verbose_mode && $poldek_l
69 - n=$($poldek_l | grep -vE '^dbg:' | wc -l)
70 + n=$($poldek_l | grep 'test://' | wc -l)
71 assertEquals "2 sources expected" "$n" "2"
73 n=$($poldek_l | grep -E '^test[12] ' | wc -l)
74 assertEquals "2 sources expected, but not those" "$n" "2"
81 + poldek_l="$POLDEK --conf $TMPDIR/poldek.conf -q -l"
83 + is_verbose_mode && $poldek_l
85 + n=$(fakeroot $poldek_l | grep 'test://' | wc -l)
86 + assertEquals "2 sources expected" "$n" "2"
88 + n=$(fakeroot $poldek_l | grep -E '^test[12] ' | wc -l)
89 + assertEquals "2 sources expected, but not those" "$n" "2"
92 + mkdir $TMPDIR/home || fail "mkdir"
93 + mv -f $TMPDIR/poldek.conf $TMPDIR/home/.poldekrc
97 + poldek_l="$POLDEK -q -l"
98 + is_verbose_mode && $poldek_l
100 + n=$(fakeroot $poldek_l | grep 'test://' | wc -l)
101 + assertEquals "2 sources expected" "$n" "2"
103 + n=$(fakeroot $poldek_l | grep -E '^test[12] ' | wc -l)
104 + assertEquals "2 sources expected, but not those" "$n" "2"