PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [Fedora Core 4] von i386 auf i686 wechseln



Crazy_Chris
08.10.05, 12:31
Hi,

ich habe zurzeit den Kernel 2.6.13.1 (i686) auf mein Pentium 4 Notebook zu laufen. Trotzdem versucht YUM immer i386 Pakete zu laden (z.B bei einer Update) Wo kann ich es einstellen das immer i686 Pakete genutzt werden? Unter Gentoo ist das so einfach zu ändern aber unter Fedora such ich mir nen Wolf. :ugly:

Danke.

carnil
08.10.05, 12:55
Hallo

Kenne mich jetzt mit YUM nicht so gut aus, aber wie sieht denn deine yum.conf aus? Kannst Du diese hier mal posten? In der Manpage zu yum.conf steht ja folgendes:



VARIABLES

There are a number of variables you can use to ease maintenance of the configuration file. They are only useful inside the name, baseurl and commands fields in the config file.

$releasever
This will be replaced with the value of the version of the package listed in distroverpkg. This defaults to the version of the package redhat-release
$arch
This will be replaced with your architecture as listed by os.uname()[4] in pyhton.
$basearch
This will be replaced with your base architecture as they are listed in archwork.py in yum. For example if your $arch is i686 your $basearch will be i386.
$YUM0-$YUM9
These will be replaced with the value of the shell environment variable of the same name. If the shell environment variable does not exist then they will not be replaced.

Vielleicht hilft es Dir ja.

Crazy_Chris
08.10.05, 13:01
Das steht in der /etc/yum.conf:

# Note: This file is no longer the entire yum configuration
# for fedorafaq.org. See http://www.fedorafaq.org/#yumconf
# for details on how to set up your system with the new
# yum configuration.

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
# We don't want to gpg-check local, unsigned packages
#gpgcheck=1
# Changed this because some mirrors go down and then
# re-trying takes forever.
retries=1

----------------------------------

und das z.B in der /etc/yum.repos.d/fedora.repo


[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

------------------------------------

Ich habe in der Python Config Datei aus der man-Beschreibung schon geguckt. Nur konnte ich mit dieser Datei nicht viel anfangen. :o

Irgendwo hier muß ich was ändern:

/usr/lib/python2.4/site-packages/yum/archwork.py

->



#!/usr/bin/python -t

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2002 Duke University

import os
import rpm
import re

def getArch():
arch = os.uname()[4]
newarch = None
if re.search('86', arch):
newarch = 'i686'
if re.search('sparc', arch) or re.search('sun', arch):
newarch = 'sparc'
if re.search('alpha', arch):
newarch = 'alpha'
if re.search('ppc', arch):
newarch = 'ppc'
if re.search('x86_64', arch):
newarch = 'x86_64'
if not newarch:
newarch = arch
return newarch

def betterarch(arch1, arch2):
"""Take two archs, return the better of the two, returns none if both \
of them come out to 0, returns either if they are the same archscore"""
score1 = rpm.archscore(arch1)
score2 = rpm.archscore(arch2)
if score1 == 0 and score2 == 0:
return None
if score1 < score2:
if score1 != 0:
return arch1
else:
return arch2
if score2 < score1:
if score2 != 0:
return arch2
else:
return arch1
if score1 == score2:
return arch1
del score1
del score2

def bestarch(archlist):
currentarch = archlist[0]
for arch in archlist[1:]:
currentarch = betterarch(currentarch, arch)
return currentarch


def compatArchList():
archdict = {}
archdict['i386']=['i386','i486','i586','i686','athlon','noarch']
archdict['alpha']=['alpha','alphaev6','noarch']
archdict['sparc']=['sparc','sparc64','noarch','sun4c','sun4u','sun4d' ,'sun4m','sparcv9']
archdict['ppc']=['ppc','noarch','ppc64','powerpc','powerppc','osfma ch3_ppc','ppciseries','ppcpseries','rs6000']
archdict['ia64']=['ia64','noarch', 'i686']
archdict['s390']=['noarch','s390']
archdict['s390x']=['noarch','s390','s390x']
archdict['x86_64']=['noarch','x86_64','athlon','i386','i686']
archdict['parisc']=['hppa2.0','hppa1.2','hppa1.2','hppa1.1','hppa1.0', 'paris','noarch']
myarch=getArch()
if archdict.has_key(myarch):
archlist = archdict[myarch]
else:
archlist = [myarch, 'noarch']
return archlist

def availablearchs(nevral, name):
archlist = compatArchList()
finalarchs = []
for arch in archlist:
if nevral.exists(name, arch):
finalarchs.append(arch)
return finalarchs