linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E

源代码在线查看: 0052-0052.html

软件大小: 23537 K
上传用户: jellylihui
关键词: linux ebookslinuxLearning unix linux-unix
下载地址: 免注册下载 普通下载 VIP

相关代码

				

				

				

				

				Maximum RPM (RPM):Using RPM to Upgrade Packages:EarthWeb Inc.-

				
				
								function displayWindow(url, width, height) {
				        var Win = window.open(url,"displayWindow",'width=' + width +
				',height=' + height + ',resizable=1,scrollbars=yes');
				}
				//-->
				
				
				
				 -->
				

				

				

				

				

				

				

				

				

				

				

				

				

				

				

				

				Previous | Table of Contents | Next

				

				

				Page 52

				

				

				In this case, a package has been installed. As expected, its scripts are executed. Next, let's

				upgrade this package:

				

				

				

				# rpm -U bother-3.5-1.i386.rpm

				This is the bother 3.5 preinstall script

				This is the bother 3.5 postinstall script

				This is the bother 2.7 preuninstall script

				This is the bother 2.7 postuninstall script

				#

				

				

				

				This is a textbook example of the sequence of events during an upgrade. The new version

				of the package is installed (as shown by the pre- and postinstall scripts being executed).

				Finally, the previous version of the package is removed (showing the pre- and postuninstall scripts

				being executed). There are really no surprises here. It worked just the way it was meant to.

				

				

				This time, let's use the --noscripts option when the time comes to perform the upgrade:

				

				

				

				# rpm -i bother-2.7-1.i386.rpm

				This is the bother 2.7 preinstall script

				This is the bother 2.7 postinstall script

				#

				

				

				

				Again, the first package is installed and its scripts are executed. Now let's try the upgrade

				using the --noscripts option:

				

				

				

				# rpm -U --noscripts bother-3.5-1.i386.rpm

				This is the bother 2.7 preuninstall script

				This is the bother 2.7 postuninstall script

				#

				

				

				

				The difference here is that the --noscripts option prevented the new package's scripts

				from executing. The scripts from the package being erased were still executed.

				

				

				

				Previous | Table of Contents | Next

				

				

				

				

				

				

				
				
				

				
				
				

				

				

							

相关资源