Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Don't blame about missing upgrades for locked packages
Vsevolod Stakhov committed 10 years ago
commit 98502a6dc53926a61db4fce962ecc8e9690e1864
parent 82ef6b8
1 file changed +12 -4
modified libpkg/pkg_jobs.c
@@ -3,9 +3,9 @@
 * Copyright (c) 2011-2012 Julien Laffaye <jlaffaye@FreeBSD.org>
 * Copyright (c) 2011-2012 Marin Atanasov Nikolov <dnaeon@gmail.com>
 * Copyright (c) 2013 Matthew Seaman <matthew@FreeBSD.org>
-
 * Copyright (c) 2013-2014 Vsevolod Stakhov <vsevolod@FreeBSD.org>
+
 * Copyright (c) 2013-2016 Vsevolod Stakhov <vsevolod@FreeBSD.org>
 * All rights reserved.
-
 * 
+
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
@@ -15,7 +15,7 @@
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
-
 * 
+
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@@ -931,6 +931,14 @@ pkg_jobs_find_upgrade(struct pkg_jobs *j, const char *pattern, match_t m)
		if (p == NULL)
			return (EPKG_FATAL);

+
		/*
+
		 * For locked packages we don't need to perform this
+
		 * heuristic
+
		 */
+
		if (p->locked) {
+
			return (EPKG_END);
+
		}
+

		while(pkg_rdeps(p, &rdep) == EPKG_OK) {
			struct pkg *rdep_package;

@@ -2103,7 +2111,7 @@ pkg_jobs_fetch(struct pkg_jobs *j)
	char cachedpath[MAXPATHLEN];
	bool mirror = (j->flags & PKG_FLAG_FETCH_MIRROR) ? true : false;

-
	
+

	if (j->destdir == NULL || !mirror)
		cachedir = pkg_object_string(pkg_config_get("PKG_CACHEDIR"));
	else