Running yum-3.2.8 on CentOS 4.7
Today I spent a few hours testing and backporting yum-3.2.8 from CentOS 5.2 to CentOS 4.7. It wasn’t so hard to backport. Most of the time I have spent on testing and searching. Code is patched to allow sets, which are supported in python 2.3 :o) and that’s almost all. Final rpms are available for testing here:
- http://fs12.vsb.cz/hrb33/el4/hrb/testing/i386/repoview/
- http://fs12.vsb.cz/hrb33/el4/hrb/testing/x86_64/repoview/
[root@webmel4 ~]# yum update yum
Loading "fastestmirror" plugin
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Reducing CentOS.Karan.Org-EL4 - Stable to included packages only
Finished
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for yum to pack into transaction set.
yum-3.2.8-9.el4.hrb.2.1.1 100% |=========================| 29 kB 00:00
---> Package yum.noarch 0:3.2.8-9.el4.hrb.2.1.1 set to be updated
--> Running transaction check
--> Processing Dependency: python-iniparse for package: yum
--> Processing Conflict: yum-metadata-parser conflicts yum >= 3.0
--> Processing Dependency: yum-fastestmirror for package: yum
--> Processing Dependency: yum-metadata-parser >= 1.1.0 for package: yum
--> Processing Dependency: yum < 2.5 for package: yum-utils
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for yum-utils to pack into transaction set.
yum-utils-1.1.10-9.el4.hr 100% |=========================| 9.7 kB 00:00
---> Package yum-utils.noarch 0:1.1.10-9.el4.hrb.1 set to be updated
---> Downloading header for yum-fastestmirror to pack into transaction set.
yum-fastestmirror-1.1.10- 100% |=========================| 7.0 kB 00:00
---> Package yum-fastestmirror.noarch 0:1.1.10-9.el4.hrb.1 set to be updated
---> Downloading header for python-iniparse to pack into transaction set.
python-iniparse-0.2.3-4.e 100% |=========================| 5.3 kB 00:00
---> Package python-iniparse.noarch 0:0.2.3-4.el4.hrb set to be updated
---> Downloading header for yum-metadata-parser to pack into transaction set.
yum-metadata-parser-1.1.2 100% |=========================| 4.3 kB 00:00
---> Package yum-metadata-parser.i386 0:1.1.2-2.el4.hrb set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
yum noarch 3.2.8-9.el4.hrb.2.1.1 hrb-testing 506 k
Installing for dependencies:
python-iniparse noarch 0.2.3-4.el4.hrb hrb-testing 34 k
yum-fastestmirror noarch 1.1.10-9.el4.hrb.1 hrb-testing 10 k
Updating for dependencies:
yum-metadata-parser i386 1.1.2-2.el4.hrb hrb-testing 24 k
yum-utils noarch 1.1.10-9.el4.hrb.1 hrb-testing 58 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 3 Package(s)
Remove 0 Package(s)
Total download size: 633 k
Is this ok [y/N]: y
Downloading Packages:
(1/5): yum-utils-1.1.10-9 100% |=========================| 58 kB 00:00
(2/5): yum-fastestmirror- 100% |=========================| 10 kB 00:00
(3/5): python-iniparse-0. 100% |=========================| 34 kB 00:00
(4/5): yum-3.2.8-9.el4.hr 100% |=========================| 506 kB 00:00
(5/5): yum-metadata-parse 100% |=========================| 24 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : yum-metadata-parser ######################### [1/9]
Installing: python-iniparse ######################### [2/9]
Updating : yum [3/9]warning: /etc/yum.conf created as /etc/yum.conf.rpmnew
Updating : yum ######################### [3/9]
Updating : yum-utils ######################### [4/9]
Installing: yum-fastestmirror ######################### [5/9]
Cleanup : yum-utils ######################### [6/9]
Removing : yum-plugin-fastestmirror ######################### [7/9]
Cleanup : yum ######################### [8/9]
Cleanup : yum-metadata-parser ######################### [9/9]
Dependency Installed: python-iniparse.noarch 0:0.2.3-4.el4.hrb yum-fastestmirror.noarch 0:1.1.10-9.el4.hrb.1
Updated: yum.noarch 0:3.2.8-9.el4.hrb.2.1.1
Dependency Updated: yum-metadata-parser.i386 0:1.1.2-2.el4.hrb yum-utils.noarch 0:1.1.10-9.el4.hrb.1
Complete!
Everything works fine. Now it’s time to publish and make some public QA. As you can see, it handles obsolete packages!
[root@webmel4 ~]# yum install hrb-foo
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* kbs-CentOS-Extras: centos.karan.org
* fasttrack: ftp.fi.muni.cz
* hrb-kernel-stable: fs12.vsb.cz
* update: ftp.fi.muni.cz
* rpmforge: ftp-stud.fht-esslingen.de
* hrb-testing: fs12.vsb.cz
* base: ftp.fi.muni.cz
* addons: ftp.fi.muni.cz
* hrb-stable: fs12.vsb.cz
* extras: ftp.fi.muni.cz
Reducing CentOS.Karan.Org-EL4 - Stable to included packages only
Finished
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package hrb-bar.noarch 0:1-1.el4.hrb set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
hrb-bar noarch 1-1.el4.hrb hrb-testing 2.1 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 2.1 k
Is this ok [y/N]: n
Exiting on user Command
Complete!
Comments:
Andre -
Thanks for your work! I get a lot of Python errors with the package, e.g. because python 2.3 doesn’t have a sorted() function. Are you still working on this? (I started porting some of those places to the old .sort() syntax, but it’s quite some work).
Andre -
Ah, I forgot. I also get some StopIteration Exceptions because of some .next() calls.
Well, I have production ready yum 3.2.19. See: http://fs12.vsb.cz/hrb33/el4/hrb/testing/x86_64/repoview/letter_y.group.html http://fs12.vsb.cz/hrb33/el4/hrb/testing/i386/repoview/letter_y.group.html Get the hrb-release package from stable repo, disable the stable repo within the yum configuration and finally run: yum update yum –enablerepo=hrb-testing Regards, David
Ed -
David - are you still working on this project? I just installed your yum rpms on rhel4.6 and everything works except for yum search. I get the following error - [root@xxxxxxxxx yum-3.2]# yum search screen Loaded plugins: allowdowngrade Traceback (most recent call last): File “/usr/bin/yum”, line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File “/usr/share/yum-cli/yummain.py”, line 229, in user_main errcode = main(args) File “/usr/share/yum-cli/yummain.py”, line 104, in main result, resultmsgs = base.doCommands() File “/usr/share/yum-cli/cli.py”, line 348, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File “/usr/share/yum-cli/yumcommands.py”, line 559, in doCommand return base.search(extcmds) File “/usr/share/yum-cli/cli.py”, line 696, in search for (po, keys, matched_value) in matching: File “/usr/lib/python2.3/site-packages/yum/__init__.py”, line 1630, in searchGenerator sort_func = operator.itemgetter(0) AttributeError: ‘module’ object has no attribute ‘itemgetter’ Any ideas? Thanks for doing this work. The feature difference between yum 2x and 3x is significant and for those of us stuck with rhel4 your yum back port is a big deal.
Edward, I have just fixed “yum search”. The new release yum-3.2.19-18.el4.hrb.7.noarch is available within repos:
- http://fs12.vsb.cz/hrb33/el4/hrb/testing/i386/repoview/yum.html
- http://fs12.vsb.cz/hrb33/el4/hrb/testing/x86_64/repoview/yum.html
Regards, David