Mailinglist Archive: opensuse-buildservice (260 mails)

< Previous Next >
Re: [opensuse-buildservice] first draft of a dod implementation
  • From: Michael Schroeder <mls@xxxxxxx>
  • Date: Wed, 2 Dec 2009 12:09:52 +0100
  • Message-id: <20091202110952.GC28862@xxxxxxx>
3) I think the updatefrombins() call will throw out all dod entries
breaking addrepo_dod

No I patched the updatefrombins() call so that it'll keep all packages
which have no bsid (the id which is calculated from the stat() call).
This way we keep the dod entries + add the additional packages from the
:full tree (so in the worst case the number of solvables is doubled).

Ok, I missed that.

4) the dod solvables should have a hdrid of "dododo..."

Hmm why do we need this? e.g. for the getbinaryversions() call in
bs_repserver? (at least in the scheduler this isn't needed because
when it starts to calculate the meta all hdrid's are already available)

It makes thinks cleaner, you don't need to special case dod packages,
e.g. the "$pkgid = "dodododododododododododododododo" unless $pkgid;"
line in the scheduler.

(Maybe we should set the buildservice_id to "dod" as well. Hmm.)

I also think that currently dod repos are kind of slow, as
addrepo_dod() doesn't look at the old solv file like addrepo_scan.
We could move the dod handling into addrepo_scan, i.e.:

print " scanning repo $prp...\n";
my $dir = "$reporoot/$prp/$myarch/:full";
my $cache;
if (-s "$dir.solv") {
eval {$cache = $pool->repofromfile($prp, "$dir.solv");};
warn($@) if $@;
if ($cache && $cache->isexternal()) {
$repodatas{$prp}->{'lastscan'} = time();
return $cache;
}
} else {
# new code starts here:
my ($projid) = split('/', $prp, 2);
if ($projpacks->{$projid}->{'download'}) {
my $doddata = $projpacks->{$projid}->{'download'}->[0];
eval {$cache = Meta::parse("$dir/$doddata->{'metafile'}",
"$doddata->{'mtype'}", { 'arch' => [ $myarch ] })};
if ($@) {
warn("cannot read metadata: $@");
return undef;
}
for (values %$cache) {
delete $_->{'id'}; # hmm, set to dod?
$_->{'hdrmd5'} = 'dodododododododododododododododo';
}
$cache->{'/url'} = $doddata->{'baseurl'};
$cache = $pool->repofromdata($prp, $cache);
}
}

This would convert the dod data only at the first time and afterwards
just use the standard code to manage the non-dod solvables.

The drawback is that you have to delete the solv file if you change
the metadata.

What do you think?

Cheers,
Michael.

--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups