pkg, db: use 's' for source repository tags instead of 'p'

Will use 'p' for provides.
cute-signatures
Timo Teräs 2012-02-24 09:20:18 +02:00
parent 426954fc7b
commit 9ef5bf6e2d
3 changed files with 5 additions and 4 deletions

View File

@ -776,6 +776,7 @@ int apk_db_index_read(struct apk_database *db, struct apk_bstream *bs, int repo)
ipkg->replaces_priority = apk_blob_pull_uint(&l, 10); ipkg->replaces_priority = apk_blob_pull_uint(&l, 10);
break; break;
case 'p': case 'p':
case 's':
ipkg->repository_tag = apk_db_get_tag_id(db, l); ipkg->repository_tag = apk_db_get_tag_id(db, l);
break; break;
default: default:
@ -825,7 +826,7 @@ static int apk_db_write_fdb(struct apk_database *db, struct apk_ostream *os)
apk_blob_push_blob(&bbuf, APK_BLOB_STR("\n")); apk_blob_push_blob(&bbuf, APK_BLOB_STR("\n"));
} }
if (ipkg->repository_tag) { if (ipkg->repository_tag) {
apk_blob_push_blob(&bbuf, APK_BLOB_STR("p:")); apk_blob_push_blob(&bbuf, APK_BLOB_STR("s:"));
apk_blob_push_blob(&bbuf, *db->repo_tags[ipkg->repository_tag].name); apk_blob_push_blob(&bbuf, *db->repo_tags[ipkg->repository_tag].name);
apk_blob_push_blob(&bbuf, APK_BLOB_STR("\n")); apk_blob_push_blob(&bbuf, APK_BLOB_STR("\n"));
} }

View File

@ -748,7 +748,7 @@ int apk_pkg_add_info(struct apk_database *db, struct apk_package *pkg,
pkg->commit = apk_blob_cstr(value); pkg->commit = apk_blob_cstr(value);
break; break;
case 'F': case 'M': case 'R': case 'Z': case 'r': case 'q': case 'F': case 'M': case 'R': case 'Z': case 'r': case 'q':
case 'a': case 'p': case 'a': case 'p': case 's':
/* installed db entries which are handled in database.c */ /* installed db entries which are handled in database.c */
return 1; return 1;
default: default:

View File

@ -4,7 +4,7 @@ V:3
S:1 S:1
I:1 I:1
D:b D:b
p:testing s:testing
C:Q1hdUpqRv5mYgJEqW52UmVsv23ysE= C:Q1hdUpqRv5mYgJEqW52UmVsv23ysE=
P:b P:b
@ -18,5 +18,5 @@ V:3
S:1 S:1
I:1 I:1
D:a>=3 D:a>=3
p:testing s:testing