Commit ab3d18e8 authored by Eskil Heyn Olsen's avatar Eskil Heyn Olsen
Browse files

reviewed by: A donkey with a rather large shrubbery


	reviewed by: A donkey with a rather large shrubbery

	* components/rpmview/Makefile.am:
	* components/rpmview/nautilus-rpm-verify-window.c:
	(nautilus_rpm_verify_window_update_message):
	* components/services/install/command-line/Makefile.am:
	* components/services/install/command-line/eazel-test-packsys.c:
	(main):
	* components/services/install/lib/Makefile.am:
	* components/services/install/lib/eazel-install-rpm-glue.c:
	* components/services/install/lib/eazel-package-system-rpm3.c:
	(rpm_create_db), (eazel_package_system_rpm3_query):
	* components/services/install/lib/eazel-package-system-rpm4.c:
	(eazel_package_system_rpm4_finalize),
	(eazel_package_system_rpm4_new):
	* components/services/install/lib/eazel-package-system-types.c:
	(packagedata_list_prune):
	* components/services/install/lib/eazel-package-system.c:
	(eazel_package_system_load_implementation):
	* components/services/install/nautilus-view/Makefile.am:
	* components/services/install/server/Makefile.am:
	Muy untested RedHat 7.0/RPM4 related stuff. Let's watcht the build
	blow up.

	* acconfig.h:
	HAVE_RPM_x0 for different rpm.s

	* configure.in:
	More weird rpm checks

	* nautilus.spec.in
	No more libeazelsoftcat
