From 04c02d72227f9fddc95741a0a936ed0f7ac33c39 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 00:20:28 -0500 Subject: opkg: improve opkg_install error reporting and include a check to verify repository signature during install git-svn-id: http://opkg.googlecode.com/svn/trunk@123 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'tests') diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c index 7033ced..d9bd0ef 100644 --- a/tests/libopkg_test.c +++ b/tests/libopkg_test.c @@ -4,7 +4,7 @@ opkg_package_t *find_pkg = NULL; -char *errors[8] = { +char *errors[10] = { "No Error", "Unknown Eror", "Download failed", @@ -12,9 +12,14 @@ char *errors[8] = { "Package already installed", "Package not available", "Package not found", - "Package not installed" + "Package not installed", + "Signature check failed", + "MD5 sum failed" }; + +#define TEST_PACKAGE "aspell" + void progress_callback (opkg_t *opkg, const opkg_progress_data_t *progress, void *data) { @@ -112,13 +117,13 @@ main (int argc, char **argv) else printf ("No package available to test find_package.\n"); - err = opkg_install_package (opkg, "aspell", progress_callback, "Installing..."); + err = opkg_install_package (opkg, TEST_PACKAGE, progress_callback, "Installing..."); printf ("\nopkg_install_package returned %d (%s)\n", err, errors[err]); - err = opkg_upgrade_package (opkg, "aspell", progress_callback, "Upgrading..."); + err = opkg_upgrade_package (opkg, TEST_PACKAGE, progress_callback, "Upgrading..."); printf ("\nopkg_upgrade_package returned %d (%s)\n", err, errors[err]); - err = opkg_remove_package (opkg, "aspell", progress_callback, "Removing..."); + err = opkg_remove_package (opkg, TEST_PACKAGE, progress_callback, "Removing..."); printf ("\nopkg_remove_package returned %d (%s)\n", err, errors[err]); printf ("Listing upgradable packages...\n"); -- cgit v0.9.1