Skip to content

Commit

Permalink
[backend] fix full tree rebuild handling of meta files
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Feb 24, 2014
1 parent f034aac commit e12154b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/bs_sched
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,7 @@ sub fctx_set_metaidmd5 {
local *F;
my $metamd5 = '0' x 32;
my $metaid = '0/0/0';
if (open(F, '<', $fctx->{'meta'})) {
if (open(F, '<', $fctx->{'lastmeta'})) {
my @s = stat(F);
$metaid = "$s[9]/$s[7]/$s[1]" if @s;
my $ctx = Digest::MD5->new;
Expand Down

2 comments on commit e12154b

@KostyaSha
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the difference between meta and lastmeta?

@mlschroe
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'meta' is the filename of the meta file in the package. In some cases (i.e. a rebuild of the full area) we want to add multiple packages, so we have multiple meta files in that case. To speed things up, some data about the meta file is cached, e.g. the md5sum. To see if the cache is valid, we set 'lastmeta' to the current meta file.

Please sign in to comment.