parent c415a8e0
2000-12-11 Eskil Heyn Olsen <eskil@eazel.com>
reviewed by: A donkey with a rather large shrubbery
* components/rpmview/Makefile.am:
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_update_message):
* components/services/install/command-line/Makefile.am:
* components/services/install/command-line/eazel-test-packsys.c:
(main):
* components/services/install/lib/Makefile.am:
* components/services/install/lib/eazel-install-rpm-glue.c:
* components/services/install/lib/eazel-package-system-rpm3.c:
(rpm_create_db), (eazel_package_system_rpm3_query):
* components/services/install/lib/eazel-package-system-rpm4.c:
(eazel_package_system_rpm4_finalize),
(eazel_package_system_rpm4_new):
* components/services/install/lib/eazel-package-system-types.c:
(packagedata_list_prune):
* components/services/install/lib/eazel-package-system.c:
(eazel_package_system_load_implementation):
* components/services/install/nautilus-view/Makefile.am:
* components/services/install/server/Makefile.am:
Muy untested RedHat 7.0/RPM4 related stuff. Let's watcht the build
blow up.
* acconfig.h:
HAVE_RPM_x0 for different rpm.s
* configure.in:
More weird rpm checks
* nautilus.spec.in
No more libeazelsoftcat
2000-12-11 Darin Adler <darin@eazel.com>
reviewed by: John Sullivan <sullivan@eazel.com>
......
......@@ -17,6 +17,8 @@
#undef HAVE_LC_MESSAGES
#undef HAVE_PAM
#undef HAVE_RPM
#undef HAVE_RPM_30
#undef HAVE_RPM_40
#undef HAVE_STPCPY
#undef USING_OAF
#undef EAZEL_BUILD_TIMESTAMP
......@@ -22,10 +22,10 @@ oaf_DATA = nautilus-rpm-view.oafinfo
bin_PROGRAMS = nautilus-rpm-view
if EAZEL_SERVICES
extra_libs = \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem-rpm3.la \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la
extra_sources = \
nautilus-rpm-view-install.h \
......
......@@ -210,7 +210,7 @@ nautilus_rpm_verify_window_update_message (NautilusRPMVerifyWindow *window)
} else {
/* TRANSLATORS: this is printed while verifying files from packages,
%s is the filename, %d/%d is filenumber of total-number-of-files */
message = g_strdup_printf (_("Checking \"%s\" (%d/%d)"),
message = g_strdup_printf (_("Checking \"%s\" (%ld/%ld)"),
window->details->current_file,
window->details->amount,
window->details->total);
......
......@@ -42,7 +42,6 @@ nautilus_service_install_view_LDADD = \
$(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem-rpm3.la \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(top_builddir)/components/services/nautilus-dependent-shared/libnautilusdepshared.a \
$(BONOBO_LIBS) \
......
......@@ -38,8 +38,7 @@ eazel_install_SOURCES = \
eazel_install_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem-rpm3.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la\
$(NULL)
eazel_gen_xml_SOURCES = \
......@@ -49,8 +48,7 @@ eazel_gen_xml_SOURCES = \
eazel_gen_xml_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem-rpm3.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la\
$(NULL)
eazel_test_packsys_SOURCES = \
......
......@@ -380,9 +380,9 @@ int main(int argc, char *argv[]) {
}
gnome_init ("Eazel Test Packsys", "1.0", argc, argv);
home_dbpath = g_strdup_printf ("%s/.nautilus/packagedb", g_get_home_dir ());
home_dbpath = g_strdup_printf ("/tmp/packagedb");
packsys = init_package_system (home_dbpath, g_strdup (g_get_home_dir ()));
eazel_package_system_set_debug (packsys, EAZEL_PACKAGE_SYSTEM_DEBUG_FAIL);
eazel_package_system_set_debug (packsys, EAZEL_PACKAGE_SYSTEM_DEBUG_VERBOSE);
test_package_load (packsys, argv[1]);
test_matches_query (packsys);
......
......@@ -19,11 +19,19 @@ INCLUDES = \
$(GHTTP_CFLAGS) \
$(NULL)
if HAVE_RPM_30
RPM3=libeazelpackagesystem-rpm3.la
endif
if HAVE_RPM_40
RPM4=libeazelpackagesystem-rpm4.la
endif
lib_LTLIBRARIES = \
libeazelinstall.la \
libeazelpackagesystem.la \
libeazelpackagesystem-rpm3.la \
libeazelpackagesystem-rpm4.la \
$(RPM3) \
$(RPM4) \
libeazelpackagesystem-skeleton.la \
$(NULL)
......@@ -64,6 +72,7 @@ libeazelinstall_la_SOURCES = \
eazel-install-tests.c \
eazel-install-object.c \
eazel-install-problem.c \
eazel-package-system-rpm3.c \
$(NULL)
libeazelinstall_la_LDFLAGS = \
......@@ -100,8 +109,8 @@ libeazelpackagesystem_skeleton_la_SOURCES = \
# libeazelpackagesystem-rpm3
libeazelpackagesystem_rpm3_la_SOURCES = \
eazel-package-system-rpm3-private.h \
eazel-package-system-rpm3.h \
eazel-package-system-rpm3-private.h \
eazel-package-system-rpm3.c \
$(NULL)
......@@ -109,6 +118,8 @@ libeazelpackagesystem_rpm3_la_SOURCES = \
# libeazelpackagesystem-rpm4
libeazelpackagesystem_rpm4_la_SOURCES = \
eazel-package-system-rpm3.h \
eazel-package-system-rpm3.c \
eazel-package-system-rpm4.h \
eazel-package-system-rpm4.c \
$(NULL)
......
......@@ -32,8 +32,6 @@
#include <libtrilobite/trilobite-core-utils.h>
#include <rpm/rpmlib.h>
#include <rpm/rpmmacro.h>
#include <rpm/dbindex.h>
#include <string.h>
#include <time.h>
......
......@@ -50,7 +50,6 @@
#include <rpm/rpmlib.h>
#include <rpm/rpmmacro.h>
#include <rpm/dbindex.h>
#include <ctype.h>
#include <sys/types.h>
......@@ -376,7 +375,7 @@ rpm_create_db (char *dbpath,
EazelPackageSystemRpm3 *system)
{
addMacro (NULL, "_dbpath", NULL, "/", 0);
if (strcmp (root, "/")) {
info (system, "Creating %s", dbpath);
mkdir (dbpath, 0700);
......@@ -655,6 +654,7 @@ eazel_package_system_rpm3_load_package (EazelPackageSystemRpm3 *system,
Query implemementation
*************************************************************/
#ifdef HAVE_RPM_30
static void
eazel_package_system_rpm3_query_impl (EazelPackageSystemRpm3 *system,
const char *dbpath,
......@@ -828,6 +828,7 @@ eazel_package_system_rpm3_query_foreach (char *dbpath,
g_warning ("Unknown query");
}
}
#endif /* HAVE_RPM_30 */
GList*
eazel_package_system_rpm3_query (EazelPackageSystemRpm3 *system,
......@@ -836,6 +837,7 @@ eazel_package_system_rpm3_query (EazelPackageSystemRpm3 *system,
EazelPackageSystemQueryEnum flag,
unsigned long detail_level)
{
#ifdef HAVE_RPM_30
GList *result = NULL;
struct RpmQueryPiggyBag pig;
......@@ -856,6 +858,9 @@ eazel_package_system_rpm3_query (EazelPackageSystemRpm3 *system,
eazel_package_system_rpm3_close_dbs (system);
return result;
#else
return NULL;
#endif /* HAVE_RPM_30 */
}
/************************************************************
......@@ -1279,6 +1284,7 @@ eazel_package_system_rpm3_new (GList *dbpaths)
return system;
}
#ifdef HAVE_RPM_30
EazelPackageSystem*
eazel_package_system_implementation (GList *dbpaths)
{
......@@ -1299,3 +1305,4 @@ eazel_package_system_implementation (GList *dbpaths)
return result;
}
#endif
......@@ -29,8 +29,6 @@
#include <libtrilobite/trilobite-core-utils.h>
#include <rpm/rpmlib.h>
#include <rpm/rpmmacro.h>
#include <rpm/dbindex.h>
#include <ctype.h>
#include <sys/types.h>
......@@ -76,7 +74,6 @@ eazel_package_system_rpm4_finalize (GtkObject *object)
system = EAZEL_PACKAGE_SYSTEM_RPM4 (object);
eazel_package_system_rpm3_close_dbs (EAZEL_PACKAGE_SYSTEM_RPM3 (system));
eazel_package_system_rpm3_free_dbs (EAZEL_PACKAGE_SYSTEM_RPM3 (system));
g_hash_table_destroy (system->dbs);
......@@ -152,7 +149,6 @@ eazel_package_system_rpm4_new (GList *dbpaths)
g_hash_table_insert (system->db_to_root, db, root);
}
eazel_package_system_rpm3_create_dbs (EAZEL_PACKAGE_SYSTEM_RPM3 (system));
eazel_package_system_rpm3_open_dbs (EAZEL_PACKAGE_SYSTEM_RPM3 (system));
return system;
}
......
......@@ -30,8 +30,6 @@
#include "eazel-package-system-types.h"
#include <rpm/rpmlib.h>
#include <rpm/rpmmacro.h>
#include <rpm/dbindex.h>
#include <sys/types.h>
#include <sys/stat.h>
......@@ -259,12 +257,12 @@ packagedata_copy (const PackageData *pack, gboolean deep)
return result;
}
#define COPY_STRING(name) do { \
if (full_package->##name != NULL) { \
g_free (package->##name); \
package->##name = g_strdup (full_package->##name); \
} \
} while (0)
#define COPY_STRING(field) \
if (full_package->field != NULL) { \
g_free (package->field); \
package->field = g_strdup (full_package->field); \
}
/* fill in a package struct with info from another one:
* flags tells what fields to skip.
......@@ -704,11 +702,11 @@ packagedata_list_prune (GList **input,
gboolean destroy,
gboolean deep)
{
GList *in_it, *rm_it;
GList *in_it=NULL, *rm_it=NULL;
for (rm_it = remove_list; rm_it; rm_it = g_list_next (rm_it)) {
PackageData *rm = (PackageData*)rm_it->data;
PackageData *in = (PackageData*)in_it->data;
PackageData *in = NULL;
for (in_it = *input; in_it; in_it = g_list_next (in_it)) {
in = (PackageData*)in_it->data;
......@@ -716,7 +714,7 @@ packagedata_list_prune (GList **input,
break;
}
}
if (in_it) {
if (in_it && in) {
(*input) = g_list_remove (*input, in);
if (destroy) {
packagedata_destroy (in, deep);
......
......@@ -81,7 +81,7 @@ eazel_package_system_suggest_id ()
static EazelPackageSystem*
eazel_package_system_load_implementation (EazelPackageSystemId id, GList *roots)
{
EazelPackageSystem *result;
EazelPackageSystem *result = NULL;
EazelPackageSystemConstructorFunc const_func = NULL;
GModule *module = NULL;
......@@ -96,10 +96,13 @@ eazel_package_system_load_implementation (EazelPackageSystemId id, GList *roots)
g_assert_not_reached ();
};
g_module_make_resident (module);
g_module_symbol (module, "eazel_package_system_implementation", (gpointer)&const_func);
result = (*const_func)(roots);
if (module==NULL) {
g_warning ("gmodule: %s", g_module_error ());
} else {
g_module_make_resident (module);
g_module_symbol (module, "eazel_package_system_implementation", (gpointer)&const_func);
result = (*const_func)(roots);
}
return result;
}
......
......@@ -42,7 +42,6 @@ nautilus_service_install_view_LDADD = \
$(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem-rpm3.la \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(top_builddir)/components/services/nautilus-dependent-shared/libnautilusdepshared.a \
$(BONOBO_LIBS) \
......
......@@ -47,7 +47,6 @@ trilobite_eazel_install_service_LDADD = \
$(RPM_LIBS) \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem-rpm3.la \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite-service.la \
$(GNOMEUI_LIBS) \
......
......@@ -387,6 +387,7 @@ dnl ====================================
if test "x$EAZEL_SERVICES_ENABLED" = "xyes" ;
then
rpm_libs=
have_rpm=no
AC_CHECK_LIB(bz2, bzread, [rpm_libs=-lbz2])
dnl <= Check for bzip2 > 1.0.0
AC_CHECK_LIB(bz2, BZ2_bzread, [rpm_libs=-lbz2
......@@ -406,40 +407,44 @@ then
dnl =>
AC_CHECK_LIB(popt, poptParseArgvString, [rpm_libs="$rpm_libs -lpopt"])
AC_CHECK_FUNC(dbopen, [],
AC_CHECK_LIB(db1, dbopen, [rpm_libs="$rpm_libs -ldb1"],
AC_CHECK_LIB(db, dbopen, [rpm_libs="$rpm_libs -ldb"],
AC_MSG_ERROR([sorry rpm requires a db-1.85 API])))
)
AC_CHECK_LIB(rpm, rpmRunTransactions,[build_rpmview=yes],
[build_rpmview=false],-lz $rpm_libs)
if test "x$build_rpmview" = "xyes" ; then
dnl FIXME
dnl Ideally I should check for rpm and where it is
AC_CHECK_LIB(db2, dbopen, [rpm_libs="$rpm_libs -ldb2"],
AC_CHECK_LIB(db1, dbopen, [rpm_libs="$rpm_libs -ldb1"],
AC_CHECK_LIB(db, dbopen, [rpm_libs="$rpm_libs -ldb"],
AC_MSG_ERROR([sorry rpm requires a db-1.85 API]))))
)
AC_CHECK_LIB(rpmio, rpmMessage, [rpm_libs="$rpm_libs -lrpmio"],[],$rpm_libs)
AC_CHECK_LIB(rpm, rpmRunTransactions,[have_rpm=yes],
[have_rpm=no], $rpm_libs)
if test "x$have_rpm" = "xyes" ; then
dnl FIXME
dnl Ideally I should check for rpm and where it is
AC_MSG_CHECKING([rpm version])
RPM_VERSION=`rpm --version | awk '{ print $3; }'`
_found_valid_rpm="no"
rpm_needed=3.0.*
AC_MSG_CHECKING(rpm version = $rpm_needed)
case $RPM_VERSION in
$rpm_needed)
_found_valid_rpm="yes"
;;
*)
3.0.[4-9])
AC_DEFINE(HAVE_RPM_30)
_found_valid_rpm="yes"
AM_CONDITIONAL(HAVE_RPM_30, test 1)
;;
4.[0-9])
AC_DEFINE(HAVE_RPM_40)
_found_valid_rpm="yes"
AM_CONDITIONAL(HAVE_RPM_40, test 1)
;;
esac
if test "$_found_valid_rpm" = "yes"
if test "x$_found_valid_rpm"="xyes"
then
AC_MSG_RESULT([found $RPM_VERSION, yes])
AC_DEFINE(HAVE_RPM)
RPM_LIBS="-lrpm -lz $rpm_libs"
build_rpmview=yes
rpmversion="$RPM_VERSION"
else
AC_MSG_RESULT([hmf...])
AC_MSG_WARN([RPM $rpm_needed required, $RPM_VERSION found])
AC_MSG_RESULT([no])
AC_MSG_WARN([RPM 3.0.4 or higher required, $RPM_VERSION found])
build_rpmview=no
fi
fi
......@@ -839,7 +844,7 @@ dnl <= Rpm-view integrated? =>
case x$build_rpmview in
xyes)
echo "
RPMview component : YES"
RPMview component : YES ($rpmversion)"
;;
*)
echo "
......
......@@ -290,9 +290,6 @@ fi
%{prefix}/lib/libeazelinstall.so
%{prefix}/lib/libtrilobite-service.so
%{prefix}/lib/libtrilobite.so
%{prefix}/lib/libeazelsoftcat.so.0.0.0
%{prefix}/lib/libeazelsoftcat.so.0
%{prefix}/lib/libeazelsoftcat.so
%defattr(0444, bin, bin)
%config %{sysconfdir}/pam.d/eazel-helper
......
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