Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Move the trusted_boot setting into AnacondaYum.run (#731260). (http://www.linux-archive.org/centos/565322-move-trusted_boot-setting-into-anacondayum-run-731260-a.html)

David Cantrell 08-17-2011 06:35 PM

Move the trusted_boot setting into AnacondaYum.run (#731260).
 
On 08/17/2011 02:35 PM, Chris Lumens wrote:

We can't call isPackageInstalled after the transaction has been run, since
it wants to operate on a TransactionSet object and that's been deleted. So
instead we need to call it sometime between populateTs and _run. This looks
to be as good a place as any.
---
yuminstall.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 6f8a8a4..71f1154 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1064,6 +1064,8 @@ class AnacondaYum(YumSorter):
self.ts.check()
self.ts.order()

+ self.anaconda.id.bootloader.trusted_boot = self.isPackageInstalled(name="tboot")
+
if self._run(instLog, cb, intf) == DISPATCH_BACK:
self.tsInfo.curmedia = None
return DISPATCH_BACK
@@ -1854,8 +1856,6 @@ debuglevel=6

anaconda.id.instProgress = None

- anaconda.id.bootloader.trusted_boot = self.ayum.isPackageInstalled(name="tboot")
-
if rc == DISPATCH_BACK:
return DISPATCH_BACK



Yep, ack.

--
David Cantrell <dcantrell@redhat.com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

"Wei, Gang" 08-18-2011 01:22 AM

Move the trusted_boot setting into AnacondaYum.run (#731260).
 
David Cantrell wrote on*2011-08-18:
> On 08/17/2011 02:35 PM, Chris Lumens wrote:
>> We can't call isPackageInstalled after the transaction has been run,
>> since it wants to operate on a TransactionSet object and that's been
>> deleted. So instead we need to call it sometime between populateTs
>> and _run. This looks to be as good a place as any.
>> ---
>> yuminstall.py | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>> diff --git a/yuminstall.py b/yuminstall.py index 6f8a8a4..71f1154
>> 100644
>> --- a/yuminstall.py
>> +++ b/yuminstall.py
>> @@ -1064,6 +1064,8 @@ class AnacondaYum(YumSorter):
>> self.ts.check()
>> self.ts.order()
>> + self.anaconda.id.bootloader.trusted_boot =
>> + self.isPackageInstalled(name="tboot")
>> +
>> if self._run(instLog, cb, intf) == DISPATCH_BACK:
>> self.tsInfo.curmedia = None
>> return DISPATCH_BACK @@ -1854,8 +1856,6 @@
>> debuglevel=6
>>
>> anaconda.id.instProgress = None
>> - anaconda.id.bootloader.trusted_boot =
>> self.ayum.isPackageInstalled(name="tboot") -
>> if rc == DISPATCH_BACK:
>> return DISPATCH_BACK
>
> Yep, ack.

Oh, thanks for the fix. Theoretically speaking I should test it before send it out, but it looks like very hard for me.

Jimmy



_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 06:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.