Commit 292bf85d authored by Rafael Monnerat's avatar Rafael Monnerat

Update local file after perform the upgrade only.

parent 1dd26cbc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2012-2014 Vifib SARL and Contributors. # Copyright (c) 2012 Vifib SARL and Contributors.
# All Rights Reserved. # All Rights Reserved.
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
...@@ -95,16 +95,6 @@ class Upgrader: ...@@ -95,16 +95,6 @@ class Upgrader:
def fixConsistency(self, signature, upgrade=0, reboot=0, boot=0, **kw): def fixConsistency(self, signature, upgrade=0, reboot=0, boot=0, **kw):
today = datetime.date.today().isoformat() today = datetime.date.today().isoformat()
if upgrade and boot:
signature.update(reboot=today, upgrade=today)
if upgrade:
signature.update(upgrade=today)
elif reboot:
signature.update(reboot=today)
else:
raise ValueError(
"You need upgrade and/or reboot when invoke fixConsistency!")
if upgrade: if upgrade:
pkgmanager = BasePromise() pkgmanager = BasePromise()
configuration_dict = signature.get_signature_dict() configuration_dict = signature.get_signature_dict()
...@@ -122,6 +112,16 @@ class Upgrader: ...@@ -122,6 +112,16 @@ class Upgrader:
pkgmanager.update(repository_tuple_list, upgrade_goal['filter-package-list']) pkgmanager.update(repository_tuple_list, upgrade_goal['filter-package-list'])
if upgrade and boot:
signature.update(reboot=today, upgrade=today)
if upgrade:
signature.update(upgrade=today)
elif reboot:
signature.update(reboot=today)
else:
raise ValueError(
"You need upgrade and/or reboot when invoke fixConsistency!")
def checkConsistency(self, fixit=0, **kw): def checkConsistency(self, fixit=0, **kw):
# Get configuration # Get configuration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment