mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-13 04:51:15 +00:00
Removed old FIXME's Trying to fix the memory corruption wrt ->minor. Added
2001-01-19 Eskil Heyn Olsen <eskil@eazel.com> * components/services/install/lib/eazel-install-logic2.c: (dump_tree_helper), (check_md5_on_files), (eazel_install_check_existing_packages), (get_softcat_info), (is_satisfied), (is_satisfied_features), (do_file_conflict_check), (install_packages_helper): Removed old FIXME's Trying to fix the memory corruption wrt ->minor. Added more ifdefs around debug output. * components/services/install/lib/eazel-install-object.c: (eazel_install_emit_preflight_check), (eazel_install_emit_dependency_check): Do the proper thing with total_packages and total_bytes. Use gtk_object_unref to delete packagedata object in dep_check signal. * components/services/install/lib/eazel-install-xml-package-list.c: (osd_parse_provides): Parse <FEATURE> in <PROVIDES> and blurp on unknown tags. * components/services/install/lib/eazel-package-system-rpm3.c: (eazel_package_system_rpm3_packagedata_fill_from_header), (check_if_all_packages_seen): No more start and end signals around failed signals.
This commit is contained in:
parent
7782707acb
commit
1bf4039e0a
27
ChangeLog
27
ChangeLog
|
@ -1,3 +1,30 @@
|
|||
2001-01-19 Eskil Heyn Olsen <eskil@eazel.com>
|
||||
|
||||
* components/services/install/lib/eazel-install-logic2.c:
|
||||
(dump_tree_helper), (check_md5_on_files),
|
||||
(eazel_install_check_existing_packages), (get_softcat_info),
|
||||
(is_satisfied), (is_satisfied_features), (do_file_conflict_check),
|
||||
(install_packages_helper):
|
||||
Removed old FIXME's
|
||||
Trying to fix the memory corruption wrt ->minor.
|
||||
Added more ifdefs around debug output.
|
||||
|
||||
* components/services/install/lib/eazel-install-object.c:
|
||||
(eazel_install_emit_preflight_check),
|
||||
(eazel_install_emit_dependency_check):
|
||||
Do the proper thing with total_packages and total_bytes.
|
||||
Use gtk_object_unref to delete packagedata object in dep_check
|
||||
signal.
|
||||
|
||||
* components/services/install/lib/eazel-install-xml-package-list.c:
|
||||
(osd_parse_provides):
|
||||
Parse <FEATURE> in <PROVIDES> and blurp on unknown tags.
|
||||
|
||||
* components/services/install/lib/eazel-package-system-rpm3.c:
|
||||
(eazel_package_system_rpm3_packagedata_fill_from_header),
|
||||
(check_if_all_packages_seen):
|
||||
No more start and end signals around failed signals.
|
||||
|
||||
2001-01-11 Robin * Slomkowski <rslomkow@eazel.com>
|
||||
|
||||
* nautilus.spec.in: added Nautilus_Control_throbber.oaf
|
||||
|
|
|
@ -74,11 +74,12 @@ dump_tree_helper (GList *packages, char *indent, GList *path)
|
|||
}
|
||||
|
||||
name = packagedata_get_readable_name (pack);
|
||||
trilobite_debug ("%s%p (%s) %s%s",
|
||||
trilobite_debug ("%s%p (%s) %s %s%s",
|
||||
indent,
|
||||
pack,
|
||||
name,
|
||||
pack->fillflag & MUST_HAVE ? "filled":"not_filled",
|
||||
pack->eazel_id,
|
||||
pack->fillflag & MUST_HAVE ? "filled":"not filled",
|
||||
pack->status == PACKAGE_CANNOT_OPEN ? " but failed" : "");
|
||||
tmp = g_strdup_printf ("%s ", indent);
|
||||
if (g_list_find_custom (path, name, (GCompareFunc)strcmp)) {
|
||||
|
@ -134,8 +135,11 @@ check_md5_on_files (EazelInstall *service,
|
|||
|
||||
if (memcmp (pmd5, md5, 16) != 0) {
|
||||
g_warning (_("MD5 mismatch, package %s may be compromised"), pack->name);
|
||||
#if EI2_DEBUG & 0x4
|
||||
/* get_readable_name is leaked */
|
||||
trilobite_debug ("read md5 from file %s", pack->filename);
|
||||
trilobite_debug ("for package %s version %s", pack->name, pack->version);
|
||||
trilobite_debug ("for package %s", packagedata_get_readable_name (pack));
|
||||
#endif
|
||||
eazel_install_emit_md5_check_failed (service,
|
||||
pack,
|
||||
trilobite_md5_get_string_from_md5_digest (md5));
|
||||
|
@ -294,8 +298,15 @@ eazel_install_check_existing_packages (EazelInstall *service,
|
|||
pack->minor, existing_package->minor);
|
||||
} else if (!pack->minor && existing_package->minor) {
|
||||
/* If the given packages does not have a minor,
|
||||
but the installed has, assume we're updated */
|
||||
res = 1;
|
||||
but the installed has, assume we're fine */
|
||||
/* FIXME: bugzilla.eazel.com
|
||||
This is a patch, it should be res=1, revert when
|
||||
softcat is updated to have revisions for all packages
|
||||
(post PR3) */
|
||||
res = 0;
|
||||
} else {
|
||||
/* Eh, do nothing just to be safe */
|
||||
res = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -481,6 +492,8 @@ get_softcat_info (EazelInstall *service,
|
|||
break;
|
||||
case EAZEL_INSTALL_STATUS_DOWNGRADES:
|
||||
case EAZEL_INSTALL_STATUS_QUO:
|
||||
(*package)->status = PACKAGE_ALREADY_INSTALLED;
|
||||
eazel_install_emit_install_failed (service, *package);
|
||||
gtk_object_unref (GTK_OBJECT (*package));
|
||||
result = PACKAGE_SKIPPED;
|
||||
break;
|
||||
|
@ -595,7 +608,7 @@ dedupe (EazelInstall *service,
|
|||
void check_dependencies (EazelInstall *service, GList *packages);
|
||||
void check_dependencies_foreach (PackageData *package, EazelInstall *service);
|
||||
gboolean is_satisfied (EazelInstall *service, PackageDependency *dep);
|
||||
gboolean is_satisfied_features (EazelInstall *service, GList *features);
|
||||
gboolean is_satisfied_features (EazelInstall *service, PackageData *package);
|
||||
|
||||
gboolean
|
||||
is_satisfied (EazelInstall *service,
|
||||
|
@ -612,7 +625,8 @@ is_satisfied (EazelInstall *service,
|
|||
if (dep->version != NULL) {
|
||||
char *sense_str = eazel_softcat_sense_flags_to_string (dep->sense);
|
||||
#if EI2_DEBUG & 0x4
|
||||
trilobite_debug ("is_satisfied? %p %s %s %s", dep->package, dep->package->name, sense_str, dep->version);
|
||||
trilobite_debug ("is_satisfied? %p %s %s %s",
|
||||
dep->package, dep->package->name, sense_str, dep->version);
|
||||
#endif
|
||||
key = g_strdup_printf ("%s-%s-%s", dep->package->eazel_id, sense_str, dep->version);
|
||||
g_free (sense_str);
|
||||
|
@ -655,14 +669,17 @@ is_satisfied (EazelInstall *service,
|
|||
result = TRUE;
|
||||
}
|
||||
} else {
|
||||
if (is_satisfied_features (service, dep->package->features)) {
|
||||
if (dep->package->features && is_satisfied_features (service, dep->package)) {
|
||||
#if EI2_DEBUG & 0x4
|
||||
trilobite_debug ("\t--> feature satisfied");
|
||||
trilobite_debug ("\t--> features of package are satisfied");
|
||||
#endif
|
||||
result = TRUE;
|
||||
}
|
||||
}
|
||||
if (result) {
|
||||
#if EI2_DEBUG & 0x4
|
||||
trilobite_debug ("\t--> feature is satisfied");
|
||||
#endif
|
||||
g_hash_table_insert (service->private->dep_ok_hash,
|
||||
key,
|
||||
GINT_TO_POINTER (DEPENDENCY_OK));
|
||||
|
@ -683,13 +700,18 @@ is_satisfied (EazelInstall *service,
|
|||
|
||||
gboolean
|
||||
is_satisfied_features (EazelInstall *service,
|
||||
GList *features)
|
||||
PackageData *package)
|
||||
{
|
||||
gboolean result = TRUE;
|
||||
GList *iterator;
|
||||
GList *features;
|
||||
|
||||
g_assert (service);
|
||||
g_assert (EAZEL_IS_INSTALL (service));
|
||||
g_assert (package);
|
||||
g_assert (IS_PACKAGEDATA (package));
|
||||
|
||||
features = package->features;
|
||||
|
||||
trilobite_debug ("is_satisfied_features %d features", g_list_length (features));
|
||||
|
||||
|
@ -1246,6 +1268,10 @@ do_file_conflict_check (EazelInstall *service,
|
|||
if (extra_packages == NULL) {
|
||||
check_feature_consistency (service, *packages);
|
||||
prune_failed_packages (service, packages);
|
||||
} else {
|
||||
#if EI2_DEBUG & 0x4
|
||||
trilobite_debug ("extra_packages set, no doing feature consistency check");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1424,6 +1450,9 @@ install_packages_helper (EazelInstall *service,
|
|||
GList **packages,
|
||||
GList **extra_packages)
|
||||
{
|
||||
#if EI2_DEBUG & 0x4
|
||||
trilobite_debug ("-> install_packages_helper");
|
||||
#endif
|
||||
do_dep_check (service, packages);
|
||||
do_file_conflict_check (service, packages, extra_packages);
|
||||
|
||||
|
@ -1433,15 +1462,9 @@ install_packages_helper (EazelInstall *service,
|
|||
trilobite_debug ("FINAL TREE END");
|
||||
#endif
|
||||
|
||||
/* FIXME: bugzilla.eazel.com 5264(fixed), 5266, 5267
|
||||
finish this cruft by
|
||||
1: traversing the tree to see if anything failed/broke (5264)
|
||||
2 if failed, emit_failed on the root, and remove root from tree
|
||||
3: if any broke any other, add the others to tree and recurse
|
||||
else
|
||||
4: traverse tree and download packages (5266)
|
||||
5: force install... (5267)
|
||||
*/
|
||||
#if EI2_DEBUG & 0x4
|
||||
trilobite_debug ("<- install_packages_helper");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1343,11 +1343,14 @@ eazel_install_emit_preflight_check (EazelInstall *service,
|
|||
GList *iterator;
|
||||
unsigned long size_packages, num_packages;
|
||||
gboolean result;
|
||||
GList *flat_packages;
|
||||
|
||||
EAZEL_INSTALL_SANITY_VAL(service, FALSE);
|
||||
|
||||
size_packages = eazel_install_get_size_increasement (service, packages);
|
||||
num_packages = g_list_length (packages);
|
||||
flat_packages = flatten_packagedata_dependency_tree (packages);
|
||||
size_packages = eazel_install_get_size_increasement (service, flat_packages);
|
||||
num_packages = g_list_length (flat_packages);
|
||||
g_list_free (flat_packages);
|
||||
|
||||
for (iterator = packages; iterator; glist_step (iterator)) {
|
||||
PackageData *pack = (PackageData*)iterator->data;
|
||||
|
@ -1523,11 +1526,13 @@ eazel_install_emit_dependency_check (EazelInstall *service,
|
|||
needed_package = packagedata_copy (needs->package, FALSE);
|
||||
if (needs->version) {
|
||||
g_free (needed_package->version);
|
||||
needed_package->version = NULL;
|
||||
g_free (needed_package->minor);
|
||||
needed_package->minor = NULL;
|
||||
needed_package->version = g_strdup (needs->version);
|
||||
}
|
||||
gtk_signal_emit (GTK_OBJECT (service), signals[DEPENDENCY_CHECK], package, needed_package);
|
||||
packagedata_destroy (needed_package, TRUE);
|
||||
gtk_object_unref (GTK_OBJECT (needed_package));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -678,6 +678,12 @@ osd_parse_provides (PackageData *pack, xmlNodePtr node, GList **feature_list)
|
|||
g_free (tmp);
|
||||
got_package = TRUE;
|
||||
}
|
||||
} else if (g_strcasecmp (child->name, "FEATURE") == 0) {
|
||||
tmp = xmlNodeGetContent (child);
|
||||
list = g_list_prepend (list, g_strdup (tmp));
|
||||
xmlFree (tmp);
|
||||
} else {
|
||||
trilobite_debug ("Unknown tag %s in xml", child->name);
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
|
|
|
@ -666,6 +666,8 @@ eazel_package_system_rpm3_packagedata_fill_from_header (EazelPackageSystemRpm3 *
|
|||
free ((void*)requires_version);
|
||||
|
||||
}
|
||||
/* FIXME: bugzilla.eazel.com 5826
|
||||
Load in the features of the package */
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -1075,9 +1077,6 @@ check_if_all_packages_seen (EazelPackageSystemRpm3 *system,
|
|||
PackageData *pack = (PackageData*)iterator->data;
|
||||
/* HACK: that fixes bugzilla.eazel.com 4914 */
|
||||
if (op==EAZEL_PACKAGE_SYSTEM_OPERATION_UNINSTALL) {
|
||||
eazel_package_system_emit_start (EAZEL_PACKAGE_SYSTEM (system),
|
||||
op,
|
||||
pack);
|
||||
if (eazel_package_system_is_installed (EAZEL_PACKAGE_SYSTEM (system),
|
||||
dbpath,
|
||||
pack->name,
|
||||
|
@ -1086,22 +1085,20 @@ check_if_all_packages_seen (EazelPackageSystemRpm3 *system,
|
|||
EAZEL_SOFTCAT_SENSE_EQ)) {
|
||||
fail (system, "%s is still installed", pack->name);
|
||||
eazel_package_system_emit_failed (EAZEL_PACKAGE_SYSTEM (system), op, pack);
|
||||
}
|
||||
eazel_package_system_emit_end (EAZEL_PACKAGE_SYSTEM (system),
|
||||
op,
|
||||
pack);
|
||||
} else {
|
||||
eazel_package_system_emit_start (EAZEL_PACKAGE_SYSTEM (system),
|
||||
op,
|
||||
pack);
|
||||
eazel_package_system_emit_end (EAZEL_PACKAGE_SYSTEM (system),
|
||||
op,
|
||||
pack);
|
||||
}
|
||||
} else {
|
||||
if (!g_list_find_custom (seen,
|
||||
pack,
|
||||
(GCompareFunc)eazel_install_package_compare)) {
|
||||
fail (system, "did not see %s", pack->name);
|
||||
eazel_package_system_emit_start (EAZEL_PACKAGE_SYSTEM (system),
|
||||
op,
|
||||
pack);
|
||||
eazel_package_system_emit_failed (EAZEL_PACKAGE_SYSTEM (system), op, pack);
|
||||
eazel_package_system_emit_end (EAZEL_PACKAGE_SYSTEM (system),
|
||||
op,
|
||||
pack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue