diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-05-20 15:26:00 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-05-20 15:26:00 +0000 |
commit | 1f3bf130e3705ed4d77af08cf51c12128ab5424d (patch) | |
tree | 9f5d2f3b64e7aa17b261e911cb1fff0547451e7d /scripts | |
parent | 445f36acfd30cd71b89e8ed7385b74cb9da0f2dc (diff) | |
download | anaconda-1f3bf130e3705ed4d77af08cf51c12128ab5424d.tar.gz anaconda-1f3bf130e3705ed4d77af08cf51c12128ab5424d.tar.xz anaconda-1f3bf130e3705ed4d77af08cf51c12128ab5424d.zip |
merge from taroon branch to HEAD. mostly the package stuff, but also
msw's ctrl-alt-del thing and some arch fixups
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mk-images.i386 | 2 | ||||
-rw-r--r-- | scripts/mk-images.ia64 | 5 | ||||
-rw-r--r-- | scripts/mk-images.ppc | 19 | ||||
-rw-r--r-- | scripts/mk-images.s390 | 2 | ||||
-rw-r--r-- | scripts/mk-images.x86_64 | 2 | ||||
-rwxr-xr-x | scripts/pkgorder | 131 |
6 files changed, 59 insertions, 102 deletions
diff --git a/scripts/mk-images.i386 b/scripts/mk-images.i386 index e2e3993e1..9bfe18c60 100644 --- a/scripts/mk-images.i386 +++ b/scripts/mk-images.i386 @@ -95,7 +95,7 @@ FSMODS="msdos vfat ext3 reiserfs jfs" SECSTAGE="agpgart raid0 raid1 raid5 lvm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport" BTERMMODULES="vga16fb" -COMMONMODULES="vfat nfs $USBMODS $BTERMMODULES" +COMMONMODULES="vfat nfs floppy $USBMODS $BTERMMODULES" LOCALMODULES="$COMMONMODULES aic7xxx megaraid ncr53c8xx sym53c8xx $IDEMODS $SCSIMODS" NETWORKMODULES="$COMMONMODULES 3c59x diff --git a/scripts/mk-images.ia64 b/scripts/mk-images.ia64 index b9ab64172..90a6738dc 100644 --- a/scripts/mk-images.ia64 +++ b/scripts/mk-images.ia64 @@ -2,7 +2,8 @@ USBMODS="usb-uhci usb-ohci hid keybdev" LATEUSBMODS="mousedev" -SECSTAGE="nfs fat vfat raid0 raid1 raid5 ext3 $LATEUSBMODS" +COMMONMODULES="nfs fat vfat cramfs floppy" +SECSTAGE="nfs fat vfat raid0 raid1 raid5 lvm-mod ext3 $LATEUSBMODS" NETMODULES="3c59x acenic bcm5700 e100 e1000 eepro100 hamachi sk98lin starfire sunhme tulip yellowfin tg3" SCSIMODULES="sd_mod sr_mod scsi_mod DAC960 cciss cpqarray aic7xxx aic7xxx_mod megaraid qla1280 qla2200 qla2300 sym53c8xx sym53c8xx_2 mptscsih mptbase ips" IDEMODULES="ide-mod ide-probe-mod ide-disk ide-cd" @@ -39,7 +40,7 @@ makeBootImages() { --initrdflags '--initrdto $TOPDESTPATH/images/ramdisk.img \ --initrdsize 8192 \ --loaderbin loader \ - --modules "nfs fat vfat cramfs $USBMODS $NETMODULES $SCSIMODULES $IDEMODULES"' + --modules "$COMMONMODULES $USBMODS $NETMODULES $SCSIMODULES $IDEMODULES"' # now make a boot iso mkdir -p $TOPDESTPATH/images/isopath diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc index 0844de063..9ba290b72 100644 --- a/scripts/mk-images.ppc +++ b/scripts/mk-images.ppc @@ -1,14 +1,13 @@ -COMMONMODULES="nfs fat vfat cramfs loop" +COMMONMODULES="nfs fat vfat cramfs loop floppy" FSMODS="msdos vfat ext3 reiserfs jfs" IDEMODS="ide-cd" SCSIMODS="sd_mod sr_mod st" LATEUSBMODS="mousedev usb-storage" SECSTAGE="raid0 raid1 raid5 lvm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS" -# need yellowfin for IBM? NETMODULES="sungem tg3 ne2k-pci 3c59x 8139too - de4x5 acenic pcnet32 tulip natsemi eepro100 airport" + de4x5 acenic pcnet32 tulip natsemi e100 e1000 airport" -SCSIMODULES="advansys aic7xxx initio sym53c8xx" +SCSIMODULES="$SCSIMODS advansys aic7xxx initio sym53c8xx" ISERIESMODULES="veth viodasd viocd" # images we only want on the CD (usually for space reasons) @@ -27,7 +26,7 @@ makeBootImages() { makeinitrd --initrdto $TOPDESTPATH/ppc/chrp/ramdisk.image.gz \ --initrdsize 8192 \ --loaderbin loader \ - --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $IDEMODULES $ISOMODULES" + --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $SCSIMODS $IDEMODS $ISOMODULES" mkdir -p $TOPDESTPATH/etc $TOPDESTPATH/ppc/chrp cp $KERNELROOT/boot/vmlinux-*pseries* $TOPDESTPATH/ppc/chrp/vmlinux @@ -53,7 +52,7 @@ makeBootImages() { makeinitrd --initrdto $TOPDESTPATH/ppc/iSeries/ramdisk.image.gz \ --initrdsize 8192 \ --loaderbin loader \ - --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $IDEMODULES $ISOMODULES $ISERIESMODULES" + --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $IDEMODS $ISOMODULES $ISERIESMODULES" cp $KERNELROOT/boot/vmlinux-*iseries* $TOPDESTPATH/ppc/iSeries/vmlinux cp $KERNELROOT/boot/System.map-*iseries* $TOPDESTPATH/ppc/iSeries/System.map @@ -66,13 +65,13 @@ makeBootImages() { # makeinitrd --initrdto $TOPDESTPATH/images/ramdisk.image.gz \ # --initrdsize 8192 \ # --loaderbin loader \ - # --modules "nfs fat vfat cramfs $NETMODULES $SCSIMODULES $IDEMODULES $ISOMODULES" + # --modules "nfs fat vfat cramfs $NETMODULES $SCSIMODULES $IDEMODS $ISOMODULES" fi } makeSecondStage() { - makeinstimage "netstg" "$SECSTAGE $SCSIMODULES $IDEMODULES" - makeinstimage "hdstg" "$SECSTAGE $NETMODULES $IDEMODULES" - makemainmodules "$SECSTAGE $NETMODULES $SCSIMODULES $IDEMODULES" + makeinstimage "netstg" "$SECSTAGE $SCSIMODULES $IDEMODS" + makeinstimage "hdstg" "$SECSTAGE $NETMODULES $IDEMODS" + makemainmodules "$SECSTAGE $NETMODULES $SCSIMODULES $IDEMODS" makemainimage "stage2" "cramfs" } diff --git a/scripts/mk-images.s390 b/scripts/mk-images.s390 index 9bada5f3e..821447a96 100644 --- a/scripts/mk-images.s390 +++ b/scripts/mk-images.s390 @@ -430,7 +430,7 @@ fi IDEMODS="" SCSIMODS="" -SECSTAGE="$IDEMODS $SCSIMODS raid0 raid1 raid5" +SECSTAGE="$IDEMODS $SCSIMODS raid0 raid1 raid5 lvm-mod" COMMONMODULES="loop cramfs dasd_diag_mod dasd_eckd_mod dasd_fba_mod dasd_mod tape390 isofs ext3" LOCALMODULES="$COMMONMODULES tape390 $IDEMODS $SCSIMODS" diff --git a/scripts/mk-images.x86_64 b/scripts/mk-images.x86_64 index dd8571acd..46143980e 100644 --- a/scripts/mk-images.x86_64 +++ b/scripts/mk-images.x86_64 @@ -40,7 +40,7 @@ FSMODS="msdos vfat ext3 reiserfs" SECSTAGE="agpgart raid0 raid1 raid5 lvm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport" BTERMMODULES="vga16fb" -COMMONMODULES="vfat loop cramfs $USBMODS $BTERMMODULES" +COMMONMODULES="vfat loop cramfs floppy $USBMODS $BTERMMODULES" LOCALMODULES="$COMMONMODULES aic7xxx megaraid ncr53c8xx sym53c8xx $IDEMODS $SCSIMODS" NETWORKMODULES="$COMMONMODULES nfs 3c59x diff --git a/scripts/pkgorder b/scripts/pkgorder index 85e72cd1c..91cb0cd5a 100755 --- a/scripts/pkgorder +++ b/scripts/pkgorder @@ -19,11 +19,11 @@ log.handler = anaconda_log rpmFD = None -import comps +import hdrlist def cmpHeaderByName(h1, h2): - n1 = string.lower(h1['name']) - n2 = string.lower(h2['name']) + n1 = string.lower(h1.nevra()) + n2 = string.lower(h2.nevra()) if n1 < n2: return -1 @@ -68,20 +68,14 @@ disc2Dir = distDir + "-disc2" # pull in the hdlist f = distDir + "/RedHat/base/hdlist" try: - hdlist = comps.HeaderListFromFile(f, noscore = 1) + hdlist = hdrlist.HeaderListFromFile(f) hdlist.mergeFullHeaders(distDir + "/RedHat/base/hdlist2") except rpm.error: print "Failed to read header list", f sys.exit(1) # and read the comps file -comps = comps.ComponentSet("file://%s/RedHat/base/comps.xml" %(distDir,), - hdlist, arch = arch, matchAllLang = 0) - -# FIXME: HACK SO THAT PPC TREES WILL SPLIT. MUST BE REMOVED -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -import iutil -if iutil.getArch() == "ppc" and hdlist.packages.has_key("kernel"): - del hdlist.packages["kernel"] +grpset = hdrlist.groupSetFromCompsFile("file://%s/RedHat/base/comps.xml" + %(distDir,), hdlist) # work out the order we'd like to install everything in pkgOrder = [] @@ -93,112 +87,75 @@ for package in hdlist.keys(): not package.startswith("kernel-doc") and not package.startswith("kernel-source") and not package.startswith("kernel-debug")): - hdlist[package].selected = 1 - pkgOrder.append(hdlist[package].h) - pkgHash[hdlist[package].h] = None + hdlist[package].select() + pkgOrder.append(hdlist[package].nevra()) + pkgHash[hdlist[package].name] = None # Tier 1 language packages get priority. tier1langs = ("en:en_US:de:de_DE:es:es_ES:fr:fr_FR:it:it_IT:ja:ja_JP:" "ko:ko_KR:zh:zh_CN:zh_TW:pt:pt_BR:en_GB:en_CA") -# Form a dictionary of _all_ the components, even sub comps -compsDict = {} -subComps = {} -for h in hdlist.keys(): - hdlist[h].selected = 0 - for comp in hdlist[h].comps: - compsDict[comp.name] = comp - -# make a list of all the names of all the components. -allComps = compsDict.values() - -# go through all our toplevel components and add children to it. -for comp in comps: - compsDict[comp.name] = comp - subComps[comp] = [] - for c in allComps: - if isParent(comp, c): - subComps[comp].append(c) -#print subComps -#print compsDict +grpids = grpset.groups.keys() +grpids.sort() + # FIXME: this is a hack to get things we want to be first on the CDs earlier # in a more perfect world, we'd read the installclasses to do this -complist = ["Core", "Base", "Text-based Internet", "Web Server", - "Windows File Server", "Printing Support", - "Dialup Networking Support", "Server Configuration Tools", - "Administration Tools"] +complist = ["core", "base", "text-internet", "web-server", + "smb-server", "printing", "dialup", "server-cfg", + "admin-tools"] # now let's pull in all of workstation common -if comps.has_key("Workstation Common"): - comp = comps["Workstation Common"] - complist.append("Workstation Common") - for name in comp.includes: +if grpset.groups.has_key("workstation-common"): + comp = grpset.groups["workstation-common"] + complist.append("workstation-common") + for name in comp.groupreqs: if name not in complist: complist.append(name) # a couple more that make sense to have early -complist.extend(["GNOME Desktop Environment", "Emacs", "Development Tools", - "Development Libraries", "X Software Development", - "GNOME Software Development", "KDE Desktop Environment", - "KDE Software Development"]) +complist.extend(["gnome-desktop", "emacs", "development-tools", + "development-libs", "x-software-development", + "gnome-software-development", "kde-desktop", + "kde-software-development"]) latelangs = [] -for name in comps: - if comp.name in complist: +for id in grpids: + if id in complist: continue - if ((comp.lang is not None) and - (string.find(tier1langs, comp.lang) == -1)): - latelangs.append(comp.name) + if ((grpset.groups[id].langonly is not None) and + (tier1langs.find(grpset.groups[id].langonly) == -1)): + latelangs.append(id) else: - complist.append(comp.name) + complist.append(id) complist.extend(latelangs) # for each comp, staring with base, list the packages # in alphabetical order. -for name in complist: - if not comps.has_key(name): +for id in complist: + if not grpset.groups.has_key(id): continue - comp = comps[name] + group = grpset.groups[id] list = [] - # don't update the hdlist selection state yet, we're going to do - # a lot of toggling here. - comps.freeze() - # make sure all the components are off - for n in compsDict.values(): - n.unselect () - - # turn on this component, and anything that this component needs - # to have on in order to be on. - selectComp(comp) - if comp.conditionalKey: - selectComp(comps[comp.conditionalKey]) - - # Do the same for each subcomponent - for c in subComps[comp]: - selectComp(c) - if c.conditionalKey: - selectComp(compsDict[c.conditionalKey]) - # update the hdlist selection states - comps.thaw() + group.select() # append what got turned on to our order. - - for p in hdlist.selected(): - list.append(p.h) + for p in hdlist.pkgs.values(): + if p.isSelected(): + list.append(p) list.sort(cmpHeaderByName) for item in list: - if not pkgHash.has_key (item): - pkgOrder.append(item) - pkgHash[item] = None + if not pkgHash.has_key (item.name): + pkgOrder.append(item.nevra()) + pkgHash[item.name] = None # add all of the packages that haven't been added yet. list = [] -for p in hdlist.packages.values(): - if not pkgHash.has_key (p.h): - list.append(p.h) +for p in hdlist.pkgs.values(): + if not pkgHash.has_key (p.name): + list.append(p) list.sort(cmpHeaderByName) for item in list: - pkgOrder.append(item) + pkgOrder.append(item.nevra()) # Now set up rpm to run the transaction deporder testpath = '/tmp/pkgorder-' + str (os.getpid ()) @@ -209,7 +166,7 @@ ts.setVSFlags(~(rpm.RPMVSF_NORSA|rpm.RPMVSF_NODSA)) ts.setFlags(rpm.RPMTRANS_FLAG_NOMD5|rpm.RPMTRANS_FLAG_ANACONDA) for h in pkgOrder: #print "in:", h[1000000] - ts.addInstall(h, h, 'i') + ts.addInstall(hdlist[h].hdr, hdlist[h].hdr, 'i') pkgOrder = [] # we have to run ts.check() before ts.order() now to set up the |