summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Corsépius <corsepiu@fedoraproject.org>2007-10-30 15:25:41 +0100
committerRalf Corsépius <corsepiu@fedoraproject.org>2007-10-30 15:25:41 +0100
commited315a2ccb26d9efdeb7fee45e4a4a7c02f99aeb (patch)
tree40f91c99a5f556484749c4738329f5922c832391
parente898dde44d34ce7e937acbefb530287e718d36bf (diff)
parentbb19662ebdd821047b7c3c61356198c0040e6175 (diff)
downloadrpm-ed315a2ccb26d9efdeb7fee45e4a4a7c02f99aeb.tar.gz
rpm-ed315a2ccb26d9efdeb7fee45e4a4a7c02f99aeb.tar.bz2
rpm-ed315a2ccb26d9efdeb7fee45e4a4a7c02f99aeb.zip
merge.
-rw-r--r--build/rpmfc.c4
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/psm.c9
-rw-r--r--lib/rpmts.c1
-rw-r--r--lib/rpmts.h80
-rw-r--r--lib/rpmtsscore.h74
6 files changed, 80 insertions, 90 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 14bc1e44c..ec6baff4c 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -1662,7 +1662,7 @@ assert(ac == c);
if (fc->provides != NULL && (c = rpmdsCount(fc->provides)) > 0 && !fc->skipProv) {
const char **names = xcalloc(c, sizeof(char *));
const char **evrs = xcalloc(c, sizeof(char *));
- const char **flags = xcalloc(c, sizeof(int_32 *));
+ int32_t *flags = xcalloc(c, sizeof(int32_t *));
int i;
rpmds pi = rpmdsInit(fc->provides);
while ((i = rpmdsNext(pi)) >= 0) {
@@ -1696,7 +1696,7 @@ assert(flags != NULL);
if (fc->requires != NULL && (c = rpmdsCount(fc->requires)) > 0 && !fc->skipReq) {
const char **names = xcalloc(c, sizeof(char *));
const char **evrs = xcalloc(c, sizeof(char *));
- const char **flags = xcalloc(c, sizeof(int_32 *));
+ int32_t *flags = xcalloc(c, sizeof(int32_t *));
int i;
rpmds ri = rpmdsInit(fc->requires);
while ((i = rpmdsNext(ri)) >= 0) {
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 1f0ac6bd5..e178c5708 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -24,7 +24,7 @@ librpm_la_SOURCES = \
idtx.c manifest.c manifest.h misc.c package.c \
poptALL.c poptI.c poptQV.c psm.c psm.h query.c \
rpmal.c rpmchecksig.c rpmds.c rpmfi.c rpmgi.c rpmgi_internal.h \
- rpminstall.c \
+ rpminstall.c rpmtsscore.h \
rpmlead.c rpmlead.h rpmlibprov.c rpmps.c rpmrc.c rpmte.c rpmts.c \
rpmvercmp.c signature.c signature.h stringbuf.c transaction.c \
verify.c rpmlock.c rpmlock.h misc.h
diff --git a/lib/psm.c b/lib/psm.c
index c811de8ef..6fba8d934 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -23,7 +23,7 @@
#define _RPMTE_INTERNAL
#include "rpmte.h"
-#define _RPMTS_INTERNAL /* XXX ts->notify */
+#include "rpmtsscore.h"
#include "rpmts.h"
#include "rpmlead.h" /* writeLead proto */
@@ -1776,13 +1776,6 @@ assert(psm->mi == NULL);
errno = saveerrno;
}
- if (psm->goal == PSM_PKGSAVE) {
- if (!rc && ts && ts->notify == NULL) {
- rpmlog(RPMLOG_INFO, _("Wrote: %s\n"),
- (psm->pkgURL ? psm->pkgURL : "???"));
- }
- }
-
if (rc) {
if (psm->failedFile)
rpmlog(RPMERR_CPIO,
diff --git a/lib/rpmts.c b/lib/rpmts.c
index df6c47175..79e87afc9 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -20,6 +20,7 @@
#define _RPMTS_INTERNAL
#include "rpmts.h"
+#include "rpmtsscore.h"
/* XXX FIXME: merge with existing (broken?) tests in system.h */
/* portability fiddles */
diff --git a/lib/rpmts.h b/lib/rpmts.h
index ee6f660a9..bd8621084 100644
--- a/lib/rpmts.h
+++ b/lib/rpmts.h
@@ -99,85 +99,7 @@ typedef enum rpmtsOpX_e {
#include "rpmhash.h" /* XXX hashTable */
#include "rpmal.h" /* XXX availablePackage/relocateFileList ,*/
-#include "rpmte.h" /* for rpmElementType */
-
-/**********************
- * Transaction Scores *
- **********************
- *
- * In order to allow instance counts to be adjusted properly when an
- * autorollback transaction is ran, we keep a list that is indexed
- * by rpm name of whether the rpm has been installed or erased. This listed
- * is only updated:
- *
- * iif autorollbacks are enabled.
- * iif this is not a rollback or autorollback transaction.
- *
- * When creating an autorollback transaction, its rpmts points to the same
- * rpmtsScore object as the running transaction. So when the autorollback
- * transaction runs it can see where each package was in the running transaction
- * at the point the running transaction failed, and thus on a per package
- * basis make adjustments to the instance counts.
- *
- * XXX: Jeff, I am not convinced that this does not need to be in its own file
- * (i.e. rpmtsScore.{h,c}), but I first wanted to get it working.
- */
-struct rpmtsScoreEntry_s {
- char * N; /*!<Name of package */
- rpmElementType te_types; /*!<te types this entry represents */
- int installed; /*!<Was the new header installed */
- int erased; /*!<Was the old header removed */
-};
-
-typedef struct rpmtsScoreEntry_s * rpmtsScoreEntry;
-
-struct rpmtsScore_s {
- int entries; /*!< Number of scores */
- rpmtsScoreEntry * scores; /*!< Array of score entries */
- int nrefs; /*!< Reference count. */
-};
-
-typedef struct rpmtsScore_s * rpmtsScore;
-
-
-/** \ingroup rpmts
- * initialize rpmtsScore for running transaction and autorollback
- * transaction.
- * @param runningTS Running Transaction.
- * @param rollbackTS Rollback Transaction.
- * @return RPMRC_OK
- */
-rpmRC rpmtsScoreInit(rpmts runningTS, rpmts rollbackTS);
-
-/** \ingroup rpmts
- * Free rpmtsScore provided no more references exist against it.
- * @param score rpmtsScore to free
- * @return NULL always
- */
-rpmtsScore rpmtsScoreFree(rpmtsScore score);
-
-/** \ingroup rpmts
- * Get rpmtsScore from transaction.
- * @param ts RPM Transaction.
- * @return rpmtsScore or NULL.
- */
-rpmtsScore rpmtsGetScore(rpmts ts);
-
-/** \ingroup rpmts
- * Get rpmtsScoreEntry from rpmtsScore.
- * @param score RPM Transaction Score.
- * @return rpmtsScoreEntry or NULL.
- */
-rpmtsScoreEntry rpmtsScoreGetEntry(rpmtsScore score, const char *N);
-
-/** \ingroup rpmts
- * \file lib/rpmts.h
- * Structures and prototypes used for an "rpmts" transaction set.
- */
-
-/**************************
- * END Transaction Scores *
- **************************/
+#include "rpmtsscore.h" /* for rpmtsScore */
extern int _cacheDependsRC;
diff --git a/lib/rpmtsscore.h b/lib/rpmtsscore.h
new file mode 100644
index 000000000..f5b5c1b5c
--- /dev/null
+++ b/lib/rpmtsscore.h
@@ -0,0 +1,74 @@
+#ifndef H_RPMTSSCORE
+#define H_RPMTSSCORE
+
+#include "rpmlib.h"
+#include "rpmte.h"
+
+/**********************
+ * Transaction Scores *
+ **********************
+ *
+ * In order to allow instance counts to be adjusted properly when an
+ * autorollback transaction is ran, we keep a list that is indexed
+ * by rpm name of whether the rpm has been installed or erased. This listed
+ * is only updated:
+ *
+ * iif autorollbacks are enabled.
+ * iif this is not a rollback or autorollback transaction.
+ *
+ * When creating an autorollback transaction, its rpmts points to the same
+ * rpmtsScore object as the running transaction. So when the autorollback
+ * transaction runs it can see where each package was in the running transaction
+ * at the point the running transaction failed, and thus on a per package
+ * basis make adjustments to the instance counts.
+ *
+ */
+
+struct rpmtsScoreEntry_s {
+ char * N; /*!<Name of package */
+ rpmElementType te_types; /*!<te types this entry represents */
+ int installed; /*!<Was the new header installed */
+ int erased; /*!<Was the old header removed */
+};
+
+typedef struct rpmtsScoreEntry_s * rpmtsScoreEntry;
+
+struct rpmtsScore_s {
+ int entries; /*!< Number of scores */
+ rpmtsScoreEntry * scores; /*!< Array of score entries */
+ int nrefs; /*!< Reference count. */
+};
+
+typedef struct rpmtsScore_s * rpmtsScore;
+
+/** \ingroup rpmts
+ * initialize rpmtsScore for running transaction and autorollback
+ * transaction.
+ * @param runningTS Running Transaction.
+ * @param rollbackTS Rollback Transaction.
+ * @return RPMRC_OK
+ */
+rpmRC rpmtsScoreInit(rpmts runningTS, rpmts rollbackTS);
+
+/** \ingroup rpmts
+ * Free rpmtsScore provided no more references exist against it.
+ * @param score rpmtsScore to free
+ * @return NULL always
+ */
+rpmtsScore rpmtsScoreFree(rpmtsScore score);
+
+/** \ingroup rpmts
+ * Get rpmtsScore from transaction.
+ * @param ts RPM Transaction.
+ * @return rpmtsScore or NULL.
+ */
+rpmtsScore rpmtsGetScore(rpmts ts);
+
+/** \ingroup rpmts
+ * Get rpmtsScoreEntry from rpmtsScore.
+ * @param score RPM Transaction Score.
+ * @return rpmtsScoreEntry or NULL.
+ */
+rpmtsScoreEntry rpmtsScoreGetEntry(rpmtsScore score, const char *N);
+
+#endif /* H_RPMTSSCORE */