Re: FYI: Workaround for today's FC5 baseurl/mirrorlist problems

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

 



You can copy/paste the script below to a text editor and save it as
change-repos.sh.  Then chmod the file to make it executable (chmod 755
change-repos.sh).  Then run the script as root.  This will create a
folder under root called repo.bak where the original repo files are
backed up (in case you need them later, or the script somehow goes
nuts - I tested it and it worked fine here).

The remaining commands are simple sed commands run against the backup
files to edit the pertinent entries and piping the output to the yum
repo directory (overwriting the existing ones).  Note that the
individual sed commands may appear to be on a separate line depending
on the display width of your mail reader simply because the argument
that follows is long.  In fact the sed command and its arguments are
of course all on one line (but of course each sed command on a
separate line).

Having said all that I still can't seem to get yum to work with the new repos.

Jacques B.


#beginning of script
#backing up original repos
mkdir ~/repo.bak
cp /etc/yum.repos.d/fedora-core.repo ~/repo.bak/
cp /etc/yum.repos.d/fedora-extras.repo ~/repo.bak/
cp /etc/yum.repos.d/fedora-updates.repo ~/repo.bak/
cp /etc/yum.repos.d/fedora-updates-testing.repo ~/repo.bak/

#modify fedora-core.repo
sed 's/fedora.redhat.com\/download\/mirrors\/fedora-core-$releasever/mirrors.fedoraproject.org\/mirrorlist?repo=core-$releasever$arch=$basearch/'
~/repo.bak/fedora-core.repo > /etc/yum.repos.d/fedora-core.repo

#modify fedora-extras.repo
sed 's/fedora.redhat.com\/download\/mirrors\/fedora-extras-$releasever/mirrors.fedoraproject.org\/mirrorlist?repo=extras-$releasever$arch=$basearch/'
~/repo.bak/fedora-extras.repo > /etc/yum.repos.d/fedora-updates.repo >
/etc/yum.repos.d/fedora-extras.repo

#modify fedora-updates.repo
sed 's/fedora.redhat.com\/download\/mirrors\/updates-released-fc$releasever/mirrors.fedoraproject.org\/mirrorlist?repo=updates-released-$releasever$arch=$basearch/'
/etc/yum.repos.d/fedora-updates.repo > ~/repo.bak/fedora-updates.repo

#modify fedora-updates-testing.repo
sed 's/fedora.redhat.com\/download\/mirrors\/updates-testing-fc$releasever/mirrors.fedoraproject.org\/mirrorlist?repo=updates-testing-$releasever$arch=$basearch/'
/etc/yum.repos.d/fedora-updates-testing.repo >
~/repo.bak/fedora-updates-testing.repo


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux