📄 managing-package-repository.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>Managing the Package Repository</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos User Guide"HREF="ecos-user-guide.html"><LINKREL="UP"TITLE="Configuration and the Package Repository"HREF="configuration-and-the-package-repository.html"><LINKREL="PREVIOUS"TITLE="Modifying the Memory Layout"HREF="modifying-the-memory-layout.html"><LINKREL="NEXT"TITLE="Package Structure"HREF="package-structure.html"></HEAD><BODYCLASS="CHAPTER"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos User Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="modifying-the-memory-layout.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="package-structure.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="CHAPTER"><H1><ANAME="MANAGING-PACKAGE-REPOSITORY">Chapter 29. Managing the Package Repository</H1><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="managing-package-repository.html#PACKAGE-INSTALLATION">Package Installation</A></DT><DT><AHREF="package-structure.html">Package Structure</A></DT></DL></DIV><P>A source distribution of <SPANCLASS="PRODUCTNAME">eCos</SPAN> consists of a number of packages, such as the kernel, the C library, and the µITRON subsystems. These are individually versioned in the tree structure of the source code, to support distribution on a per-package basis and to support third party packages whose versioning systems might be different. The <SPANCLASS="PRODUCTNAME">eCos</SPAN> <SPANCLASS="APPLICATION">Package Administration Tool</SPAN> is used to manage the installation and removal of packages from a variety of sources with potentially multiple versions.</P><P>The presence of the version information in the source tree structure might be a hindrance to the use of a separate source control system such as <SPANCLASS="emphasis"><ICLASS="EMPHASIS">CVS</I></SPAN> or <SPANCLASS="emphasis"><ICLASS="EMPHASIS">SourceSafe</I></SPAN>. To work in this way, you can rename all the version components to some common name (such as “current”) thus unifying the structure of source trees from distinct <SPANCLASS="PRODUCTNAME">eCos</SPAN> releases.</P><P>The <SPANCLASS="PRODUCTNAME">eCos</SPAN> build system will treat any such name as just anotherversion of the package(s), and support building in exactly the sameway. However, performing this rename invalidates any existing buildtrees that referred to the versioned source tree, so do the renamefirst, before any other work, and do a complete rebuild afterwards.</P><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="PACKAGE-INSTALLATION">Package Installation</H1><P>Package installation and removal is performed using the <SPANCLASS="PRODUCTNAME">eCos</SPAN> <SPANCLASS="APPLICATION">Package Administration Tool</SPAN>. This tool is a Tcl script named <BCLASS="COMMAND">ecosadmin.tcl</B> which allows the user to add new <SPANCLASS="PRODUCTNAME">eCos</SPAN> packages and new versions of existing packages to an <SPANCLASS="PRODUCTNAME">eCos</SPAN> repository. Such packages must be distributed as a single file in the <SPANCLASS="PRODUCTNAME">eCos</SPAN> package distribution format. Unwanted packages may also be removed from the repository using this tool. A graphical version of the tool is provided as part of the <SPANCLASS="PRODUCTNAME">eCos</SPAN> <SPANCLASS="APPLICATION">Configuration Tool</SPAN>.</P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3071">Using the Administration Tool</H2><P>The graphicalversion of the <SPANCLASS="PRODUCTNAME">eCos</SPAN> <SPANCLASS="APPLICATION">PackageAdministration Tool</SPAN>, provided as part of the<SPANCLASS="PRODUCTNAME">eCos</SPAN> <SPANCLASS="APPLICATION">ConfigurationTool</SPAN>, provides functions equivalent to the command-lineversion for those who prefer a Windows-based interface.</P><P>It may be invoked in one of two ways:</P><P></P><UL><LI><P>from the <SPANCLASS="GUIMENU">start menu</SPAN> (by default <SPANCLASS="GUIMENUITEM">Start->Programs-> eCos->Package Administration Tool</SPAN>)</P></LI><LI><P>from the <SPANCLASS="PRODUCTNAME">eCos</SPAN> <SPANCLASS="APPLICATION">Configuration Tool</SPAN> via the <SPANCLASS="GUIMENUITEM">Tools->Administration</SPAN> menu item</P></LI></UL><P><P><IMGSRC="pix/admin.png"></P></P><P>The main window of the tool displays the packages which arecurrently installed in the form of a tree. The installed versionsof each package may be examined by expanding the tree.</P><P>Packages may be added to the <SPANCLASS="PRODUCTNAME">eCos</SPAN> repository by clicking onthe <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Add</I></SPAN> button. The <SPANCLASS="PRODUCTNAME">eCos</SPAN> package distributionfile to be added is then selected via a <SPANCLASS="emphasis"><ICLASS="EMPHASIS">File Open</I></SPAN> dialogbox.</P><P>Packages may be removed by selecting a package in the treeand then clicking on the <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Remove</I></SPAN> button. Ifa package node is selected, all versions of the selected packagewill be removed. If a package version node is selected, only theselected version of the package will be removed.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3099">Using the command line</H2><P>The <BCLASS="COMMAND">ecosadmin.tcl</B> script is located in the base of the <SPANCLASS="PRODUCTNAME">eCos</SPAN> repository. Use a command of the following form under versions of UNIX:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ tclsh ecosadmin.tcl <command></PRE></TD></TR></TABLE><P>Under Windows, a command of the following form may be usedat the Cygwin command line prompt:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ cygtclsh80 ecosadmin.tcl <command></PRE></TD></TR></TABLE><P>The following commands are available:</P><P></P><DIVCLASS="VARIABLELIST"><DL><DT><BCLASS="COMMAND">add <file></B></DT><DD><P>Adds the packages contained with the specified package distributionfile to the <SPANCLASS="PRODUCTNAME">eCos</SPAN> repository and updates the package database accordingly.By convention, <SPANCLASS="PRODUCTNAME">eCos</SPAN> package distribution files are given the <TTCLASS="FILENAME">.epk</TT> suffix.</P></DD><DT><BCLASS="COMMAND">remove <package> [ --version=<version> ]</B></DT><DD><P>Removes the specified package from the <SPANCLASS="PRODUCTNAME">eCos</SPAN> repository and updates the package database accordingly. Where the optional version qualifier is used, only the specified version of the package is removed.</P></DD><DT><BCLASS="COMMAND">list</B></DT><DD><P>Produces a list of the packages which are currently installed and their versions. The available templates and hardware targets are also listed.</P></DD></DL></DIV><P>Note that is is possible to remove critical packages such as the common HAL package using this tool. Users should take care to avoid such errors since core <SPANCLASS="PRODUCTNAME">eCos</SPAN> packages may only be re-installed in the context of a complete re-installation of <SPANCLASS="PRODUCTNAME">eCos</SPAN>.</P></DIV></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="modifying-the-memory-layout.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="package-structure.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Modifying the Memory Layout</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="configuration-and-the-package-repository.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Package Structure</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -