Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Preserve automatic flag during upgrade.
Vsevolod Stakhov committed 12 years ago
commit bc1377b6d9e905a0f1199ff9ba3e522b80593f08
parent d03ad31
1 file changed +3 -4
modified libpkg/pkg_jobs.c
@@ -1497,17 +1497,16 @@ pkg_jobs_handle_install(struct pkg_solved *ps, struct pkg_jobs *j, bool handle_r
	const char *pkgorigin, *oldversion = NULL;
	struct pkg_note *an;
	char path[MAXPATHLEN];
-
	bool automatic;
+
	bool automatic = false;
	int flags = 0;
	int retcode = EPKG_FATAL;

	old = ps->items[1] ? ps->items[1]->pkg : NULL;
	new = ps->items[0]->pkg;

-
	pkg_get(new, PKG_ORIGIN, &pkgorigin,
-
				PKG_AUTOMATIC, &automatic);
+
	pkg_get(new, PKG_ORIGIN, &pkgorigin);
	if (old != NULL)
-
		pkg_get(old, PKG_VERSION, &oldversion);
+
		pkg_get(old, PKG_VERSION, &oldversion, PKG_AUTOMATIC, &automatic);

	an = pkg_annotation_lookup(new, "repository");