db: remove APK_NAME_VIRTUAL flag
use the package 'installed_size' == 0 as a test instead for dependency only packages.cute-signatures
parent
e5be34335c
commit
c8c52e1dc6
|
@ -127,7 +127,7 @@ static int add_main(void *ctx, int argc, char **argv)
|
||||||
virtpkg->version = strdup("0");
|
virtpkg->version = strdup("0");
|
||||||
virtpkg->description = strdup("virtual meta package");
|
virtpkg->description = strdup("virtual meta package");
|
||||||
apk_dep_from_pkg(&virtdep, &db, virtpkg);
|
apk_dep_from_pkg(&virtdep, &db, virtpkg);
|
||||||
virtdep.name->flags |= APK_NAME_TOPLEVEL | APK_NAME_VIRTUAL;
|
virtdep.name->flags |= APK_NAME_TOPLEVEL;
|
||||||
virtpkg = apk_db_pkg_add(&db, virtpkg);
|
virtpkg = apk_db_pkg_add(&db, virtpkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,6 @@ struct apk_db_dir_instance {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define APK_NAME_TOPLEVEL 0x0001
|
#define APK_NAME_TOPLEVEL 0x0001
|
||||||
#define APK_NAME_VIRTUAL 0x0002
|
|
||||||
|
|
||||||
struct apk_name {
|
struct apk_name {
|
||||||
apk_hash_node hash_node;
|
apk_hash_node hash_node;
|
||||||
|
|
|
@ -1693,7 +1693,7 @@ int apk_db_install_pkg(struct apk_database *db,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Install the new stuff */
|
/* Install the new stuff */
|
||||||
if (!(newpkg->name->flags & APK_NAME_VIRTUAL)) {
|
if (newpkg->installed_size != 0) {
|
||||||
r = apk_db_unpack_pkg(db, newpkg, (oldpkg != NULL), cb, cb_ctx);
|
r = apk_db_unpack_pkg(db, newpkg, (oldpkg != NULL), cb, cb_ctx);
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in New Issue