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

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux