CN113885936A - Solution method for software package dependence in customized mirror image - Google Patents

Solution method for software package dependence in customized mirror image Download PDF

Info

Publication number
CN113885936A
CN113885936A CN202111215741.8A CN202111215741A CN113885936A CN 113885936 A CN113885936 A CN 113885936A CN 202111215741 A CN202111215741 A CN 202111215741A CN 113885936 A CN113885936 A CN 113885936A
Authority
CN
China
Prior art keywords
software package
data
storage device
dependent
software
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111215741.8A
Other languages
Chinese (zh)
Inventor
石培
程向璐
金奇才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202111215741.8A priority Critical patent/CN113885936A/en
Publication of CN113885936A publication Critical patent/CN113885936A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Abstract

The invention discloses a method for solving the dependence of a software package in a customized mirror image, which relates to the field of computers and comprises the following steps: determining all dependent software packages of the target software package as first software packages; traversing any first software package in the customized mirroring process; if the data of the currently traversed first software package is found from the first storage device, acquiring the data of the currently traversed first software package from the first storage device; if the data of the currently traversed first software package is not found from the first storage device, downloading the currently traversed first software package, wherein the contents are known.

Description

Solution method for software package dependence in customized mirror image
This application is a divisional application of the invention patent application 2021109342042 filed on 8/16/2021.
Technical Field
The invention relates to the field of computers, in particular to a solution method, computing equipment and a storage medium for software package dependence in a customized mirror image.
Background
A software package refers to a program or a group of programs having specific functions for performing specific tasks. The dependency of the software packages of the Li nux operating system is complex, for example, the software package a depends on the software packages B1, B2, B3, etc., and the software package B1 depends on the software packages C1, C2, C3, etc., i.e., a software package and its dependent software package can be actually understood as a multi-branch tree structure.
Pre-installed software packages, i.e., software packages that have been installed at the time of shipment of the computing device. In customizing an image (i.e., copying an operating system on top of an original operating system), if a pre-installed software package is to be customized and run properly in the image operating system, all the dependent software packages of the pre-installed software package need to be installed in the image operating system. At present, a dependent software package missing from a pre-installed software package is downloaded mainly by analyzing a software package downloaded by a working computing device (i.e., a computing device used in a customized mirroring process), but the installation condition of the software package of an original operating system is often different from that of the working computing device, which easily causes the condition of lacking the dependent software package. Therefore, after the mirror image is customized by the method, due to the lack of the dependent software package, the pre-installed software package cannot normally run. That is, the existing solution for the dependency software package of the pre-installed software package cannot accurately identify the missing dependency software package, so that the pre-installed software package cannot normally run on the mirror image operating system.
Disclosure of Invention
To this end, the present invention provides a solution to software package dependencies in customized images in an effort to solve or at least alleviate the problems presented above.
According to an aspect of the present invention, there is provided a solution for software package dependency in a customized image, executed in a computing device, the computing device being communicatively connected to a first storage device, wherein the first storage device stores data of all software packages installed on an original operating system of the customized image, the method comprising: determining all dependent software packages of a target software package as a first software package, wherein the target software package is any pre-installed software package; traversing any first software package in the customized mirroring process; if the data of the currently traversed first software package is found from the first storage device, acquiring the data of the currently traversed first software package from the first storage device; and if the data of the currently traversed first software package is not found from the first storage device, downloading the currently traversed first software package.
Optionally, the computing device is further communicatively connected to a second storage means, the method further comprising the steps of: and storing the downloaded data of the first software package to a second storage device.
Optionally, the step of downloading the currently traversed first software package comprises: and judging whether the second storage device stores the data of the currently traversed first software package, if so, acquiring the data of the currently traversed first software package from the second storage device, and if not, downloading the currently traversed first software package.
Optionally, the method further comprises the steps of: determining all dependent software packages of the currently traversed first software package according to the acquired data of the first software package or the downloaded data of the first software package; any dependent software packages of the first software package are traversed.
Optionally, the method further comprises the steps of: acquiring a first preset file of an original operating system; reading data of all software packages installed on an original operating system from a first preset file; and storing the data of all the software packages which are read to the first storage device.
Optionally, any first software package is traversed by a depth-first algorithm.
Optionally, the data of any installed software package stored by the first storage device includes: an installed software package name, an installed software package version number, and dependent software package information, the dependent software package information including: the name, version number and version number type of the dependent software package, and the version number, name and version number type of the alternative dependent software package.
Optionally, the data of any downloaded software package stored by the second storage device includes: the name, version number type of the downloaded software package and the path of a second predetermined file, wherein the second predetermined file comprises the name, version number type of all the dependencies of the downloaded software package and the name, version number and version number type of the alternative dependent software package.
Optionally, any of the first software packages comprises any dependent software package of the target software package and an alternative dependent software package of any dependent software package.
According to an aspect of the present invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method as described above.
According to the technical scheme of the invention, a method for solving the dependence of the software package in the customized mirror image is provided, the method comprises the steps of firstly determining all the dependence of a target software package, traversing any dependence in the process of customizing the mirror image, judging whether the data of the currently traversed dependence is found from a first storage device (including the data of the software package installed by an original operating system), if so, obtaining the data of the currently traversed dependence from the first storage device, if not, downloading the currently traversed dependence, and storing the downloaded dependence to a second storage device.
According to the invention, the missing dependence of the target pre-installed software package is traversed by depending on the software package installed in the original operating system in the process of customizing the mirror image, and the missing dependence is determined based on the software package installed in the original operating system, so that the missing dependence of the target pre-installed software package can be accurately identified in the process of customizing the mirror image, and the identification accuracy of the missing dependence is improved.
In addition, the invention also can store the downloaded dependence, and the downloaded dependence is not downloaded until the downloaded dependence is not stored, thereby avoiding repeated downloading, improving the solution speed of the dependence of the software package, avoiding resource waste and improving the resource utilization rate.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 illustrates a schematic diagram of a tree structure on which software packages depend, according to one embodiment of the invention;
FIG. 2 illustrates a schematic diagram of a system 100 for resolving software package dependencies in a customized image according to one embodiment of the invention;
FIG. 3 shows a schematic diagram of a computing device 200, according to one embodiment of the invention; and
FIG. 4 illustrates a flow diagram of a method 300 for resolving software package dependencies in a customized image, according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the Li nux operating system, the dependency relationship of the software package is complex, for example, the software package a depends on the software packages B1, B2, B3, etc., and the software package B1 depends on the software packages C1, C2, C3, etc., that is, a software package and its dependent software package can be actually understood as a multi-branch tree structure, as shown in fig. 1, fig. 1 shows a schematic diagram of the tree structure on which the software package depends according to an embodiment of the present invention.
In the process of customizing the image, if one pre-installed software package is to be customized into the image operating system and can normally run, all the dependent software packages of the pre-installed software package need to be installed in the image operating system. Currently, the dependent software packages missing from the pre-installed software packages are downloaded mainly by analyzing the software packages downloaded by the working computing device, but the software package installation situation of the original operating system is often different from that of the working computing device, for example, if the working computing device installs the software package C2, the software package C2 is not downloaded during the downloading of the dependent software packages of the pre-installed software packages, but the actual situation is that the original operating system does not install the software package C2. Therefore, the existing solution for the dependency software package of the pre-installed software package cannot accurately identify the missing dependency software package, so that the pre-installed software package cannot normally run on the mirror image operating system.
In order to solve the problems, the invention provides a system for solving the dependence of software packages in customized images. FIG. 2 illustrates a schematic diagram of a system 100 for resolving software package dependencies in a customized image, according to one embodiment of the invention. As shown in fig. 2, the system 100 for solving software package dependencies in a customized image includes a computing device 200, a first storage device 110, and a second storage device 120, where the computing device 200 is communicatively connected to the first storage device 110 and the second storage device 120, respectively, for example, through a wired or wireless network connection.
The first storage device 110 stores data of all software packages installed on the original operating system of the customized image, and the data of any installed software package includes: an installed software package name, an installed software package version number, and dependent software package information. The dependent software package information includes: dependent software package name, dependent software package version number type, alternative dependent (i.e., alternative dependent software package) version number, alternative dependent name, and alternative dependent version number type. It is to be noted that, in the following description, the dependency package is simply referred to as a dependency.
The version number type indicates a version requirement for the dependency, and includes NA, i ═ or, < and the like, NA indicates that there is no requirement for the dependent version, > = indicates that the dependent version number is the current version or above, i indicates that the dependent version number is the current version, and < indicates that the dependent version number is the current version or below. For example, the version number is 1.0, the version number type > indicates a version number that needs to be relied upon of 1.0 or more, the version number type < > indicates a version number that needs to be relied upon of 1.0 or less, and the version number type > indicates a version number that needs to be relied upon of 1.0. Alternative dependencies, which represent dependencies that may be alternatives, each of which may or may not have one or more alternative dependencies. If any dependency of the target software package is not installed in the original operating system, but any alternative dependency of the dependency is installed, the dependency is also considered to be satisfied, i.e., the dependency of the target software package is considered to be installed in the original operating system. All dependencies of each installed software package can be determined according to the dependent software package information of each installed software package. Part of the contents of the first storage means are shown in table 1:
TABLE 1
Figure BDA0003310713000000051
Figure BDA0003310713000000061
As can be seen from the first row of data in Table 1, the installed software package zlib1g-dev has a version number of 1:1.2.12.2-1+ dde and includes two dependencies, zlib1g and libc 6-dev. The dependency zlib1g has a version number of 1:1.2.12.2-1+ dde, no alternative dependency, and a version number type of ═ i, i.e., the version number of the dependency zlib1g is equal to 1:1.2.12.2-1+ dde. The version number of the dependency libc6-dev is null, the alternative dependency is libc-dev, the version number type is NA, namely no requirement is made on the version depending on libc6-dev, the version number of the alternative dependency libc-dev is null, and the version number type is NA, namely no requirement is made on the version depending on libc-dev. The other data in table 1 were also analyzed in the manner described above and are not described in detail here.
The second storage device 120 stores the downloaded dependent data in the customized mirroring process, and any downloaded dependent data includes: a downloaded dependency name, a downloaded dependency version number type, a path of the second predetermined file (a storage path of the second predetermined file on which the download depends). The second predetermined file includes names, version numbers, version number types of all downloaded dependencies and names, version numbers, and version number types of alternative dependencies, that is, all sub-dependencies of the current dependency and alternative dependencies of each sub-dependency can be determined through the second predetermined file. For example, the second predetermined file may be a control file of a software package. Part of the contents of the second storage means 120 are shown in table 2:
TABLE 2
Figure BDA0003310713000000062
Figure BDA0003310713000000071
As can be seen from the first row of data in table 2, the version number of the downloaded dependency libdrm-radeon1 is 2.4.39, and the version number type is >, that is, the version number of the downloaded dependency libdrm-radeon1 is equal to 2.4.39 and above. The path of the second predetermined file which depends on libdrm-radeon1 is/var/cache/apt/libdrm-radeon 1_2.4.3_ amd64.deb, and all the sub-dependency data of the current downloaded dependency can be obtained from the second predetermined file by accessing the path/var/cache/apt/libdrm-radeon 1_2.4.3_ amd64.deb, so that all the sub-dependencies of the current downloaded dependency are determined. The other data in table 2 were also analyzed in the manner described above and are not described in detail here.
In one embodiment, the first storage 110 and the second storage 120 may be databases, further, the databases may be relational databases, such as MYSQL, SqlServer, ACCESS, etc., and the databases of the first storage 110 and the second storage 120 may be local databases residing in the computing device 200, or may be located at a plurality of geographic locations as distributed databases, such as Hbase, etc.; the first storage device 110 and the second storage device 120 may also be a cache, such as a redis cache, or the like, and in short, the first storage device 110 and the second storage device 120 are used for storing data of all software packages installed on the original operating system of the customized image and data of software packages downloaded in the customized image process, respectively. The present invention does not limit the specific deployment and configuration of the first storage device 110 and the second storage device 120.
In one embodiment, computing device 200 may be implemented as a server, such as an application server, a Web server, or the like; but may also be implemented as a desktop computer, a notebook computer, a processor chip, a tablet computer, etc., but is not limited thereto. The computing device 200 may be connected to the first storage 110 and the second storage 120, and store and read data of all installed software packages on the original operating system of the customized image to and from the first storage 110, and also store and read data of downloaded software packages to and from the second storage 120.
For example, the computing device 200 may directly read data in the first storage device 110 and the second storage device 120, and write data into the first storage device 110 and the second storage device 120 (when the first storage device 110 and the second storage device 120 are local databases of the computing device 200), or may access the internet in a wired or wireless manner, read data in the first storage device 110 and the second storage device 120 through a data interface, and write data into the first storage device 110 and the second storage device 120.
A solution to software package dependencies in a customized image of the present invention may be executed in the computing device 200. FIG. 3 shows a block diagram of a computing device 200, according to one embodiment of the invention. As shown in FIG. 3, in a basic configuration 202, a computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between the processor 204 and the system memory 206.
Depending on the desired configuration, the processor 204 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 204 may include one or more levels of cache, such as a level one cache 210 and a level two cache 212, a processor core 214, and registers 216. Example processor cores 214 may include Arithmetic Logic Units (ALUs), Floating Point Units (FPUs), digital signal processing cores (DSP cores), or any combination thereof. The example memory controller 218 may be used with the processor 204, or in some implementations the memory controller 218 may be an internal part of the processor 204.
Depending on the desired configuration, system memory 206 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 206 may include an operating system 220, one or more applications 222, and program data 224. In some implementations, the application 222 can be arranged to operate with program data 224 on an operating system. Program data 224 includes instructions, and in computing device 200 according to the present invention, program data 224 contains instructions for performing data storage method 300.
Computing device 200 also includes storage device 232, storage device 232 including removable storage 236 and non-removable storage 238, each of removable storage 236 and non-removable storage 238 being connected to storage interface bus 234. In the present invention, the data related to each event occurring during the execution of the program and the time information indicating the occurrence of each event may be stored in the storage device 232, and the operating system 220 is adapted to manage the storage device 232. The storage device 232 may be a magnetic disk.
Computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via the bus/interface controller 230. The exemplary output device 242 includes an image processing unit 248 and an audio processing unit 250. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 252. Example peripheral interfaces 244 can include a serial interface controller 254 and a parallel interface controller 256, which can be configured to facilitate communications with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 258. An example communication device 246 may include a network controller 260, which may be arranged to facilitate communications with one or more other computing devices 262 over a network communication link via one or more communication ports 264.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 200 may be implemented as a server, such as a file server, a database server, an application server, a WEB server, etc., or as part of a small-form factor portable (or mobile) electronic device, such as a cellular telephone, a Personal Digital Assistant (PDA), a personal media player device, a wireless WEB-browsing device, a personal headset device, an application-specific device, or a hybrid device that include any of the above functions. Computing device 200 may also be implemented as a personal computer including both desktop and notebook computer configurations. In some embodiments, the computing device 200 is configured to perform a solution 300 to software package dependencies in a customized image according to the present invention.
FIG. 4 illustrates a flow diagram of a method 300 for resolving software package dependencies in a customized image, according to one embodiment of the invention. The method 300 is suitable for execution in a computing device 200 (such as the one described above), and the method 300 for solving software package dependencies in customized images includes steps S301 to S310. In step S301, the data of all the software packages installed in the original operating system is stored in the first storage device, and the data of any installed software package is as described above and is not described herein again.
In one embodiment, step S301 specifically includes: first, a first predetermined file of the original operating system is obtained, and data of all software packages installed in the original operating system is stored in the first predetermined file, for example, the first predetermined file may be a/var/lib/dpkg/status file. Next, the data of all the software packages installed on the original operating system are read from the first predetermined file, and the read data of all the software packages are stored in the first storage device 110. The partial data stored in the first storage device 110 is shown in table 1, and will not be described herein.
Next, in step S302, all dependencies of the target software package are determined, the target software package being any pre-installed software package in the customized mirroring process. Specifically, the name, version number type of all dependencies and the name, version number and version number type of the alternative dependencies of each dependency are extracted from the second predetermined file of the target software package, so as to determine all dependencies and alternative dependencies of each dependency of the target software package (all dependencies and alternative dependencies of each dependency determined herein may be understood as direct dependencies of the target software package).
In the process of customizing the mirror image, step S303 is executed to traverse any dependency, and in one embodiment, any dependency and an alternative dependency of the dependency are traversed by a depth-first algorithm, and the method of traversing by a depth-first algorithm is the prior art and is not discussed herein within the scope of the present invention.
Continuing to execute step S304, searching the currently traversed dependent data from the first storage device, and determining whether the currently traversed dependent data is found from the first storage device 110. In one embodiment, step S304 includes: the dependent data of the current traversal can be searched from the first storage device 110, or the alternative dependent data of the current traversal dependency can be searched from the first storage device 110, and as long as the dependent data of the current traversal or the alternative dependent data of the current traversal dependency is searched from the first storage device 110, it can be determined that the dependent data of the current traversal is searched from the first storage device 110, and if the dependent data of the current traversal and the alternative dependent data are not searched from the first storage device 110, it can be determined that the dependent data of the current traversal is not searched from the first storage device 110.
If the data of the current traversal dependency is found from the first storage device 110, step S305 is executed to obtain the data of the current traversal dependency from the first storage device, specifically, obtain the dependency information of the current traversal dependency from the first storage device 110, where the dependency information includes one or more fields, and each field includes a name, a version number type, a name, a version number, and a version number type of an alternative dependency corresponding to the dependency. If the data of the current traversal dependency is not found from the first storage device 110, step S306 is executed to determine whether the data of the current traversal dependency is stored in the second storage device.
If the second storage device stores the data of the current traversal dependency, to avoid repeated downloading, step S307 is executed to obtain the data of the current traversal dependency from the second storage device, specifically, obtain the path of the second predetermined file of the current traversal dependency from the second storage device. If the second storage device does not store the data of the current traversal dependency, step S308 is executed to download the current traversal dependency.
Next, in step S309, the downloaded dependent data is stored in the second storage device. In the customized mirroring process, any downloaded dependent data is as described above, and a part of data stored in the second storage device 120 is as shown in table 2, which is not described herein again. Next, in step S310, all the child dependencies of the current traversal dependency and the alternative dependencies of the child dependencies are determined by the data of the acquired dependencies or the data of the downloaded dependencies.
In one embodiment, if the dependent software package information of the currently traversed dependent software package is obtained from the first storage device 110, all the sub-dependencies of the currently traversed dependent software package and the alternative dependencies of each sub-dependency are determined through the dependent software package information. If the path of the second predetermined file of the current traversal dependency is obtained from the second storage device 120, the second predetermined file is accessed through the path of the second predetermined file, so as to determine all the sub-dependencies of the current traversal dependency and the alternative dependencies of each sub-dependency. And if the currently traversed dependency is downloaded, accessing the second predetermined file through the path of the second predetermined file of the downloaded dependency, so as to determine all the sub-dependencies of the currently traversed dependency and the alternative dependencies of the sub-dependencies.
It should be noted that, in the implementation process of the present invention, the target software package and the tree structure corresponding to the dependency thereof are dynamically generated, after downloading or acquiring any direct dependency of the target software package, the sub-dependency of the current direct dependency may be determined, and the steps S303 to S311 are continuously performed to traverse any current direct dependency, and acquire the sub-dependency from the first storage device 110, or download the sub-dependency until all the current direct dependencies no longer include dependencies, the traversal of the current direct dependency tree structure branch is completed. And continuing to execute the step S303 to the step S311 to traverse any other directly dependent tree structure branch of the target software package, and so on, and completing all the dependencies of the tree structure.
Taking the tree structure shown in fig. 1 as an example (fig. 1 does not show the alternative dependencies of the dependencies), the process of traversing the dependencies is explained in detail (the alternative dependencies are not included in the process). As can be seen from FIG. 1, the target software package is A, the direct dependency of the target software package A includes B1, B2 and B3, and the dependency of B1 depends on software packages C1, C2 and C3. Then, in the present scheme, first, the dependency B1 is traversed, and steps S303 to S311 are performed, so that it is determined that the dependency B1 depends on the software packages C1, C2, and C3. Then, step S303 to step S311 are executed for the dependency C1, if there is no dependency in the dependency C1, step S303 to step S311 are executed for the dependency C2, if there is no dependency in the dependency C2, step S303 to step S311 are continuously executed for the dependency C3, if there is no dependency in the dependency C3, step S303 to step S311 are executed for the dependency B2, and so on until the traversal completes any dependency of the target software package. The following is a key code example of the present invention:
Figure BDA0003310713000000121
Figure BDA0003310713000000131
Figure BDA0003310713000000141
Figure BDA0003310713000000151
Figure BDA0003310713000000161
Figure BDA0003310713000000171
Figure BDA0003310713000000181
Figure BDA0003310713000000191
based on the above, the solution for solving the software package dependency in the customized mirror image provided by the invention realizes traversing the missing dependency of the target pre-installed software package by relying on the software package installed in the original operating system in the process of customizing the mirror image, and can accurately identify the missing dependency of the target pre-installed software package in the process of customizing the mirror image because the missing dependency is determined based on the software package installed in the original operating system. In addition, the invention also can store the downloaded dependence, and the downloaded dependence is not downloaded until the downloaded dependence is not stored, thereby avoiding repeated downloading, improving the solution speed of the dependence of the software package, avoiding resource waste and improving the resource utilization rate.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the solution of the present invention to software package dependencies in the customized image according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (9)

