1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Cleanup from Dan McGee <dpmcgee@gmail.com> and Jürgen Hötzel <juergen@hoetzel.info>

* configure swig check
* misc libalpm cleanup
This commit is contained in:
Aaron Griffin 2006-12-22 19:38:55 +00:00
parent d8d8221556
commit e3aace4a4d
7 changed files with 20 additions and 16 deletions

View File

@ -3,7 +3,7 @@ CFLAGS=""
AC_PREREQ(2.59) AC_PREREQ(2.59)
dnl Update it right before the release since $pkgver_foo are all _post_ release snapshots dnl Update it right before the release since $pkgver_foo are all _post_ release snapshots
AC_INIT([Pacman package manager], 3.4.0, [pacman-dev@archlinux.org], pacman) AC_INIT([Pacman package manager], 3.0.0, [pacman-dev@archlinux.org], pacman)
AC_LANG(C) AC_LANG(C)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
@ -214,10 +214,12 @@ else
DOXYSTATUS="no, disabled by configure" DOXYSTATUS="no, disabled by configure"
fi fi
dnl Check for swig binary
AC_CHECK_PROGS([SWIG], [swig])
dnl Check for python support dnl Check for python support
AC_MSG_CHECKING(if Python bindings should be generated) AC_MSG_CHECKING(if Python bindings should be generated)
if test x$wantpython = xyes ; then if test x$wantpython = xyes ; then
AC_CHECK_PROGS([SWIG], [swig])
AM_CONDITIONAL(HAS_PYTHON, test $SWIG) AM_CONDITIONAL(HAS_PYTHON, test $SWIG)
if test $SWIG ; then if test $SWIG ; then
AC_DEFINE([HAS_PYTHON], [TRUE], [Enabled Python Support]) AC_DEFINE([HAS_PYTHON], [TRUE], [Enabled Python Support])
@ -238,7 +240,6 @@ fi
dnl Check for perl support dnl Check for perl support
AC_MSG_CHECKING(if Perl bindings should be generated) AC_MSG_CHECKING(if Perl bindings should be generated)
if test x$wantperl = xyes ; then if test x$wantperl = xyes ; then
AC_CHECK_PROGS([SWIG], [swig])
AM_CONDITIONAL(HAS_PERL, test $SWIG) AM_CONDITIONAL(HAS_PERL, test $SWIG)
if test $SWIG ; then if test $SWIG ; then
AC_DEFINE([HAS_PERL], [TRUE], [Enabled Perl Support]) AC_DEFINE([HAS_PERL], [TRUE], [Enabled Perl Support])
@ -259,9 +260,8 @@ fi
dnl Check for java support dnl Check for java support
AC_MSG_CHECKING(if Java bindings should be generated) AC_MSG_CHECKING(if Java bindings should be generated)
if test x$wantjava = xyes ; then if test x$wantjava = xyes ; then
AC_CHECK_PROGS([SWIG], [swig])
AC_CHECK_PROGS([JAVAC], [javac]) AC_CHECK_PROGS([JAVAC], [javac])
AM_CONDITIONAL(HAS_JAVA, test $JAVAC -a $SWIG) AM_CONDITIONAL(HAS_JAVA, test "$JAVAC" -a "$SWIG")
if test $JAVAC ; then if test $JAVAC ; then
if test $SWIG ; then if test $SWIG ; then
AC_DEFINE([HAS_JAVA], [TRUE], [Enabled Java Support (javac=ok swig=ok)]) AC_DEFINE([HAS_JAVA], [TRUE], [Enabled Java Support (javac=ok swig=ok)])

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pacman\n" "Project-Id-Version: pacman\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-12-08 13:57-0600\n" "POT-Creation-Date: 2006-12-23 1:35-0600\n"
"PO-Revision-Date: 2006-08-26 14:53+0200\n" "PO-Revision-Date: 2006-08-26 14:53+0200\n"
"Last-Translator: Hungarian <frugalware-devel@frugalware.org>\n" "Last-Translator: Hungarian <frugalware-devel@frugalware.org>\n"
"Language-Team: Hungarian <frugalware-devel@frugalware.org>\n" "Language-Team: Hungarian <frugalware-devel@frugalware.org>\n"
@ -28,7 +28,7 @@ msgstr "2006. janu
# type: TH # type: TH
#: pacman.8:1 #: pacman.8:1
#, no-wrap #, no-wrap
msgid "pacman 3.4.0" msgid "pacman 3.0.0"
msgstr "" msgstr ""
# type: SH # type: SH

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2006-12-08 13:57-0600\n" "POT-Creation-Date: 2006-12-23 1:35-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -29,7 +29,7 @@ msgstr ""
# type: TH # type: TH
#: pacman.8:1 #: pacman.8:1
#, no-wrap #, no-wrap
msgid "pacman 3.4.0" msgid "pacman 3.0.0"
msgstr "" msgstr ""
# type: SH # type: SH

