summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub>2000-01-10 13:56:56 +0000
committerjakub <jakub>2000-01-10 13:56:56 +0000
commit79b4b003cb0a88b4577cd249a61fd684bf3f4f48 (patch)
tree8d0f5a7b196fc269c1ca9e87f1795ebe7a09e573
parente72e153e1211696c216eb6f421aa25f8da717131 (diff)
downloadanaconda-79b4b003cb0a88b4577cd249a61fd684bf3f4f48.tar.gz
anaconda-79b4b003cb0a88b4577cd249a61fd684bf3f4f48.tar.xz
anaconda-79b4b003cb0a88b4577cd249a61fd684bf3f4f48.zip
Misc sparc fixes.
Use stripped down gzread to uncompress .mo files when loading them, so we don't have to gunzip them in the filesystem.
-rw-r--r--Makefile2
-rwxr-xr-xanaconda9
-rw-r--r--gettext_rh.py19
-rw-r--r--silo.py43
-rwxr-xr-xupd-instroot16
5 files changed, 41 insertions, 48 deletions
diff --git a/Makefile b/Makefile
index 072d5630e..8fe321e5b 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
SUBDIRSRECFG = balkan help isys iw pixmaps po textw gnome-map
-SUBDIRSHD = rpmmodule kudzu isys balkan libfdisk collage loader stubs po \
+SUBDIRSHD = rpmmodule kudzu balkan isys libfdisk collage loader stubs po \
minislang textw utils
SUBDIRS = $(SUBDIRSHD) gnome-map iw help pixmaps
BUILDONLYSUBDIRS = pump
diff --git a/anaconda b/anaconda
index e9f1e790d..34a59c8fe 100755
--- a/anaconda
+++ b/anaconda
@@ -17,6 +17,8 @@ if (os.path.exists('rpmmodule')):
sys.path.append('gnome-map')
sys.path.append('isys')
+os.environ['HOME'] = '/tmp'
+
# Python passed my path as argv[0]!
# if sys.argv[0][-7:] == "syslogd":
if len(sys.argv) > 1:
@@ -226,7 +228,10 @@ if (display_mode == 'g' and not os.environ.has_key('DISPLAY')):
if (display_mode == 'g'):
if not test and not localInstall and not reconfigOnly:
for i in ( "imrc", "im_palette.pal", "gtk" ):
- os.symlink ("../mnt/source/RedHat/instimage/etc/" + i, "/etc/" + i)
+ try:
+ os.symlink ("../mnt/source/RedHat/instimage/etc/" + i, "/etc/" + i)
+ except:
+ pass
from gui import InstallInterface
elif (display_mode == 't'):
from text import InstallInterface
@@ -339,7 +344,7 @@ except:
from string import joinfields
list = traceback.format_exception (type, value, tb)
text = joinfields (list, "")
- rc = intf.exceptionWindow (_("Exception Occured"), text)
+ rc = intf.exceptionWindow (_("Exception Occurred"), text)
intf.__del__ ()
if rc:
import pdb
diff --git a/gettext_rh.py b/gettext_rh.py
index 4c7d38030..a9b44a156 100644
--- a/gettext_rh.py
+++ b/gettext_rh.py
@@ -40,7 +40,7 @@ compile it into a .mo file, ready for use with this module. Note that you
will have to use C style strings (ie. use double quotes) for proper string
extraction.
"""
-import os, string, iutil
+import os, string, iutil, gzread
prefix = '/usr/local'
localedir = prefix + '/share/locale'
@@ -145,33 +145,22 @@ class Catalog:
self.localedir = localedir
self.cat = {}
if not domain: return
- import os
for self.lang in lang:
if self.lang == 'C':
- del os
return
- catalog = "%s//%s/LC_MESSAGES/%s.mo" % (
+ catalog = "%s/%s/LC_MESSAGES/%s.mo" % (
localedir, self.lang, domain)
- if not os.access (catalog, os.R_OK) and os.access (catalog + ".gz", os.R_OK):
- os.system ("/usr/bin/gunzip < %s.gz > %s " % (catalog, catalog))
-
try:
- f = open(catalog, "rb")
+ f = gzread.open(catalog)
buffer = f.read()
+ f.close()
del f
- if os.access (catalog + ".gz", os.R_OK):
- try:
- os.remove (catalog)
- except:
- pass
break
except IOError:
pass
else:
- del os
return # assume C locale
- del os
if _StrToInt(buffer[:4]) != 0x950412de:
# magic number doesn't match
raise error, 'Bad magic number in %s' % (catalog,)
diff --git a/silo.py b/silo.py
index 16e597259..8086dae4d 100644
--- a/silo.py
+++ b/silo.py
@@ -25,12 +25,16 @@ class SiloInstall:
try:
os.mkdir ("/tmp/ufsmntpoint")
isys.makeDevInode (dev, "/tmp/" + dev)
- isys.mount ("/tmp" + dev, "/tmp/ufsmntpoint", "ufs")
+ isys.mount ("/tmp/" + dev, "/tmp/ufsmntpoint", "ufs")
except:
try:
os.remove ("/tmp/" + dev)
except:
pass
+ try:
+ os.rmdir ("/tmp/ufsmntpoint")
+ except:
+ pass
return None
root = "/tmp/ufsmntpoint"
else:
@@ -70,16 +74,17 @@ class SiloInstall:
def getSiloImages(self):
todo = self.todo
- if not todo.ddruid:
- raise RuntimeError, "No disk druid object"
- (drives, raid) = todo.ddruid.partitionList()
+ if not todo.__dict__.has_key('fstab'):
+ raise RuntimeError, "No fstab object"
+
+ (drives, raid) = todo.fstab.partitionList()
# rearrange the fstab so it's indexed by device
mountsByDev = {}
- for loc in todo.mounts.keys():
- (device, fsystem, reformat) = todo.mounts[loc]
- mountsByDev[device] = loc
+ for (mntpoint, device, fsystem, doFormat, size) in \
+ self.todo.fstab.mountList():
+ mountsByDev[device] = mntpoint
oldImages = {}
for dev in todo.liloImages.keys():
@@ -128,10 +133,7 @@ class SiloInstall:
return todo.liloImages
def getSiloOptions(self):
- if self.todo.mounts.has_key ('/boot'):
- bootpart = self.todo.mounts['/boot'][0]
- else:
- bootpart = self.todo.mounts['/'][0]
+ bootpart = self.todo.fstab.getBootDevice()
i = len (bootpart) - 1
while i > 0 and bootpart[i] in string.digits:
i = i - 1
@@ -139,7 +141,7 @@ class SiloInstall:
mbrpart = None
- (drives, raid) = self.todo.ddruid.partitionList()
+ (drives, raid) = self.todo.fstab.partitionList()
for (dev, devName, type, start, size) in drives:
i = len (dev) - 1
while i > 0 and dev[i] in string.digits:
@@ -155,15 +157,12 @@ class SiloInstall:
def getSiloMbrDefault(self):
# Check partition at cylinder 0 on the boot disk
# is /, /boot or Linux swap
- if self.todo.mounts.has_key ('/boot'):
- bootpart = self.todo.mounts['/boot'][0]
- else:
- bootpart = self.todo.mounts['/'][0]
+ bootpart = self.todo.fstab.getBootDevice()
i = len (bootpart) - 1
while i > 0 and bootpart[i] in string.digits:
i = i - 1
boothd = bootpart[:i+1]
- (drives, raid) = self.todo.ddruid.partitionList()
+ (drives, raid) = self.todo.fstab.partitionList()
for (dev, devName, type, start, size) in drives:
i = len (dev) - 1
while i > 0 and dev[i] in string.digits:
@@ -175,7 +174,7 @@ class SiloInstall:
elif type == 2:
if dev == bootpart:
return "mbr"
- elif dev == self.todo.mounts['/'][0]:
+ elif dev == self.todo.fstab.getRootDevice()[0]:
return "mbr"
return "partition"
return "partition"
@@ -225,11 +224,7 @@ class SiloInstall:
smpInstalled = (self.todo.hdList.has_key('kernel-smp') and
self.todo.hdList['kernel-smp'].selected)
- if self.todo.mounts.has_key ('/'):
- (dev, fstype, format) = self.todo.mounts['/']
- rootDev = dev
- else:
- raise RuntimeError, "Installing silo, but there is no root device"
+ rootDev = self.todo.fstab.getRootDevice()[0]
args = [ "silo" ]
@@ -336,7 +331,7 @@ class SiloInstall:
else: # duplicate entry, first entry wins
silo.delImage (name)
- if self.todo.mounts.has_key ('/boot'):
+ if self.todo.fstab.getBootDevice() != self.todo.fstab.getRootDevice()[0]:
silo.write(todo.instPath + "/boot/silo.conf")
try:
os.remove(todo.instPath + "/etc/silo.conf")
diff --git a/upd-instroot b/upd-instroot
index 85a6307de..ab24bc18b 100755
--- a/upd-instroot
+++ b/upd-instroot
@@ -37,6 +37,7 @@ pythondeps() {
SRC=$1/RedHat/RPMS
+mkdir -p ../trees/hdimage
cd ../trees/hdimage
DEST=$PWD
cd -
@@ -52,7 +53,7 @@ echo "DESTGR is $DESTGR"
PACKAGES="glibc-2 ldconfig setup e2fsprogs-1 XFree86-libs XFree86-SVGA
XFree86-S3 XFree86-S3V XFree86-Mach32 XFree86-Mach64
XFree86-FBDev XFree86-I128 XFree86-3DLabs XFree86-VGA16
- XFree86-Sun XFree86-75dpi-fonts XFree86-100dpi-fonts
+ XFree86-Sun XFree86-TGA XFree86-75dpi-fonts XFree86-100dpi-fonts
XFree86-ISO8859-2 XFree86-cyrillic-fonts XFree86-3.
xpm-3 glib- gtk+- gnome-libs python-1 newt imlib-1 libpng
libtiff libjpeg- libtermcap-2 zlib rpm rpm-devel rpm-python ash- bash-
@@ -64,6 +65,7 @@ PACKAGES="glibc-2 ldconfig setup e2fsprogs-1 XFree86-libs XFree86-SVGA
KEEPFILE=/tmp/keepfile.$$
cat > $KEEPFILE <<EOF
+sbin/ldconfig
sbin/clock
sbin/mkfs.ext2
sbin/mke2fs
@@ -362,13 +364,12 @@ for p in $DEST $DESTGR; do
rm -rf $p/boot $p/home $p/root $p/tmp
- cp /sbin/ldconfig $p
# Must create ld.so.conf, because ldconfig does not cache
# dirs specified on the command line.
touch $p/etc/ld.so.conf
[ -d $p/usr/X11R6/lib ] && echo /usr/X11R6/lib > $p/etc/ld.so.conf
- (cd $p; chroot $p ./ldconfig )
- rm -f $p/ldconfig $p/etc/ld.so.conf
+ (cd $p; chroot $p usr/sbin/ldconfig )
+ rm -f $p/usr/sbin/ldconfig $p/etc/ld.so.conf
for l in `find $p -exec file {} \; | sed -n 's/^\([^:]*\):.*ELF.*$/\1/p'`; do
# Strip dwarf stuff, symbols and unneeded not-alloced sections
@@ -380,6 +381,11 @@ for p in $DEST $DESTGR; do
(cd /usr/share/zoneinfo; find . -type f -or -type l |
grep '^./[A-Z]' | sort | sed 's/^..//' |
gzip -9) > $p/usr/lib/timezones.gz
+
+ for i in `find $p/usr/share/locale -name anaconda.mo`; do
+ gzip -9 $i
+ mv -f $i.gz $i
+ done
done
# always use passive mode for ftp installs
@@ -452,6 +458,4 @@ ln -s /tmp $DESTGR/usr/X11R6/lib/X11/xkb/compiled
ls [a-r]* | cpio --quiet -H crc -o | gzip -9 > sbin.cgz
rm -f [a-r]*
- find $DEST/usr/share/locale -name \*.mo | xargs gzip -9
-
cp -a $HOMEDIR/anaconda-stub $DEST/usr/bin/anaconda