Determining maximal set of dependent software updates valid for installation
16 claims: 2 independent, 14 dependent
- 1A method in a computing device, comprising:inputting information corresponding to an install set (408) of at least one package for which installation is requested;communicating with a validation component to eliminate packages from the install set that are not valid for installation, the validation component (402) providing information as to whether a package is valid for installation;determining dependency relationships with package data from packages already installed on the device and/or with packages (414) queued for installation on the device;and determining an update path for installing packages by building a graph (424) having nodes representing package versions, analyzing paths between the nodes that correspond to dependency relationships between the package versions, each path having a weight, and traversing the graph to find the highest version with the least amount of weight when more than one path can be used to get to the highest version.
- 12A system in a computing device, comprising:a validation component (402) that provides information as to whether a package is valid for installation;and an update ordering component (404) configured to: input information corresponding to an install set (408) of at least one package for which installation is requested;communicate with the validation component to eliminate packages from the install set that are not valid for installation;determine dependency relationships with package data from packages already installed on the device and/or with packages (414) queued for installation on the device;and determine an update path for installing packages by building a graph (424) having nodes representing package versions, analyzing paths between the nodes that correspond to dependency relationships between the package versions, each path having a weight, and traversing the graph to find the highest version with the least amount of weight when more than one path can be used to get to the highest version.
Independent claims2
75 paragraphs in 6 sections, as filed
CROSS-REFERENCE TO RELATED APPLICATIONS
0001The present invention claims priority to United States provisional patent application serial no. <patcit id="pcit0001" dnum="US60530130B"><text>60/530,130 filed December 16, 2003</text></patcit>.
0002The present invention is related to the following United States patent applications, filed concurrently herewith: <ul id="ul0001" list-style="none" compact="compact"><li>Patent application serial no. <patcit id="pcit0002" dnum="US10837250B"><text>10/837, 250</text></patcit> "Applying Custom Software Image Updates To Non-Volatile Storage in a Failsafe Manner;"</li><li>Patent application serial no. <patcit id="pcit0003" dnum="US10837151B"><text>10/837, 151</text></patcit> "Ensuring that a Software Update may be Installed or Run only on a Specific Device or Class of Devices;"</li><li>Patent application serial no. <patcit id="pcit0004" dnum="US10837024B"><text>10/837,024</text></patcit> "Self-Describing Software Image Update Components" and</li><li>Patent application serial no. <patcit id="pcit0005" dnum="US10837150B"><text>10/837,150 </text></patcit>"Creating File Systems Within a File In a Storage Technology-Abstracted Manner."</li></ul>
FIELD OF THE INVENTION
0003The invention relates generally to computing devices such as those having embedded operating systems, and more particularly to updating the non-volatile storage of computing devices.
BACKGROUND
0004Mobile computing devices such as personal digital assistants, contemporary mobile telephones, and hand-held and pocket-sized computers are becoming important and popular user tools. In general, they have become small enough to be extremely convenient, while consuming less battery power, and at the same time have become capable of running more powerful applications.
0005During the process of manufacturing such devices, embedded operating system images are typically built into a monolithic image file and stored in non-volatile storage (e.g., NAND or NOR flash memory, a hard disk and so forth) of each device. As a result, updating such a device is necessary or desirable from time-to-time.
0006However, a monolithic operating system has a number of disadvantages, including that to install an update, a large amount of resources (e.g., temporary storage and bandwidth) are needed to replace the entire monolithic image. At the same time, installing some subset components of the operating system is a difficult task, because the existing package install state on the device is variable, and there may be any number of versioned packages queued for install. At present there is not a known intelligent image update server infrastructure that can query the installed image on a device to figure out what to install. Even if such a server infrastructure can be developed, however, there would be privacy concerns with sharing a device's install state information with a server. What is needed is an efficient way to handle device updates on the device side, that can deal with the many update versions and conflicts and dependencies between those versions.
0007<patcit id="pcit0006" dnum="US2001029605A"><text>US 2001/029605</text></patcit> relates to the management of software packages after distribution. A software package manager uses a distribution unit containing components for a software package and a manifest file that describes the distribution unit to manage the installation, execution, and uninstallation of software packages on a computer. For installation, the package manager acquires the manifest file and parses it to learn if the software package depends on any additional components. The package manager resolves any dependencies by acquiring a distribution unit containing the needed component and installs the dependency's distribution unit. Because the dependencies can be nested within dependencies, the package manager recursively processes all the dependencies before finishing the installation of the software package that depends upon the additional components.
0008An update path for installing packages by building a graph having nodes representing package versions, analyzing paths between the nodes that correspond to dependency relationships between the package versions is disclosed. Said cited document does not disclose each path having a weight and traversing the graph to find the highest version with the least amount of weight.
SUMMAY OF THE INVENTION
0009It is the object of the present invention to increase the flexibility of prior art systems.
0010This object is solved by the subject matter of the independent claims.
0011Preferred embodiments are defined by the dependent claims.
0012Briefly, the present invention is directed towards a system and method by which a collection of packages for installing (e.g., on an embedded device) are reviewed for their dependent relationships, whereby it is possible to choose a maximal set of install possibilities to allow for maximal version updates for any given package in the fewest update steps possible, while honoring package dependency constraints. This is accomplished by knowing both the existing package install state on the device as well as the versioned packages queued for installation.
0013Any package to be installed is first validated, which refers to a process in which the packages queued for install are reviewed for completeness, the contents are validated, update authority is determined (from a signature mechanism), and dependency relationships are determined. In one implementation, the result of the validation process comprises two lists: a list of packages that can be installed because they pass the validation requirements, and a list of packages which cannot because they fail to meet one or more of the validation requirements, along with a failure reason. The lists may be sorted into an installation order.
0014An update validator / validation process is provided, which in general organizes and validates a set of update packages that have been downloaded to a device into groups that are based on the target package being updated. Each group is processed to determine a minimal and optimal set of packages that can be applied to the existing image on the device to produce the update. To determine the minimal and optimal set of packages, the packages are organized into a graph that may have multiple paths from the base node (representing the target package) to each of the leaf nodes. The graph facilitates determining an optimal path through the set of packages, whereby the existing device package may be updated to the highest possible version of each package specified within the update set with the lowest cost (weighted) update. To this end, after the graphs are built, they are walked for various validation purposes, while attempting to find the highest version that the device can be update to, with the least amount of weight (cost) when more than one path can be used to get to the same version.
0015In one implementation, the validation process is accessible as an application programming interface called, for example, by an update application. The validation process looks for a device manifest file for each package (the device manifest file describes the package), and when found, the package is added (e.g., as a representative node for that package) to the package graph. When each the manifest files have been processed, graph processing looks for certificate information, including checking the parent node's certificate chain and pruning any corresponding branch from the tree from the parent node when not valid. When the branches and nodes of the graph have been processed including for signature verification, the lowest weighted branch is determined, and that branch is added to the update list that is to be returned to the calling entity.
0016Other advantages will become apparent from the following detailed description when taken in conjunction with the drawings, in which:
BRIEF DESCRIPTION OF THE DRAWINGS
0017<ul id="ul0002" list-style="none" compact="compact"><li><figref idref="f0001">FIGURE 1</figref> is a block diagram generally representing a computer system into which the present invention may be incorporated;</li><li><figref idref="f0002">FIG. 2</figref> is a representation of a manifest file used to obtain package dependency information in accordance with an aspect of the present invention;</li><li><figref idref="f0003">FIGS. 3A</figref> and <figref idref="f0004">3B</figref> comprise a flow diagram for performing an update validation process, including handling dependency information in accordance with an aspect of the present invention;</li><li><figref idref="f0005">FIG. 4</figref> is a block diagram showing various mechanisms that perform the update validation process in accordance with an aspect of the present invention;</li><li><figref idref="f0006">FIGS. 5A</figref> and <figref idref="f0007">5B</figref> comprise a flow diagram for performing an update ordering process, including handling dependency information in accordance with an aspect of the present invention;</li><li><figref idref="f0008">FIG. 6</figref> is a flow diagram for constructing a graph to evaluate package dependencies in accordance with an aspect of the present invention; and</li><li><figref idref="f0009">FIGS. 7A</figref> and <figref idref="f0010">7B</figref> comprise a flow diagram for performing a traversal of a package update graph, in accordance with an aspect of the present invention.</li></ul>
DETAILED DESCRIPTION
<u>EXEMPLARY OPERATING ENVIRONMENT</u>
0018<figref idref="f0001">FIG. 1</figref> shows functional components of one such handheld computing device 120, including a processor 122, a memory 124, a display 126, and a keyboard 128 (which may be a physical or virtual keyboard, or may represent both). A microphone 129 may be present to receive audio input. The memory 124 generally includes both volatile memory (e.g., RAM) and non-volatile memory (e.g., ROM, PCMCIA cards, and so forth). An operating system 130 is resident in the memory 124 and executes on the processor 122, such as the Windows<sup>®</sup> operating system from Microsoft Corporation, or another operating system.
0019One or more application programs 132 are loaded into memory 124 and run on the operating system 130. Examples of applications include email programs, scheduling programs, PIM (personal information management) programs, word processing programs, spreadsheet programs, Internet browser programs, and so forth. The handheld personal computer 120 may also include a notification manager 134 loaded in the memory 124, which executes on the processor 122. The notification manager 134 handles notification requests, e.g., from the application programs 132. Also, as described below, the handheld personal computer 120 includes networking software 136 (e.g., hardware drivers and the like) and network components 138 (e.g., a radio and antenna) suitable for connecting the handheld personal computer 120 to a network, which may include making a telephone call.
0020The handheld personal computer 120 has a power supply 140, which is implemented as one or more batteries. The power supply 140 may further include an external power source that overrides or recharges the built-in batteries, such as an AC adapter or a powered docking cradle.
0021The exemplary handheld personal computer 120 represented in <figref idref="f0001">FIG. 1</figref> is shown with three types of external notification mechanisms: one or more light emitting diodes (LEDs) 142 and an audio generator 144. These devices may be directly coupled to the power supply 140 so that when activated, they remain on for a duration dictated by a notification mechanism even though the handheld personal computer processor 122 and other components might shut down to conserve battery power. The LED 142 preferably remains on indefinitely until the user takes action. Note that contemporary versions of the audio generator 144 use too much power for today's handheld personal computer batteries, and so it is configured to turn off when the rest of the system does or at some finite duration after activation.
0022Note that although a basic handheld personal computer has been shown, virtually any device capable of receiving data communications and processing the data in some way for use by a program, such as a mobile telephone, is equivalent for purposes of implementing the present invention.
<u>DETERMINING SOFTWARE UPDATES VALID FOR INSTALLATION</u>
0023The present invention is generally directed towards updating software that is stored on small mobile computing devices, such as Microsoft Windows<sup>®</sup> CE .NET-based portable devices, including those in which the initial software or software update is written to the embedded device's non-volatile memory, e.g., flash memory. Notwithstanding, the present invention provides benefits to computing in general, and thus may apply to other computing devices and other types of storage, including various types of memory and/or other types of storage media such as hard disk drives. For purposes of simplicity, the term "flash" hereinafter will be used with reference to the updatable storage of a device, although it is understood that any storage mechanism is equivalent. Further, the term "image" will generally include the concept of the initial software installation image as well as subsequent software updates to an image, even when only part of an existing image is updated.
0024In accordance with an aspect of the present invention, an appropriate subset of available software updates in the form of self-contained, secure entities is applied to an embedded device's non-volatile storage in an efficient, intelligent (and failsafe) manner. Various types of software updates may be applied, including full replacement updates and updates that may contain only the changes to a previous update. These software updates may contain both executable code and data, with the executable code customized to the virtual address space environment of the embedded device at install time.
0025Unlike monolithic updates, once the initial manufacturing image is installed on a device, updates to the image may be performed by updating discrete parts of the image via the present invention. In one implementation, these discrete parts are encapsulated into packages, wherein a package is a self-describing collection of image files (code, data, scripts and so forth), and may comprise a collection of components that is signed and packaged for distribution. In this implementation, the entire operating system image is built from one or more packages, each of which may be updated individually or in combination with other packages, depending upon each package's requirements.
0026Packages may be configured in various ways, including "canonical," "delta/difference," and "super" forms, that each serves various purposes with respect to software updates. For example, canonical packages contain a complete copy of each file within the package, while delta/difference packages contain one or more files which contain only the binary differences based on an earlier revision of the file. Delta/difference packages are applied to a previous version that is already installed, and are thus typically smaller in size relative to other packages and used when trying to reduce download cost and download time. Super packages contain other packages, and are used as a convenience when it is needed to download more than one package, such as when updating interdependent packages.
0027Canonical packages are generated during a build process by associating operating system features and metadata (e.g., a specific application's executable code and the associated data and configuration information) with a package definition. Delta/difference packages are generated from canonical packages by applying a binary difference algorithm to the contents of two canonical packages and, in keeping with the present invention as described below, capturing the dependent relationship that the delta/difference package has on the baseline canonical package version.
0028In accordance with an aspect of the present invention, there is provided an update validator / validation process that organizes and validates a set of update packages that have been downloaded to a device. A first step in this process organizes the packages into coherent groups based on the target package being updated. After the packages have been organized into groups, each group is processed to determine the minimal and optimal set of packages that can be applied to the existing image on the device to produce the update. The coherent groups each comprise a set of packages that target the same existing package on the device. Each of the new packages may have a different base version and be applicable to a different target version.
0029To determine the minimal and optimal set of packages, the packages are organized into a graph that may have multiple paths from the base node (representing the target package) to each of the leaf nodes. This facilitates determining an optimal path through the set of packages that comprise the graph. Each group is processed to determine the optimal set of packages within the group to install, whereby the existing device package is updated to the highest possible version of each package specified within the update set.
0030A variety of factors affect the outcome of this processing. For example, if a dependency or signature cannot be validated, then that branch of the update is removed from the graph, and a different branch attempted, if one is available. One branch may be more efficient than another with respect to how much data needs to be updated; note that a canonical package is considered to have an infinite weight, because any way to obtain the update without using the canonical package (that is, via at least some deltas, possibly in multiple packages) is likely more efficient than writing (e.g., flashing) each file in the canonical package. Alternatively, it is feasible to have an actual weight for a canonical package.
0031Thus, a graph is built for each package, whether in an NK (kernel) partition or a system partition, wherein partitions are essentially different file systems, which may have different properties, where package contents may be stored, as generally described in the aforementioned related patent application entitled "Creating File Systems Within a File In a Storage Technology-Abstracted Manner." Note that the packages having contents that go into the NK partition are the same kind of packages as the packages which their contents go into the IMGFS partition. However, loading/booting sequence of the operating system is different for NK and system updates to the IMGFS partition, in that the NK partition is loaded first, and the drivers in the NK partition are used to locate and load the IMGFS partition files.
0032A node for each update package is added to the corresponding graph for that package. Version dependency relationships spelled out in the package manifests are then used to connect the nodes in the graph, e.g., version two of a package may upgrade version one of a package, and version three may upgrade version two (but not version one), whereby there would be an edge connection between version one and two and version two and three, but not between version one and three. It should be understood that the above version relationships only an example, and the relationships actually depend on the way the update is built. For example, it is possible to build a version 3 package that updates from a version 1 package. In general, each update package has a specific source version and a specific destination (final) version, and can only update from that source version, (which is not necessarily the destination version minus one). Note that a canonical update package can update any earlier version.
0033After the graphs are built, they are walked for various validation purposes, e.g., to check signatures as described below. In general, the graph walking process traverses the path in each graph, attempting to find the highest version that the device can be updated to, with the least amount of weight (cost) when more than one path can be used to get to the same version. While walking, if a node is not validated, that node and its path are essentially removed from the graph.
0034With respect to package manifests, as described in the aforementioned related patent application entitled "Self-Describing Software Image Update Components," each package type contains a device-side manifest file (e.g., having a .dsm extension) that fully describes both the contents of the package as well as more general package characteristics (including dependency information). <figref idref="f0002">FIG. 2</figref> represents a layout of the manifest file.
0035As seen in the table below, the device manifest header contains a globally-unique identifier (GUID) which uniquely refers to the lineage of that specific package and a version which refers to the specific package file: <tables id="tabl0001" num="0001"><table frame="all"><tgroup cols="3" colsep="0" rowsep="0"><colspec colnum="1" colname="col1" colwidth="22mm" /><colspec colnum="2" colname="col2" colwidth="55mm" /><colspec colnum="3" colname="col3" colwidth="71mm" colsep="1" /><thead><row><entry namest="col1" nameend="col3" align="left" valign="top">typedef struct _DeviceManifestHeader</entry></row></thead><tbody><row><entry>{</entry><entry /><entry /></row><row><entry /><entry>const DWORD dwStructSize;</entry><entry>// Size of this structure (in bytes)</entry></row><row><entry /><entry /><entry>// for versioning</entry></row><row><entry /><entry>const DWORD dwPackageVersion;</entry><entry>// Version of this package</entry></row><row><entry /><entry>const DWORD dwPrevPkgVersion;</entry><entry>// Version of package that this package</entry></row><row><entry /><entry /><entry>// updates. (0) for Canonical</entry></row><row><entry /><entry>const DWORD dwPackageFlags;</entry><entry>// package specific identifiers.</entry></row><row><entry /><entry>const DWORD dwProcessorID;</entry><entry>// what processor (matches defines in</entry></row><row><entry /><entry /><entry>// winnt.h)</entry></row><row><entry /><entry>const DWORD dwOSVersion;</entry><entry>// what version of the operating system</entry></row><row><entry /><entry /><entry>// was this built to.</entry></row><row><entry /><entry>const DWORD dwPlatformID;</entry><entry>// what was the target platform.</entry></row><row><entry /><entry>const DWORD dwNameLength;</entry><entry>// length of filename in bytes.</entry></row><row><entry /><entry>const DWORD dwNameOffset;</entry><entry>// offset to Friendly name of package</entry></row><row><entry /><entry>const DWORD dwDependentCount;</entry><entry>// How many entries in Dependent GUID</entry></row><row><entry /><entry /><entry>// list.</entry></row><row><entry /><entry>const DWORD dwDependentOffset;</entry><entry>// How many bytes from the front of the</entry></row><row><entry /><entry /><entry>// file are the dependent GUID structs.</entry></row><row><entry /><entry>const DWORD dwShadowCount;</entry><entry>// How many entries in shadow GUID list.</entry></row><row><entry /><entry>const DWORD dwShadowOffset;</entry><entry>// How many bytes from front of file is</entry></row><row><entry /><entry /><entry>// the array of shadowed package GUIDs.</entry></row><row><entry /><entry>const DWORD dwFileCount;</entry><entry>// How many files are there listed in</entry></row><row><entry /><entry /><entry>// this manifest.</entry></row><row><entry /><entry>const DWORD dwFileListOffset;</entry><entry>// How many bytes from the front of file</entry></row><row><entry /><entry /><entry>// to the first FileEntry.</entry></row><row><entry /><entry>const DWORD cbCERTData;</entry><entry>// number of bytes of digital certificate</entry></row><row><entry /><entry /><entry>// data</entry></row><row><entry /><entry>const DWORD dwCERTDataOffset;</entry><entry>// How many bytes from the front of file</entry></row><row><entry /><entry /><entry>// to the certificate data.</entry></row><row><entry /><entry>const GUID guidPackage;</entry><entry>// GUID of this package</entry></row><row rowsep="1"><entry namest="col1" nameend="col3" align="left">}DeviceManifestHeader, *PDeviceManifestHeader;</entry></row></tbody></tgroup><tgroup cols="3" colsep="0" rowsep="0"><colspec colnum="1" colname="col1" colwidth="22mm" /><colspec colnum="2" colname="col2" colwidth="55mm" /><colspec colnum="3" colname="col3" colwidth="71mm" colsep="1" /><thead><row><entry namest="col1" nameend="col3" align="left" valign="top">typedef struct _DependentEntry {</entry></row></thead><tbody><row><entry /><entry>const DWORD size;</entry><entry /></row><row><entry /><entry>const DWORD version;</entry><entry /></row><row><entry /><entry>const GUID guid;</entry><entry /></row><row rowsep="1"><entry namest="col1" nameend="col3" align="left">}DependentEntry,*PDependentEntry;</entry></row></tbody></tgroup><tgroup cols="3" colsep="0" rowsep="0"><colspec colnum="1" colname="col1" colwidth="22mm" /><colspec colnum="2" colname="col2" colwidth="55mm" /><colspec colnum="3" colname="col3" colwidth="71mm" colsep="1" /><thead><row><entry namest="col1" nameend="col3" align="left" valign="top">typedef struct _FileEntry {</entry></row></thead><tbody><row><entry /><entry>const DWORD dwNameLength;</entry><entry /></row><row><entry /><entry>const DWORD dwFlags;</entry><entry /></row><row><entry /><entry>const DWORD dwOffset;</entry><entry /></row><row><entry /><entry>const DWORD dwBase;</entry><entry>// Base address that file was originally linked with.</entry></row><row><entry /><entry>const DWORD dwFileSize;</entry><entry>// Size of the whole file. Not accurate for</entry></row><row><entry /><entry /><entry>// update packages.</entry></row><row rowsep="1"><entry namest="col1" nameend="col3" align="left">}FILEENTRY,*PFILEENTRY;</entry></row></tbody></tgroup></table></tables>
0036Also seen in the device manifest header is a list of packages on which the current package is dependent, each described by the following structure: <tables id="tabl0002" num="0002"><table frame="all"><tgroup cols="3" colsep="0" rowsep="0"><colspec colnum="1" colname="col1" colwidth="22mm" /><colspec colnum="2" colname="col2" colwidth="38mm" /><colspec colnum="3" colname="col3" colwidth="22mm" colsep="1" /><thead><row><entry namest="col1" nameend="col3" align="left" valign="top">typedef struct _DependentEntry {</entry></row></thead><tbody><row><entry /><entry>const DWORD size;</entry><entry /></row><row><entry /><entry>const DWORD version;</entry><entry /></row><row><entry /><entry>const GUID guid;</entry><entry /></row><row rowsep="1"><entry namest="col1" nameend="col3" align="left">}DependentEntry,*PDependentEntry;</entry></row></tbody></tgroup></table></tables>
0037There can be any number of packages each uniquely described by a GUID; all versions of a package share the same GUID. The dependency rules for a package require that the package or packages on which a package is dependent are either at or above the version number identified in the dependency list. A package is at or above the specified version if such a version is already installed on the device, or the install is pending and its dependencies are satisfied (thus ensuring its install).
0038To provide access to the information in the device side manifest file, which in one implementation is a binary file with a proprietary format, a common Package Information API (PackageInfoAPI) is provided. The present invention uses the package information API to determine the existing install state for a package on the device, as well as for packages that are queued for possible install. The API exists as a build system API as well as an embedded device API, and serves to effectively parse the device manifest files of a collection of package files. In general, the package information API provides the ability to enumerate the pre-existing packages on a device, to enumerate the shadow order information (described below) for a specific package, to enumerate the dependency information for a specific package, and to enumerate the list of file names of the files that belong to a specific package. The package information API also provides the ability to open a file that is stored in the file system as a device side manifest, open a device side manifest from within a specified package, and retrieve the package information (e.g., _PACKAGEINFO) for a specific package. The Package Information API also provides an interface to calculate a CRC32 value for a specific file, when given a path to that file, and to calculate a CRC32 value for a specific package, given a path to that package. The PackageInfoAPI component contains an implementation of the APIs set forth below.
0039The following API set defines the external interface to the PackageInfoAPI. The data types are described as follows: <ul id="ul0003" list-style="bullet" compact="compact"><li><b>HPKGENUM</b> - This is an opaque data type that is used to identify a specific package enumeration set.</li><li><b>HPKG</b> - This is an opaque data type used to represent a unique package.</li><li><b>HRESULT</b> - This is a standard COM return type.</li><li><b>REFGUID</b> - This is a reference to a GUID structure.</li><li><b>LPTSTR</b> - This is a pointer to a TCHAR string</li><li><b>HFILEENTRY</b> - This is an opaque data type that is used to pass FILEENTRY information to the calling program.</li></ul>
0040The following API finds the first valid (valid==not a malicious 'impersonator') package and supplies the handle needed to retrieve the package info: <img file="EP1548586B1_D0001.tif" />
0041The following API finds the next valid package and supplies the handle needed to retrieve the package info (S_FALSE indicates the end of the enumeration): <img file="EP1548586B1_D0002.tif" />
0042The following API closes the package enumerator: <img file="EP1548586B1_D0003.tif" />
0043The following API will 'open' a Device Side Manifest file with specified GUID supplying the handle needed to retrieve the package info. This is an alternative to using the FindFirstPackage/FindNextPackage APIs: <img file="EP1548586B1_D0004.tif" />
0044The following API will 'open' a Device Side Manifest file with specified name supplying the handle needed to retrieve the package info. This is an alternative to using the FindFirstPackage/FindNextPackage APIs: <img file="EP1548586B1_D0005.tif" /><img file="EP1548586B1_D0006.tif" /><img file="EP1548586B1_D0007.tif" />
0045In accordance with an aspect of the present invention, any package to be installed is first validated. Package validation refers to a process in which the packages queued for install are reviewed for completeness, their contents are validated, update authority is determined (from a signature mechanism), and dependency relationships are determined. In one implementation, the result of the validation process comprises two lists: a list of one or more packages which can be installed because they pass the validation requirements, and a list of one or more packages which cannot be installed because they fail to meet one or more of the validation requirements, along with a failure reason for each. The lists may be sorted into an installation order, which, in addition to ensuring that any needed files will be present if deltas are applied, can depend on size considerations to reduce fragmentation and ensure there is enough space to do the update. <figref idref="f0003">FIGS. 3A</figref> and <figref idref="f0004">3B</figref> comprise a flowchart describing the overall validation process.
0046In one implementation, the validation process is accessible as an application programming interface called, for example, by an update application. There are two functions, one called with the filenames of updates to validate and return installation data therefor, and another where the calling program provides a path to a directory where update packages are stored. For purposes of simplicity, the updates generally will be considered herein as being in a directory.
0047In <figref idref="f0003">FIGS. 3A</figref> and <figref idref="f0004">3B</figref>, a number of tests are performed to determine whether a package can be installed, e.g., when given a directory containing one ore more packages to install. Step 300 takes the directory of packages, and tests determine whether the directory exists (step 302) and the directory contains file(s) (step 304). If not, an error message is returned via step 306 and the validation process ends.
0048If the directory exists with at least one file therein, steps 308 and 322 loop to iterate through each of the files, performing tests on each. Step 310 tests whether the file is a suitable type of package file; if so, step 312 attempts to extract the device-side manifest file (DSM) from the package. More particularly, in one implementation, a CABAPI is used to attempt to open the file as a CAB file. If this succeeds, then an attempt to extract the DSM is made. If the file cannot be loaded as a CAB file, the name is recorded into a list of bad packages with an HRESULT error code indicating that the specified file name could not be loaded as a CAB file. If the DSM cannot be extracted, then the name of the file is recorded in the list of bad packages with an HRESULT error code indicating that there was not a DSM in the CAB. If not a CAB file, or if the device manifest file is not found as evaluated at step 314, the next package file is selected and tested until none remain.
0049When a device-side manifest file is found, the package is added (e.g., as a representative node for that package) to a package graph via step 316. If not successful as tested by step 318, the validation process ends (at step 320) as a result of failing to create the node.
0050When each the files have been processed, the graph should not be empty if at least one file in the directory was a package file having a device manifest file. If the graph is empty (step 324), none of the files were valid packages, and the process ends at step 326. Otherwise the process continues to step 328 of <figref idref="f0004">FIG. 3B</figref>.
0051Step 328 (along with step 348) of <figref idref="f0004">FIG. 3B</figref> represent a loop for processing each branch in the graph, while step 330 (along with step 344) represent a nested loop for processing each node in the branch currently being processed. In general the processing looks for certificate information, including checking the parent node's certificate chain via steps 332 and 334, pruning the corresponding branch from the tree from the parent node when not found via step 336.
0052If found, the signature is verified via steps 338 and 340. If found, weighting data (that is used to evaluate efficiency when deciding which package to use relative to others when more than one path can be used to provide the same result) is added at step 342 to the branch based on the node, and the next node is selected until none remain via step 344. The weighting information is calculated when the package is loaded and is added to the weight of the path when the path is constructed. The initial graph construction works off of the assumption that the packages are valid, and thus the signature information only has to be verified for the packages that the process wants to use, rather than performing it on every package in the update set, which hopefully reduces the number of signature checks performed. If the signature is not valid at step 340, the branch is pruned from the current node at step 346.
0053When the branches and nodes of the graph have been processed in this manner, the graph is walked as represented by step 350 to find the lowest weighted branch, and that branch is added to the update list that is to be returned.
0054In accordance with an aspect of the present invention, the validation process provides the version-dependency calculation requirements that enable the determination of the maximal dependent software updates that are valid for installation. As represented by the block diagram of <figref idref="f0005">FIG. 4</figref>, the validation process 402 is associated with (or can be considered as including) various components to make the determination, including an update ordering component 404. The update ordering component 404 constructs a graph 406 of the set of packages that have been downloaded to a device as an update set 408, extracting the dependency information from the package manifest 410 and verifying that the other packages 412 are present on the device (or in the queued install packages 414) with the correct version. In addition, the update ordering component 404 is responsible for parsing the existing and new device manifest files 410 and 412 and generating an install order for the packages based on the dependency requirements.
0055<figref idref="f0006">FIGS. 5A</figref> and <figref idref="f0007">5B</figref> comprise a flowchart describing the update ordering process of the validation process. In general, after some initialization and validation checks (steps 500, 502 and 504), for each existing device manifest file on the device, which corresponds to a previously installed package, a package graph is created by the update ordering process to represent that package, as defined by the package's device manifest file which is maintained on the device. Note that the validation process may use the package information API to enumerate the existing device manifests. The packages in the update directory are added to the appropriate baseline graph for that package at step 506; if no existing graph is found, one is created for the new package, but tagged as a non-baseline graph. The node contains information based on the manifest and package, and when added, looks to the other nodes in the graph for version information to determine which node or nodes to connect to based on what version or versions the package can update. Note that there may be orphaned nodes in the graph that are capable of updating the packages that are being added to the graph. The graph construction process walks the nodes that comprise the graph and adds the appropriate links if there are existing nodes in the graph that can update the new node.
0056Once the packages to install have been added, each graph is walked, including for the purposes of evaluating paths and performing file validation. Note that the paths through the graph were constructed in real time as the nodes were added to the graph. As described below with reference to <figref idref="f0008">FIG. 6</figref>, once the packages have been loaded, the update validator walks each graph looking for the optimal path among the set of paths available for the graph. Once a path is selected for a graph, then the signatures for the nodes in the path are validated. If the signature for a specific node cannot be validated, then the path is pruned starting at the failing node, and then the path selection process is re-run for that graph. This process is repeated until either the nodes in a path are determined to have valid signatures or there are no more paths to process for the given graph.
0057If processing is successful at step 514, the update ordering process continues to step 518 of <figref idref="f0007">FIG. 5B</figref>, wherein for each resulting package graph, if the package is part of the NK partition, the Package information is added to NK list 416 (<figref idref="f0005">FIG. 4</figref>) via step 522. If the Package is not part of the NK partition, the package is added to an Other list 418 (<figref idref="f0005">FIG. 4</figref>). Once all Package Graphs have been processed, the other list 418 is appended to the NK list 416 via step 532, and if the append is successful as evaluated at step 534, a NOERROR state is returned with the appended NK list 416 and an invalid list 420.
0058Another part of the validation process 402 is directed to constructing an update graph, and is accomplished by an update graph component 422, which is responsible for building a graph of the packages that comprise an update on the device. Each preexisting package on the device will be used to create the base node for an independent graph. In one implementation, each package is represented by a package node object; note that in this implementation, each node object is contained within one, and only one, package graph object.
0059The graph construction process is represented in <figref idref="f0008">FIG. 6</figref>. In general, the update graph 424 (<figref idref="f0005">FIG. 4</figref>) contains two arrays, including an array of node objects 436 and an array of edge objects 428. The edge objects connect nodes to each other. When a new package is added to the graph, a node object is created for the package and added to the node array 426, as represented by step 600. If the node is not created as evaluated at step 602, the process fails.
0060Steps 606 and 608 attempt to find an existing graph corresponding to this package; if none are found the package is new and a graph is created therefor at step 610, (and ensured that it is properly created via step 612). If successfully created, the new graph is returned at step 616, else a failure is returned.
0061If the node create was successful and a graph was found for that package, step 608 branches to step 618, where, via steps 618-630, for each node in the node array, if the base version of the new node matches the version number for the existing node, an edge object is created in the update graph 424 (<figref idref="f0005">FIG. 4</figref>) and added to the array 428. In this condition, the edge object specifies the existing node as the source and the new node as the sink. If instead the base version of the existing node matches the version number of the new node, an edge object is created specifying the new node as the source and the existing node as the sink.
0062Note that it is possible for a package to be added that, at the time of addition, has no connections to any existing nodes. This condition will be rectified through one of two outcomes, namely (a) there are no nodes that can be reached through this package node and there are no paths to this package node through other package nodes in the update; in this circumstance, the node will be marked as bad and will end up on the invalid update list, and (b) a package that will be added later will connect to the node. In this circumstance, the node will be processed during the graph walk phase, described below with reference to <figref idref="f0009">FIGS. 7A</figref> and <figref idref="f0010">7B</figref>.
0063Further, note that if two packages have the same target version, then the two device-side manifest files are compared. If they are not equal, both nodes are marked as invalid, because for any given package, the device-side manifest file for a specific version should be the same across all packages that update the given package to a specific version.
0064As another part of the validation process, an update graph walker component 430 traverses each package graph in order to determine the highest final version number for the package based on possibly multiple paths through the graph. While walking, the update graph walker component 430 validates the digital signatures on the packages in the graph. If a signature check fails, the graph is pruned at that point and any the edges that connect to the failed node are removed.
0065Once the highest version number is determined, the dependencies for that node are validated. This is accomplished by querying the update graph 424 for a package graph that matches the dependent GUID. If a new update graph has not been validated, then the update graph walker starts the walking process over on the new package graph. If a dependency cannot be satisfied, then the branch is abandoned and a new branch is attempted. The edges connecting the nodes in the branch are removed. If all possible branches are exhausted and the dependency requirements cannot be met, then the packages represented by the nodes in the graph are moved to the invalid update list.
0066<figref idref="f0009">FIGS. 7A</figref> and <figref idref="f0010">7B</figref> represent the logic of the traversal process, starting with base node for a graph. As represented by steps 702-706, for each edge in the graph, it is determined if the edge has the node as the source (step 704). If there are no edges associated with the node, then a terminal node has been detected, and is handled by steps 708-718. In general, these steps compare the version number for the node with the graph version number (step 714), and if the node version is higher than the graph version, the graph version is updated to the node version at step 716, and the process ends (with no error returned).
0067If instead there was an edge at step 704, the process branches to step 724 of <figref idref="f0010">FIG. 7B</figref> to check the node to see if it has a CERT chain. If there is no CERT chain at step 724, the CERT block is obtained from the device-side manifest file corresponding to the node. Note that if there is no CERT block in the device-side manifest file, the node is marked as bad at step 730 and the process returns.
0068If there is CERT data at step 724 or step 728, the process proceeds to step 734 to decode the data. If the decoding fails, the node is marked as bad at step 730 and the process returns.
0069Otherwise, an attempt to find the sink node at the end of the edge is performed at step 738, with a test at step 740 as to whether there is no sink node; if not, a graph integrity error is logged and the process returns via step 742.
0070If the sink node is found, the CERT data is used to validate the sink node (step 744). If the sink node passes signature validation, then this function is recursively called, passing the sink node at step 748, returning to step 720 of <figref idref="f0009">FIG. 7A</figref>. If the sink node fails, then the edge is marked as bad.
0071In this manner, the maximal set of updates is determined and returned in an ordered update list, along with a list of any invalid updates. This may correspond to the minimal number of packages that maximize the device package versions.
0072As can be seen from the foregoing detailed description, there is provided a mechanism that handles device updates on the device side. The mechanism deals with the many update versions and conflicts and dependencies between those versions to provide a minimal number of valid packages when applied will maximize the device package versions.
0073While the invention is susceptible to various modifications and alternative constructions, certain illustrated aspects thereof are shown in the drawings and have been described above in detail. It should be understood, however, that there is no intention to limit the invention to the specific forms disclosed, but on the contrary, the intention is to cover all modifications, alternative constructions, and equivalents falling within the spirit and scope of the invention.
Contents6
17 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17
Every citation, both ways
| Document | Relation | Office |
|---|---|---|
| EP0802480A | Cites | European Patent Office (EPO) |
| US2001029605A1 | Cites | United States of America |
| ANONYMOUS: "Method for Generating Ordered Build Dependencies" IBM TECHNICAL DISCLOSURE BULLETIN, vol. 38, no. 9, 1 September 1995 (1995-09-01), pages 161-162, XP002452534 New York, US | Non-patent | – |
11 members in 5 offices; this record represents the family
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 530130P | United States of America | – | |
| 53013003 | United States of America | P | |
| 837176 | United States of America | – | |
| 83717604 | United States of America | A |
Members11
| Document | Office | Kind | |
|---|---|---|---|
| US2005132350A1 | United States of America | A1 | |
| KR20050061376A | Republic of Korea | A | |
| EP1548586A2 | European Patent Office (EPO) | A2 | |
| JP2005182784A | Japan | A | |
| CN1645322A | China | A | |
| EP1548586A3 | European Patent Office (EPO) | A3 | |
| US7568195B2 | United States of America | B2 | |
| KR101137146B1 | Republic of Korea | B1 | |
| JP5025901B2 | Japan | B2 | |
| EP1548586B1This record | European Patent Office (EPO) | B1 | |
| CN1645322B | China | B |
71 legal events, as 9 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Change of applicant/patenteeR081 | R081 | DE | |
| Change of applicant/patenteeR081 | R081 | DE | |
| Change of representativeR082 | R082 | DE | |
| Amendments to the register in respect of changes of name or changes affecting rights (sect. 32/1977)REGISTERED BETWEEN 20150115 AND 20150121732E | 732E | GB | |
| Change of representativeR082 | R082 | DE | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal feeWithdrawnR119 | R119 | DE | |
| Notification of lapseLapsedST | ST | FR | |
| Patent lapsedLapsedMM4A | MM4A | IE | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| Patent ceasedCeasedPL | PL | CH | |
| Lapsed because of non-payment of the annual feeLapsedV1 | V1 | NL | |
| Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal feeWithdrawnR119 | R119 | DE | |
| No opposition filed against granted patent, or epo opposition proceedings concluded without decisionGrantedR097 | R097 | DE | |
| No opposition filedOpposition26N | 26N | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Invalidated european patentMG4D | MG4D | LT | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Translation files for an european patent granted for nl, confirming art. 52 par. 1 or 6 of the patents act 1995GrantedT3 | T3 | NL | |
| Deletion acc. to par. 5 (withdrawal of the translation of the ep patent)MK05 | MK05 | AT | |
| Dpma publication of mentioned ep patent grantGrantedR096 | R096 | DE | |
| European patents granted designating irelandGrantedFG4D | FG4D | IE | |
| European patent takes effect as a national patent in ch/liEP | EP | CH | |
| Reference to at number (ep patent enters austrian national phase)REF | REF | AT | |
| Designated contracting statesAK | AK | EP | |
| European patent grantedGrantedFG4D | FG4D | GB | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Grant fee paidORIGINAL CODE: EPIDOSNIGR3GRAS | GRAS | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOSNIGR1GRAP | GRAP | EP | |
| Designation fees paidAKX | AKX | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Request for extension of the european patentAX | AX | EP | |
| Search report despatchedORIGINAL CODE: 0009013PUAL | PUAL | EP | |
| Designated contracting statesAK | AK | EP | |
| Request for extension of the european patentAX | AX | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 1548586
- Application
- 40292344
Titles3
- German
- Feststellung eines maximalen Satz von abhängigen Softwareaktualisierungen für gültige Installation
- English
- Determining maximal set of dependent software updates valid for installation
- French
- Détermination d'un ensemble maximal des mises à jour dépendantes de logiciel pour installation
Classification
- CPC, 2
- G06F8/65
- G06F8/54
- IPC, 2
- G06F9 445
- G06F9 44
Designated states30
- Contracting states, 30
- Austria
- Belgium
- Bulgaria
- Switzerland
- Cyprus
- Czechia
- Germany
- Denmark
- Estonia
- Spain
- Finland
- France
- United Kingdom
- Greece
- Hungary
- Ireland
- Iceland
- Italy
- Liechtenstein
- Lithuania
- Luxembourg
- Monaco
- Netherlands (Kingdom of the)
- Poland
and 6 moreShow fewer
- Portugal
- Romania
- Sweden
- Slovenia
- Slovakia
- Türkiye
