By request of Jo Rhett:
In all cases, I've delineated sections of commands or literal output
with a line of alternating dashes and underscores.
Adding a package on RHEL 3 or 4:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
# /usr/bin/up2date samba-client
Fetching Obsoletes list for channel: rhel-x86_64-as-4...
Fetching Obsoletes list for channel: rhel-x86_64-as-4-extras...
Fetching Obsoletes list for channel: nebrwesleyan...
Fetching Obsoletes list for channel: nebrwesleyan...
Fetching rpm headers...
########################################
Name Version Rel
----------------------------------------------------------
samba-client 3.0.10 1.4E.12.2 x86_64
Testing package set / solving RPM inter-dependencies...
Downloading headers to solve dependencies...
#######################################
Downloading headers to solve dependencies...
########################################
samba-client-3.0.10-1.4E.12 ########################## Done.
samba-common-3.0.10-1.4E.12 ########################## Done.
cups-libs-1.1.22-0.rc1.9.20 ########################## Done.
Preparing ########################################### [100%]
Installing...
1:cups-libs ########################################### [100%]
2:samba-common ########################################### [100%]
3:samba-client ########################################### [100%]
The following packages were added to your selection to satisfy dependencies:
Name Version Release
--------------------------------------------------------------
samba-common 3.0.10 1.4E.12.2
cups-libs 1.1.22 0.rc1.9.20.2.el4_5.2
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
To add a package on RHEL 5, all versions of CentOS, all versions of
Fedora, and all versions of YellowDog Linux:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
# /usr/bin/yum -y install samba
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
dries 100% |=========================| 951 B 00:00
fedora 100% |=========================| 2.1 kB 00:00
nwu-livna 100% |=========================| 951 B 00:00
nwu-dries 100% |=========================| 951 B 00:00
nwu-base 100% |=========================| 951 B 00:00
adobe-linux-i386 100% |=========================| 951 B 00:00
nwu-custom 100% |=========================| 951 B 00:00
updates 100% |=========================| 2.3 kB 00:00
primary.sqlite.bz2 100% |=========================| 1.9 MB 00:07
nwu-freshrpms 100% |=========================| 951 B 00:00
Resolving Dependencies
--> Running transaction check
---> Package samba.i386 0:3.0.26a-6.fc7 set to be updated
--> Processing Dependency: samba-common = 3.0.26a-6.fc7 for package: samba
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package samba-common.i386 0:3.0.26a-6.fc7 set to be updated
---> Package samba.i386 0:3.0.26a-6.fc7 set to be updated
--> Processing Dependency: samba-common = 3.0.25b-2.fc7 for package:
samba-client
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package samba-client.i386 0:3.0.26a-6.fc7 set to be updated
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
samba i386 3.0.26a-6.fc7 updates 2.8 M
Updating for dependencies:
samba-client i386 3.0.26a-6.fc7 updates 4.5 M
samba-common i386 3.0.26a-6.fc7 updates 7.2 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 2 Package(s)
Remove 0 Package(s)
Total download size: 14 M
Downloading Packages:
(1/3): samba-client-3.0.2 100% |=========================| 4.5 MB 00:24
(2/3): samba-3.0.26a-6.fc 100% |=========================| 2.8 MB 00:16
(3/3): samba-common-3.0.2 100% |=========================| 7.2 MB 00:33
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : samba-common ######################### [1/5]
Installing: samba ######################### [2/5]
Updating : samba-client ######################### [3/5]
Cleanup : samba-common ######################### [4/5]
Cleanup : samba-client ######################### [5/5]
Installed: samba.i386 0:3.0.26a-6.fc7
Dependency Updated: samba-client.i386 0:3.0.26a-6.fc7 samba-common.i386
0:3.0.26a-6.fc7
Complete!
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
This was run with "-d 2" (debug level 2), which is the default but can
be overridden on a global level. If you are going to depend on any of
this output, you would need to specify the debug level.
Removing a package on all versions of RHEL, CentOS, Fedora, YellowDog,
and SuSE:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
# rpm -e samba
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
There's no output if the command succeeds. If it fails:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
# rpm -e samba-common
error: Failed dependencies:
samba-common = 0:3.0.26a-6.fc7 is needed by (installed)
samba-client-3.0.26a-6.fc7.i386
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
To remove a package, following dependencies, on RHEL 5, CentOS,
Fedora, or YellowDog, you can use:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
# yum -y remove samba-common
Loading "installonlyn" plugin
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package samba-common.i386 0:3.0.26a-6.fc7 set to be erased
--> Processing Dependency: samba-common = 3.0.26a-6.fc7 for package:
samba-client
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package samba-common.i386 0:3.0.26a-6.fc7 set to be erased
---> Package samba-client.i386 0:3.0.26a-6.fc7 set to be erased
--> Processing Dependency: /usr/bin/smbclient for package:
nagios-plugins-disk_smb
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package samba-client.i386 0:3.0.26a-6.fc7 set to be erased
---> Package nagios-plugins-disk_smb.i386 0:1.4.8-4.fc7 set to be erased
--> Processing Dependency: nagios-plugins-disk_smb for package:
nagios-plugins-all
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package nagios-plugins-all.i386 0:1.4.8-4.fc7 set to be erased
---> Package nagios-plugins-disk_smb.i386 0:1.4.8-4.fc7 set to be erased
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
samba-common i386 3.0.26a-6.fc7 installed 18 M
Removing for dependencies:
nagios-plugins-all i386 1.4.8-4.fc7 installed 0.0
nagios-plugins-disk_smb i386 1.4.8-4.fc7 installed 8.0 k
samba-client i386 3.0.26a-6.fc7 installed 11 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 4 Package(s)
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Removing : samba-common ######################### [1/4]
Removing : samba-client ######################### [2/4]
Removing : nagios-plugins-disk_smb ######################### [3/4]
Removed: samba-common.i386 0:3.0.26a-6.fc7
Dependency Removed: nagios-plugins-all.i386 0:1.4.8-4.fc7
nagios-plugins-disk_smb.i386 0:1.4.8-4.fc7 samba-client.i386 0:3.0.26a-6.fc7
Complete!
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
You can't do this on RHEL 3 and 4, AFAIK.
You can, on all platforms, remove multiple packages with one rpm command:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
% rpm -q samba-client samba-common
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Order doesn't matter; RPM will determine the correct order in which
the packages should be removed.
To see check installed packages on RHEL, CentOS, Fedora, YellowDog,
and SuSE:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
% rpm -q samba-client
samba-client-3.0.10-1.4E.12.2
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Or, if it's not installed:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
% rpm -q samba
package samba is not installed
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
When updating packages, you can _only_ update to the latest version.
It's not possible to update to a specific version.
On RHEL 3 and 4:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
# up2date -u pcre-devel
Fetching Obsoletes list for channel: rhel-x86_64-as-4...
Fetching Obsoletes list for channel: rhel-x86_64-as-4-extras...
Fetching Obsoletes list for channel: nebrwesleyan...
Fetching Obsoletes list for channel: nebrwesleyan...
Fetching rpm headers...
########################################
Name Version Rel
----------------------------------------------------------
pcre-devel 4.5 4.el4_5.4 x86_64
Testing package set / solving RPM inter-dependencies...
Downloading headers to solve dependencies...
########################################
pcre-devel-4.5-4.el4_5.4.x8 ########################## Done.
pcre-4.5-4.el4_5.4.x86_64.r ########################## Done.
Preparing ########################################### [100%]
Installing...
1:pcre ########################################### [100%]
2:pcre-devel ########################################### [100%]
The following packages were added to your selection to satisfy dependencies:
Name Version Release
--------------------------------------------------------------
pcre 4.5 4.el4_5.4
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
On RHEL 5, CentOS, Fedora, and YellowDog:
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
# yum -y update xchat
Loading "installonlyn" plugin
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package xchat.i386 1:2.8.4-5.fc7 set to be updated
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
xchat i386 1:2.8.4-5.fc7 updates 1.3 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 1.3 M
Downloading Packages:
(1/1): xchat-2.8.4-5.fc7. 100% |=========================| 1.3 MB 00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : xchat ######################### [1/2]
Cleanup : xchat ######################### [2/2]
Updated: xchat.i386 1:2.8.4-5.fc7
Complete!
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Let me know if this satisfies your needs.
Chris St. Pierre
Unix Systems Administrator
Nebraska Wesleyan University
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine