From b5580de5d9adfe7c0b5a5544e697b2029cdc9066 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 30 Jan 2008 02:53:07 +0000 Subject: [PATCH] Use repodata_merge_attrs to implement =Shr again. Currently suboptimal, as the blob data isn't shared in the file (the old attribute store simply copied only ofs/len, the new one creates a new blob for each reference to the same data snippet). --- tools/repo_susetags.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/repo_susetags.c b/tools/repo_susetags.c index d5e54fc..9ee2123 100644 --- a/tools/repo_susetags.c +++ b/tools/repo_susetags.c @@ -784,7 +784,7 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, int with_attr) repodata_set_str(data, last_found_pack, id_messagedel, line + 6); #endif continue; -#if 0 +#if 1 case CTAG('=', 'S', 'h', 'r'): if (last_found_pack >= pd.nshare) { @@ -828,7 +828,12 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, int with_attr) free (pd.sources[i]); } free (pd.sources); + } +#endif + if (pd.nshare) + { + int i, last_found; last_found = 0; for (i = 0; i < pd.nshare; i++) if (pd.share_with[i]) @@ -860,11 +865,10 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, int with_attr) } } if (n != repo->end) - merge_attrs (attr, i, last_found); + repodata_merge_attrs (data, i, last_found); } free (pd.share_with); } -#endif if (data) repodata_internalize(data); -- 2.7.4