1. A solution for software package dependency in a customized image, executed in a computing device communicatively connected to a first storage device and a second storage device, wherein the first storage device stores data of all software packages installed on an original operating system of the customized image, and the data of the installed software packages stored in the first storage device includes: an installed software package name, an installed software package version number, and dependent software package information, the method comprising:
determining all dependent software packages of a target software package as a first software package, wherein the target software package is any pre-installed software package;
traversing any one of the first software packages in the customized mirroring process;
if the data of the currently traversed first software package is found from the first storage device, acquiring the data of the currently traversed first software package from the first storage device;
if the data of the currently traversed first software package is not found from the first storage device, downloading the currently traversed first software package;
storing the downloaded data of the first software package to the second storage device.
2. The method of claim 1, wherein the downloading the first software package currently traversed comprises:
and judging whether the second storage device stores the data of the currently traversed first software package, if so, acquiring the data of the currently traversed first software package from the second storage device, and if not, downloading the currently traversed first software package.
3. The method of claim 2, further comprising the steps of:
determining all dependent software packages of the currently traversed first software package according to the acquired data of the first software package or the downloaded data of the first software package;
traversing any dependent software packages of the first software package.
4. The method of any of claims 1 to 3, further comprising the step of:
acquiring a first preset file of an original operating system;
reading data of all software packages installed on an original operating system from the first preset file;
and storing the data of all the software packages which are read to the first storage device.
5. The method of claim 4, wherein any of the first software packages is traversed by a depth-first algorithm.
6. The method of claim 1, wherein the data of any installed software package stored by the first storage device comprises: an installed software package name, an installed software package version number, and dependent software package information, the dependent software package information including: the name, version number and version number type of the dependent software package, and the version number, name and version number type of the alternative dependent software package.
7. The method according to claim 1, wherein the second predetermined file comprises names, version numbers, version number types of all dependencies of downloaded software packages and names, version numbers and version number types of alternative dependent software packages, and any one of the first software packages comprises any dependent software package of the target software package and any alternative dependent software package of any dependent software package.
8. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-7.
9. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-7.
CN202111215741.8A 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image Pending CN113885936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111215741.8A CN113885936A (en) 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111215741.8A CN113885936A (en) 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image
CN202110934204.2A CN113391826B (en) 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110934204.2A Division CN113391826B (en) 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image

Publications (1)

Publication Number Publication Date
CN113885936A true CN113885936A (en) 2022-01-04

Family

ID=77622562

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110934204.2A Active CN113391826B (en) 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image
CN202111215741.8A Pending CN113885936A (en) 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110934204.2A Active CN113391826B (en) 2021-08-16 2021-08-16 Solution method for software package dependence in customized mirror image

Country Status (1)

Country Link
CN (2) CN113391826B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114706564A (en) * 2022-05-16 2022-07-05 龙芯中科技术股份有限公司 Software package manufacturing method and device, electronic equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114706628B (en) * 2022-04-02 2023-02-17 北京星辰天合科技股份有限公司 Data processing method and device of distributed storage system based on one pool and multiple cores
CN114756255B (en) * 2022-06-14 2022-09-27 统信软件技术有限公司 Offline package generation method and software package installation method
CN114860273B (en) * 2022-07-04 2022-12-20 广东睿江云计算股份有限公司 Self-adaptive software package management method and management system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9690562B2 (en) * 2010-02-26 2017-06-27 Red Hat, Inc. Detecting computing processes requiring reinitialization after a software package update
CN102118500B (en) * 2010-12-27 2013-08-21 清华大学 Software package-based online automatic updating method for open source operating system of mobile terminal
CN102945155B (en) * 2012-10-22 2016-08-03 中标软件有限公司 A kind of for detecting (SuSE) Linux OS software kit and the method for dependence disappearance thereof
CN109634617A (en) * 2018-10-25 2019-04-16 深圳壹账通智能科技有限公司 Software installation method, user equipment, storage medium and device
CN109933342B (en) * 2019-03-18 2020-10-16 北京升鑫网络科技有限公司 Method and device for extracting file content from local docker mirror image
CN110990020A (en) * 2019-11-24 2020-04-10 苏州浪潮智能科技有限公司 Software compiling method and device, electronic equipment and storage medium
CN111198709A (en) * 2019-12-29 2020-05-26 浪潮电子信息产业股份有限公司 RPM software package management method, system, device and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114706564A (en) * 2022-05-16 2022-07-05 龙芯中科技术股份有限公司 Software package manufacturing method and device, electronic equipment and storage medium
CN114706564B (en) * 2022-05-16 2022-08-30 龙芯中科技术股份有限公司 Software package manufacturing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113391826A (en) 2021-09-14
CN113391826B (en) 2021-11-09

