always save 'world' with line feeds
using space was for backwards compatibility with apk-tools 2.2.2 and earlier (from January 2012)cute-signatures
parent
c553970061
commit
cd6786bc30
|
@ -152,7 +152,6 @@ struct apk_database {
|
||||||
int permanent : 1;
|
int permanent : 1;
|
||||||
int compat_newfeatures : 1;
|
int compat_newfeatures : 1;
|
||||||
int compat_notinstallable : 1;
|
int compat_notinstallable : 1;
|
||||||
int compat_old_world : 1;
|
|
||||||
|
|
||||||
struct apk_dependency_array *world;
|
struct apk_dependency_array *world;
|
||||||
struct apk_protected_path_array *protected_paths;
|
struct apk_protected_path_array *protected_paths;
|
||||||
|
|
|
@ -1113,8 +1113,6 @@ static int apk_db_read_state(struct apk_database *db, int flags)
|
||||||
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, ' '))
|
|
||||||
db->compat_old_world = 1;
|
|
||||||
apk_blob_pull_deps(&blob, db, &db->world);
|
apk_blob_pull_deps(&blob, db, &db->world);
|
||||||
free(world.ptr);
|
free(world.ptr);
|
||||||
}
|
}
|
||||||
|
@ -1653,7 +1651,7 @@ int apk_db_write_config(struct apk_database *db)
|
||||||
if (os == NULL)
|
if (os == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
apk_deps_write(db, db->world, os, APK_BLOB_PTR_LEN(db->compat_old_world ? " " : "\n", 1));
|
apk_deps_write(db, db->world, os, APK_BLOB_PTR_LEN("\n", 1));
|
||||||
os->write(os, "\n", 1);
|
os->write(os, "\n", 1);
|
||||||
r = os->close(os);
|
r = os->close(os);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
|
Loading…
Reference in New Issue