[buildd-tools-devel] Bug#807744: sbuild: aptitude 0.7.5-2 breaks sbuild upon install-deps

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Thu Dec 24 11:43:51 UTC 2015


2015-12-12 10:26 Luca Falavigna:
>Source: sbuild
>Severity: important
>
>Dear Maintainer,
>
>aptitude_0.7.5-2 breaks sbuild during its install-deps stage, when aptitude is
>used as resolver to install build-dependencies.
>
>This is the offending commit:
>https://anonscm.debian.org/cgit/aptitude/aptitude.git/commit/?h=debian-
>sid&id=a865d7dd4040273eda0c012cfd20862de3c6622f
>
>This is the portion of the log which exposes the problem:
>Writing extended state information...
>Building tag database...
>E: Could not create directory: /sbuild-nonexistent/.cache:
>boost::filesystem::create_directory: No such file or directory: "/sbuild-
>nonexistent/.cache"


2015-12-24 08:17 Johannes Schauer:
>Control: tag -1 + patch
>
>Hi,
>
>On Sat, 12 Dec 2015 11:26:20 +0100 Luca Falavigna <dktrkranz at debian.org> wrote:
>> aptitude_0.7.5-2 breaks sbuild during its install-deps stage, when aptitude
>> is used as resolver to install build-dependencies.
>>
>> This is the offending commit:
>> https://anonscm.debian.org/cgit/aptitude/aptitude.git/commit/?h=debian-
>> sid&id=a865d7dd4040273eda0c012cfd20862de3c6622f
>>
>> This is the portion of the log which exposes the problem:
>> Writing extended state information...
>> Building tag database...
>> E: Could not create directory: /sbuild-nonexistent/.cache:
>> boost::filesystem::create_directory: No such file or directory: "/sbuild-
>> nonexistent/.cache"
>
>the following patch should fix this:
>
>diff --git a/lib/Sbuild/ResolverBase.pm b/lib/Sbuild/ResolverBase.pm
>index db54289..1e71abf 100644
>--- a/lib/Sbuild/ResolverBase.pm
>+++ b/lib/Sbuild/ResolverBase.pm
>@@ -1368,6 +1368,8 @@ sub get_aptitude_command_internal {
>     debug2("APT Command: ", join(" ", @aptcommand), "\n");
>
>     $options->{'INTCOMMAND'} = \@aptcommand;
>+
>+    $options->{'ENV'}{'XDG_CACHE_HOME'} = '/tmp';
> }
>
> sub run_aptitude_command {
>
>
>Though I'm not sure how wise it is to use /tmp as aptitude's location for its
>cache...
>
>Thanks!
>
>cheers, josch



2015-12-24 09:13 Mattia Rizzolo:
>On Thu, Dec 24, 2015 at 09:17:29AM +0100, Johannes Schauer wrote:
>> the following patch should fix this:
>>
>> diff --git a/lib/Sbuild/ResolverBase.pm b/lib/Sbuild/ResolverBase.pm
>> index db54289..1e71abf 100644
>> --- a/lib/Sbuild/ResolverBase.pm
>> +++ b/lib/Sbuild/ResolverBase.pm
>> @@ -1368,6 +1368,8 @@ sub get_aptitude_command_internal {
>>      debug2("APT Command: ", join(" ", @aptcommand), "\n");
>>
>>      $options->{'INTCOMMAND'} = \@aptcommand;
>> +
>> +    $options->{'ENV'}{'XDG_CACHE_HOME'} = '/tmp';
>>  }
>>
>>  sub run_aptitude_command {
>>
>>
>> Though I'm not sure how wise it is to use /tmp as aptitude's location for its
>> cache...
>
>So nice in pbuilder we had another problem with aptitude, and the fix
>was the same.
>
>BTW, I used '/root' as XDG_CACHE_HOME.  On second though '/root/.cache'
>would have been better, but *shrugs*, I don't think people are going to
>do so much stuff in buildd chroots (even if I'll probably switch it in a
>later release).

aptitude 0.7.5-3 (released a few days ago, after IRC conversations with
Mattia) contains a patch that means that the cache files/dirs (for
downloaded metadata) should be created only when using changelog
operations (which sbuild never invokes, I suppose); and even in that
case, aptitude emits errors but does not stop performing the operation.

There are still other warnings/errors complaining about the lack of home
dir for configuration, but I think that they are present for years.

josch asked me to drop a line about this, closing the bug, but I'd
better leave the latter to you.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Buildd-tools-devel mailing list