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/p5solv | |
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/p5solv')
-rwxr-xr-x | examples/p5solv | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/p5solv b/examples/p5solv index cd24602..ce32f1c 100755 --- a/examples/p5solv +++ b/examples/p5solv @@ -178,7 +178,9 @@ sub writecachedrepo { die("internal error, cannot reload solv file\n") unless $self->{'handle'}->add_solv($f, $solv::Repo::SOLV_ADD_NO_STUBS); } else { $info->extend_to_repo(); - $info->add_solv($f, $solv::Repo::REPO_EXTEND_SOLVABLES); + my $flags = $solv::Repo::REPO_EXTEND_SOLVABLES; + $flags |= $solv::Repo::REPO_LOCALPOOL if $ext ne 'DL'; + $info->add_solv($f, $flags); } } } @@ -262,8 +264,8 @@ sub load_ext { my $f = $self->download($filename, 1, $filechksum); return 0 unless $f; if ($ext eq 'FL') { - $self->{'handle'}->add_rpmmd($f, 'FL', $solv::Repo::REPO_USE_LOADING|$solv::Repo::REPO_EXTEND_SOLVABLES); - } elsif ($ext eq 'FL') { + $self->{'handle'}->add_rpmmd($f, 'FL', $solv::Repo::REPO_USE_LOADING|$solv::Repo::REPO_EXTEND_SOLVABLES|$solv::Repo::REPO_LOCALPOOL); + } elsif ($ext eq 'DL') { $self->{'handle'}->add_deltainfoxml($f, $solv::Repo::REPO_USE_LOADING); } $self->writecachedrepo($ext, $repodata); @@ -390,7 +392,9 @@ sub load_ext { my $filechksum = $repodata->lookup_checksum($solv::SOLVID_META, $solv::SUSETAGS_FILE_CHECKSUM); my $f = $self->download("$descrdir/$filename", 1, $filechksum); return 0 unless $f; - $self->{'handle'}->add_susetags($f, $defvendorid, $ext, $solv::Repo::REPO_USE_LOADING|$solv::Repo::REPO_EXTEND_SOLVABLES); + my $flags = $solv::Repo::REPO_USE_LOADING|$solv::Repo::REPO_EXTEND_SOLVABLES; + $flags |= $solv::Repo::REPO_LOCALPOOL if $ext ne 'DL'; + $self->{'handle'}->add_susetags($f, $defvendorid, $ext, $flags); $self->writecachedrepo($ext, $repodata); return 1; } |