summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:02:14 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:02:14 (EST)
commite107c4253aba1620f80caa375dbe0d405fcdde83 (patch)
tree16c07a9ef905cd770a49703f741f42869934e611 /libopkg
parenta18410f02b51d400450c30d0b769b2f1e3e6736a (diff)
opkg: remove some printfs and replace with opkg_message where appropriate
git-svn-id: http://opkg.googlecode.com/svn/trunk@57 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/opkg_configure.c2
-rw-r--r--libopkg/opkg_download.c4
-rw-r--r--libopkg/opkg_remove.c12
3 files changed, 12 insertions, 6 deletions
diff --git a/libopkg/opkg_configure.c b/libopkg/opkg_configure.c
index 94d37c2..34a5d6f 100644
--- a/libopkg/opkg_configure.c
+++ b/libopkg/opkg_configure.c
@@ -37,7 +37,7 @@ int opkg_configure(opkg_conf_t *conf, pkg_t *pkg)
err = pkg_run_script(conf, pkg, "postinst", "configure");
if (err) {
- printf("ERROR: %s.postinst returned %d\n", pkg->name, err);
+ opkg_message(conf, OPKG_ERROR, "ERROR: %s.postinst returned %d\n", pkg->name, err);
return err;
}
diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c
index 4160b97..27b9d2e 100644
--- a/libopkg/opkg_download.c
+++ b/libopkg/opkg_download.c
@@ -182,7 +182,9 @@ int opkg_download(opkg_conf_t *conf, const char *src, const char *dest_file_name
else
return -1;
- printf ("\n");
+ /* if no custom progress handler was set, we need to clear the default progress bar */
+ if (!opkg_cb_download_progress)
+ printf ("\n");
err = file_move(tmp_file_location, dest_file_name);
diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
index 1a84e95..6f80c4d 100644
--- a/libopkg/opkg_remove.c
+++ b/libopkg/opkg_remove.c
@@ -204,11 +204,13 @@ static int remove_autoinstalled (opkg_conf_t *conf, pkg_t *pkg)
deps = pkg_has_installed_dependents(conf, NULL, p, &dependents);
if (deps == 0)
{
- printf ("%s was autoinstalled but is now orphaned\n", buffer);
+ opkg_message (conf, OPKG_INFO,
+ "%s was autoinstalled but is now orphaned\n", buffer);
opkg_remove_pkg(conf, p,0);
}
else
- printf ("%s was autoinstalled and is still required by %d installed packages\n", buffer, deps);
+ opkg_message (conf, OPKG_INFO, "%s was autoinstalled and is still required by "
+ "%d installed packages\n", buffer, deps);
}
free (buffer);
}
@@ -272,7 +274,8 @@ int opkg_remove_pkg(opkg_conf_t *conf, pkg_t *pkg,int message)
}
if ( message==0 ){
- printf("Removing package %s from %s...\n", pkg->name, pkg->dest->name);
+ opkg_message (conf, OPKG_NOTICE,
+ "Removing package %s from %s...\n", pkg->name, pkg->dest->name);
fflush(stdout);
}
pkg->state_flag |= SF_FILELIST_CHANGED;
@@ -349,7 +352,8 @@ int remove_data_files_and_list(opkg_conf_t *conf, pkg_t *pkg)
this seems like a better thing to do to conserve
space. */
if (conffile_has_been_modified(conf, conffile)) {
- printf(" not deleting modified conffile %s\n", file_name);
+ opkg_message (conf, OPKG_NOTICE,
+ " not deleting modified conffile %s\n", file_name);
fflush(stdout);
continue;
}