diff options
author | Eskil Heyn Olsen <eskil@src.gnome.org> | 2000-08-23 03:13:03 +0000 |
---|---|---|
committer | Eskil Heyn Olsen <eskil@src.gnome.org> | 2000-08-23 03:13:03 +0000 |
commit | 14e4fa6ad64405f4253bcc07659b40f85fcce667 (patch) | |
tree | e74fffbf6f0535ccc62a0154258f356964bff1af | |
parent | 3184fe2b0a38ba2835c71b10423af7c24f6f0106 (diff) | |
download | nautilus-14e4fa6ad64405f4253bcc07659b40f85fcce667.tar.gz |
Default DRY_RUN to FALSE instead of TRUE... beware.
* components/services/install/lib/eazel-install-metadata.c:
(create_default_configuration_metafile),
Default DRY_RUN to FALSE instead of TRUE... beware.
(init_default_install_configuration):
Default transaction_dir to g_get_home_dir()/.nautilus/transactions/
* components/services/install/lib/eazel-install-protocols.c:
(gnome_vfs_xfer_callback), (eazel_install_fetch_package),
Trying to make the gnomevfs fetching work properly.
(get_url_for_package):
Removed the check, since I need to do it in the gnome-vfs callback
loop.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | components/services/install/lib/eazel-install-metadata.c | 7 | ||||
-rw-r--r-- | components/services/install/lib/eazel-install-protocols.c | 40 |
3 files changed, 32 insertions, 32 deletions
@@ -1,3 +1,20 @@ +2000-08-22 Eskil Heyn Olsen <eskil@eazel.com> + + * components/services/install/lib/eazel-install-metadata.c: + (create_default_configuration_metafile), + Default DRY_RUN to FALSE instead of TRUE... beware. + + (init_default_install_configuration): + Default transaction_dir to g_get_home_dir()/.nautilus/transactions/ + + * components/services/install/lib/eazel-install-protocols.c: + (gnome_vfs_xfer_callback), (eazel_install_fetch_package), + Trying to make the gnomevfs fetching work properly. + + (get_url_for_package): + Removed the check, since I need to do it in the gnome-vfs callback + loop. + 2000-08-22 Gene Z. Ragan <gzr@eazel.com> Work in progress to support dragging onto diff --git a/components/services/install/lib/eazel-install-metadata.c b/components/services/install/lib/eazel-install-metadata.c index 660c7ec79..c13b7aa89 100644 --- a/components/services/install/lib/eazel-install-metadata.c +++ b/components/services/install/lib/eazel-install-metadata.c @@ -89,13 +89,13 @@ create_default_configuration_metafile (const char* target_file) { tree = xmlNewChild (doc->root, NULL, "VERBOSE", "TRUE"); tree = xmlNewChild (doc->root, NULL, "SILENT", "FALSE"); tree = xmlNewChild (doc->root, NULL, "DEBUG", "TRUE"); - tree = xmlNewChild (doc->root, NULL, "DRY_RUN", "TRUE"); + tree = xmlNewChild (doc->root, NULL, "DRY_RUN", "FALSE"); tree = xmlNewChild (doc->root, NULL, "FORCE", "FALSE"); tree = xmlNewChild (doc->root, NULL, "DEPEND", "FALSE"); tree = xmlNewChild (doc->root, NULL, "UPDATE", "TRUE"); tree = xmlNewChild (doc->root, NULL, "UNINSTALL", "FALSE"); tree = xmlNewChild (doc->root, NULL, "DOWNGRADE", "FALSE"); - tree = xmlNewChild (doc->root, NULL, "PORT", "8888"); + tree = xmlNewChild (doc->root, NULL, "PORT", "8888"); tree = xmlNewChild (doc->root, NULL, "HOSTNAME", "ham.eazel.com"); tree = xmlNewChild (doc->root, NULL, "PKG_LIST_STORAGE_PATH", "/package-list.xml"); tree = xmlNewChild (doc->root, NULL, "TMP_DIR", "/tmp/eazel-install"); @@ -204,6 +204,9 @@ init_default_install_configuration (const char* config_file) { rv->pkg_list = g_strdup (xml_get_value (base, "PKG_LIST")); rv->transaction_dir = g_strdup (xml_get_value (base, "TRANSACTION_DIR")); + if (rv->transaction_dir == NULL) { + rv->transaction_dir = g_strdup_printf ("%s/.nautilus/transactions", g_get_home_dir ()); + } tmpbuf = xml_get_value (base, "VERBOSE"); rv->mode_verbose = get_boolean_value_from_string (tmpbuf); diff --git a/components/services/install/lib/eazel-install-protocols.c b/components/services/install/lib/eazel-install-protocols.c index 45b70302e..af1743127 100644 --- a/components/services/install/lib/eazel-install-protocols.c +++ b/components/services/install/lib/eazel-install-protocols.c @@ -217,9 +217,9 @@ gnome_vfs_xfer_callback (GnomeVFSXferProgressInfo *info, switch (info->status) { case GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR: - g_message ("VFS Error: %s\n", + g_message ("GnomeVFS Error: %s\n", gnome_vfs_result_to_string (info->vfs_status)); - return TRUE; + return FALSE; break; case GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE: g_message ("Overwriting `%s' with `%s'", @@ -301,17 +301,18 @@ gnome_vfs_xfer_callback (GnomeVFSXferProgressInfo *info, return TRUE; default: g_message ("Unexpected phase %d", info->phase); - return TRUE; /* keep going anyway */ + return FALSE; /* keep going anyway */ } + break; case GNOME_VFS_XFER_PROGRESS_STATUS_DUPLICATE: + g_message ("Duplicate"); + return FALSE; default: - g_message ("ugly status"); - break; + g_message ("Unknown status"); + return FALSE; } - g_message ("Boh!"); - return FALSE; - + return FALSE; } gboolean @@ -504,20 +505,7 @@ eazel_install_fetch_package (EazelInstall *service, filename_from_url (url)); g_message ("%s resolved", package->name); #ifndef EAZEL_INSTALL_PROTOCOL_USE_OLD_CGI - if (g_file_test (targetname, G_FILE_TEST_ISFILE)) { - /* Uh, file already exists, check the size to see if we can reuse it */ - struct stat sbuf; - stat (targetname, &sbuf); - g_message ("File already exists, checking %d vs %d", package->bytesize, sbuf.st_size); - if (sbuf.st_size == package->bytesize) { - g_message ("Size checks out"); - result = TRUE; - } else { - result = eazel_install_fetch_file (service, url, package->name, targetname); - } - } else { - result = eazel_install_fetch_file (service, url, package->name, targetname); - } + result = eazel_install_fetch_file (service, url, package->name, targetname); #else /* EAZEL_INSTALL_PROTOCOL_USE_OLD_CGI */ if (filename_from_url (url) && strlen (filename_from_url (url))>1) { result = eazel_install_fetch_file (service, url, package->name, targetname); @@ -669,14 +657,6 @@ get_url_for_package (EazelInstall *service, pack = (PackageData*)packages->data; url = g_strdup (pack->filename); - /* Update the given package */ - if (entry==RPMSEARCH_ENTRY_NAME) { - PackageData *pack2; - pack2 = (PackageData*)data; - g_message ("setting bytesize to %d", pack->bytesize); - pack2->bytesize = pack->bytesize; - } - g_list_foreach (packages, (GFunc)packagedata_destroy_foreach, NULL); |