opkg: make .opk as the default opkg file extension
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:26:19 +0000 (05:26 +0000)
committerticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:26:19 +0000 (05:26 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@141 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/args.c
libopkg/opkg_defines.h
libopkg/opkg_download.c
libopkg/opkg_install.c
libopkg/pkg.c
libopkg/pkg_parse.c

index 564e05c3074b052e497d94a140c208cd1da9f673..85d7d7edc1703dec17cd7f9a058390a742264941 100644 (file)
@@ -244,7 +244,7 @@ void args_usage(char *complaint)
      printf("\tupdate                  Update list of available packages\n");
      printf("\tupgrade                 Upgrade all installed packages to latest version\n");
      printf("\tinstall <pkg>           Download and install <pkg> (and dependencies)\n");
      printf("\tupdate                  Update list of available packages\n");
      printf("\tupgrade                 Upgrade all installed packages to latest version\n");
      printf("\tinstall <pkg>           Download and install <pkg> (and dependencies)\n");
-     printf("\tinstall <file.ipk>      Install package <file.ipk>\n");
+     printf("\tinstall <file.opk>      Install package <file.opk>\n");
      printf("\tconfigure [<pkg>]       Configure unpacked packages\n");
      printf("\tremove <pkg|regexp>     Remove package <pkg|packages following regexp>\n");
      printf("\tflag <flag> <pkg> ...   Flag package(s) <pkg>\n");
      printf("\tconfigure [<pkg>]       Configure unpacked packages\n");
      printf("\tremove <pkg|regexp>     Remove package <pkg|packages following regexp>\n");
      printf("\tflag <flag> <pkg> ...   Flag package(s) <pkg>\n");
index 1fdef18653d724f799c1f40d3315442625d96ffb..090d7d4526351fffffe6480f6155b8dfe554f201 100644 (file)
@@ -16,7 +16,8 @@
 #ifndef OPKG_DEFINES_H
 #define OPKG_DEFINES_H
 
 #ifndef OPKG_DEFINES_H
 #define OPKG_DEFINES_H
 
-#define OPKG_PKG_EXTENSION ".ipk"
+#define OPKG_PKG_EXTENSION ".opk"
+#define IPKG_PKG_EXTENSION ".ipk"
 #define DPKG_PKG_EXTENSION ".deb"
 
 #define OPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-"
 #define DPKG_PKG_EXTENSION ".deb"
 
 #define OPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-"
index 629aa798aa181f500b55fbc13127fd95efb987bf..a8f03e27f1b11244de336d4c01da849867cd8379 100644 (file)
@@ -154,7 +154,7 @@ int opkg_download_pkg(opkg_conf_t *conf, pkg_t *pkg, const char *dir)
     sprintf_alloc(&url, "%s/%s", pkg->src->value, pkg->filename);
 
     /* XXX: BUG: The pkg->filename might be something like
     sprintf_alloc(&url, "%s/%s", pkg->src->value, pkg->filename);
 
     /* XXX: BUG: The pkg->filename might be something like
-       "../../foo.ipk". While this is correct, and exactly what we
+       "../../foo.opk". While this is correct, and exactly what we
        want to use to construct url above, here we actually need to
        use just the filename part, without any directory. */
 
        want to use to construct url above, here we actually need to
        use just the filename part, without any directory. */
 
@@ -202,6 +202,7 @@ int opkg_prepare_url_for_install(opkg_conf_t *conf, const char *url, char **name
          free(file_basec);
 
      } else if (strcmp(&url[strlen(url) - 4], OPKG_PKG_EXTENSION) == 0
          free(file_basec);
 
      } else if (strcmp(&url[strlen(url) - 4], OPKG_PKG_EXTENSION) == 0
+                || strcmp(&url[strlen(url) - 4], IPKG_PKG_EXTENSION) == 0
                || strcmp(&url[strlen(url) - 4], DPKG_PKG_EXTENSION) == 0) {
 
          err = pkg_init_from_file(pkg, url);
                || strcmp(&url[strlen(url) - 4], DPKG_PKG_EXTENSION) == 0) {
 
          err = pkg_init_from_file(pkg, url);
index a3893c7131f54e89cc2fc926d15d57f00af2e2cf..47554d0fe0b02a503c7ed9dbac3e9af55f37cf3b 100644 (file)
@@ -521,7 +521,7 @@ static int verify_pkg_installable(opkg_conf_t *conf, pkg_t *pkg)
      * XXX: BUG easy for cworth
      * 1) please point the call below to the correct current root destination
      * 2) we need to resolve how to check the required space for a pending pkg, 
      * XXX: BUG easy for cworth
      * 1) please point the call below to the correct current root destination
      * 2) we need to resolve how to check the required space for a pending pkg, 
-     *    my diddling with the .ipk file size below isn't going to cut it.
+     *    my diddling with the .opk file size below isn't going to cut it.
      * 3) return a proper error code instead of 1
      */
      int comp_size, blocks_available;
      * 3) return a proper error code instead of 1
      */
      int comp_size, blocks_available;
index 26b6efe31b4da30d28c28bfaad067d069c7490d6..d662664a362b119424aafe9fd6a4459b6e2ddda8 100644 (file)
@@ -1079,7 +1079,7 @@ void pkg_print_status(pkg_t * pkg, FILE * file)
        can be found in th available file.
 
        But, someone proposed the idea to make it possible to
        can be found in th available file.
 
        But, someone proposed the idea to make it possible to
-       reconstruct a .ipk from an installed package, (ie. for beaming
+       reconstruct a .opk from an installed package, (ie. for beaming
        from one handheld to another). So, maybe we actually want a few
        more fields here, (depends, suggests, etc.), so that that would
        be guaranteed to work even in the absence of more information
        from one handheld to another). So, maybe we actually want a few
        more fields here, (depends, suggests, etc.), so that that would
        be guaranteed to work even in the absence of more information
index 9b43754e04a6e51dcb305f4a6dc5a65c6cf91703..af5ead76dd9671e5872983efc06d642b9f7d9eab 100644 (file)
@@ -369,7 +369,7 @@ int pkg_parse_raw(pkg_t *pkg, char ***raw, pkg_src_t *src, pkg_dest_t *dest)
 out:;
     
     *raw = lines;
 out:;
     
     *raw = lines;
-/* If the ipk has not a Provides line, we insert our false line */ 
+/* If the opk has not a Provides line, we insert our false line */ 
     if ( pkg_false_provides==1)
     {
        pkg->provides_count = 1;
     if ( pkg_false_provides==1)
     {
        pkg->provides_count = 1;