[systemd-devel] [systemd-commits] 4 commits - src/core test/TEST-03-JOBS

Michal Schmidt mschmidt at redhat.com
Thu Nov 27 07:17:47 PST 2014


On 11/27/2014 03:42 AM, Zbigniew Jędrzejewski-Szmek wrote:
> On Wed, Nov 26, 2014 at 07:35:30AM -0800, Michal Schmidt wrote:
>>  src/core/job.c                 |    7 +++++--
>>  src/core/job.h                 |   14 ++++++++++----
>>  src/core/transaction.c         |    2 +-
>>  test/TEST-03-JOBS/test-jobs.sh |    9 +++++++++
>>  4 files changed, 25 insertions(+), 7 deletions(-)
> 
> Hi,
> test-engine does not pass anymore. I didn't check exactly, but one
> of those commits is the most likely culprit.

Yeah, this one:

>> New commits:
>> commit e0312f4db08c7100bd00299614e87bedc759b366
>> Author: Michal Schmidt <mschmidt at redhat.com>
>> Date:   Wed Nov 26 16:33:46 2014 +0100
>>
>>     core: fix check for transaction destructiveness
>>     
>>     When checking if the transaction is destructive, we need to check if the
>>     previously installed job is a superset of the new job (and hence the new
>>     job will fold into the installed one without changing it), not the other
>>     way around.
>>
>> diff --git a/src/core/transaction.c b/src/core/transaction.c
>> index bbaa6da..b992edd 100644
>> --- a/src/core/transaction.c
>> +++ b/src/core/transaction.c
>> @@ -511,7 +511,7 @@ static int transaction_is_destructive(Transaction *tr, JobMode mode, sd_bus_erro
>>                  assert(!j->transaction_next);
>>  
>>                  if (j->unit->job && (mode == JOB_FAIL || j->unit->job->irreversible) &&
>> -                    !job_type_is_superset(j->type, j->unit->job->type))
>> +                    !job_type_is_superset(j->unit->job->type, j->type))
>>                          return sd_bus_error_setf(e, BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE,
>>                                                   "Transaction is destructive.");
>>          }

Fixed now in
c21b92ffe7 "core: fix transaction destructiveness check once more"

Thanks,
Michal



More information about the systemd-devel mailing list