Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not add an unknown flag to the pkg_add flags
Baptiste Daroussin committed 12 years ago
commit c0cac59b3d807b6323fd3bc88e7901c14e2d036a
parent bee9ffe
2 files changed +6 -6
modified libpkg/pkg.h.in
@@ -1055,11 +1055,11 @@ int pkgdb_compact(struct pkgdb *db);
 */
int pkg_add(struct pkgdb *db, const char *path, unsigned flags, struct pkg_manifest_key *keys);

-
#define PKG_ADD_UPGRADE			(1U << 1)
-
#define PKG_ADD_USE_UPGRADE_SCRIPTS	(1U << 2)
-
#define PKG_ADD_AUTOMATIC		(1U << 3)
-
#define PKG_ADD_FORCE			(1U << 4)
-
#define PKG_ADD_NOSCRIPT		(1U << 5)
+
#define PKG_ADD_UPGRADE			(1U << 0)
+
#define PKG_ADD_USE_UPGRADE_SCRIPTS	(1U << 1)
+
#define PKG_ADD_AUTOMATIC		(1U << 2)
+
#define PKG_ADD_FORCE			(1U << 3)
+
#define PKG_ADD_NOSCRIPT		(1U << 4)

/**
 * Allocate a new pkg_jobs.
modified libpkg/pkg_jobs.c
@@ -1119,7 +1119,7 @@ pkg_jobs_install(struct pkg_jobs *j)
		}

		if ((j->flags & PKG_FLAG_FORCE) == PKG_FLAG_FORCE)
-
			flags |= PKG_ADD_FORCE | PKG_FLAG_FORCE;
+
			flags |= PKG_ADD_FORCE;
		if ((j->flags & PKG_FLAG_NOSCRIPT) == PKG_FLAG_NOSCRIPT)
			flags |= PKG_ADD_NOSCRIPT;
		flags |= PKG_ADD_UPGRADE;