OpenVZ Forum


Home » General » Support » Pass yum arguments on to vzyum
Pass yum arguments on to vzyum [message #25485] Thu, 27 December 2007 14:21 Go to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
I am installing something that tells me to issue the following command:

yum --enablerepo=centosplus upgrade perl


I am doing this in a VE. How do I format the vzyum command to pass that on?

[root@Char ~]# vzyum 114 --enablerepo=centosplus upgrade perl
exec /usr/bin/yum -c /vz/template/centos/4/i386/config/yum.conf --installroot /vz/root/114 --enablerepo=centosplus upgrade perl
not using ftp, http[s], or file for repos, skipping - 4 is not a valid release or hasnt been released yet


Cannot find a valid baseurl for repo: centosplus
Re: Pass yum arguments on to vzyum [message #25486 is a reply to message #25485] Thu, 27 December 2007 14:29 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
More info:

[root@Char ~]# vzyum 114 --enablerepo=centosplus upgrade perl
exec /usr/bin/yum -c /vz/template/centos/4/i386/config/yum.conf --installroot /vz/root/114 --enablerepo=centosplus upgrade perl
not using ftp, http[s], or file for repos, skipping - 4 is not a valid release or hasnt been released yet
Setting up Upgrade Process
Setting up repositories
not using ftp, http[s], or file for repos, skipping - 4 is not a valid release or hasnt been released yet
Reading repository metadata in from local files
Could not find update match for perl
No Packages marked for Update/Obsoletion


[main]
cachedir=/vz/template/centos/4/i386/yum-cache/
# Ugly hack to make yum disregard /etc/yum.repos.d/*repo files
# from both the host system and from inside VPS
reposdir=/dev/null
# Fix for bug #78 - we do not want to install dummy,
# we want to upgrade it.
installonlypkgs=''

[centos4-vz-addons]
name=OpenVZ add-ons for CentOS 4 - i386
baseurl=file:///vz/template/centos/4/i386/vz-addons/
enabled=1
gpgcheck=0

[centos4-base]
name=CentOS 4 - i386 - Base
baseurl=http://mirror.centos.org/centos/4/os/i386/
enabled=1
gpgcheck=1

[centos4-updates-released]
name=CentOS 4 - i386 - Released Updates
baseurl=http://mirror.centos.org/centos/4/updates/i386/
enabled=1
gpgcheck=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$ basearch&repo=centosplus
baseurl= http://mirror.centos.org/centos/$releasever/centosplus/$base arch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
Re: Pass yum arguments on to vzyum [message #25488 is a reply to message #25486] Thu, 27 December 2007 15:28 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

First of all, centosplus is already enabled in your repo config, so no need for --enablerepo.

Second, it looks like the problem is in handling of $releasever and $basearch macros -- could you check that by substituting those for 4 and i386, as it is done for other repos in config file?

This problem might be caused by centos-release rpm not installed in an appropriate VE.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Pass yum arguments on to vzyum [message #25490 is a reply to message #25488] Thu, 27 December 2007 15:37 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
I disabled centosplus in the yum.conf so it is enabled only via the command line.

I put 4 and i386 in where needed and it work just fine now.
Re: Pass yum arguments on to vzyum [message #25491 is a reply to message #25490] Thu, 27 December 2007 15:41 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Do you have centos-release rpm in a VE?

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Pass yum arguments on to vzyum [message #25492 is a reply to message #25491] Thu, 27 December 2007 15:43 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
It is a CentOS4 i386 VE on a CentOS5 x64 host.
Re: Pass yum arguments on to vzyum [message #25493 is a reply to message #25492] Thu, 27 December 2007 15:48 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

No, my question is -- do you have a package named 'centos-release' installed in a VE. In other words, what does
vzctl exec NNN rpm -q centos-release
shows?


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Pass yum arguments on to vzyum [message #25494 is a reply to message #25493] Thu, 27 December 2007 16:04 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
[root@Char ~]# vzctl exec 114 rpm -q centos-release
rpmdb: Program version 4.2 doesn't match environment version
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
package centos-release is not installed
Re: Pass yum arguments on to vzyum [message #25495 is a reply to message #25494] Thu, 27 December 2007 16:13 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Then
rpm --root /vz/root/114 -q centos-release


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Pass yum arguments on to vzyum [message #25502 is a reply to message #25495] Thu, 27 December 2007 20:28 Go to previous messageGo to next message
johan_hammy is currently offline  johan_hammy
Messages: 99
Registered: December 2005
Member
[root@Char ~]# rpm --root /vz/root/114 -q centos-release
centos-release-4-4.4
Re: Pass yum arguments on to vzyum [message #25593 is a reply to message #25502] Wed, 02 January 2008 14:45 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

That's really strange, I guess the only way to make it work is to hardcode 4 and i386 (as you did).

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: erro iptables modules: FATAL:
Next Topic: error "failed to load module vzmon"
Goto Forum:
  


Current Time: Wed Jun 26 14:45:24 GMT 2024

Total time taken to generate the page: 0.03355 seconds