diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2018-06-22 15:02:10 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2018-06-22 15:02:10 +0000 |
commit | 9cd939fb7466279e8657a832e36c8d007b3ac403 (patch) | |
tree | b91bb38b427dbed5a8c7513b31ff39b30ccbbbfc | |
parent | e62dd92caee07f9e0ea63a040bdee92a5e442c57 (diff) |
activate tag solver (won't do anything if plists don't have actual tags)
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgAdd.pm | 14 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgDelete.pm | 12 |
2 files changed, 18 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm index 1114b7cd68d..33c465c79af 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgAdd.pm,v 1.101 2018/06/20 10:21:40 espie Exp $ +# $OpenBSD: PkgAdd.pm,v 1.102 2018/06/22 15:02:09 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -993,12 +993,12 @@ sub process_set $state->tracker->cant($set); return (); } -# if (!$set->solver->solve_tags($state)) { -# if (!$state->defines('libdepends')) { -# $state->{bad}++; -# return (); -# } -# } + if (!$set->solver->solve_tags($state)) { + if (!$state->defines('libdepends')) { + $state->{bad}++; + return (); + } + } if (!$set->recheck_conflicts($state)) { $state->{bad}++; $set->cleanup(OpenBSD::Handle::CANT_INSTALL, "fatal conflicts"); diff --git a/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm b/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm index 81efe7e107a..3f151b75b3e 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgDelete.pm @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgDelete.pm,v 1.41 2018/06/20 10:15:42 espie Exp $ +# $OpenBSD: PkgDelete.pm,v 1.42 2018/06/22 15:02:09 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -370,6 +370,16 @@ sub process_set $state->tracker->cant($set); return (); } + if (defined $pkg->plist->{tags}) { + if (!$set->solver->solve_tags($state)) { + if (!$state->defines('libdepends')) { + $set->cleanup( + OpenBSD::Handle::CANT_DELETE); + $state->tracker->cant($set); + return (); + } + } + } } really_remove($set, $state); $set->cleanup; |