⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0052-0052.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:




<HTML>

<HEAD>

<TITLE>Maximum RPM (RPM):Using RPM to Upgrade Packages:EarthWeb Inc.-</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311054 //-->

<!-- TITLE=Maximum RPM (RPM)//-->

<!-- AUTHOR=Edward Bailey//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=04 //-->

<!-- PAGES=0045-0052 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->









<P><CENTER>

<a href="0049-0051.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch05/0053-0056.html">Next</A>

</CENTER></P>



<A NAME="PAGENUM-52"><P>Page 52</P></A>





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

upgrade this package:

</P>

<!-- CODE //-->

<PRE>

# 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

#

</PRE>

<!-- END CODE //-->



<P>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.

</P>



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

</P>

<!-- CODE SNIP //-->

<PRE>

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

This is the bother 2.7 preinstall script

This is the bother 2.7 postinstall script

#

</PRE>

<!-- END CODE SNIP //-->



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

using the --noscripts option:

</P>

<!-- CODE //-->

<PRE>

# 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

#

</PRE>

<!-- END CODE //-->



<P>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.

</P>

<BR><BR>

<P><CENTER>

<a href="0049-0051.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch05/0053-0056.html">Next</A>

</CENTER></P>











</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -