Commit b48cda85 authored by Darin Adler's avatar Darin Adler

Saw the Tinderbox broken, so I just had to fix it. Also, I

	couldn't compile, and check-THANKS.pl failed.

	* libnautilus-extensions/nautilus-string.c:
	(nautilus_istr_compare): Change back nautilus_istr_compare to its
	old meaning.
	* libnautilus-extensions/nautilus-glib-extensions.c:
	(compare_strings_case_breaks_ties),
	(nautilus_g_str_list_sort_case_insensitive): Make the case
	insensitive sort use nautilus_strcmp_case_breaks_ties.

	* components/services/install/lib/eazel-install-protocols.c:
	(eazel_install_fetch_package_by_id):
	* components/services/install/lib/eazel-install-query.c:
	(eazel_install_simple_query):
	* components/services/install/lib/eazel-install-rpm-glue.c:
	(install_new_packages), (eazel_install_prepare_package_system),
	(eazel_install_free_package_system),
	(eazel_install_add_to_rpm_set), (eazel_install_fetch_dependencies):
	* components/services/install/lib/eazel-install-rpm-signature.c:
	(trilobite_check_rpm_signature):
	* components/services/install/lib/eazel-install-types.c:
	(packagedata_status_str_to_enum),
	(packagedata_modstatus_enum_to_str),
	(packagedata_modstatus_str_to_enum):
	* components/services/install/lib/eazel-install-xml-package-list.c:
	(generate_xml_package_list):
	Fixed a bunch of uninitialized variable warnings. At least one was
	probably a real bug, so Eskil needs to review these changes.

	* components/rpmview/nautilus-rpm-view.c:
	(nautilus_rpm_view_update_from_uri): This didn't compile with the
	Red Hat 6.1 version of the rpm library. So I fixed it. I hope I
	did it right. Eskil needs to review this change.

	* THANKS: Victor's name needed another space between it and the
	email address.
	* check-THANKS.pl: Missing comma, also the misspelling of Josh's
	email address was not mapped to his new email address.