Similar Documents

Publication Publication Date Title
CN113885936A (en) Solution method for software package dependence in customized mirror image
CN103500082B (en) Method and apparatus for handling vector data
US9336001B2 (en) Dynamic instrumentation
US9875192B1 (en) File system service for virtualized graphics processing units
JP2000347872A (en) Method and device for processing exception as regular control flow
KR20140091747A (en) Method and system using exceptions for code specialization in a computer architecture that supports transactions
JP7088897B2 (en) Data access methods, data access devices, equipment and storage media
CN114365099A (en) Speculative access to prevent history pattern inconsistencies in a computing environment
CN114461404B (en) Process migration method, computing device and readable storage medium
US11782813B2 (en) Methods and apparatus to determine refined context for software bug detection and correction
CN111694992B (en) Data processing method and device
CN113204385A (en) Plug-in loading method and device, computing equipment and readable storage medium
CN106502707B (en) Code generation method and device
CN111930392A (en) Application service deployment method, computing device and readable storage medium
CN114816772B (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN114879978A (en) Software package dependency processing method, computing device and readable storage medium
CN114168937A (en) Resource access method, computing device and readable storage medium
CN110674491A (en) Method and device for real-time evidence obtaining of android application and electronic equipment
CN113254965B (en) Software package encryption method, computing device and storage medium
CN112953996B (en) Service method and system thereof
CN114416221A (en) Application execution method, computing device and storage medium
EP4155950A1 (en) Apparatus, computer-readable medium, and method for reducing bounds checking overhead by instrumenting pointer arithmetic
CN118055064A (en) Route information synchronization method, device, computing equipment and storage medium
US20230030136A1 (en) Methods and apparatus to detect malware using micro-forests with customer trust seeds

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination