Author: matz Date: Sat Dec 8 02:53:58 2007 New Revision: 8073 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8073&view=rev Log: Also activate paging for embedded attr stores. Modified: trunk/sat-solver/src/attr_store.c trunk/sat-solver/src/attr_store_p.h trunk/sat-solver/src/repo_solv.c Modified: trunk/sat-solver/src/attr_store.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/attr_store.c?rev=8073&r1=8072&r2=8073&view=diff ============================================================================== --- trunk/sat-solver/src/attr_store.c (original) +++ trunk/sat-solver/src/attr_store.c Sat Dec 8 02:53:58 2007 @@ -1137,7 +1137,7 @@ /* Try to either setup on-demand paging (using FP as backing file), or in case that doesn't work (FP not seekable) slurps in all pages and deactivates paging. */ -static void +void read_or_setup_pages (FILE *fp, Attrstore *s) { unsigned int blobsz; Modified: trunk/sat-solver/src/attr_store_p.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/attr_store_p.h?rev=8073&r1=8072&r2=8073&view=diff ============================================================================== --- trunk/sat-solver/src/attr_store_p.h (original) +++ trunk/sat-solver/src/attr_store_p.h Sat Dec 8 02:53:58 2007 @@ -76,6 +76,7 @@ }; void add_attr_from_file (Attrstore *s, unsigned entry, Id name, int type, Id *idmap, unsigned maxid, FILE *fp); +void read_or_setup_pages (FILE *fp, Attrstore *s); #define get_num(ptr,val) do { \ typedef int __wrong_buf__[(1-sizeof((ptr)[0])) * (sizeof((ptr)[0])-1)];\ Modified: trunk/sat-solver/src/repo_solv.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo_solv.c?rev=8073&r1=8072&r2=8073&view=diff ============================================================================== --- trunk/sat-solver/src/repo_solv.c (original) +++ trunk/sat-solver/src/repo_solv.c Sat Dec 8 02:53:58 2007 @@ -521,12 +521,6 @@ case TYPE_ID: read_id(fp, numid + numrel); /* just check Id */ break; - case TYPE_ATTR_CHUNK: - read_id(fp, 0); - /* Fallthrough. */ - case TYPE_ATTR_INT: - read_id(fp, 0); - break; case TYPE_U32: read_u32(fp); break; @@ -540,6 +534,12 @@ while ((read_u8(fp) & 0xc0) != 0) ; break; + case TYPE_ATTR_CHUNK: + read_id(fp, 0); + /* Fallthrough. */ + case TYPE_ATTR_INT: + read_id(fp, 0); + break; case TYPE_ATTR_INTLIST: case TYPE_ATTR_LOCALIDS: while (read_id(fp, 0) != 0) @@ -787,6 +787,8 @@ if (embedded_store) { attr_store_pack (embedded_store); + /* If we have any attributes we also have pages. */ + read_or_setup_pages (fp, embedded_store); repo_add_attrstore (repo, embedded_store); } xfree(idmap); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org