aboutsummaryrefslogtreecommitdiffstats
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-20 14:08:16 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-20 14:08:16 +0300
commit3f27da2adec968b1d8f83149b2b321e1050b4acb (patch)
treefe66fec31a9eb8a6541075ef3f8e307d2e99d957 /src/package.c
parent7e18398781b056f858ef60200e24b0f8ab394cfe (diff)
downloadapk-tools-3f27da2adec968b1d8f83149b2b321e1050b4acb.tar.bz2
apk-tools-3f27da2adec968b1d8f83149b2b321e1050b4acb.tar.xz
solver: fix pinning+cache to work
Mistakenly allowed masked out package to be installed if it was in cache.
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/package.c b/src/package.c
index 6723de6..e211b63 100644
--- a/src/package.c
+++ b/src/package.c
@@ -802,7 +802,7 @@ int apk_pkg_add_info(struct apk_database *db, struct apk_package *pkg,
default:
/* lower case index entries are safe to be ignored */
if (!islower(field)) {
- pkg->filename = APK_PKG_UNINSTALLABLE;
+ pkg->uninstallable = 1;
db->compat_notinstallable = 1;
}
db->compat_newfeatures = 1;
@@ -914,8 +914,7 @@ int apk_pkg_read(struct apk_database *db, const char *file,
tar->close(tar);
if (r < 0 && r != -ECANCELED)
goto err;
- if (ctx.pkg->name == NULL ||
- ctx.pkg->filename == APK_PKG_UNINSTALLABLE) {
+ if (ctx.pkg->name == NULL || ctx.pkg->uninstallable) {
r = -ENOTSUP;
goto err;
}