libopkg: remove "extra_data" option
[project/opkg-lede.git] / libopkg / opkg_conf.c
1 /* opkg_conf.c - the opkg package management system
2
3 Copyright (C) 2009 Ubiq Technologies <graham.gower@gmail.com>
4
5 Carl D. Worth
6 Copyright (C) 2001 University of Southern California
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2, or (at
11 your option) any later version.
12
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17 */
18
19 #include <stdio.h>
20 #include <sys/types.h>
21 #include <sys/stat.h>
22 #include <fcntl.h>
23 #include <glob.h>
24 #include <unistd.h>
25
26 #include "opkg_conf.h"
27 #include "pkg_vec.h"
28 #include "pkg.h"
29 #include "xregex.h"
30 #include "sprintf_alloc.h"
31 #include "opkg_message.h"
32 #include "file_util.h"
33 #include "opkg_defines.h"
34 #include "libbb/libbb.h"
35
36 static int lock_fd;
37 static char *lock_file = NULL;
38
39 static opkg_conf_t _conf;
40 opkg_conf_t *conf = &_conf;
41
42 /*
43 * Config file options
44 */
45 opkg_option_t options[] = {
46 {"cache", OPKG_OPT_TYPE_STRING, &_conf.cache},
47 {"force_defaults", OPKG_OPT_TYPE_BOOL, &_conf.force_defaults},
48 {"force_maintainer", OPKG_OPT_TYPE_BOOL, &_conf.force_maintainer},
49 {"force_depends", OPKG_OPT_TYPE_BOOL, &_conf.force_depends},
50 {"force_overwrite", OPKG_OPT_TYPE_BOOL, &_conf.force_overwrite},
51 {"force_downgrade", OPKG_OPT_TYPE_BOOL, &_conf.force_downgrade},
52 {"force_reinstall", OPKG_OPT_TYPE_BOOL, &_conf.force_reinstall},
53 {"force_space", OPKG_OPT_TYPE_BOOL, &_conf.force_space},
54 {"force_postinstall", OPKG_OPT_TYPE_BOOL, &_conf.force_postinstall},
55 {"force_checksum", OPKG_OPT_TYPE_BOOL, &_conf.force_checksum},
56 {"check_signature", OPKG_OPT_TYPE_BOOL, &_conf.check_signature},
57 {"no_check_certificate", OPKG_OPT_TYPE_BOOL, &_conf.no_check_certificate},
58 {"ftp_proxy", OPKG_OPT_TYPE_STRING, &_conf.ftp_proxy},
59 {"http_proxy", OPKG_OPT_TYPE_STRING, &_conf.http_proxy},
60 {"http_timeout", OPKG_OPT_TYPE_STRING, &_conf.http_timeout},
61 {"no_proxy", OPKG_OPT_TYPE_STRING, &_conf.no_proxy},
62 {"test", OPKG_OPT_TYPE_BOOL, &_conf.noaction},
63 {"noaction", OPKG_OPT_TYPE_BOOL, &_conf.noaction},
64 {"download_only", OPKG_OPT_TYPE_BOOL, &_conf.download_only},
65 {"nodeps", OPKG_OPT_TYPE_BOOL, &_conf.nodeps},
66 {"nocase", OPKG_OPT_TYPE_BOOL, &_conf.nocase},
67 {"offline_root", OPKG_OPT_TYPE_STRING, &_conf.offline_root},
68 {"overlay_root", OPKG_OPT_TYPE_STRING, &_conf.overlay_root},
69 {"proxy_passwd", OPKG_OPT_TYPE_STRING, &_conf.proxy_passwd},
70 {"proxy_user", OPKG_OPT_TYPE_STRING, &_conf.proxy_user},
71 {"query-all", OPKG_OPT_TYPE_BOOL, &_conf.query_all},
72 {"size", OPKG_OPT_TYPE_BOOL, &_conf.size},
73 {"tmp_dir", OPKG_OPT_TYPE_STRING, &_conf.tmp_dir},
74 {"verbosity", OPKG_OPT_TYPE_INT, &_conf.verbosity},
75 {"verify_program", OPKG_OPT_TYPE_STRING, &_conf.verify_program},
76 {NULL, 0, NULL}
77 };
78
79 static int resolve_pkg_dest_list(void)
80 {
81 nv_pair_list_elt_t *iter;
82 nv_pair_t *nv_pair;
83 pkg_dest_t *dest;
84 char *root_dir;
85
86 for (iter = nv_pair_list_first(&conf->tmp_dest_list); iter;
87 iter = nv_pair_list_next(&conf->tmp_dest_list, iter)) {
88 nv_pair = (nv_pair_t *) iter->data;
89
90 if (conf->offline_root) {
91 sprintf_alloc(&root_dir, "%s%s", conf->offline_root,
92 nv_pair->value);
93 } else {
94 root_dir = xstrdup(nv_pair->value);
95 }
96
97 dest =
98 pkg_dest_list_append(&conf->pkg_dest_list, nv_pair->name,
99 root_dir, conf->lists_dir);
100 free(root_dir);
101
102 if (conf->default_dest == NULL)
103 conf->default_dest = dest;
104
105 if (conf->dest_str && !strcmp(dest->name, conf->dest_str)) {
106 conf->default_dest = dest;
107 conf->restrict_to_default_dest = 1;
108 }
109 }
110
111 if (conf->dest_str && !conf->restrict_to_default_dest) {
112 opkg_msg(ERROR, "Unknown dest name: `%s'.\n", conf->dest_str);
113 return -1;
114 }
115
116 return 0;
117 }
118
119 static int opkg_conf_set_option(const char *name, const char *value)
120 {
121 int i = 0;
122
123 while (options[i].name) {
124 if (strcmp(options[i].name, name) == 0) {
125 switch (options[i].type) {
126 case OPKG_OPT_TYPE_BOOL:
127 if (*(int *)options[i].value) {
128 opkg_msg(ERROR,
129 "Duplicate boolean option %s, "
130 "leaving this option on.\n",
131 name);
132 return 0;
133 }
134 *((int *const)options[i].value) = 1;
135 return 0;
136 case OPKG_OPT_TYPE_INT:
137 if (value) {
138 if (*(int *)options[i].value) {
139 opkg_msg(ERROR,
140 "Duplicate option %s, "
141 "using first seen value \"%d\".\n",
142 name,
143 *((int *)options[i].
144 value));
145 return 0;
146 }
147 *((int *const)options[i].value) =
148 atoi(value);
149 return 0;
150 } else {
151 opkg_msg(ERROR,
152 "Option %s needs an argument\n",
153 name);
154 return -1;
155 }
156 case OPKG_OPT_TYPE_STRING:
157 if (value) {
158 if (*(char **)options[i].value) {
159 opkg_msg(ERROR,
160 "Duplicate option %s, "
161 "using first seen value \"%s\".\n",
162 name,
163 *((char **)options[i].
164 value));
165 return 0;
166 }
167 *((char **const)options[i].value) =
168 xstrdup(value);
169 return 0;
170 } else {
171 opkg_msg(ERROR,
172 "Option %s needs an argument\n",
173 name);
174 return -1;
175 }
176 }
177 }
178 i++;
179 }
180
181 opkg_msg(ERROR, "Unrecognized option: %s=%s\n", name, value);
182 return -1;
183 }
184
185 static int
186 opkg_conf_parse_file(const char *filename,
187 pkg_src_list_t * pkg_src_list)
188 {
189 int line_num = 0;
190 int err = 0;
191 FILE *file;
192 regex_t valid_line_re, comment_re;
193 #define regmatch_size 14
194 regmatch_t regmatch[regmatch_size];
195
196 file = fopen(filename, "r");
197 if (file == NULL) {
198 opkg_perror(ERROR, "Failed to open %s", filename);
199 err = -1;
200 goto err0;
201 }
202
203 opkg_msg(INFO, "Loading conf file %s.\n", filename);
204
205 err = xregcomp(&comment_re,
206 "^[[:space:]]*(#.*|[[:space:]]*)$", REG_EXTENDED);
207 if (err)
208 goto err1;
209
210 err = xregcomp(&valid_line_re,
211 "^[[:space:]]*(\"([^\"]*)\"|([^[:space:]]*))"
212 "[[:space:]]*(\"([^\"]*)\"|([^[:space:]]*))"
213 "[[:space:]]*(\"([^\"]*)\"|([^[:space:]]*))"
214 "([[:space:]]+([^[:space:]]+))?([[:space:]]+(.*))?[[:space:]]*$",
215 REG_EXTENDED);
216 if (err)
217 goto err2;
218
219 while (1) {
220 char *line;
221 char *type, *name, *value;
222
223 line_num++;
224
225 line = file_read_line_alloc(file);
226 if (line == NULL)
227 break;
228
229 if (regexec(&comment_re, line, 0, 0, 0) == 0)
230 goto NEXT_LINE;
231
232 if (regexec(&valid_line_re, line, regmatch_size, regmatch, 0) ==
233 REG_NOMATCH) {
234 opkg_msg(ERROR, "%s:%d: Ignoring invalid line: `%s'\n",
235 filename, line_num, line);
236 goto NEXT_LINE;
237 }
238
239 /* This has to be so ugly to deal with optional quotation marks */
240 if (regmatch[2].rm_so > 0) {
241 type = xstrndup(line + regmatch[2].rm_so,
242 regmatch[2].rm_eo - regmatch[2].rm_so);
243 } else {
244 type = xstrndup(line + regmatch[3].rm_so,
245 regmatch[3].rm_eo - regmatch[3].rm_so);
246 }
247
248 if (regmatch[5].rm_so > 0) {
249 name = xstrndup(line + regmatch[5].rm_so,
250 regmatch[5].rm_eo - regmatch[5].rm_so);
251 } else {
252 name = xstrndup(line + regmatch[6].rm_so,
253 regmatch[6].rm_eo - regmatch[6].rm_so);
254 }
255
256 if (regmatch[8].rm_so > 0) {
257 value = xstrndup(line + regmatch[8].rm_so,
258 regmatch[8].rm_eo - regmatch[8].rm_so);
259 } else {
260 value = xstrndup(line + regmatch[9].rm_so,
261 regmatch[9].rm_eo - regmatch[9].rm_so);
262 }
263
264 if (regmatch[13].rm_so != regmatch[13].rm_eo
265 && strncmp(type, "dist", 4) != 0) {
266 opkg_msg(ERROR,
267 "%s:%d: Ignoring config line with trailing garbage: `%s'\n",
268 filename, line_num, line);
269 } else {
270
271 /* We use the conf->tmp_dest_list below instead of
272 conf->pkg_dest_list because we might encounter an
273 offline_root option later and that would invalidate the
274 directories we would have computed in
275 pkg_dest_list_init. (We do a similar thing with
276 tmp_src_nv_pair_list for sake of symmetry.) */
277 if (strcmp(type, "option") == 0) {
278 opkg_conf_set_option(name, value);
279 } else if (strcmp(type, "src") == 0) {
280 if (!nv_pair_list_find
281 ((nv_pair_list_t *) pkg_src_list, name)) {
282 pkg_src_list_append(pkg_src_list, name,
283 value, 0);
284 } else {
285 opkg_msg(ERROR,
286 "Duplicate src declaration (%s %s). "
287 "Skipping.\n", name, value);
288 }
289 } else if (strcmp(type, "src/gz") == 0) {
290 if (!nv_pair_list_find
291 ((nv_pair_list_t *) pkg_src_list, name)) {
292 pkg_src_list_append(pkg_src_list, name,
293 value, 1);
294 } else {
295 opkg_msg(ERROR,
296 "Duplicate src declaration (%s %s). "
297 "Skipping.\n", name, value);
298 }
299 } else if (strcmp(type, "dest") == 0) {
300 nv_pair_list_append(&conf->tmp_dest_list, name,
301 value);
302 } else if (strcmp(type, "lists_dir") == 0) {
303 conf->lists_dir = xstrdup(value);
304 } else if (strcmp(type, "arch") == 0) {
305 opkg_msg(INFO,
306 "Supported arch %s priority (%s)\n",
307 name, value);
308 if (!value) {
309 opkg_msg(NOTICE,
310 "No priority given for architecture %s,"
311 "defaulting to 10\n", name);
312 value = xstrdup("10");
313 }
314 nv_pair_list_append(&conf->arch_list, name,
315 value);
316 } else {
317 opkg_msg(ERROR,
318 "%s:%d: Ignoring invalid line: `%s'\n",
319 filename, line_num, line);
320 }
321
322 }
323
324 free(type);
325 free(name);
326 free(value);
327
328 NEXT_LINE:
329 free(line);
330 }
331
332 regfree(&valid_line_re);
333 err2:
334 regfree(&comment_re);
335 err1:
336 if (fclose(file) == EOF) {
337 opkg_perror(ERROR, "Couldn't close %s", filename);
338 err = -1;
339 }
340 err0:
341 return err;
342 }
343
344 int opkg_conf_write_status_files(void)
345 {
346 pkg_dest_list_elt_t *iter;
347 pkg_dest_t *dest;
348 pkg_vec_t *all;
349 pkg_t *pkg;
350 int i, ret = 0;
351
352 if (conf->noaction)
353 return 0;
354
355 list_for_each_entry(iter, &conf->pkg_dest_list.head, node) {
356 dest = (pkg_dest_t *) iter->data;
357
358 dest->status_fp = fopen(dest->status_file_name, "w");
359 if (dest->status_fp == NULL && errno != EROFS) {
360 opkg_perror(ERROR, "Can't open status file %s",
361 dest->status_file_name);
362 ret = -1;
363 }
364 }
365
366 all = pkg_vec_alloc();
367 pkg_hash_fetch_available(all);
368
369 for (i = 0; i < all->len; i++) {
370 pkg = all->pkgs[i];
371 /* We don't need most uninstalled packages in the status file */
372 if (pkg->state_status == SS_NOT_INSTALLED
373 && (pkg->state_want == SW_UNKNOWN
374 || (pkg->state_want == SW_DEINSTALL
375 && pkg->state_flag != SF_HOLD)
376 || pkg->state_want == SW_PURGE)) {
377 continue;
378 }
379 if (pkg->dest == NULL) {
380 opkg_msg(ERROR,
381 "Internal error: package %s has a NULL dest\n",
382 pkg->name);
383 continue;
384 }
385 if (pkg->dest->status_fp)
386 pkg_print_status(pkg, pkg->dest->status_fp);
387 }
388
389 pkg_vec_free(all);
390
391 list_for_each_entry(iter, &conf->pkg_dest_list.head, node) {
392 dest = (pkg_dest_t *) iter->data;
393 if (dest->status_fp && fclose(dest->status_fp) == EOF) {
394 opkg_perror(ERROR, "Couldn't close %s",
395 dest->status_file_name);
396 ret = -1;
397 }
398 }
399
400 return ret;
401 }
402
403 char *root_filename_alloc(char *filename)
404 {
405 char *root_filename;
406 sprintf_alloc(&root_filename, "%s%s",
407 (conf->offline_root ? conf->offline_root : ""), filename);
408 return root_filename;
409 }
410
411 static int glob_errfunc(const char *epath, int eerrno)
412 {
413 if (eerrno == ENOENT)
414 /* If leading dir does not exist, we get GLOB_NOMATCH. */
415 return 0;
416
417 opkg_msg(ERROR, "glob failed for %s: %s\n", epath, strerror(eerrno));
418 return 0;
419 }
420
421 int opkg_conf_init(void)
422 {
423 pkg_src_list_init(&conf->pkg_src_list);
424 pkg_dest_list_init(&conf->pkg_dest_list);
425 pkg_dest_list_init(&conf->tmp_dest_list);
426 nv_pair_list_init(&conf->arch_list);
427
428 return 0;
429 }
430
431 int opkg_conf_load(void)
432 {
433 int i, glob_ret;
434 char *tmp, *tmp_dir_base, **tmp_val;
435 glob_t globbuf;
436 char *etc_opkg_conf_pattern;
437
438 conf->restrict_to_default_dest = 0;
439 conf->default_dest = NULL;
440
441 if (!conf->offline_root)
442 conf->offline_root = xstrdup(getenv("OFFLINE_ROOT"));
443
444 if (conf->conf_file) {
445 struct stat st;
446 if (stat(conf->conf_file, &st) == -1) {
447 opkg_perror(ERROR, "Couldn't stat %s", conf->conf_file);
448 goto err0;
449 }
450 if (opkg_conf_parse_file(conf->conf_file,
451 &conf->pkg_src_list))
452 goto err1;
453 }
454
455 if (conf->offline_root)
456 sprintf_alloc(&etc_opkg_conf_pattern, "%s/etc/opkg/*.conf",
457 conf->offline_root);
458 else {
459 const char *conf_file_dir = getenv("OPKG_CONF_DIR");
460 if (conf_file_dir == NULL)
461 conf_file_dir = OPKG_CONF_DEFAULT_CONF_FILE_DIR;
462 sprintf_alloc(&etc_opkg_conf_pattern, "%s/*.conf",
463 conf_file_dir);
464 }
465
466 memset(&globbuf, 0, sizeof(globbuf));
467 glob_ret = glob(etc_opkg_conf_pattern, 0, glob_errfunc, &globbuf);
468 if (glob_ret && glob_ret != GLOB_NOMATCH) {
469 free(etc_opkg_conf_pattern);
470 globfree(&globbuf);
471 goto err1;
472 }
473
474 free(etc_opkg_conf_pattern);
475
476 for (i = 0; i < globbuf.gl_pathc; i++) {
477 if (globbuf.gl_pathv[i])
478 if (conf->conf_file &&
479 !strcmp(conf->conf_file, globbuf.gl_pathv[i]))
480 continue;
481 if (opkg_conf_parse_file(globbuf.gl_pathv[i],
482 &conf->pkg_src_list) < 0) {
483 globfree(&globbuf);
484 goto err1;
485 }
486 }
487
488 globfree(&globbuf);
489
490 if (conf->offline_root)
491 sprintf_alloc(&lock_file, "%s/%s", conf->offline_root,
492 OPKGLOCKFILE);
493 else
494 sprintf_alloc(&lock_file, "%s", OPKGLOCKFILE);
495
496 lock_fd = creat(lock_file, S_IRUSR | S_IWUSR | S_IRGRP);
497 if (lock_fd == -1) {
498 opkg_perror(ERROR, "Could not create lock file %s", lock_file);
499 goto err2;
500 }
501
502 if (lockf(lock_fd, F_TLOCK, (off_t) 0) == -1) {
503 opkg_perror(ERROR, "Could not lock %s", lock_file);
504 if (close(lock_fd) == -1)
505 opkg_perror(ERROR, "Couldn't close descriptor %d (%s)",
506 lock_fd, lock_file);
507 lock_fd = -1;
508 goto err2;
509 }
510
511 if (conf->tmp_dir)
512 tmp_dir_base = conf->tmp_dir;
513 else
514 tmp_dir_base = getenv("TMPDIR");
515
516 sprintf_alloc(&tmp, "%s/%s",
517 tmp_dir_base ? tmp_dir_base :
518 OPKG_CONF_DEFAULT_TMP_DIR_BASE, OPKG_CONF_TMP_DIR_SUFFIX);
519 if (conf->tmp_dir)
520 free(conf->tmp_dir);
521 conf->tmp_dir = mkdtemp(tmp);
522 if (conf->tmp_dir == NULL) {
523 opkg_perror(ERROR, "Creating temp dir %s failed", tmp);
524 goto err3;
525 }
526
527 pkg_hash_init();
528 hash_table_init("file-hash", &conf->file_hash,
529 OPKG_CONF_DEFAULT_HASH_LEN);
530 hash_table_init("obs-file-hash", &conf->obs_file_hash,
531 OPKG_CONF_DEFAULT_HASH_LEN / 16);
532
533 if (conf->lists_dir == NULL)
534 conf->lists_dir = xstrdup(OPKG_CONF_LISTS_DIR);
535
536 if (conf->verify_program == NULL)
537 conf->verify_program = xstrdup(OPKG_CONF_DEFAULT_VERIFY_PROGRAM);
538
539 if (conf->offline_root) {
540 sprintf_alloc(&tmp, "%s/%s", conf->offline_root,
541 conf->lists_dir);
542 free(conf->lists_dir);
543 conf->lists_dir = tmp;
544 }
545
546 /* if no architectures were defined, then default all, noarch, and host architecture */
547 if (nv_pair_list_empty(&conf->arch_list)) {
548 nv_pair_list_append(&conf->arch_list, "all", "1");
549 nv_pair_list_append(&conf->arch_list, "noarch", "1");
550 nv_pair_list_append(&conf->arch_list, HOST_CPU_STR, "10");
551 }
552
553 /* Even if there is no conf file, we'll need at least one dest. */
554 if (nv_pair_list_empty(&conf->tmp_dest_list)) {
555 nv_pair_list_append(&conf->tmp_dest_list,
556 OPKG_CONF_DEFAULT_DEST_NAME,
557 OPKG_CONF_DEFAULT_DEST_ROOT_DIR);
558 }
559
560 if (resolve_pkg_dest_list())
561 goto err4;
562
563 nv_pair_list_deinit(&conf->tmp_dest_list);
564
565 return 0;
566
567 err4:
568 free(conf->lists_dir);
569
570 pkg_hash_deinit();
571 hash_table_deinit(&conf->file_hash);
572 hash_table_deinit(&conf->obs_file_hash);
573
574 if (rmdir(conf->tmp_dir) == -1)
575 opkg_perror(ERROR, "Couldn't remove dir %s", conf->tmp_dir);
576 err3:
577 if (lockf(lock_fd, F_ULOCK, (off_t) 0) == -1)
578 opkg_perror(ERROR, "Couldn't unlock %s", lock_file);
579
580 if (close(lock_fd) == -1)
581 opkg_perror(ERROR, "Couldn't close descriptor %d (%s)",
582 lock_fd, lock_file);
583 if (unlink(lock_file) == -1)
584 opkg_perror(ERROR, "Couldn't unlink %s", lock_file);
585 err2:
586 if (lock_file) {
587 free(lock_file);
588 lock_file = NULL;
589 }
590 err1:
591 pkg_src_list_deinit(&conf->pkg_src_list);
592 pkg_dest_list_deinit(&conf->pkg_dest_list);
593 nv_pair_list_deinit(&conf->arch_list);
594
595 for (i = 0; options[i].name; i++) {
596 if (options[i].type == OPKG_OPT_TYPE_STRING) {
597 tmp_val = (char **)options[i].value;
598 if (*tmp_val) {
599 free(*tmp_val);
600 *tmp_val = NULL;
601 }
602 }
603 }
604 err0:
605 nv_pair_list_deinit(&conf->tmp_dest_list);
606 if (conf->dest_str)
607 free(conf->dest_str);
608 if (conf->conf_file)
609 free(conf->conf_file);
610
611 return -1;
612 }
613
614 void opkg_conf_deinit(void)
615 {
616 int i;
617 char **tmp;
618
619 if (conf->tmp_dir)
620 rm_r(conf->tmp_dir);
621
622 if (conf->lists_dir)
623 free(conf->lists_dir);
624
625 if (conf->dest_str)
626 free(conf->dest_str);
627
628 if (conf->conf_file)
629 free(conf->conf_file);
630
631 pkg_src_list_deinit(&conf->pkg_src_list);
632 pkg_dest_list_deinit(&conf->pkg_dest_list);
633 nv_pair_list_deinit(&conf->arch_list);
634
635 for (i = 0; options[i].name; i++) {
636 if (options[i].type == OPKG_OPT_TYPE_STRING) {
637 tmp = (char **)options[i].value;
638 if (*tmp) {
639 free(*tmp);
640 *tmp = NULL;
641 }
642 }
643 }
644
645 if (conf->verbosity >= DEBUG) {
646 hash_print_stats(&conf->pkg_hash);
647 hash_print_stats(&conf->file_hash);
648 hash_print_stats(&conf->obs_file_hash);
649 }
650
651 pkg_hash_deinit();
652 hash_table_deinit(&conf->file_hash);
653 hash_table_deinit(&conf->obs_file_hash);
654
655 if (lock_fd != -1) {
656 if (lockf(lock_fd, F_ULOCK, (off_t) 0) == -1)
657 opkg_perror(ERROR, "Couldn't unlock %s", lock_file);
658
659 if (close(lock_fd) == -1)
660 opkg_perror(ERROR, "Couldn't close descriptor %d (%s)",
661 lock_fd, lock_file);
662
663 }
664
665 if (lock_file) {
666 if (unlink(lock_file) == -1)
667 opkg_perror(ERROR, "Couldn't unlink %s", lock_file);
668
669 free(lock_file);
670 }
671 }