View File

@ -399,7 +399,7 @@ char *alpm_get_sha1sum(char *name);
/* /*
* Errors * Errors
*/ */
extern enum __pmerrno_t { enum __pmerrno_t {
PM_ERR_MEMORY = 1, PM_ERR_MEMORY = 1,
PM_ERR_SYSTEM, PM_ERR_SYSTEM,
PM_ERR_BADPERMS, PM_ERR_BADPERMS,
@ -469,7 +469,9 @@ extern enum __pmerrno_t {
/* Downloading */ /* Downloading */
PM_ERR_CONNECT_FAILED, PM_ERR_CONNECT_FAILED,
PM_ERR_FORK_FAILED PM_ERR_FORK_FAILED
} pm_errno; };
extern enum __pmerrno_t pm_errno;
char *alpm_strerror(int err); char *alpm_strerror(int err);

View File

@ -55,9 +55,9 @@ char *_alpm_needbackup(char *file, pmlist_t *backup)
ptr++; ptr++;
/* now str points to the filename and ptr points to the md5 or sha1 hash */ /* now str points to the filename and ptr points to the md5 or sha1 hash */
if(!strcmp(file, str)) { if(!strcmp(file, str)) {
char *md5 = strdup(ptr); char *hash = strdup(ptr);
FREE(str); FREE(str);
return(md5); return(hash);
} }
FREE(str); FREE(str);
} }

View File

@ -43,11 +43,14 @@ struct __pmdb_t {
pmlist_t *grpcache; pmlist_t *grpcache;
pmlist_t *servers; pmlist_t *servers;
}; };
/* db.c, database general calls */
pmdb_t *_alpm_db_new(char *root, char *dbpath, char *treename); pmdb_t *_alpm_db_new(char *root, char *dbpath, char *treename);
void _alpm_db_free(void *data); void _alpm_db_free(void *data);
int _alpm_db_cmp(const void *db1, const void *db2); int _alpm_db_cmp(const void *db1, const void *db2);
pmlist_t *_alpm_db_search(pmdb_t *db, pmlist_t *needles); pmlist_t *_alpm_db_search(pmdb_t *db, pmlist_t *needles);
pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback);
/* be.c, backend specific calls */
int _alpm_db_install(pmdb_t *db, const char *dbfile); int _alpm_db_install(pmdb_t *db, const char *dbfile);
int _alpm_db_open(pmdb_t *db); int _alpm_db_open(pmdb_t *db);
void _alpm_db_close(pmdb_t *db); void _alpm_db_close(pmdb_t *db);
@ -58,7 +61,6 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, unsigned int inforeq);
int _alpm_db_remove(pmdb_t *db, pmpkg_t *info); int _alpm_db_remove(pmdb_t *db, pmpkg_t *info);
int _alpm_db_getlastupdate(pmdb_t *db, char *ts); int _alpm_db_getlastupdate(pmdb_t *db, char *ts);
int _alpm_db_setlastupdate(pmdb_t *db, char *ts); int _alpm_db_setlastupdate(pmdb_t *db, char *ts);
pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback);
#endif /* _ALPM_DB_H */ #endif /* _ALPM_DB_H */

View File

@ -382,7 +382,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, pmlist_t *dbs_sync, p
{ {
pmlist_t *deps = NULL; pmlist_t *deps = NULL;
pmlist_t *list = NULL; /* list allowing checkdeps usage with data from trans->packages */ pmlist_t *list = NULL; /* list allowing checkdeps usage with data from trans->packages */
pmlist_t *trail = NULL; /* breadcrum list to avoid running into circles */ pmlist_t *trail = NULL; /* breadcrumb list to avoid running into circles */
pmlist_t *asked = NULL; pmlist_t *asked = NULL;
pmlist_t *i, *j, *k, *l; pmlist_t *i, *j, *k, *l;
int ret = 0; int ret = 0;