summaryrefslogtreecommitdiffstats
path: root/iutil.py
Commit message (Collapse)AuthorAgeFilesLines
* Structure the repo layout so it matches final structure better and make isys ↵Martin Sivak2010-05-311-1075/+0
| | | | | | a real Python package. Also updates the build and autotools stuff to work with the new structure
* refactoring: put totalMemory() into isys.Ales Kozumplik2010-05-271-11/+0
| | | | so the python implementation in iutil.py can be removed.
* iutil: execWithCallback() and execWithPulseProgress() return an object.Ales Kozumplik2010-05-241-6/+9
| | | | | | | | The object contains all the products of the exec: return call, stdout and stderr. The remaining execWith*() methods can migrate to this too one day. The advantage now is that lvm() and mdadm() in devicelibs/ don't have to resort to (possibly broken) hacks to get the error message from their calls.
* logging: simplify stdout logging in execWithCallback().Ales Kozumplik2010-05-241-9/+6
|
* logging: use stderr parameter in execWithCallback().Ales Kozumplik2010-05-241-0/+2
| | | | Ales broke this with 667c563e81b6e07df74bbb48be034539bfffe08b.
* improve the memory checking so it reflects better the hungry architectures.Ales Kozumplik2010-05-191-0/+11
| | | | | | | | | | | | 1) in isys.h differentiate betweet powerpc64 and sparc and everything else. powerpc is extremely hungry. 2) decrease the limits for the remaining architectures--I have i686 and x86_64 particularly in mind there 3) change the way the total memory is guessed. the previous method just assumed kernel binary image is around 16 MB. This can be completely off for the hungry archs.
* Set minswap suggestion on s390x to 1 (#466289).David Cantrell2010-04-141-0/+3
| | | | | | | On s390x, set the minswap suggestion to 1 rather than 256, 1024, or the amount of memory in the system. On s390x, it's common for users to run with swap volumes smaller than the installed memory size, so align the anaconda recommendations with that.
* use isSparc not isSPARCDennis Gilmore2010-03-151-1/+1
| | | | | the function to determine what machine we are is isSparc not isSPARC correct typo
* add function to get the sparc system typeDennis Gilmore2010-03-151-0/+19
| | | | | | depending on the type of SPARC machine we are running on we need to pass different flags to silo. include a function to determine what machine we are running on.
* Log commands as a string instead of as a list of strings.David Lehman2010-02-031-3/+3
|
* Fix: execWithRedirect() logging stderr at wrong loglevel.Ales Kozumplik2010-02-031-5/+5
|
* Fix: execWithCallback() not logging stderr.Ales Kozumplik2010-02-031-2/+22
|
* iutil.execWithRedirect() hasn't used searchPath= since 2006. Take it out.Peter Jones2010-01-151-5/+1
| | | | | iutil.execWithRedirect() stopped doing anything with searchPath in 2006 when clumens committed d0dec24. Remove these silly vestigal bits.
* Fixup various errors detected by pylintHans de Goede2010-01-141-1/+1
| | | | | | | | | | | | | | | | | | I've been running pylint on a subset of anaconda: booty storage iw/*.py platform.py And it has found various errors this commit fixes: - Restore line accidently dropped from iscsi.py - execWithPulseProgress should propagate the return value of execWithCallback - storage.formats.fs:535 (FS.doCheck): self.intf should be just intf - storage.formats.fs: add missing "import sys" (for sys.exit) - advanced_config.py add missing import for NetworkConfigurator - lvm_dialog_gui.py: VolumeGroupEditor.editLogicalVolume dev was renamed to d - partition_gui.py: remove an unneeded semicolon - partition_gui.py: PartitionWindow.createCB rc should be dialog_rc - storage.FSSet.write: put docstring in the proper place - platform.Sparc.minimumSector: sectors should be sector
* fix for a bug in 05ce88b2 that split one line over several in program.logAles Kozumplik2009-12-231-2/+7
|
* Log into program.log through the standard python logging (part of #524980).Ales Kozumplik2009-12-181-20/+13
|
* update reIPL messagesMark Hamzy2009-12-091-3/+10
| | | | | | Added some more debugging information which was helpful during reIPL problem determination. Also, some of the messages did not keep up with previous code changes...
* Remove test mode.Chris Lumens2009-12-031-2/+0
| | | | | | | This is yet another way of running anaconda that gets extremely limited use, no testing, and no consideration during development to making sure it still works. Again, we need to stop pretending and get rid of modes that we don't support.
* Enable method/repo nfs options in stage2.Radek Vykydal2009-12-031-0/+15
| | | | | | | | | | | In stage 2, the nfs options given in repo= boot parameter were malparsed, in UI they were ignored. Note that now the options can get to stage 2 only via method=/repo= boot parameter. Ks nfs option --opts works only when its url specifies stage2 (i.e. ends with images/install.img). In cases when method (--repo parameter for anaconda python script) is inferred from stage2, nfs options of stage2 "nfs:..." url aren't passed to stage 2.
* Whenever storage code tries to log a method call, do so into the ↵Ales Kozumplik2009-12-031-16/+0
| | | | | | | 'tmp/storage.log' file. (a part of #524980) Previously, the method call was logged into 'tmp/anaconda.log' which made the file harder to do anything useful with.
* Get correct boot device in reIPL code for s390 (#537390).Mark Hamzy2009-11-171-1/+4
| | | | | | Account for the /boot existing on its own partition or as part of /. Output the values of the reipl configuration in linuxrc.s390 before reboot.
* In execWithCallback(), support disabling stdout echo (#528386)David Cantrell2009-11-021-5/+9
| | | | | stdout echo is on by default, add a parameter that lets us turn that off if we want to.
* Create execWithCallback() function in iutil.David Cantrell2009-10-281-3/+15
| | | | | | | | Create an execWithCallback() function that takes in a callback function and some data that is always passed to the callback function. Change execWithPulseProgress() to use execWithCallback(). The idea behind execWithCallback() is to allow flexibility to creating non-pulse progress bars or other UI indicators.
* Reintegrate reipl to trigger reboot/halt on s390x correctly. (#528380)Steffen Maier2009-10-161-0/+17
| | | | | | | | | | | Because of 8bc669549ddcc7040a5ba56b8afafa18684bac4e and maybe others, triggering reipl at the end of anaconda is no longer sufficient to be hit in all different anaconda install paths. Therefore, move the triggering right after having configured reipl in sysfs and do all in one place. Now loader must no longer immediately relay SIGUSR1/2 to init, since anaconda is not nearly finished with installation, but only remember the state requested by anaconda. Only right before loader terminates, it kills init with the remembered state to really reboot/halt.
* Use named parameters for translatable strings with multiple params.David Cantrell2009-10-011-7/+21
| | | | | | | | | | | | | | | | This is a cleanup for the po files. xgettext displays the following messages for some Python files: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments. This patch modifies the reported format strings to use named parameters per the warning message. We were already using these style format strings in users.py and possibly other files. Basically when there is more than one parameter in the format string, we should use a hash table with named parameters.
* Don't leak fds (#520154)Joel Granados Moreno2009-09-171-0/+9
|
* Fix busy cursor stack popping when creating formats (#518529).Radek Vykydal2009-09-141-2/+0
| | | | | | Pop the stack only where the window pushing it is created and not in called execWithPulseProgress which causes stack underflow and busy cursor mess in repo editing.
* Use tee thread to ensure line buffered output to screen and log file at the ↵Martin Sivak2009-08-251-23/+59
| | | | same moment... (#506664)
* Close the opened file descriptors when necessary. (#499854)Joel Granados Moreno2009-08-061-2/+35
|
* Don't show formatting progress bar after mkfs has exited.Eric Kerin2009-07-161-1/+12
| | | | | | | | mke2fs will finish it's work quickly, and anaconda will spend quite sometime reading in the output, and updating the progress dialog in certain cases - the attached patch adds a check to the read/progress loop to check to see if the process has finished, and jumps out early if that's the case.
* fix backtrace in s390 reipl support due to missing anaconda.id.fsset (#509877)Steffen Maier2009-07-061-27/+3
| | | | | | | | Replaces previous post with fixed patch. Assuming anaconda.id.bootloader.device is always a disk device (not a partition) and it always contains the device /boot and hence the zipl bootloader is located on, this fixes the back trace.
* Stop using rhpl.arch in writeRpmPlatform()Jeremy Katz2009-07-011-4/+3
| | | | | yum's rpmUtils.arch has the same bits as rhpl.arch, so use those instead for writing out /etc/rpm/platform
* Stop using rhpl.translateJeremy Katz2009-07-011-1/+3
| | | | Use python's gettext module instead of rhpl.translate
* We no longer write out /etc/rpm/platform, so don't offer to upgrade it.Chris Lumens2009-06-011-6/+2
|
* Use powers of two in swapSuggestion (#463885).Chris Lumens2009-05-201-3/+3
|
* Move _resetRpmDb into iutil so we can access it everywhere.Chris Lumens2009-04-301-0/+7
|
* Remove requirement for EFI machines to be x86, since IA64 is too (#497934).Chris Lumens2009-04-281-4/+3
|
* When catching an OSError, handle it as an object instead of a tuple (#497374).Chris Lumens2009-04-231-16/+15
|
* Run programs with LC_ALL=C in case we're parsing output (#492549).Chris Lumens2009-04-131-2/+10
|
* Do not write "Running..." to stdout, as that could be tty1.Chris Lumens2009-03-121-2/+3
| | | | | | Doing so sends a whole lot of spew to tty1 which not only looks bad, but makes VNC and text installs look even worse than they already are. Also, let's write output from execWithPulseProgress to the program.log too.
* stdout and stderr may also need to be created.Chris Lumens2009-03-091-5/+5
| | | | | | This is required when handling kickstart scriptlets that can write to log files, since the log file will need to be created before it can be opened.
* Merge branch 'master' into storageDavid Lehman2009-03-041-0/+180
|\ | | | | | | | | | | | | | | | | Conflicts: anaconda fsset.py iutil.py iw/partition_gui.py partedUtils.py
| * reIPL support for s390Mark Hamzy2009-03-021-0/+181
| | | | | | | | Signed-off-by: David Cantrell <dcantrell@redhat.com>
* | More work on iutil.execWith function file handling.David Lehman2009-03-031-29/+45
| | | | | | | | | | This time I've tested them fairly well, so hopefully these changes will be the last for a while.
* | os.dup2 wants a fileno, not a file. Also, don't clobber the name str.David Lehman2009-02-271-3/+3
| |
* | hasiSeriesNativeStorage is no longer used anywhere.Chris Lumens2009-02-271-19/+0
| |
* | Fix iutil.execWithFoo's file handling.David Lehman2009-02-271-21/+39
| |
* | Add some useful functions to iutil.David Lehman2009-02-231-0/+52
|/
* Remove statement without effect to make pychecker happyHans de Goede2009-02-061-2/+0
| | | | Remove statement without effect to make pychecker happy.
* Pay attention to the stderr parameter to execWithCapture.Chris Lumens2009-02-021-2/+5
|