1 --- a/libopkg/opkg_utils.c
2 +++ b/libopkg/opkg_utils.c
7 -char **read_raw_pkgs_from_file(const char *file_name)
12 - if(!(fp = fopen(file_name, "r"))){
13 - fprintf(stderr, "can't get %s open for read\n", file_name);
17 - ret = read_raw_pkgs_from_stream(fp);
24 -char **read_raw_pkgs_from_stream(FILE *fp)
26 - char **raw = NULL, *buf, *scout;
30 - buf = calloc (1, size);
32 - while (fgets(buf, size, fp)) {
33 - while (strlen (buf) == (size - 1)
34 - && buf[size-2] != '\n') {
35 - size_t o = size - 1;
37 - buf = realloc (buf, size);
38 - if (fgets (buf + o, size - o, fp) == NULL)
43 - raw = realloc(raw, (count + 50) * sizeof(char *));
45 - if((scout = strchr(buf, '\n')))
48 - raw[count++] = strdup(buf);
51 - raw = realloc(raw, (count + 1) * sizeof(char *));
59 /* something to remove whitespace, a hash pooper */
60 char *trim_alloc(char *line)
74 int pkg_init_from_file(pkg_t *pkg, const char *filename)
82 if (err) { return err; }
85 - raw = read_raw_pkgs_from_stream(control_file);
86 - pkg_parse_raw(pkg, &raw, NULL, NULL);
87 + pkg_parse_fd(pkg, fileno(control_file), NULL, NULL, 0);
93 void set_flags_from_control(opkg_conf_t *conf, pkg_t *pkg){
96 - char **raw_start=NULL;
99 size_t str_size = strlen(pkg->dest->info_dir)+strlen(pkg->name)+12;
100 temp_str = (char *) alloca (str_size);
101 @@ -471,28 +470,23 @@
104 sprintf( temp_str,"%s/%s.control",pkg->dest->info_dir,pkg->name);
106 - raw = raw_start = read_raw_pkgs_from_file(temp_str);
108 - opkg_message(conf, OPKG_ERROR, "Unable to open the control file in %s\n", __FUNCTION__);
113 - if (!pkg_valorize_other_field(pkg, &raw ) == 0) {
114 - opkg_message(conf, OPKG_DEBUG, "unable to read control file for %s. May be empty\n", pkg->name);
122 + if( (fd = open(temp_str, O_RDONLY)) > 0 )
124 + if( pkg_valorize_other_field(pkg, fd) )
126 + opkg_message(conf, OPKG_DEBUG, "unable to read control file for %s. May be empty\n", pkg->name);
134 + opkg_message(conf, OPKG_ERROR, "Unable to open the control file in %s\n", __FUNCTION__);
142 #define CHECK_BUFF_SIZE(buff, line, buf_size, page_size) do { \
143 --- a/libopkg/pkg_hash.c
144 +++ b/libopkg/pkg_hash.c
152 #include "hash_table.h"
154 @@ -110,45 +112,52 @@
157 int pkg_hash_add_from_file(opkg_conf_t *conf, const char *file_name,
158 - pkg_src_t *src, pkg_dest_t *dest, int is_status_file)
159 + pkg_src_t *src, pkg_dest_t *dest, int is_status_file, int no_desc)
161 - hash_table_t *hash = &conf->pkg_hash;
166 - raw = raw_start = read_raw_pkgs_from_file(file_name);
170 - while(*raw){ /* don't worry, we'll increment raw in the parsing function */
175 - if (pkg_parse_raw(pkg, &raw, src, dest) == 0) {
176 - if (!pkg->architecture) {
177 - char *version_str = pkg_version_str_alloc(pkg);
178 - pkg->architecture = pkg_get_default_arch(conf);
179 - opkg_message(conf, OPKG_ERROR, "Package %s version %s has no architecture specified, defaulting to %s.\n",
180 - pkg->name, version_str, pkg->architecture);
183 - hash_insert_pkg(hash, pkg, is_status_file,conf);
189 + hash_table_t *hash = &conf->pkg_hash;
192 - /* XXX: CLEANUP: I'd like a cleaner interface for cleaning up
193 - memory after read_raw_pkgs_from_file */
203 + if( (fd = open(file_name, O_RDONLY)) > 0 )
213 + if (pkg_parse_fd(pkg, fd, src, dest, no_desc) == 0) {
214 + if (!pkg->architecture) {
215 + char *version_str = pkg_version_str_alloc(pkg);
216 + pkg->architecture = pkg_get_default_arch(conf);
217 + opkg_message(conf, OPKG_ERROR, "Package %s version %s has no architecture specified, defaulting to %s.\n",
218 + pkg->name, version_str, pkg->architecture);
222 + hash_insert_pkg(hash, pkg, is_status_file, conf);
234 + opkg_message (conf, OPKG_ERROR,
235 + "Unable to open package list %s\n", file_name);
243 abstract_pkg_t * abstract_pkg_fetch_by_name(hash_table_t * hash, const char * pkg_name)
244 --- a/libopkg/pkg_parse.c
245 +++ b/libopkg/pkg_parse.c
246 @@ -191,214 +191,301 @@
250 -/* Some random thoughts from Carl:
252 - This function could be considerably simplified if we just kept
253 - an array of all the generic string-valued field names, and looped
254 - through those looking for a match. Also, these fields could perhaps
255 - be stored in the package as an array as well, (or, probably better,
256 - as an nv_pair_list_t).
258 - Fields which require special parsing or storage, (such as Depends:
259 - and Status:) could be handled as they are now.
261 -/* XXX: FEATURE: The Suggests: field needs to be changed from a string
262 - to a dependency list. And, since we already have
263 - Depends/Pre-Depends and need to add Conflicts, Recommends, and
264 - Enhances, perhaps we could generalize all of these and save some
267 -int pkg_parse_raw(pkg_t *pkg, char ***raw, pkg_src_t *src, pkg_dest_t *dest)
268 +int pkg_parse_fd(pkg_t *pkg, int fd, pkg_src_t *src, pkg_dest_t *dest, int no_desc)
270 - int reading_conffiles, reading_description;
271 - int pkg_false_provides=1;
273 - char * provide=NULL;
278 - reading_conffiles = reading_description = 0;
280 - for (lines = *raw; *lines; lines++) {
281 - /* fprintf(stderr, "PARSING %s\n", *lines);*/
284 - if(isGenericFieldType("Package:", *lines))
285 - pkg->name = parseGenericFieldType("Package", *lines);
286 - else if(isGenericFieldType("Priority:", *lines))
287 - pkg->priority = parseGenericFieldType("Priority", *lines);
288 - else if(isGenericFieldType("Provides", *lines)){
289 -/* Here we add the internal_use to align the off by one problem between provides_str and provides */
290 - provide = (char * ) calloc(1, strlen(*lines)+ 35 ); /* Preparing the space for the new opkg_internal_use_only */
291 - if ( alterProvidesLine(*lines,provide) ){
294 - pkg->provides_str = parseDependsString( provide, &pkg->provides_count);
295 -/* Let's try to hack a bit here.
296 - The idea is that if a package has no Provides, we would add one generic, to permit the check of dependencies
297 - in alot of other places. We will remove it before writing down the status database */
298 - pkg_false_provides=0;
301 - else if(isGenericFieldType("Pre-Depends", *lines))
302 - pkg->pre_depends_str = parseDependsString(*lines, &pkg->pre_depends_count);
306 - if(isGenericFieldType("Architecture:", *lines))
307 - pkg->architecture = parseGenericFieldType("Architecture", *lines);
308 - else if(isGenericFieldType("Auto-Installed:", *lines)) {
309 - char *auto_installed_value;
310 - auto_installed_value = parseGenericFieldType("Auto-Installed:", *lines);
311 - if (strcmp(auto_installed_value, "yes") == 0) {
312 - pkg->auto_installed = 1;
314 - free(auto_installed_value);
319 - if(isGenericFieldType("Filename:", *lines))
320 - pkg->filename = parseGenericFieldType("Filename", *lines);
324 - if(isGenericFieldType("Section:", *lines))
325 - pkg->section = parseGenericFieldType("Section", *lines);
326 - else if(isGenericFieldType("Size:", *lines))
327 - pkg->size = parseGenericFieldType("Size", *lines);
328 - else if(isGenericFieldType("Source:", *lines))
329 - pkg->source = parseGenericFieldType("Source", *lines);
330 - else if(isGenericFieldType("Status", *lines))
331 - parseStatus(pkg, *lines);
332 - else if(isGenericFieldType("Suggests", *lines))
333 - pkg->suggests_str = parseDependsString(*lines, &pkg->suggests_count);
337 - if(isGenericFieldType("Tags:", *lines))
338 - pkg->tags = parseGenericFieldType("Tags", *lines);
342 - if(isGenericFieldType("MD5sum:", *lines))
343 - pkg->md5sum = parseGenericFieldType("MD5sum", *lines);
344 - /* The old opkg wrote out status files with the wrong case for MD5sum,
345 - let's parse it either way */
346 - else if(isGenericFieldType("MD5Sum:", *lines))
347 - pkg->md5sum = parseGenericFieldType("MD5Sum", *lines);
348 - else if(isGenericFieldType("Maintainer", *lines))
349 - pkg->maintainer = parseGenericFieldType("Maintainer", *lines);
353 - if(isGenericFieldType("Installed-Size:", *lines))
354 - pkg->installed_size = parseGenericFieldType("Installed-Size", *lines);
355 - else if(isGenericFieldType("Installed-Time:", *lines)) {
356 - char *time_str = parseGenericFieldType("Installed-Time", *lines);
357 - pkg->installed_time = strtoul(time_str, NULL, 0);
363 - if(isGenericFieldType("Essential:", *lines)) {
364 - char *essential_value;
365 - essential_value = parseGenericFieldType("Essential", *lines);
366 - if (strcmp(essential_value, "yes") == 0) {
367 - pkg->essential = 1;
369 - free(essential_value);
374 - if(isGenericFieldType("Version", *lines))
375 - parseVersion(pkg, *lines);
379 - if(isGenericFieldType("Conffiles", *lines)){
380 - parseConffiles(pkg, *lines);
381 - reading_conffiles = 1;
383 - else if(isGenericFieldType("Conflicts", *lines))
384 - pkg->conflicts_str = parseDependsString(*lines, &pkg->conflicts_count);
388 - if(isGenericFieldType("Description", *lines)) {
389 - pkg->description = parseGenericFieldType("Description", *lines);
390 - reading_conffiles = 0;
391 - reading_description = 1;
393 - else if(isGenericFieldType("Depends", *lines))
394 - pkg->depends_str = parseDependsString(*lines, &pkg->depends_count);
398 - if(isGenericFieldType("Recommends", *lines))
399 - pkg->recommends_str = parseDependsString(*lines, &pkg->recommends_count);
400 - else if(isGenericFieldType("Replaces", *lines))
401 - pkg->replaces_str = parseDependsString(*lines, &pkg->replaces_count);
406 - if(reading_description) {
407 - /* we already know it's not blank, so the rest of description */
408 - pkg->description = realloc(pkg->description,
409 - strlen(pkg->description)
410 - + 1 + strlen(*lines) + 1);
411 - strcat(pkg->description, "\n");
412 - strcat(pkg->description, (*lines));
414 - else if(reading_conffiles)
415 - parseConffiles(pkg, *lines);
420 - if(line_is_blank(*lines)) {
431 + int reading_conffiles, reading_description;
432 + int pkg_false_provides=1;
433 + char *provide = NULL;
438 + reading_conffiles = reading_description = 0;
440 + memset(buf, 0, sizeof(buf));
442 + while(!eof || (bsz > 0))
446 + rv = read(fd, &buf[bsz], sizeof(buf) - bsz - 1);
460 + /*opkg_message(conf, OPKG_ERROR, "I/O error while parsing package list\n");*/
461 + printf("I/O error while parsing package list\n");
473 + if( (nl = strchr(buf, '\n')) != NULL )
475 + bsz -= (int)(nl - buf) + 1;
477 + memset(line, 0, sizeof(line));
478 + memcpy(line, buf, (int)(nl - buf));
479 + memmove(buf, &buf[(int)(nl - buf) + 1], bsz);
484 + if(isGenericFieldType("Package:", line))
485 + pkg->name = parseGenericFieldType("Package", line);
486 + else if(isGenericFieldType("Priority:", line))
487 + pkg->priority = parseGenericFieldType("Priority", line);
488 + else if(isGenericFieldType("Provides", line)){
489 + /* Here we add the internal_use to align the off by one problem between provides_str and provides */
490 + provide = (char * ) calloc(1, strlen(line)+ 35 ); /* Preparing the space for the new opkg_internal_use_only */
491 + if ( alterProvidesLine(line,provide) ){
495 + pkg->provides_str = parseDependsString( provide, &pkg->provides_count);
496 + /* Let's try to hack a bit here.
497 + The idea is that if a package has no Provides, we would add one generic, to permit the check of dependencies
498 + in alot of other places. We will remove it before writing down the status database */
499 + pkg_false_provides=0;
502 + else if(isGenericFieldType("Pre-Depends", line))
503 + pkg->pre_depends_str = parseDependsString(line, &pkg->pre_depends_count);
507 + if(isGenericFieldType("Architecture:", line))
508 + pkg->architecture = parseGenericFieldType("Architecture", line);
509 + else if(isGenericFieldType("Auto-Installed:", line)) {
510 + char *auto_installed_value;
511 + auto_installed_value = parseGenericFieldType("Auto-Installed:", line);
512 + if (strcmp(auto_installed_value, "yes") == 0) {
513 + pkg->auto_installed = 1;
515 + free(auto_installed_value);
520 + if(isGenericFieldType("Filename:", line))
521 + pkg->filename = parseGenericFieldType("Filename", line);
525 + if(isGenericFieldType("Section:", line) && !no_desc)
526 + pkg->section = parseGenericFieldType("Section", line);
527 + else if(isGenericFieldType("Size:", line))
528 + pkg->size = parseGenericFieldType("Size", line);
529 + else if(isGenericFieldType("Source:", line) && !no_desc)
530 + pkg->source = parseGenericFieldType("Source", line);
531 + else if(isGenericFieldType("Status", line))
532 + parseStatus(pkg, line);
533 + else if(isGenericFieldType("Suggests", line))
534 + pkg->suggests_str = parseDependsString(line, &pkg->suggests_count);
538 + if(isGenericFieldType("Tags:", line))
539 + pkg->tags = parseGenericFieldType("Tags", line);
543 + if(isGenericFieldType("MD5sum:", line))
544 + pkg->md5sum = parseGenericFieldType("MD5sum", line);
545 + /* The old opkg wrote out status files with the wrong case for MD5sum,
546 + let's parse it either way */
547 + else if(isGenericFieldType("MD5Sum:", line))
548 + pkg->md5sum = parseGenericFieldType("MD5Sum", line);
549 + else if(isGenericFieldType("Maintainer", line) && !no_desc)
550 + pkg->maintainer = parseGenericFieldType("Maintainer", line);
554 + if(isGenericFieldType("Installed-Size:", line))
555 + pkg->installed_size = parseGenericFieldType("Installed-Size", line);
556 + else if(isGenericFieldType("Installed-Time:", line)) {
557 + char *time_str = parseGenericFieldType("Installed-Time", line);
558 + pkg->installed_time = strtoul(time_str, NULL, 0);
564 + if(isGenericFieldType("Essential:", line)) {
565 + char *essential_value;
566 + essential_value = parseGenericFieldType("Essential", line);
567 + if (strcmp(essential_value, "yes") == 0) {
568 + pkg->essential = 1;
570 + free(essential_value);
575 + if(isGenericFieldType("Version", line))
576 + parseVersion(pkg, line);
580 + if(isGenericFieldType("Conffiles", line)){
581 + parseConffiles(pkg, line);
582 + reading_conffiles = 1;
584 + else if(isGenericFieldType("Conflicts", line))
585 + pkg->conflicts_str = parseDependsString(line, &pkg->conflicts_count);
589 + if(isGenericFieldType("Description", line)) {
591 + pkg->description = parseGenericFieldType("Description", line);
592 + reading_conffiles = 0;
593 + reading_description = 1;
595 + else if(isGenericFieldType("Depends", line))
596 + pkg->depends_str = parseDependsString(line, &pkg->depends_count);
600 + if(isGenericFieldType("Recommends", line))
601 + pkg->recommends_str = parseDependsString(line, &pkg->recommends_count);
602 + else if(isGenericFieldType("Replaces", line))
603 + pkg->replaces_str = parseDependsString(line, &pkg->replaces_count);
607 + if(reading_description) {
608 + /* we already know it's not blank, so the rest of description */
611 + pkg->description = realloc(pkg->description,
612 + strlen(pkg->description) + 1 + strlen(line) + 1);
613 + strcat(pkg->description, "\n");
614 + strcat(pkg->description, (line));
617 + else if(reading_conffiles)
618 + parseConffiles(pkg, line);
622 + if(line_is_blank(line))
628 + /*opkg_message(conf, OPKG_ERROR, "Buffer exceeded while parsing line:\n[%s]\n", buf);*/
629 + printf("Buffer exceeded while parsing line:\n[%s]\n", buf);
638 -/* If the opk has not a Provides line, we insert our false line */
639 - if ( pkg_false_provides==1)
641 - pkg->provides_count = 1;
642 - pkg->provides_str = calloc (1, sizeof (char*));
643 - pkg->provides_str[0] = strdup ("opkg_internal_use_only");
655 + lseek(fd, -(off_t)bsz, SEEK_CUR);
657 + if (!rv && pkg->name)
663 -int pkg_valorize_other_field(pkg_t *pkg, char ***raw)
664 +int pkg_valorize_other_field(pkg_t *pkg, int fd)
674 + memset(buf, 0, sizeof(buf));
676 + while(!eof || (bsz > 0))
680 + rv = read(fd, &buf[bsz], sizeof(buf) - bsz - 1);
705 - for (lines = *raw; *lines; lines++) {
706 - if(isGenericFieldType("Essential:", *lines)) {
707 - char *essential_value;
708 - essential_value = parseGenericFieldType("Essential", *lines);
709 - if (strcmp(essential_value, "yes") == 0) {
710 - pkg->essential = 1;
712 - free(essential_value);
713 + if( (nl = strchr(buf, '\n')) != NULL )
715 + bsz -= (int)(nl - buf) + 1;
717 + memset(line, 0, sizeof(line));
718 + memcpy(line, buf, (int)(nl - buf));
719 + memmove(buf, &buf[(int)(nl - buf) + 1], bsz);
721 + if(isGenericFieldType("Essential:", line))
723 + char *essential_value;
724 + essential_value = parseGenericFieldType("Essential", line);
725 + if (strcmp(essential_value, "yes") == 0) {
726 + pkg->essential = 1;
728 + free(essential_value);
742 + lseek(fd, -(off_t)bsz, SEEK_CUR);
744 + if (!rv && pkg->name)
750 --- a/libopkg/pkg_parse.h
751 +++ b/libopkg/pkg_parse.h
753 char ** parseDependsString(char * raw, int * depends_count);
754 int parseVersion(pkg_t *pkg, char *raw);
755 void parseConffiles(pkg_t * pkg, char * raw);
756 -int pkg_parse_raw(pkg_t *pkg, char ***raw, pkg_src_t *src, pkg_dest_t *dest);
757 -int pkg_valorize_other_field(pkg_t *pkg, char ***raw);
758 +int pkg_parse_fd(pkg_t *pkg, int fd, pkg_src_t *src, pkg_dest_t *dest, int no_desc);
759 +int pkg_valorize_other_field(pkg_t *pkg, int fd);
762 --- a/libopkg/opkg_utils.h
763 +++ b/libopkg/opkg_utils.h
765 void free_error_list();
767 long unsigned int get_available_blocks(char * filesystem);
768 -char **read_raw_pkgs_from_file(const char *file_name);
769 -char **read_raw_pkgs_from_stream(FILE *fp);
770 char *trim_alloc(char * line);
771 int line_is_blank(const char *line);
773 --- a/libopkg/libopkg.c
774 +++ b/libopkg/libopkg.c
778 opkg_conf_t opkg_conf;
783 @@ -122,12 +123,18 @@
784 !strcmp(cmd_name,"status") )
785 args.noreadfeedsfile = 1;
787 + if( !strcmp(cmd_name,"list") ||
788 + !strcmp(cmd_name,"list-installed") ||
789 + !strcmp(cmd_name,"list_installed") ||
790 + !strcmp(cmd_name,"search") )
793 opkg_cb_message = default_opkg_message_callback;
794 opkg_cb_response = default_opkg_response_callback;
795 opkg_cb_status = default_opkg_status_callback;
798 - err = opkg_conf_init (&opkg_conf, &args);
799 + err = opkg_conf_init (&opkg_conf, &args, no_desc);
802 opkg_print_error_list (&opkg_conf);
808 opkg->conf = calloc (1, sizeof (opkg_conf_t));
809 - err = opkg_conf_init (opkg->conf, opkg->args);
810 + err = opkg_conf_init (opkg->conf, opkg->args, 0);
816 /* throw away old opkg_conf and start again */
817 opkg_conf_deinit (opkg->conf);
818 - opkg_conf_init (opkg->conf, opkg->args);
819 + opkg_conf_init (opkg->conf, opkg->args, 0);
821 free (opkg->options);
822 opkg_init_options_array (opkg->conf, &opkg->options);
823 --- a/libopkg/opkg_conf.c
824 +++ b/libopkg/opkg_conf.c
826 static int opkg_conf_set_default_dest(opkg_conf_t *conf,
827 const char *default_dest_name);
828 static int set_and_load_pkg_src_list(opkg_conf_t *conf,
829 - pkg_src_list_t *nv_pair_list);
830 + pkg_src_list_t *nv_pair_list, int no_desc);
831 static int set_and_load_pkg_dest_list(opkg_conf_t *conf,
832 - nv_pair_list_t *nv_pair_list, char * lists_dir);
833 + nv_pair_list_t *nv_pair_list, char * lists_dir, int no_desc);
835 int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options)
841 -int opkg_conf_init(opkg_conf_t *conf, const args_t *args)
842 +int opkg_conf_init(opkg_conf_t *conf, const args_t *args, int no_desc)
846 @@ -294,12 +294,12 @@
847 if ( !(args->nocheckfordirorfile)){
848 /* need to run load the source list before dest list -Jamey */
849 if ( !(args->noreadfeedsfile))
850 - set_and_load_pkg_src_list(conf, &conf->pkg_src_list);
851 + set_and_load_pkg_src_list(conf, &conf->pkg_src_list, no_desc);
853 /* Now that we have resolved conf->offline_root, we can commit to
854 the directory names for the dests and load in all the package
856 - set_and_load_pkg_dest_list(conf, &tmp_dest_nv_pair_list,lists_dir);
857 + set_and_load_pkg_dest_list(conf, &tmp_dest_nv_pair_list,lists_dir, no_desc);
860 err = opkg_conf_set_default_dest(conf, args->dest);
865 -static int set_and_load_pkg_src_list(opkg_conf_t *conf, pkg_src_list_t *pkg_src_list)
866 +static int set_and_load_pkg_src_list(opkg_conf_t *conf, pkg_src_list_t *pkg_src_list, int no_desc)
868 pkg_src_list_elt_t *iter;
873 if (file_exists(list_file)) {
874 - pkg_hash_add_from_file(conf, list_file, src, NULL, 0);
875 + pkg_hash_add_from_file(conf, list_file, src, NULL, 0, no_desc);
883 -static int set_and_load_pkg_dest_list(opkg_conf_t *conf, nv_pair_list_t *nv_pair_list, char *lists_dir )
884 +static int set_and_load_pkg_dest_list(opkg_conf_t *conf, nv_pair_list_t *nv_pair_list, char *lists_dir, int no_desc)
886 nv_pair_list_elt_t *iter;
890 if (file_exists(dest->status_file_name)) {
891 pkg_hash_add_from_file(conf, dest->status_file_name,
893 + NULL, dest, 1, no_desc);
897 --- a/libopkg/opkg_conf.h
898 +++ b/libopkg/opkg_conf.h
903 -int opkg_conf_init(opkg_conf_t *conf, const args_t *args);
904 +int opkg_conf_init(opkg_conf_t *conf, const args_t *args, int no_desc);
905 void opkg_conf_deinit(opkg_conf_t *conf);
907 int opkg_conf_write_status_files(opkg_conf_t *conf);
908 --- a/tests/opkg_hash_test.c
909 +++ b/tests/opkg_hash_test.c
912 pkg_hash_init("test", hash, 1024);
914 - pkg_hash_add_from_file(&conf, argv[1], NULL, NULL, 0);
915 - pkg_hash_add_from_file(&conf, argv[2], NULL, NULL, 0);
916 + pkg_hash_add_from_file(&conf, argv[1], NULL, NULL, 0, 0);
917 + pkg_hash_add_from_file(&conf, argv[2], NULL, NULL, 0, 0);
920 pkg_print_info( pkg_hash_fetch_by_name_version(hash, "libc6", "2.2.3-2"), stdout);
921 --- a/libopkg/pkg_hash.h
922 +++ b/libopkg/pkg_hash.h
924 void pkg_hash_fetch_available(hash_table_t *hash, pkg_vec_t *available);
926 int pkg_hash_add_from_file(opkg_conf_t *conf, const char *file_name,
927 - pkg_src_t *src, pkg_dest_t *dest, int is_status_file);
928 + pkg_src_t *src, pkg_dest_t *dest, int is_status_file, int no_desc);
929 pkg_t *hash_insert_pkg(hash_table_t *hash, pkg_t *pkg, int set_status,opkg_conf_t *conf);
931 abstract_pkg_t * ensure_abstract_pkg_by_name(hash_table_t * hash, const char * pkg_name);