[PATCH] remove rhpl.getArch() calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached are my patches to remove rhpl.getArch() calls and use new functions in iutil. Notes:

1) The new functions are at the end of iutil.py

2) isX86() returns true for 32-bit and 64-bit x86 processors, but you can pass bits=[32|64] to test just one subset (this is used in getArch further down).

2.5) The getArch() function returns a string naming the processor we are on (but sanitized to match names we need during installation, e.g. all 32-bit x86 processors are called 'i386', all 64-bit x86 processors are called 'x86_64', all ppc processors are called 'ppc', and so on like we use during installation), whereas the isArch() functions just return true or false if the processor is in that arch family.

3) The iutil.getPPCMachine() function grew a chunk of code because it was calling another function in rhpl. I just merged it with getPPCMachine() in iutil.py.

4) Almost all uses of rhpl.getArch() throughout anaconda are to test to see if we are on s390 or not and do something special. IBM, I hope you're reading this because the next time you tell me that the s390 platform is some sort of standard, I'm referring to these patches.

5) There are two uses of rhpl.arch.canonArch, one in iutil.py and one in upgrade.py. Didn't touch do anything about that code in these patches. Maybe later.

6) Defined an isSparc() and isAlpha() since we have those in rhpl and use them in anaconda.

?'s

Attachment: 0001-Create-architecture-test-functions-in-iutil.patch
Description: Binary data

Attachment: 0002-Add-isAlpha-test-function-to-iutil.patch
Description: Binary data

Attachment: 0003-Expand-iutil.isX86-and-added-iutil.getArch.patch
Description: Binary data

Attachment: 0004-Replace-rhpl.getArch-calls-with-iutil-calls.patch
Description: Binary data

Attachment: 0005-Be-consistent-with-data-type.patch
Description: Binary data



--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux