Software package construction method and device and electronic equipment

Through iterative analysis and database recording dependencies, we automatically identify and obtain compiled files of missing dependencies during software package construction, and solve the inefficiency problem caused by missing dependencies and complex dependencies in software package construction, and achieve efficient and accurate software package construction.

CN119576284APending Publication Date: 2025-03-07LOONGSON ZHONGKE (XIAN) TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411569807.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

During the software package construction process, missing dependencies are difficult to identify, and complex dependencies lead to inefficient construction.

Method used

Through iterative analysis, the missing dependency objects of the software package to be analyzed are automatically identified, and the compilation files of the dependency objects are obtained from the second device, recorded in the database, forming a construction index, and the software package is reversely built according to the dependency relationship.

Benefits of technology

It improves the recognition efficiency of dependent objects, the acquisition efficiency and accuracy of compiled files, avoids the information chaos and duplicate construction problems caused by manual recording, and improves the construction efficiency and accuracy of software packages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576284A_ABST
    Figure CN119576284A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a software package construction method and device and electronic equipment, and is applied to first equipment, the method comprises the following steps: determining a first software package with dependency loss as a to-be-analyzed software package, and determining a dependency object of the loss of the to-be-analyzed software package; acquiring a compiling file corresponding to the dependent object from second equipment; recording a compiled file of the dependent object and a dependency relationship between the dependent object and the to-be-analyzed software package in a database; determining the compiled file of the dependent object as a new to-be-analyzed software package, continuing to perform iterative analysis on the new to-be-analyzed software package, and stopping analysis until the obtained compiled file does not have a missing dependent object; and according to the dependency relationship and the compiling file recorded in the database, reversely constructing the software package corresponding to each dependency object in sequence until the software packages corresponding to all the dependency objects are constructed, and obtaining a target software package. According to the embodiment of the invention, the construction efficiency and accuracy of the software package are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a software package construction method, device and electronic equipment. Background Art

[0002] For a new architecture, the construction of the distribution is generally divided into two stages. The first stage is to create the basic operating environment, for example, to create basic Linux environments such as CLFS (Cross Linux From Scratch) or LFS (Linux From Scratch). This stage mainly uses cross-compilation and other technologies to build and package the core components required for the startup of the operating system into a file system, and then create a boot disk to guide the startup of the operating system. Although it can be started at this time, the function is single and cannot realize complex functions. The second stage is to build the packaging tools related to the distribution based on the basic environment created in the first stage, and enrich the software ecology of the corresponding distribution through this tool.

[0003] In the second stage of release building, each upper-level application software requires a large number of basic build dependency packages during the construction process. The problem of missing build dependencies is inevitable. An upper-level application package often has multiple layers of complex tree dependencies or circular dependencies, and the dependencies are nested, with as few as two layers and as many as dozens of layers. Manual analysis and recording alone is slow and error-prone, and sometimes there are problems of duplicate records and duplicate construction, which is inefficient. Summary of the invention

[0004] The embodiments of the present invention provide a method, device and electronic device for building a software package, which can solve the problem of difficult identification of missing dependencies and low building efficiency caused by complex dependencies during software building.

[0005] In one aspect, an embodiment of the present invention discloses a method for constructing a software package, the method being applied to a first device, the method comprising:

[0006] Determine the first software package with missing dependencies as the software package to be analyzed, and determine the missing dependency objects of the software package to be analyzed;

[0007] Obtaining a compiled file corresponding to the dependent object from the second device;

[0008] Recording the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database;

[0009] Determine the compiled file of the dependent object as a new software package to be analyzed, and continue to iteratively analyze the new software package to be analyzed until the obtained compiled file does not have any missing dependent objects, and stop analyzing;

[0010] According to the dependency relationship and the compiled files recorded in the database, the software packages corresponding to the dependent objects recorded in the database are reversely constructed in sequence until the software packages corresponding to all the dependent objects are constructed, thereby obtaining the target software package.

[0011] Optionally, obtaining the compiled file corresponding to the dependent object from the second device includes:

[0012] Sending a first remote command to the second device; the first remote command is used to retrieve a compiled file corresponding to the dependent object in the second device;

[0013] In a case where the compiled file exists in the second device, reading the compiled file from the second device;

[0014] In the case that the compiled file does not exist in the second device, other devices that have established communication connections with the first device are traversed to obtain the compiled file corresponding to the dependent object.

[0015] Optionally, the method further comprises:

[0016] When the compiled file does not exist in the second device, or when the compiled file does not exist in any other device that establishes a communication connection with the first device, the compiled file corresponding to the dependent object is obtained from the web page using crawler technology.

[0017] Optionally, obtaining the compiled file corresponding to the dependent object from the second device includes:

[0018] Executing a first identification instruction in the second device through a remote login tool to identify an absolute path corresponding to the dependent object; the absolute path is used to fully describe a storage location of the dependent object in the second device;

[0019] Based on the absolute path, a binary package corresponding to the dependent object is identified from the second device.

[0020] Optionally, the software packages corresponding to the dependent objects recorded in the database are sequentially reversely constructed according to the dependency relationships and the compiled files recorded in the database until the software packages corresponding to all the dependent objects are constructed to obtain the target software package, including:

[0021] Determine the software packages corresponding to the dependent objects and build a dependency chain according to the dependency relationships recorded in the database;

[0022] Based on the compiled files in the database, the software packages corresponding to the dependent objects are reversely constructed in sequence according to the software package construction dependency chain, and the successfully constructed dependent objects are marked until the software packages corresponding to all the dependent objects in the database are constructed to obtain the target software package.

[0023] Optionally, the method further comprises:

[0024] The built software package is updated to the remote software warehouse; the remote software warehouse allows other devices to access it.

[0025] Optionally, determining the dependent objects that are missing from the software package to be analyzed includes:

[0026] Install the software package to be analyzed using a software package management tool;

[0027] Acquire installation prompt information generated by the software package management tool; the installation prompt information is used to indicate the reason for the installation failure of the software package to be analyzed;

[0028] Based on the installation prompt information, the dependent objects missing from the software package to be analyzed are identified.

[0029] Optionally, recording the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database includes:

[0030] Querying the database whether there is a historical record corresponding to the dependent object;

[0031] If the database contains a record corresponding to the dependent object, only the historical record is retained; or, after clearing the historical record, the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed are recorded in the database;

[0032] If the record corresponding to the dependent object does not exist in the database, the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed are recorded in the database.

[0033] On the other hand, an embodiment of the present invention discloses a software package construction device, which is applied to a first device and includes:

[0034] A determination module, configured to determine the first software package with missing dependencies as the software package to be analyzed, and determine the missing dependency objects of the software package to be analyzed;

[0035] An acquisition module, used to acquire a compiled file corresponding to the dependent object from the second device;

[0036] A recording module, used for recording the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database;

[0037] an iterative module, configured to determine the compiled file of the dependent object as a new software package to be analyzed, and continue to iteratively analyze the new software package to be analyzed until the obtained compiled file does not contain any missing dependent object;

[0038] The construction module is used to reversely construct the software packages corresponding to the dependent objects recorded in the database in turn according to the dependency relationships and compilation files recorded in the database, until the software packages corresponding to all the dependent objects are constructed to obtain the target software package.

[0039] Optionally, the acquisition module includes:

[0040] A sending submodule, configured to send a first remote command to the second device; the first remote command is used to retrieve a compiled file corresponding to the dependent object in the second device;

[0041] a reading submodule, configured to read the compiled file from the second device if the compiled file exists in the second device;

[0042] The traversal submodule is used to traverse other devices that have established communication connections with the first device to obtain the compiled file corresponding to the dependent object when the compiled file does not exist in the second device.

[0043] Optionally, the acquisition module further includes:

[0044] The crawling submodule is used to use crawler technology to obtain the compiled file corresponding to the dependent object from the web page when the compiled file does not exist in the second device or the compiled file does not exist in other devices that establish communication connection with the first device.

[0045] Optionally, the acquisition module includes:

[0046] An execution submodule, configured to execute a first identification instruction in the second device through a remote login tool to identify an absolute path corresponding to the dependent object; the absolute path is used to fully describe a storage location of the dependent object in the second device;

[0047] The replication submodule is used to identify the binary package corresponding to the dependent object from the second device based on the absolute path.

[0048] Optionally, the building block includes:

[0049] A dependency chain determination submodule, used to determine the software packages corresponding to each dependent object to build a dependency chain according to the dependency relationships recorded in the database;

[0050] The construction submodule is used to reversely build the software packages corresponding to the dependent objects in turn according to the software package construction dependency chain based on the compiled files in the database, and mark the successfully built dependent objects until the software packages corresponding to all the dependent objects in the database are built, thereby obtaining the target software package.

[0051] Optionally, the device further comprises:

[0052] The update module is used to update the built software package to the remote software warehouse; the remote software warehouse allows other devices to access it.

[0053] Optionally, the determining module includes:

[0054] An installation submodule is used to install the software package to be analyzed using a software package management tool;

[0055] A prompt information acquisition submodule, used to acquire installation prompt information generated by the software package management tool; the installation prompt information is used to indicate the reason for the installation failure of the software package to be analyzed;

[0056] The identification submodule is used to identify the missing dependent objects of the software package to be analyzed based on the installation prompt information.

[0057] Optionally, the recording module includes:

[0058] A query submodule, used to query whether there is a historical record corresponding to the dependent object in the database;

[0059] A first recording submodule is configured to retain only the historical record if a record corresponding to the dependent object exists in the database; or, after clearing the historical record, record in the database the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed;

[0060] The second recording submodule is used to record the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in the database if the record corresponding to the dependent object does not exist in the database.

[0061] On the other hand, an embodiment of the present invention further discloses an electronic device, which includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to execute the aforementioned software package construction method.

[0062] The embodiment of the present invention further discloses a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the aforementioned software package construction method.

[0063] The embodiments of the present invention include the following advantages:

[0064] The software package construction method provided by the embodiment of the present invention can automatically identify all directly or indirectly dependent objects missing from the first software package through iterative analysis, and obtain the compiled files of the dependent objects from the second device, compared with manually querying and obtaining the compiled files of the dependent objects, the embodiment of the present invention improves the recognition efficiency of the dependent objects, the efficiency and accuracy of obtaining the compiled files. In addition, the embodiment of the present invention records the obtained compiled files and the dependency relationship between the dependent objects and the software to be analyzed in a database, thereby forming a construction index of the software package, and reversely constructs the software packages of each dependent object in accordance with the dependency relationship, so as to obtain the target software package with the dependent objects missing in the first software package added. Compared with manually recording the dependency relationship and constructing the software package, the embodiment of the present invention avoids the problems of information confusion and repeated construction caused by manual recording, and improves the construction efficiency and construction accuracy of the software package. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0066] Figure 1 is a flowchart of steps of an embodiment of a method for building a software package of the present invention;

[0067] Figure 2 It is a schematic diagram of a software package construction dependency tree of the present invention;

[0068] Figure 3 is a structural block diagram of an embodiment of a software package building device of the present invention;

[0069] Figure 4 It is a structural block diagram of an electronic device of the present invention. DETAILED DESCRIPTION

[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] Method Embodiment

[0072] Reference Figure 1 , shows a flowchart of a method for building a software package according to an embodiment of the present invention, the method is applied to a first device, and the method may specifically include the following steps:

[0073] Step 101: determine a first software package with missing dependencies as a software package to be analyzed, and determine the missing dependency objects of the software package to be analyzed;

[0074] Step 102: Obtain a compiled file corresponding to the dependent object from the second device;

[0075] Step 103: Record the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database;

[0076] Step 104: determine the compiled file of the dependent object as a new software package to be analyzed, and continue to iteratively analyze the new software package to be analyzed until the obtained compiled file does not contain any missing dependent objects, and stop the analysis;

[0077] Step 105: According to the dependency relationship and the compiled file recorded in the database, reversely construct the software packages corresponding to the dependent objects recorded in the database in turn, until the software packages corresponding to all the dependent objects are constructed, thereby obtaining the target software package.

[0078] The software package construction method provided in the embodiment of the present invention can construct a release version of the software package and solve the problem of missing dependencies during the construction process. For example, in a possible application scenario, the embodiment of the present invention can quickly build a release version of the software package in a basic Linux environment with only LFS (Linux From Scratch).

[0079] It is understandable that the first software package in the embodiment of the present invention may be a release software package to be constructed. The embodiment of the present invention determines all dependent objects missing in the construction process of the first software package by means of iterative analysis. The dependent objects refer to objects that have a direct or indirect dependency relationship with the first software package, and may include but are not limited to: dependent software, dependent library files, commands, etc. Dependent software may include compiled dependent software and running dependent software. Of course, for the software package to be analyzed in each round of iterative analysis, the dependent objects refer to objects that have a direct dependency relationship with the software to be analyzed.

[0080] Dependencies describe the situation where a module or component needs another module or component to provide services when implementing its functions. In software engineering, dependencies are divided into two main types: direct dependencies (A directly uses B) and indirect dependencies (A uses C, C uses B). Correct dependencies can avoid runtime errors and maintain system stability.

[0081] For example, in an embodiment of the present invention, for a first software package A1 to be constructed, if a dependency missing problem occurs during the construction process, the first software package A1 is determined as a software package to be analyzed, and the first round of iterative analysis is started: the dependency object a1 missing from the software package A1 to be analyzed is analyzed, and the dependency object a1 includes software, library files, commands, etc. that have a direct dependency relationship with the software package A1 to be analyzed. Then, the compiled file A2 corresponding to the dependency object a1 of the software package A1 is obtained from the second device. The compiled file includes file information required for compiling the dependency object, for example, the software package, library, command, etc. required for compiling the dependency object.

[0082] Then, the compiled file A2 of the dependent object a1 is determined as a new software package to be analyzed, and the next round of iterative analysis is continued: the dependent object a2 missing from A2 is analyzed, and similarly, the dependent object a2 refers to an object that has a direct dependency relationship with the software package A2 to be analyzed. The compiled file A3 corresponding to the dependent object a2 missing from A2 is obtained from the second device.

[0083] Next, the compiled file A3 is determined as a new software package to be analyzed, and the next round of iterative analysis is continued. And so on, until the obtained compiled file does not have any missing dependent objects, the analysis is stopped. In each round of iterative analysis, the obtained compiled file and the dependency relationship between the dependent objects and the software package to be analyzed are recorded in the database for subsequent query.

[0084] At this point, the compiled files of each dependent object that the first software package directly or indirectly depends on can be obtained.

[0085] Based on the dependency relationships and compilation files recorded in the database, the software packages corresponding to the dependent objects in the database are reversely constructed in sequence until the software packages corresponding to all dependent objects are constructed, and the target software package can be obtained.

[0086] As an example, suppose the dependency relationship recorded in the database is: A depends on B, B depends on C, and C depends on D. Then, when building, you can first build D's software package based on D's compiled file, and then build C's software package based on the built D's software package and C's compiled file; then build B's software package based on the built C's software package and B's compiled file; finally, build A's software package based on the built B's software package and A's compiled file. It should be noted that in this example, the compiled files of A, B, C, and D all have missing dependencies, and the missing content is the software package of their dependent objects.

[0087] The software package construction method provided by the embodiment of the present invention can automatically identify all directly or indirectly dependent objects missing from the first software package through iterative analysis, and obtain the compiled files of the dependent objects from the second device, compared with manually querying and obtaining the compiled files of the dependent objects, the embodiment of the present invention improves the recognition efficiency of the dependent objects, the efficiency and accuracy of obtaining the compiled files. In addition, the embodiment of the present invention records the obtained compiled files and the dependency relationship between the dependent objects and the software to be analyzed in a database, thereby forming a construction index of the software package, and reversely constructs the software packages of each dependent object in accordance with the dependency relationship, so as to obtain the target software package with the dependent objects missing in the first software package added. Compared with manually recording the dependency relationship and constructing the software package, the embodiment of the present invention avoids the problems of information confusion and repeated construction caused by manual recording, and improves the construction efficiency and construction accuracy of the software package.

[0088] In an optional embodiment of the present invention, obtaining the compiled file corresponding to the dependent object from the second device includes:

[0089] Step S11: sending a first remote command to the second device; the first remote command is used to retrieve a compiled file corresponding to the dependent object in the second device;

[0090] Step S12: if the compiled file exists in the second device, read the compiled file from the second device;

[0091] Step S13: When the compiled file does not exist in the second device, traverse other devices that have established communication connections with the first device to obtain the compiled file corresponding to the dependent object.

[0092] In the embodiment of the present invention, the compiled file corresponding to the missing dependent object can be retrieved in the second device through a remote command. If the compiled file corresponding to the dependent object exists in the second device, the compiled file corresponding to the dependent object can be directly read from the second device. On the contrary, if the compiled file corresponding to the dependent object does not exist in the second device, other devices that establish a communication connection with the first device can be traversed to obtain the compiled file corresponding to the dependent object from the other devices.

[0093] Exemplarily, a remote command, such as an SSH command, can be used to remotely identify the source package or binary package of the dependent object in the second device. If the identification is successful, the scp (secure copy) command can be used to copy the source package or binary package corresponding to the dependent object from the second device.

[0094] It is understandable that if the system architecture of the second device is the same as that of the first device, for example, both are Linux architecture, or both are x86 architecture, or both are ARM architecture, etc., then the source code package of the dependent object can be copied from the second device as the compiled file of the dependent object, and the construction of the software package can be executed directly based on the acquired source code package. If the system architecture of the second device is different from that of the first device, for example, the first device is x86 architecture and the second device is ARM architecture, then the binary package of the dependent object can be acquired from the second device as the compiled file of the dependent object. The corresponding binary packages of each file on operating systems of different architectures are the same. Acquiring the binary package of the dependent object from the second device can expand the scope of application of the embodiment of the present invention, improve the compatibility of the software package construction method provided by the embodiment of the present invention, and help improve the success rate of acquiring the compiled file of the dependent object.

[0095] Optionally, the method further comprises:

[0096] When the compiled file does not exist in the second device, or when the compiled file does not exist in any other device that establishes a communication connection with the first device, the compiled file corresponding to the dependent object is obtained from the web page using crawler technology.

[0097] Furthermore, if the compiled file corresponding to the missing dependent object does not exist in the second device, or the compiled file corresponding to the dependent object does not exist in other devices that establish a communication connection with the first device, the compiled file corresponding to the dependent object can be obtained from the web page using crawler technology.

[0098] In an optional embodiment of the present invention, obtaining the compiled file corresponding to the dependent object from the second device includes:

[0099] Step S21: Execute a first identification instruction in the second device through a remote login tool to identify an absolute path corresponding to the dependent object; the absolute path is used to fully describe the storage location of the dependent object in the second device;

[0100] Step S22: Identify the binary package corresponding to the dependent object from the second device based on the absolute path.

[0101] The compilation dependencies of each software package on different architectures are the same, and the binary packages of each file on different architectures are the same. In an embodiment of the present invention, if it is found that the compilation file of a dependent object is missing during the construction of the software package, it can be identified in the second device which binary package provides the compilation file of the dependent object. Specifically, the first identification instruction can be executed in the second device through a remote login tool to identify the absolute path corresponding to the dependent object, and then the binary package corresponding to the dependent object can be identified from the second device through the absolute path.

[0102] Exemplarily, the first identification command may be an SSH command, for example, a command using the format of “ssh user@ip”.

[0103] When you identify that the target software depends on the make command when building, but you don't know which dependency package the command belongs to, you can first identify the absolute path corresponding to the command in the following way, and then identify the binary package corresponding to the file through the absolute path:

[0104] long@long-pc:~$ssh root@10.130.0.67"which make"

[0105] / usr / bin / make

[0106] long@long-pc:~$ssh root@10.130.0.67"rpm-qf / usr / bin / make"

[0107] make-4.4.1-1.oe2403.loongarch64

[0108] Among them, "make-4.4.1-1.oe2403.loongarch64" is the binary package corresponding to the dependent command.

[0109] In an optional embodiment of the present invention, the software packages corresponding to the dependent objects recorded in the database are sequentially reversely constructed according to the dependency relationships and the compiled files recorded in the database until the software packages corresponding to all the dependent objects are constructed to obtain the target software package, including:

[0110] Step S31, according to the dependency relationship recorded in the database, determine the software packages corresponding to each dependent object to build a dependency chain;

[0111] Step S32: Based on the compiled files in the database, the software packages corresponding to the dependent objects are reversely constructed in sequence according to the software package construction dependency chain, and the successfully constructed dependent objects are marked, until the software packages corresponding to all the dependent objects in the database are constructed, and the target software package is obtained.

[0112] In the embodiment of the present invention, the software package construction dependency chain corresponding to each dependent object can be determined according to the dependency relationship recorded in the database, and then the software packages corresponding to each dependent object can be reversely constructed in sequence according to the software package construction dependency chain. If the software package of a dependent object is successfully constructed, it is marked to distinguish it from the unconstructed dependent objects to avoid repeated construction. When the software packages of all dependent objects recorded in the database are constructed, the target software package can be obtained.

[0113] As an example, suppose the dependency relationship recorded in the database is: A depends on B, B depends on C, and C depends on D. Then it can be determined that the software package build dependency chain corresponding to these dependent objects is: A→B→C→D, where "→" represents the dependency relationship. During the build process, reverse build is performed in sequence according to the software package build dependency chain: build D first, then build C, then build B, and finally build A.

[0114] If an object to be analyzed has at least two directly dependent objects, a software package build dependency chain, i.e., a software package build dependency tree, can be generated according to a tree structure. As an example, assuming that the dependency relationship recorded in the database is: A depends on B, B depends on C and D, C depends on E, and D depends on F, then the corresponding software package build dependency tree is as follows: Figure 2 shown.

[0115] It is understandable that at least two dependent objects corresponding to the same software package to be analyzed have the same priority, and when generating the software package construction dependency tree, the positions of the corresponding child nodes may not be distinguished. In other words, at least two child nodes of the same node in the software package construction dependency tree have the same priority. Figure 2 In the package building dependency tree shown, nodes C and D have the same priority. Therefore, during the package building process, you can build C based on E first, or you can build D based on F first, but you need to build B after both C and D are built.

[0116] Optionally, the method further comprises:

[0117] The built software package is updated to the remote software warehouse; the remote software warehouse allows other devices to access it.

[0118] In the embodiment of the present invention, the built software package can be placed in a remote software warehouse, so that when the software package is needed to build other software packages, it can be directly installed and obtained through commands after the remote software warehouse is configured.

[0119] For example, the remote software repository in the embodiment of the present invention may be a source, such as:

[0120] https: / / mirrors.openanolis.cn / anolis / 23 / os / loongarch64 / os /

[0121] If you need to use the software package in this source, you can add the source to the yum source of the operating system and then directly install the software package in the source using the yum command.

[0122] It should be noted that the remote software repository can be updated in real time according to the construction status during the software package construction process. The software packages added to the remote software repository can include not only the final target software packages, but also the intermediate software packages. Figure 2 When the software build dependency chain shown is reverse built, the built E, F, C, D, B, and A software packages can be updated to the remote software repository in real time.

[0123] In an optional embodiment of the present invention, the determining the missing dependent objects of the software package to be analyzed includes:

[0124] Step S41, installing the software package to be analyzed using a software package management tool;

[0125] Step S42: obtaining installation prompt information generated by the software package management tool; the installation prompt information is used to indicate the reason for the installation failure of the software package to be analyzed;

[0126] Step S43: Identify the missing dependent objects of the software package to be analyzed based on the installation prompt information.

[0127] In the embodiment of the present invention, the dependent objects missing from the software package to be analyzed can be identified based on the software package management tool. Specifically, the software package to be analyzed is first installed using the software package management tool, and then the dependent objects missing from the software package to be analyzed are identified from the installation prompt information.

[0128] The compilation dependency packages corresponding to each software are different. Generally, the dependency relationship of a software package is described in the upstream information of the software package. When it is made into a format file that can be directly installed by the operating system, the dependency will be listed in the package format file. For example, in the server operating system, the compilation dependency package of the software can be identified by the following command:

[0129] [root@41f2094ca84f SPECS]#yum-builddep pyScss.spec

[0130] Failed to set locale,defaulting to C.UTF-8

[0131] Last metadata expiration check:0:00:23ago on Sun Sep 29 01:47:452024.

[0132] Package gcc-12.3.0-5.an23.loongarch64 is already installed.

[0133] Package pcre-devel-8.45-4.an23.loongarch64 is already installed.

[0134] Package python3-devel-3.11.6-2.an23.loongarch64 is already installed.

[0135] Package python3-setuptools-54.2.0-1.noarch is already installed.

[0136] Package python3-six-1.15.0-3.noarch is already installed.

[0137] Package python3-sphinx-1:3.5.2-2.noarch is already installed.

[0138] Dependencies resolved.

[0139] Nothing to do.

[0140] Complete!

[0141] In the above example, the yum command is used to identify the missing dependency packages of the software pyScss:

[0142] "Package gcc-12.3.0-5.an23.loongarch64 is already installed.

[0143] Package pcre-devel-8.45-4.an23.loongarch64 is already installed.

[0144] Package python3-devel-3.11.6-2.an23.loongarch64 is already installed.

[0145] Package python3-setuptools-54.2.0-1.noarch is already installed.

[0146] Package python3-six-1.15.0-3.noarch is already installed.

[0147] Package python3-sphinx-1:3.5.2-2.noarch is already installed."

[0148] As another example, some software packages do not write the name of the dependent software package when writing their corresponding compilation dependencies, but write the dependent command or a dependent operating system file. When building the software package, you can use commands to identify the missing commands or files of the software package. For example, when building flatbuffers, you can use the yum command (yum-builddep) to view the missing commands or files:

[0149] [root@41f2094ca84f openstack-w]#yum-builddep~ / rpmbuild / SPECS / flatbuffers.spec Failed to set locale,defaulting to C.UTF-8

[0150] No matching package to install:' / usr / bin / pip'

[0151] No matching package to install:'cmake>=2.8.9'

[0152] Package gcc-c++-12.3.0-5.an23.loongarch64 is already installed.

[0153] Package ninja-build-1.11.1-3.an23.loongarch64 is already installed.

[0154] Package python3-devel-3.11.6-2.an23.loongarch64 is already installed.

[0155] Package python3-wheel-0.38.4-2.an23.loongarch64 is already installed.

[0156] Package python3-numpy-1.23.5-1.loongarch64 is already installed.

[0157] Not all dependencies satisfied

[0158] Error: Some packages could not be found.

[0159] Among them, the missing commands or files are: " / usr / bin / pip", "cmake>=2.8.9".

[0160] By using software package management tools, you can quickly and effectively identify the missing dependent objects of the software package to be analyzed, which is conducive to improving the efficiency of software package construction.

[0161] Optionally, recording the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database includes:

[0162] Step S51, querying the database whether there is a historical record corresponding to the dependent object;

[0163] Step S52: if the database contains a record corresponding to the dependent object, only the historical record is retained; or, after clearing the historical record, the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed are recorded in the database;

[0164] Step S53: If the database does not contain a record corresponding to the dependent object, the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed are recorded in the database.

[0165] In the embodiment of the present invention, in order to avoid information redundancy in the database, the dependent object to be recorded can be compared with the historical records in the database. If the historical record corresponding to the dependent object exists in the database, only the previous historical record can be retained, or the historical record can be cleared and then the current information, including the dependency relationship between the dependent object and the software package and the compiled file of the dependent object, can be recorded in the database. Of course, if the historical record of the dependent object does not exist in the database, the dependency relationship between the dependent object and the software package to be analyzed and the compiled file of the dependent object can be directly added to the database.

[0166] Furthermore, if it is found that the compiled file of the dependent object to be recorded currently has a different version from the compiled file recorded in the database, only the latest version of the compiled file may be retained.

[0167] Alternatively, if it is found that the dependency relationship corresponding to the dependent object recorded in the database does not include the dependency relationship between the dependent object and the current software package to be analyzed, but the dependency relationship between the dependent object and other software packages is recorded, only the dependency relationship between the dependent object and the software package to be analyzed can be added to the database, and the compiled file of the dependent object is no longer recorded repeatedly.

[0168] In summary, the embodiment of the present invention provides a method for building a software package. The method can automatically identify all directly or indirectly dependent objects that are missing in the first software package through iterative analysis when there is a lack of dependency in the first software package, and obtain the compiled files of the dependent objects from the second device, thereby improving the efficiency of identifying dependent objects, and the efficiency and accuracy of obtaining compiled files. In addition, the embodiment of the present invention records the obtained compiled files and the dependency relationship between the dependent objects and the software to be analyzed in a database, thereby forming a construction index of the software package, and reversely constructs the software packages of each dependent object in turn according to the dependency relationship to obtain a target software package with the dependent objects missing in the first software package added, thereby avoiding problems such as information confusion and repeated construction caused by manual recording, and improving the construction efficiency and construction accuracy of the software package.

[0169] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0170] Device Embodiment

[0171] Reference Figure 3 , shows a structural block diagram of an embodiment of a software package construction device of the present invention, the device is applied to a first device, and the device may specifically include:

[0172] A determination module 301 is used to determine a first software package with missing dependencies as a software package to be analyzed, and determine a dependency object that is missing from the software package to be analyzed;

[0173] An acquisition module 302 is used to acquire a compiled file corresponding to the dependent object from a second device;

[0174] A recording module 303, used to record the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database;

[0175] Iteration module 304, used for determining the compiled file of the dependent object as a new software package to be analyzed, and continuing to iteratively analyze the new software package to be analyzed until the obtained compiled file does not have any missing dependent objects, and stopping the analysis;

[0176] The construction module 305 is used to reversely construct the software packages corresponding to the dependent objects recorded in the database in turn according to the dependency relationships and compilation files recorded in the database, until the software packages corresponding to all the dependent objects are constructed to obtain the target software package.

[0177] Optionally, the acquisition module includes:

[0178] A sending submodule, configured to send a first remote command to the second device; the first remote command is used to retrieve a compiled file corresponding to the dependent object in the second device;

[0179] a reading submodule, configured to read the compiled file from the second device if the compiled file exists in the second device;

[0180] The traversal submodule is used to traverse other devices that have established communication connections with the first device to obtain the compiled file corresponding to the dependent object when the compiled file does not exist in the second device.

[0181] Optionally, the acquisition module further includes:

[0182] The crawling submodule is used to use crawler technology to obtain the compiled file corresponding to the dependent object from the web page when the compiled file does not exist in the second device or the compiled file does not exist in other devices that establish communication connection with the first device.

[0183] Optionally, the acquisition module includes:

[0184] An execution submodule, configured to execute a first identification instruction in the second device through a remote login tool to identify an absolute path corresponding to the dependent object; the absolute path is used to fully describe a storage location of the dependent object in the second device;

[0185] The replication submodule is used to identify the binary package corresponding to the dependent object from the second device based on the absolute path.

[0186] Optionally, the building block includes:

[0187] A dependency chain determination submodule, used to determine the software packages corresponding to each dependent object to build a dependency chain according to the dependency relationships recorded in the database;

[0188] The construction submodule is used to reversely build the software packages corresponding to the dependent objects in turn according to the software package construction dependency chain based on the compiled files in the database, and mark the successfully built dependent objects until the software packages corresponding to all the dependent objects in the database are built, thereby obtaining the target software package.

[0189] Optionally, the device further comprises:

[0190] The update module is used to update the built software package to the remote software warehouse; the remote software warehouse allows other devices to access it.

[0191] Optionally, the determining module includes:

[0192] An installation submodule is used to install the software package to be analyzed using a software package management tool;

[0193] A prompt information acquisition submodule, used to acquire installation prompt information generated by the software package management tool; the installation prompt information is used to indicate the reason for the installation failure of the software package to be analyzed;

[0194] The identification submodule is used to identify the missing dependent objects of the software package to be analyzed based on the installation prompt information.

[0195] Optionally, the recording module includes:

[0196] A query submodule, used to query whether there is a historical record corresponding to the dependent object in the database;

[0197] A first recording submodule is configured to retain only the historical record if a record corresponding to the dependent object exists in the database; or, after clearing the historical record, record in the database the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed;

[0198] The second recording submodule is used to record the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in the database if the record corresponding to the dependent object does not exist in the database.

[0199] In summary, the embodiment of the present invention provides a software package construction device, which can automatically identify all directly or indirectly dependent objects missing from the first software package through iterative analysis when there is a lack of dependency in the first software package, and obtain the compiled files of the dependent objects from the second device, thereby improving the efficiency of identifying dependent objects, the efficiency and accuracy of obtaining compiled files. In addition, the embodiment of the present invention records the obtained compiled files and the dependency relationship between the dependent objects and the software to be analyzed in a database, thereby forming a construction index of the software package, and reversely constructs the software packages of each dependent object in turn according to the dependency relationship to obtain the target software package with the dependent objects missing in the first software package added, thereby avoiding problems such as information confusion and repeated construction caused by manual recording, and improving the construction efficiency and construction accuracy of the software package.

[0200] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0201] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0202] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0203] An embodiment of the present invention provides an electronic device for software package construction, the electronic device comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, which is the corresponding software package construction method in the method embodiment.

[0204] Figure 4 1 is a block diagram of an electronic device 600 for compiling according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0205] Reference Figure 4 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .

[0206] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0207] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0208] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.

[0209] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0210] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice information processing mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0211] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0212] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0213] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0214] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0215] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0216] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device (server or terminal), enables the processor to execute Figure 1 The package building method shown.

[0217] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0218] It should be understood by those skilled in the art that the embodiments of the present invention can be provided as methods, devices or computer program products. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0219] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0220] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a predictable manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0221] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0222] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0223] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0224] The software package construction method, device and electronic device provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for constructing a software package, characterized in that: Applied to a first device, the method includes: Determine the first software package with missing dependencies as the software package to be analyzed, and determine the missing dependency objects of the software package to be analyzed; Obtaining a compiled file corresponding to the dependent object from the second device; Recording the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database; Determine the compiled file of the dependent object as a new software package to be analyzed, and continue to iteratively analyze the new software package to be analyzed until the obtained compiled file does not have any missing dependent objects, and stop analyzing; According to the dependency relationship and the compiled files recorded in the database, the software packages corresponding to the dependent objects recorded in the database are reversely constructed in sequence until the software packages corresponding to all the dependent objects are constructed, thereby obtaining the target software package.

2. The method according to claim 1, characterized in that The obtaining, from the second device, a compiled file corresponding to the dependent object includes: Sending a first remote command to the second device; the first remote command is used to retrieve a compiled file corresponding to the dependent object in the second device; In a case where the compiled file exists in the second device, reading the compiled file from the second device; In the case that the compiled file does not exist in the second device, other devices that have established communication connections with the first device are traversed to obtain the compiled file corresponding to the dependent object.

3. The method according to claim 2, characterized in that The method further comprises: When the compiled file does not exist in the second device, or when the compiled file does not exist in any other device that establishes a communication connection with the first device, the compiled file corresponding to the dependent object is acquired from the web page using crawler technology.

4. The method according to claim 1, characterized in that: The obtaining, from the second device, a compiled file corresponding to the dependent object includes: Executing a first identification instruction in the second device through a remote login tool to identify an absolute path corresponding to the dependent object; the absolute path is used to fully describe a storage location of the dependent object in the second device; Based on the absolute path, a binary package corresponding to the dependent object is identified from the second device.

5. The method according to claim 1, characterized in that The software packages corresponding to the dependent objects recorded in the database are sequentially reversely constructed according to the dependency relationships and compiled files recorded in the database until the software packages corresponding to all the dependent objects are constructed to obtain the target software package, including: Determine the software packages corresponding to the dependent objects and build a dependency chain according to the dependency relationships recorded in the database; Based on the compiled files in the database, the software packages corresponding to the dependent objects are reversely constructed in sequence according to the software package construction dependency chain, and the successfully constructed dependent objects are marked until the software packages corresponding to all the dependent objects in the database are constructed to obtain the target software package.

6. The method according to claim 1, characterized in that The method further comprises: The built software package is updated to the remote software warehouse; the remote software warehouse allows other devices to access it.

7. The method according to claim 1, characterized in that The step of determining the dependent objects that are missing from the software package to be analyzed includes: Install the software package to be analyzed using a software package management tool; Acquire installation prompt information generated by the software package management tool; the installation prompt information is used to indicate the reason for the installation failure of the software package to be analyzed; Based on the installation prompt information, the dependent objects missing from the software package to be analyzed are identified.

8. The method according to claim 1, characterized in that The step of recording the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database includes: Querying the database whether there is a historical record corresponding to the dependent object; If the database contains a record corresponding to the dependent object, only the historical record is retained; or, after clearing the historical record, the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed are recorded in the database; If the record corresponding to the dependent object does not exist in the database, the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed are recorded in the database.

9. A software package construction device, characterized in that: The device is applied to a first device, and includes: A determination module, configured to determine the first software package with missing dependencies as the software package to be analyzed, and determine the missing dependency objects of the software package to be analyzed; An acquisition module, used to acquire a compiled file corresponding to the dependent object from the second device; A recording module, used for recording the compiled file of the dependent object and the dependency relationship between the dependent object and the software package to be analyzed in a database; an iterative module, configured to determine the compiled file of the dependent object as a new software package to be analyzed, and continue to iteratively analyze the new software package to be analyzed until the obtained compiled file does not contain any missing dependent object; The construction module is used to reversely construct the software packages corresponding to the dependent objects recorded in the database in turn according to the dependency relationships and compilation files recorded in the database, until the software packages corresponding to all the dependent objects are constructed to obtain the target software package.

10. The device according to claim 9, characterized in that The acquisition module comprises: A sending submodule, configured to send a first remote command to the second device; the first remote command is used to retrieve a compiled file corresponding to the dependent object in the second device; a reading submodule, configured to read the compiled file from the second device if the compiled file exists in the second device; The traversal submodule is used to traverse other devices that have established communication connections with the first device to obtain the compiled file corresponding to the dependent object when the compiled file does not exist in the second device.

11. The device according to claim 10, characterized in that The acquisition module also includes: The crawling submodule is used to use crawler technology to obtain the compiled file corresponding to the dependent object from the web page when the compiled file does not exist in the second device or the compiled file does not exist in other devices that establish communication connection with the first device.

12. The device according to claim 9, characterized in that The acquisition module comprises: An execution submodule, configured to execute a first identification instruction in the second device through a remote login tool to identify an absolute path corresponding to the dependent object; the absolute path is used to fully describe a storage location of the dependent object in the second device; The replication submodule is used to identify the binary package corresponding to the dependent object from the second device based on the absolute path.

13. The device according to claim 9, characterized in that The building blocks include: A dependency chain determination submodule, used to determine the software packages corresponding to each dependent object to build a dependency chain according to the dependency relationships recorded in the database; The construction submodule is used to reversely build the software packages corresponding to the dependent objects in turn according to the software package construction dependency chain based on the compiled files in the database, and mark the successfully built dependent objects until the software packages corresponding to all the dependent objects in the database are built, thereby obtaining the target software package.

14. An electronic device, characterized in that: The electronic device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to execute the software package building method according to any one of claims 1 to 8 by one or more processors.

15. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the processor is enabled to execute the software package building method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Distributed crawler system based on performance monitoring

    CN120653820A