db: fix loading of world after previous commits
parent
2ea61da9d9
commit
fc57b73101
|
@ -902,7 +902,7 @@ static int apk_db_read_state(struct apk_database *db, int flags)
|
||||||
{
|
{
|
||||||
struct apk_istream *is;
|
struct apk_istream *is;
|
||||||
struct apk_bstream *bs;
|
struct apk_bstream *bs;
|
||||||
apk_blob_t blob;
|
apk_blob_t blob, world;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* Read:
|
/* Read:
|
||||||
|
@ -914,14 +914,14 @@ static int apk_db_read_state(struct apk_database *db, int flags)
|
||||||
* 6. script db
|
* 6. script db
|
||||||
*/
|
*/
|
||||||
if (!(flags & APK_OPENF_NO_WORLD)) {
|
if (!(flags & APK_OPENF_NO_WORLD)) {
|
||||||
blob = apk_blob_from_file(db->root_fd, apk_world_file);
|
blob = world = apk_blob_from_file(db->root_fd, apk_world_file);
|
||||||
if (APK_BLOB_IS_NULL(blob))
|
if (APK_BLOB_IS_NULL(blob))
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
blob = apk_blob_trim(blob);
|
blob = apk_blob_trim(blob);
|
||||||
if (apk_blob_chr(blob, ' '))
|
if (apk_blob_chr(blob, ' '))
|
||||||
db->compat_old_world = 1;
|
db->compat_old_world = 1;
|
||||||
apk_blob_pull_deps(&blob, db, &db->world);
|
apk_blob_pull_deps(&blob, db, &db->world);
|
||||||
free(blob.ptr);
|
free(world.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & APK_OPENF_NO_INSTALLED)) {
|
if (!(flags & APK_OPENF_NO_INSTALLED)) {
|
||||||
|
|
Loading…
Reference in New Issue