opkg: remove opkg.h in preperation for new API
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:05:13 +0000 (05:05 +0000)
committerticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:05:13 +0000 (05:05 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@65 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

48 files changed:
Makefile.am
configure.ac
libopkg/Makefile.am
libopkg/args.c
libopkg/conffile.c
libopkg/conffile.h
libopkg/conffile_list.c
libopkg/conffile_list.h
libopkg/file_util.c
libopkg/includes.h
libopkg/libopkg.c
libopkg/nv_pair.c
libopkg/nv_pair_list.c
libopkg/opkg.h [deleted file]
libopkg/opkg_cmd.c
libopkg/opkg_conf.c
libopkg/opkg_conf.h
libopkg/opkg_configure.c
libopkg/opkg_download.c
libopkg/opkg_install.c
libopkg/opkg_install.h
libopkg/opkg_message.c
libopkg/opkg_message.h
libopkg/opkg_remove.c
libopkg/opkg_upgrade.c
libopkg/opkg_upgrade.h
libopkg/opkg_utils.c
libopkg/opkg_utils.h
libopkg/pkg.c
libopkg/pkg_depends.c
libopkg/pkg_depends.h
libopkg/pkg_dest.c
libopkg/pkg_dest.h
libopkg/pkg_dest_list.c
libopkg/pkg_extract.c
libopkg/pkg_hash.c
libopkg/pkg_hash.h
libopkg/pkg_parse.c
libopkg/pkg_src.c
libopkg/pkg_src_list.c
libopkg/pkg_vec.c
libopkg/pkg_vec.h
libopkg/sprintf_alloc.c
libopkg/str_list.c
libopkg/str_util.c
libopkg/void_list.c
libopkg/xregex.c
libopkg/xsystem.c

index 3550b7de3ca626f51c5dbdb243969602fbed2eb1..e48647768e55b7001f5e9f08c47afe3520f2b657 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = libbb libopkg tests src
+SUBDIRS = libbb libopkg src
 
 HOST_CPU=@host_cpu@
 BUILD_CPU=@build_cpu@
index 51c17bb11755635a7363c330dac66146ea098bf5..63c72567e3a355e0999c4d3ce98958fed7b70306 100644 (file)
@@ -4,6 +4,7 @@ AM_INIT_AUTOMAKE([opkg], [0.99.163])
 AM_CONFIG_HEADER(libopkg/config.h)
 
 AC_CANONICAL_HOST
+AC_GNU_SOURCE 
 
 
 for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
index e3548a7934d98ce0bbffa9a91cfee2c1fffa6878..e8163173ec17fbd983a433fb004b843629766db0 100644 (file)
@@ -11,7 +11,6 @@ libopkg_include_HEADERS= \
        hash_table.h \
        includes.h \
        opkg_conf.h \
-       opkg.h \
        opkg_message.h \
        opkg_state.h \
        nv_pair.h \
@@ -32,7 +31,7 @@ libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
 
 opkg_core_sources = args.c args.h \
                    user.c user.h 
-opkg_libcore_sources = args.c args.h libopkg.c libopkg.h opkg.h\
+opkg_libcore_sources = args.c args.h libopkg.c libopkg.h\
                    user.c user.h opkg_state.c opkg_state.h
 opkg_cmd_sources = opkg_cmd.c opkg_cmd.h \
                   opkg_configure.c opkg_configure.h \
index 8f6d4ee0f9da0474ef53f19d7c0c9754d33d5d80..29e8852d8787d3857b4cefa2caebd980ef515d9a 100644 (file)
@@ -20,7 +20,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "config.h"
 #include "args.h"
index 5f41cc174d2d4cc8ac061dafac7d40824ad9df35..519ba45fc037ab97a4acdfc79ab3d269357f7765 100644 (file)
@@ -18,7 +18,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include "opkg.h"
+#include "includes.h"
 #include "opkg_message.h"
 
 #include "conffile.h"
index 130d1d8d9739437fb20f6ff40ecb9e4e27f4e2e3..6166cc62ef326fd9831f95a5e9d18f02f1ef7c86 100644 (file)
 #define CONFFILE_H
 
 #include "nv_pair.h"
-
 typedef struct nv_pair conffile_t;
 
+#include "opkg_conf.h"
+
 int conffile_init(conffile_t *conffile, const char *file_name, const char *md5sum);
 void conffile_deinit(conffile_t *conffile);
 int conffile_has_been_modified(struct opkg_conf *conf, conffile_t *conffile);
index 27d48d52824551400e004f7ff24030e6d0c16959..a857de5a8391c7f6326f23b626a5690e2decf2ce 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "conffile_list.h"
 
index a5daac9250e30086266fac73d7d80b494ef4bd36..c1421c1e0d3fc41ad483243f2250578699e230e8 100644 (file)
 #ifndef CONFFILE_LIST_H
 #define CONFFILE_LIST_H
 
-#include "conffile.h"
 #include "nv_pair_list.h"
 
 typedef struct nv_pair_list_elt conffile_list_elt_t;
 typedef struct nv_pair_list conffile_list_t;
 
+#include "conffile.h"
+
 int conffile_list_init(conffile_list_t *list);
 void conffile_list_deinit(conffile_list_t *list);
 
index 3ab1cc571660efa3856812f54e767fe9c078e6f5..6f249a2bc656a87654502f88def8116c9f6fe87b 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 
index 5a67001ab4d2054326dc5c521cf5dc673241307b..65beb56e7e758489712b27110c0d87c707dbfdcf 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef INCLUDES_H
 #define INCLUDES_H
 
+#include <config.h>
 #include <stdio.h>
 
 #if STDC_HEADERS
 #endif
 
 #if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-/* XXX: What's the right way to pick up GNU's strndup declaration? */
-# if __GNUC__
-#   define __USE_GNU 1
-# endif
 # include <string.h>
-# undef __USE_GNU
 #endif
 
 #if HAVE_STRINGS_H
index 3f5adc3122682e63fc50fc4a5fbd0636e8f16dc5..c57838ac3f1b0524da3a6d8d7fa45671e221a1cb 100644 (file)
@@ -15,7 +15,6 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
 #include "includes.h"
 #include "libopkg.h"
 
@@ -24,7 +23,8 @@
 #include "opkg_cmd.h"
 #include "file_util.h"
 
-
+#include "opkg_message.h"
+#include "opkg_error.h"
 
 opkg_status_callback opkg_cb_status = NULL;
 opkg_list_callback opkg_cb_list = NULL;
index 75a08e8dca0cd5040937446a5b39d21056a05715..3d109bb4c4fdd4aca4bc404ce206994dc21b0a2a 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "nv_pair.h"
 #include "str_util.h"
index b92532218f10b54a8e7b4bf6f498dcf4e479b776..49d6225a899db2c1949afe7ce0e337cb60134eaa 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "nv_pair.h"
 #include "void_list.h"
diff --git a/libopkg/opkg.h b/libopkg/opkg.h
deleted file mode 100644 (file)
index 12a264a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* opkg.h - the itsy package management system
-
-   Carl D. Worth
-
-   Copyright (C) 2001 University of Southern California
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-*/
-
-#ifndef OPKG_H
-#define OPKG_H
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "includes.h"
-#include "opkg_conf.h"
-#include "opkg_message.h"
-
-#include "opkg_error.h"
-#include "opkg_defines.h"
-#include "opkg_state.h"
-
-#endif
index 5aa5dfa3f4c6e043a7f228363eab55ba8e0cfb6f..02e67556e1b856a7caeb87bc09af755f6daedfea 100644 (file)
    General Public License for more details.
 */
 
-#include <string.h>
 
-#include "opkg.h"
-#include <libgen.h>
-#include <glob.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h>
-#include <stdio.h>
+#include "includes.h"
 #include <dirent.h>
+#include <glob.h>
 
 #include "opkg_conf.h"
 #include "opkg_cmd.h"
@@ -38,6 +31,8 @@
 #include "file_util.h"
 #include "str_util.h"
 #include "libbb/libbb.h"
+#include "opkg_utils.h"
+#include "opkg_defines.h"
 
 #include <fnmatch.h>
 
index 8cda3216dace84a32269b68dc39555611cc4587d..34ca34d904a0fe52671e1d8cc291c4595d8dec39 100644 (file)
@@ -15,9 +15,7 @@
    General Public License for more details.
 */
 
-#include <glob.h>
-
-#include "opkg.h"
+#include "includes.h"
 #include "opkg_conf.h"
 
 #include "xregex.h"
@@ -27,6 +25,9 @@
 #include "file_util.h"
 #include "str_util.h"
 #include "xsystem.h"
+#include <glob.h>
+#include "opkg_defines.h"
+
 
 static int opkg_conf_parse_file(opkg_conf_t *conf, const char *filename,
                                pkg_src_list_t *pkg_src_list,
index 98b3fe1ddff19a17a8a552a8433dc58c67479e7b..b44a7613ed93e365ff5cbf2a21db4f6ef3e18de0 100644 (file)
@@ -21,7 +21,6 @@
 typedef struct opkg_conf opkg_conf_t;
 
 #include "hash_table.h"
-#include "opkg.h"
 #include "args.h"
 #include "pkg.h"
 #include "pkg_hash.h"
index 34a5d6fc4b21555026958f9b97b589fcf10fe3b6..87e6161367a86dac7660f7a6d0620feb5e086fd4 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include "sprintf_alloc.h"
 #include "opkg_configure.h"
 #include "opkg_state.h"
index cbf8264521baa96dd6eaf1016aec5eb341b5ca22..7dc06ef6ca07fcdfc6c44a76db9fdd99ae7b5f76 100644 (file)
@@ -22,7 +22,7 @@
 #include <gpgme.h>
 #endif
 
-#include "opkg.h"
+#include "includes.h"
 #include "opkg_download.h"
 #include "opkg_message.h"
 #include "opkg_state.h"
@@ -31,6 +31,7 @@
 #include "xsystem.h"
 #include "file_util.h"
 #include "str_util.h"
+#include "opkg_defines.h"
 
 opkg_download_progress_callback opkg_cb_download_progress = NULL;
 
index 883f559fe0b21674d23984a5b39436c0db7fa354..eae72dc7ae8a14db4ecb9840f3f97dc960027f46 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <errno.h>
 #include <dirent.h>
 #include <glob.h>
@@ -35,6 +35,7 @@ typedef void (*sighandler_t)(int);
 #include "opkg_utils.h"
 #include "opkg_message.h"
 #include "opkg_state.h"
+#include "opkg_defines.h"
 
 #include "sprintf_alloc.h"
 #include "file_util.h"
index 8d064ace4336b1a1f0b3be3da0289932a0ee2262..e4d0c081d45a85358a0f39b275d8507a5dbee65d 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "pkg.h"
 #include "opkg_conf.h"
+#include "opkg_error.h"
 
 opkg_error_t opkg_install_by_name(opkg_conf_t *conf, const char *pkg_name);
 opkg_error_t opkg_install_multi_by_name(opkg_conf_t *conf, const char *pkg_name);
index c00dd979a953b198e25096caf27c808798503027..a2397c54ed1209bd27b0f486be502c29add1213b 100644 (file)
@@ -14,7 +14,7 @@
 */
 
 
-#include "opkg.h"
+#include "includes.h"
 #include "opkg_conf.h"
 #include "opkg_message.h"
 
index e0182ddaa24e48278bc837a30fd23d1a9f787d17..eb9c4de7613c25b52ebeb73ad36de3d1900e3e22 100644 (file)
@@ -16,7 +16,6 @@
 #ifndef _OPKG_MESSAGE_H_
 #define _OPKG_MESSAGE_H_
 
-#include "opkg.h"
 #include "opkg_conf.h"
 
 typedef enum {
index afb8aa79e9b2d040931933fc18d965957d2d7975..10f7f440403ac5454ca16c22fd477f7c9a702d85 100644 (file)
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include "opkg_message.h"
 
 #include <glob.h>
 
 #include "opkg_remove.h"
+#include "opkg_error.h"
+#include "opkg_state.h"
 
 #include "file_util.h"
 #include "sprintf_alloc.h"
index b0b047fa0b862e6f438a8a5b5ff9675ce3d66811..c8b3f1925d7ea89034de4bb0b6260686966e1d38 100644 (file)
@@ -16,7 +16,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include "opkg_install.h"
 #include "opkg_message.h"
 
index 5022df46e6e28d9e5e4116d27e077ad95e50fac8..2e08c53a215e31b24c5d98af546599bf40abf7ca 100644 (file)
@@ -13,6 +13,4 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
-
 int opkg_upgrade_pkg(opkg_conf_t *conf, pkg_t *old);
index 0b596453d5859abffa5dc1ff1166e653e74f8073..3cbedd8e17788d0da938725e8348aeaaaf69064c 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <errno.h>
 #include <ctype.h>
 #include <sys/vfs.h>
index 782d7d67d8012ce1664420f69cb7568321e65224..4d11316683b38be46620581af115aa058de1c971 100644 (file)
@@ -19,6 +19,7 @@
 #define OPKG_UTILS_H
 
 #include "pkg.h"
+#include "opkg_error.h"
 
 void push_error_list(struct errlist **errors,char * msg);
 void reverse_error_list(struct errlist **errors);
index 76bb61d3d3e87bf385476a478d008d438c266e70..aa56b66789a12f791025cae263352d0e1b02a2e4 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <ctype.h>
 #include <string.h>
 #include <errno.h>
index 7ebd04e75b49c7820b9149b07f7b0b62d7e3a6c6..63464c0f3bd8c664ec1c22a989f4ea237e391cf8 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <errno.h>
 #include <ctype.h>
    
index b0066ce2bc6cfd1adc6528c42f187fd6e52b5e8f..87f2e37666dede6030913d26d4c5d0534253888c 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "pkg.h"
 #include "pkg_hash.h"
+#include "includes.h"
 
 enum depend_type {
     PREDEPEND,
index f015dd6dbffa3eed687f660de865d73e55f28f65..e7825ce40823bba862b0081727f8dc1bcc24afd1 100644 (file)
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "pkg_dest.h"
 #include "file_util.h"
 #include "str_util.h"
 #include "sprintf_alloc.h"
+#include "opkg_state.h"
+#include "opkg_defines.h"
 
 int pkg_dest_init(pkg_dest_t *dest, const char *name, const char *root_dir,const char * lists_dir)
 {
index 33c72dacd66f68984b08e17eaea9e67dd13747d2..ab895f11319cc12dacb5a42b392dd85c65ab2b71 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef PKG_DEST_H
 #define PKG_DEST_H
 
+#include "includes.h"
+
 typedef struct pkg_dest pkg_dest_t;
 struct pkg_dest
 {
index 023e58e404b4908c047e29acbda6b97114c53eef..75d0f3d4ada448c5942d08c6c4caca0514307a43 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "pkg_dest.h"
 #include "void_list.h"
index 78c252b9b21dda3e95a28f8535b91bace2426b85..23356eab205edc60489547ae558a844ef70efbba 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <errno.h>
 
 #include "pkg_extract.h"
index 0106e6550740493ddbf1391feb62de6c6491d042..26e77485e2e93dabaf61dbdc2132423dba7612fa 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <errno.h>
 #include <ctype.h>
 #include <stdlib.h>
index 730341878af60e6cfff12ee300d28f6e8f521dc5..548b1b8e2dc3f0f90f56d7938f46cd7d12fd7e94 100644 (file)
@@ -19,6 +19,8 @@
 #define PKG_HASH_H
 
 #include "pkg.h"
+#include "pkg_src.h"
+#include "pkg_dest.h"
 #include "pkg_vec.h"
 #include "hash_table.h"
 
index 5b321b5c8b8843ba2ac4ba9634e19c5d8ca9fa3c..5acaf5638d09761888163f977c65f35276fa43c1 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <errno.h>
 #include <ctype.h>
    
index 0566b7faf30b2583eae4bb34d4644d1973f9b297..f531af05cf1a98037262d4cc40b6397b61fb343a 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "pkg_src.h"
 #include "str_util.h"
index c1e63b4b2951c93229b0c2c2235e7cfc30b36696..26881ce522aab0b9f2affe2232dee9d6de28c642 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "pkg_src_list.h"
 #include "void_list.h"
index 690b7e6f94c0a8632849b77c5e9715cb9265a5c6..294571f0f93dd634cc814ea5aa013159b8a14d75 100644 (file)
    General Public License for more details.
 */
 
-#include <stdlib.h>
+#include "includes.h"
 #include <fnmatch.h>
 #include "xregex.h"
-#include "opkg.h"
 #include "pkg.h"
+#include "opkg_message.h"
 
 pkg_vec_t * pkg_vec_alloc(void)
 {
index 8941c9b1928acdc3f2f72b9316dafe34c15f99a9..8ebb6b1fb497753973d0ebae85a7dccf80286f5d 100644 (file)
 
 typedef struct pkg pkg_t;
 typedef struct abstract_pkg abstract_pkg_t;
+typedef struct pkg_vec pkg_vec_t;
+typedef struct abstract_pkg_vec abstract_pkg_vec_t;
+
+#include "opkg_conf.h"
 
 struct pkg_vec
 {
     pkg_t **pkgs;
     int len;
 };
-typedef struct pkg_vec pkg_vec_t;
 
 struct abstract_pkg_vec
 {
     abstract_pkg_t **pkgs;
     int len;
 };
-typedef struct abstract_pkg_vec abstract_pkg_vec_t;
 
 
 pkg_vec_t * pkg_vec_alloc(void);
index 1d53b2053bbcc7f4c2b6f035302d3f800e3c4a04..8c669949670502d9852084a5a64bf12bae5d7408 100644 (file)
@@ -15,7 +15,7 @@
    GNU General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <stdarg.h>
 
 #include "sprintf_alloc.h"
index e79bf8d9d3b7d11d60647eee3fcbd59d0c28274f..61697c906f485f072ca653c9ee4ab434febc682f 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "str_list.h"
 
index e1f5e682aca126efb5461c49532a3a909e652b45..1bb888389d60f3f8dd9bc47383adbd08e55c1aee 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 int str_starts_with(const char *str, const char *prefix)
 {
index af8e6a3c1390fa08f7e24fff628b6af5da18f803..81a51af95eb37a481929e4104dd0b863a1a05b1b 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <errno.h>
 
 #include "void_list.h"
index 7e5005083b2ad8a5482c6499632a01398bc89c21..0ae54e73ae6fd2434f7449499f0f89a0d93e144a 100644 (file)
@@ -15,7 +15,7 @@
    GNU General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "xregex.h"
 
index 06d6ae4fa1c0b6a586756f8acffe175f6a70d17a..267f2f9e9b1bcdf57468e461a74da28b8912ba35 100644 (file)
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <sys/wait.h>
 
 #include "xsystem.h"