diff options
author | Michael Schroeder <mls@suse.de> | 2012-11-26 14:26:02 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-11-26 14:26:02 +0100 |
commit | f6d2b5c95e7e49ab9dde3d81d1b4442c82d627ed (patch) | |
tree | 567d73448beafdaeb07092d87729f5a518360e35 /examples/pysolv | |
parent | fc144250a9cdbd1b6d5b550999b3a28c45439116 (diff) | |
download | libsolv-f6d2b5c95e7e49ab9dde3d81d1b4442c82d627ed.tar.gz libsolv-f6d2b5c95e7e49ab9dde3d81d1b4442c82d627ed.tar.bz2 libsolv-f6d2b5c95e7e49ab9dde3d81d1b4442c82d627ed.zip |
Already use LOCALPOOL when converting filelist/language extensions
Seems to work and helps to keep the main pool small.
Diffstat (limited to 'examples/pysolv')
-rwxr-xr-x | examples/pysolv | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/pysolv b/examples/pysolv index bcc8bec..bfb020e 100755 --- a/examples/pysolv +++ b/examples/pysolv @@ -269,8 +269,10 @@ class repo_generic(dict): # need to extend to repo boundaries, as this is how # info.write() has written the data info.extend_to_repo() - # LOCALPOOL does not help as pool already contains all ids - info.add_solv(nf, Repo.REPO_EXTEND_SOLVABLES) + flags = Repo.REPO_EXTEND_SOLVABLES + if ext != 'DL': + flags |= Repo.REPO_LOCALPOOL + info.add_solv(nf, flags) os.rename(tmpname, self.cachepath(ext)) except IOError, e: if tmpname: @@ -393,7 +395,7 @@ class repo_repomd(repo_generic): if not f: return False if ext == 'FL': - self.handle.add_rpmmd(f, 'FL', Repo.REPO_USE_LOADING|Repo.REPO_EXTEND_SOLVABLES) + self.handle.add_rpmmd(f, 'FL', Repo.REPO_USE_LOADING|Repo.REPO_EXTEND_SOLVABLES|Repo.REPO_LOCALPOOL) elif ext == 'DL': self.handle.add_deltainfoxml(f, Repo.REPO_USE_LOADING) self.writecachedrepo(ext, repodata) @@ -517,7 +519,10 @@ class repo_susetags(repo_generic): f = self.download(descrdir + '/' + filename, True, filechksum) if not f: return False - self.handle.add_susetags(f, defvendorid, ext, Repo.REPO_USE_LOADING|Repo.REPO_EXTEND_SOLVABLES) + flags = Repo.REPO_USE_LOADING|Repo.REPO_EXTEND_SOLVABLES + if ext != 'DL': + flags |= Repo.REPO_LOCALPOOL + self.handle.add_susetags(f, defvendorid, ext, flags) self.writecachedrepo(ext, repodata) return True |