[pacman-dev] CVS update of pacman-lib/lib/libalpm (package.c package.h)

Aaron Griffin aaron at archlinux.org
Tue Feb 6 15:57:17 EST 2007


    Date: Tuesday, February 6, 2007 @ 15:57:17
  Author: aaron
    Path: /home/cvs-pacman/pacman-lib/lib/libalpm

Modified: package.c (1.59 -> 1.60) package.h (1.25 -> 1.26)

Attempt #2 at -S/-Su unification: verify that the 'force' option has been read before comparing versions


-----------+
 package.c |    5 +++++
 package.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)


Index: pacman-lib/lib/libalpm/package.c
diff -u pacman-lib/lib/libalpm/package.c:1.59 pacman-lib/lib/libalpm/package.c:1.60
--- pacman-lib/lib/libalpm/package.c:1.59	Tue Feb  6 12:41:36 2007
+++ pacman-lib/lib/libalpm/package.c	Tue Feb  6 15:57:17 2007
@@ -125,6 +125,11 @@
 /* Is pkgB an upgrade for pkgA ? */
 int alpm_pkg_compare_versions(pmpkg_t *pkgA, pmpkg_t *pkgB)
 {
+	if(spkg->origin == PKG_FROM_CACHE) {
+		/* ensure we have the /desc file, which contains the 'force' option */
+		_alpm_db_read(pkgB->data, INFRQ_DESC, pkgB);
+	}
+
 	if(pkgB->force) {
 		/* skip the version compare call if this is a 'force' package */
 		return(1);
Index: pacman-lib/lib/libalpm/package.h
diff -u pacman-lib/lib/libalpm/package.h:1.25 pacman-lib/lib/libalpm/package.h:1.26
--- pacman-lib/lib/libalpm/package.h:1.25	Sun Feb  4 03:26:52 2007
+++ pacman-lib/lib/libalpm/package.h	Tue Feb  6 15:57:17 2007
@@ -82,7 +82,7 @@
 	alpm_list_t *conflicts;
 	alpm_list_t *provides;
 	/* internal */
-	unsigned short origin;
+	pmpkgfrom_t origin;
 	void *data;
 	pmdbinfrq_t infolevel;
 };




More information about the pacman-dev mailing list