parent 10b8bae1
2000-10-02 Darin Adler <darin@eazel.com>
Saw the Tinderbox broken, so I just had to fix it. Also, I
couldn't compile, and check-THANKS.pl failed.
* libnautilus-extensions/nautilus-string.c:
(nautilus_istr_compare): Change back nautilus_istr_compare to its
old meaning.
* libnautilus-extensions/nautilus-glib-extensions.c:
(compare_strings_case_breaks_ties),
(nautilus_g_str_list_sort_case_insensitive): Make the case
insensitive sort use nautilus_strcmp_case_breaks_ties.
* components/services/install/lib/eazel-install-protocols.c:
(eazel_install_fetch_package_by_id):
* components/services/install/lib/eazel-install-query.c:
(eazel_install_simple_query):
* components/services/install/lib/eazel-install-rpm-glue.c:
(install_new_packages), (eazel_install_prepare_package_system),
(eazel_install_free_package_system),
(eazel_install_add_to_rpm_set), (eazel_install_fetch_dependencies):
* components/services/install/lib/eazel-install-rpm-signature.c:
(trilobite_check_rpm_signature):
* components/services/install/lib/eazel-install-types.c:
(packagedata_status_str_to_enum),
(packagedata_modstatus_enum_to_str),
(packagedata_modstatus_str_to_enum):
* components/services/install/lib/eazel-install-xml-package-list.c:
(generate_xml_package_list):
Fixed a bunch of uninitialized variable warnings. At least one was
probably a real bug, so Eskil needs to review these changes.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_update_from_uri): This didn't compile with the
Red Hat 6.1 version of the rpm library. So I fixed it. I hope I
did it right. Eskil needs to review this change.
* THANKS: Victor's name needed another space between it and the
email address.
* check-THANKS.pl: Missing comma, also the misspelling of Josh's
email address was not mapped to his new email address.
2000-10-02 Maciej Stachowiak <mjs@eazel.com>
Fixed bug 3223.
......
......@@ -20,7 +20,7 @@ Morten Welinder <terra@diku.dk> - check-fixme suggestions
Richard Hult <rhult@hem.passagen.se> - bug reporting
Robert Brady <rwb197@zepler.org> - bugfixes
Shane Butlers <sbutle@deakin.edu.au> - IDE in hardware view patch for showing IDE
Victor Lecha <victor@eazel.com> - testing, build fixes.
Victor Lecha <victor@eazel.com> - testing, build fixes.
As well as the following people who contributed translations:
......
......@@ -50,7 +50,7 @@ my %email_map = ('at@ue-spacy.com' => 'tagoh@gnome.gr.jp',
'chief_wanker@eazel.com' => 'eskil@eazel.com',
'eskil@eazel.om' => 'eskil@eazel.com',
'yakk@yakk.net' => 'yakk@yakk.net.au',
'linuxfan@ionet..net' => 'linuxfan@ionet.net',
'linuxfan@ionet..net' => 'josh@eazel.com',
'rslokow@eazel.com' => 'rslomkow@eazel.com',
'snickell@stanford.edu' => 'seth@eazel.com',
'mathieu@gnome.org' => 'mathieu@eazel.com',
......@@ -58,7 +58,7 @@ my %email_map = ('at@ue-spacy.com' => 'tagoh@gnome.gr.jp',
'kmaraas@online.no' => 'kmaraas@gnome.org',
'kmaraas@gnu.org' => 'kmaraas@gnome.org',
'raph@gimp.org' => 'raph@acm.org',
'baulig@suse.de' => 'martin@home-of-linux.org'
'baulig@suse.de' => 'martin@home-of-linux.org',
'linuxfan@ionet.net' => 'josh@eazel.com');
......@@ -115,7 +115,7 @@ LOOP: while (<CHANGELOGS>) {
if ($name_map{$name}) {
$name = $name_map{$name};
};
}
$email =~ s/^.*<//;
......@@ -124,7 +124,7 @@ LOOP: while (<CHANGELOGS>) {
if ($email_map{$email}) {
$email = $email_map{$email};
};
}
push @lines, "${name} <${email}>";
}
......@@ -205,4 +205,3 @@ if (@double_credited) {
# the About dialog.
print "\n";
......@@ -548,9 +548,12 @@ nautilus_rpm_view_update_from_uri (NautilusRPMView *rpm_view, const char *uri)
char *description;
char *default_icon_path;
#ifndef RPMTAG_FILENAMES
char **paths = NULL;
char **basenames = NULL;
int *pathindex;
#endif
char **basenames = NULL;
char **links = NULL;
char *temp_version = NULL;
char *temp_release = NULL;
......@@ -616,7 +619,9 @@ nautilus_rpm_view_update_from_uri (NautilusRPMView *rpm_view, const char *uri)
if (*(links[index]) == '\0') {
temp_str = basenames[index];
} else {
g_snprintf(buffer, 511, "%s -> %s", path[index], links[index]);
g_snprintf (buffer, 511, "%s -> %s",
basenames[index],
links[index]);
temp_str = buffer;
}
gtk_clist_append (GTK_CLIST(rpm_view->details->package_file_list), &temp_str);
......
......@@ -585,14 +585,15 @@ gboolean eazel_install_fetch_package_by_id (EazelInstall *service,
switch (eazel_install_get_protocol (service)) {
case PROTOCOL_FTP:
case PROTOCOL_HTTP:
{
url = get_url_for_package (service, RPMSEARCH_ENTRY_ID, (const gpointer)id, package);
}
break;
break;
case PROTOCOL_LOCAL:
g_warning (_("Using local protocol cannot fetch by id"));
url = NULL;
break;
default:
url = NULL;
break;
};
if (url == NULL) {
......
......@@ -145,6 +145,8 @@ eazel_install_simple_query (EazelInstall *service,
GList *root_dirs;
GHashTable *names_to_ignore;
names_to_ignore = NULL; /* make compiler happy */
if (neglist_count) {
int i;
va_list va;
......
......@@ -239,9 +239,8 @@ install_new_packages (EazelInstall *service, GList *categories) {
categories = parse_local_xml_package_list (eazel_install_get_package_list (service), NULL);
}
if (categories == NULL) {
result = EAZEL_INSTALL_NOTHING;
} else {
result = EAZEL_INSTALL_NOTHING;
if (categories != NULL) {
/* First, collect all packages in one list */
GList *packages = eazel_install_flatten_categories (service, categories);
......@@ -1406,6 +1405,9 @@ eazel_install_prepare_package_system (EazelInstall *service)
case EAZEL_INSTALL_USE_RPM:
result = eazel_install_prepare_rpm_system (service);
break;
default:
result = FALSE;
break;
}
return result;
}
......@@ -1419,6 +1421,9 @@ eazel_install_free_package_system (EazelInstall *service)
case EAZEL_INSTALL_USE_RPM:
result = eazel_install_free_rpm_system (service);
break;
default:
result = FALSE;
break;
}
return result;
}
......@@ -1442,6 +1447,7 @@ eazel_install_add_to_rpm_set (EazelInstall *service,
tmp_failed = NULL;
interface_flags = 0;
if (eazel_install_get_update (service)) {
interface_flags |= INSTALL_UPGRADE;
}
......@@ -1880,6 +1886,9 @@ eazel_install_fetch_dependencies (EazelInstall *service,
failedpackages,
requirements);
break;
default:
result = FALSE;
break;
}
return result;
......
......@@ -257,6 +257,7 @@ trilobite_check_rpm_signature (const char *filename, const char *keyring_filenam
FILE *gnupg_file;
*signer_name = NULL;
temp_filename = NULL;
/* read the signature out of the RPM */
rpm_fd = open (filename, O_RDONLY);
......
......@@ -521,7 +521,7 @@ packagedata_status_str_to_enum (const char *st)
else if (strcmp (st, "PARTLY_RESOLVED")==0) { result = PACKAGE_PARTLY_RESOLVED; }
else if (strcmp (st, "RESOLVED")==0) { result = PACKAGE_RESOLVED; }
else if (strcmp (st, "ALREADY_INSTALLED")==0) { result = PACKAGE_ALREADY_INSTALLED; }
else { g_assert_not_reached (); };
else { g_assert_not_reached (); result = PACKAGE_UNKNOWN_STATUS; };
return result;
}
......@@ -549,6 +549,7 @@ packagedata_modstatus_enum_to_str (PackageSystemStatus st)
result = g_strdup ("UNTOUCHED");
break;
default:
result = NULL;
break;
}
return result;
......@@ -566,6 +567,7 @@ packagedata_modstatus_str_to_enum (const char *st)
else if (strcmp (st, "UNINSTALLED")==0) { result = PACKAGE_MOD_UNINSTALLED; }
else if (strcmp (st, "UPGRADED")==0) { result = PACKAGE_MOD_UPGRADED; }
else if (strcmp (st, "DOWNGRADED")==0) { result = PACKAGE_MOD_DOWNGRADED; }
else { result = PACKAGE_MOD_UNTOUCHED; }
return result;
}
......
......@@ -356,44 +356,51 @@ generate_xml_package_list (const char* pkg_template_file,
if (lines) {
entry_array = g_strsplit (retbuf, "\n", lines);
}
for (index = 0; index < lines; index++) {
if (entry_array[index] == NULL) {
break;
}
package_array = g_strsplit (entry_array[index], ":", num_tags+1);
if (package_array && package_array[0]) {
xmlNodePtr packages;
xmlNodePtr category;
xmlNodePtr package;
xmlNodePtr data;
int i;
/* NOTE: This xmlGetProp leaks, since it's return value
is forgotten */
if ((doc->root->childs == NULL) ||
(strlen (package_array[0]) && strcmp (cur_category, package_array[0]))) {
g_free (cur_category);
cur_category = g_strdup (package_array[0]);
category = xmlNewChild (doc->root, NULL, "CATEGORY", NULL);
xmlSetProp (category, "name", package_array[0]);
packages = xmlNewChild (category, NULL, "PACKAGES", NULL);
g_message ("Category %s...", cur_category);
for (index = 0; index < lines; index++) {
if (entry_array[index] == NULL) {
break;
}
package = xmlNewChild (packages, NULL, "PACKAGE", NULL);
for (i = 0; i <= num_tags; i++) {
if (package_array[i+1]) {
data = xmlNewChild (package, NULL, tags[i], package_array[i+1]);
} else {
trilobite_debug ("line %d, tag %d (%s) is missing", index+1, i+1, tags[i]);
package_array = g_strsplit (entry_array[index], ":", num_tags+1);
if (package_array && package_array[0]) {
xmlNodePtr packages;
xmlNodePtr category;
xmlNodePtr package;
xmlNodePtr data;
int i;
/* FIXME: I added this to get rid of
* an uninitialized variable warning,
* but I think it's probably
* wrong. (Darin)
*/
packages = NULL;
/* NOTE: This xmlGetProp leaks, since its return value
is forgotten */
if ((doc->root->childs == NULL) ||
(strlen (package_array[0]) && strcmp (cur_category, package_array[0]))) {
g_free (cur_category);
cur_category = g_strdup (package_array[0]);
category = xmlNewChild (doc->root, NULL, "CATEGORY", NULL);
xmlSetProp (category, "name", package_array[0]);
packages = xmlNewChild (category, NULL, "PACKAGES", NULL);
g_message ("Category %s...", cur_category);
}
package = xmlNewChild (packages, NULL, "PACKAGE", NULL);
for (i = 0; i <= num_tags; i++) {
if (package_array[i+1]) {
data = xmlNewChild (package, NULL, tags[i], package_array[i+1]);
} else {
trilobite_debug ("line %d, tag %d (%s) is missing", index+1, i+1, tags[i]);
}
}
g_strfreev (package_array);
}
g_strfreev (package_array);
}
}
......
......@@ -406,10 +406,18 @@ nautilus_g_str_list_sort (GList *list)
*
* Return value: @list, sorted.
**/
static int
compare_strings_case_breaks_ties (gconstpointer str_a,
gconstpointer str_b)
{
return nautilus_strcmp_case_breaks_ties (str_a, str_b);
}
GList *
nautilus_g_str_list_sort_case_insensitive (GList *list)
{
return g_list_sort (list, nautilus_istr_compare);
return g_list_sort (list, compare_strings_case_breaks_ties);
}
/**
......
......@@ -97,8 +97,8 @@ nautilus_str_compare (gconstpointer string_a, gconstpointer string_b)
int
nautilus_istr_compare (gconstpointer string_a, gconstpointer string_b)
{
return nautilus_strcmp_case_breaks_ties ((const char *) string_a,
(const char *) string_b);
return nautilus_strcasecmp ((const char *) string_a,
(const char *) string_b);
}
gboolean
......
......@@ -406,10 +406,18 @@ nautilus_g_str_list_sort (GList *list)
*
* Return value: @list, sorted.
**/
static int
compare_strings_case_breaks_ties (gconstpointer str_a,
gconstpointer str_b)
{
return nautilus_strcmp_case_breaks_ties (str_a, str_b);
}
GList *
nautilus_g_str_list_sort_case_insensitive (GList *list)
{
return g_list_sort (list, nautilus_istr_compare);
return g_list_sort (list, compare_strings_case_breaks_ties);
}
/**
......
......@@ -97,8 +97,8 @@ nautilus_str_compare (gconstpointer string_a, gconstpointer string_b)
int
nautilus_istr_compare (gconstpointer string_a, gconstpointer string_b)
{
return nautilus_strcmp_case_breaks_ties ((const char *) string_a,
(const char *) string_b);
return nautilus_strcasecmp ((const char *) string_a,
(const char *) string_b);
}
gboolean
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment