CN114879978A - Software package dependency processing method, computing device and readable storage medium - Google Patents

Software package dependency processing method, computing device and readable storage medium Download PDF

Info

Publication number
CN114879978A
CN114879978A CN202210459295.3A CN202210459295A CN114879978A CN 114879978 A CN114879978 A CN 114879978A CN 202210459295 A CN202210459295 A CN 202210459295A CN 114879978 A CN114879978 A CN 114879978A
Authority
CN
China
Prior art keywords
operating system
software package
dependency relationship
software
packages
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
CN202210459295.3A
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 CN202210459295.3A priority Critical patent/CN114879978A/en
Publication of CN114879978A publication Critical patent/CN114879978A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/532Query formulation, e.g. graphical querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a processing method of a software package dependency relationship of an operating system, a computing device and a readable storage medium, wherein the method comprises the following steps: acquiring metadata packages of software packages corresponding to one or more versions of operating systems; analyzing the metadata package to obtain dependency relationship data among all software packages in the operating system; and converting the dependency relationship data into statements for creating the software package dependency relationship, and writing the statements into the graph database so as to query the dependency relationship of the software package to be queried in the graph database. According to the technical scheme of the invention, the graph data can be used for processing the software package dependency relationship of a plurality of versions of operating systems in a centralized manner, and the graph data has the characteristics of clearness, intuition, simplicity and high efficiency when being used for inquiring the dependency relationship of the software packages in the operating systems.

Description

Software package dependency processing method, computing device and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for processing a software package dependency relationship of an operating system, a computing device, and a readable storage medium.
Background
When a software package is installed in an operating system, the software package is often dependent, so that the software cannot be installed successfully.
On the existing debian platform, a default software package management tool cannot support the query of the dependency relationship among software packages. At present, there is a method for querying a dependency relationship of a software package, in which a command line is used to analyze the dependency relationship of the software package through a debrree tool. However, this method is strongly coupled to the operating system executing the command, that is, the command must be executed on the operating system to resolve the dependency relationship of the software package, the dependency relationship of the software package cannot be queried independently from the operating system, and only the dependency relationship of the software package of the current operating system version executing the command can be queried, and other operating systems and other operating system versions cannot be queried.
Therefore, a method for processing the software package dependency relationship of the operating system is needed to solve the problems in the prior art.
Disclosure of Invention
To this end, the present invention provides a method, a computing device and a readable storage medium for handling software package dependencies of an operating system to solve or at least alleviate the above-presented problems.
According to a first aspect of the present invention, there is provided a method for processing software package dependencies of an operating system, the method comprising: acquiring metadata packages of software packages corresponding to one or more versions of operating systems; analyzing the metadata package to obtain dependency relationship data among all software packages in the operating system; and converting the dependency relationship data into statements for creating the software package dependency relationship, and writing the statements into the graph database so as to query the dependency relationship of the software package to be queried in the graph database.
Optionally, in the method for processing a software package dependency relationship of an operating system according to the present invention, the method further includes: in a graph database, an instance is created for each version of an operating system to manage dependencies between software packages in one or more versions of the operating system via the graph database.
Optionally, in the method for processing a software package dependency relationship of an operating system according to the present invention, the step of parsing the metadata package to obtain dependency relationship data between all software packages in the operating system includes: analyzing key value pairs included in the metadata packet to obtain an information list, wherein the information list includes information of all software packets in the operating system; the information list is converted into dependency data among all software packages in the operating system.
Optionally, in the processing method of software package dependencies of an operating system according to the present invention, the step of converting dependency data into statements for creating software package dependencies includes: and intercepting and splicing character strings included in the dependency relationship data to obtain a statement for creating the software package dependency relationship, wherein the character strings include the name of the software package.
Optionally, in the method for processing the software package dependency relationship of the operating system according to the present invention, the step of querying the dependency relationship of the software package to be queried in the graph database includes: and querying the dependency relationship of the software package to be queried in the graph database through the statement for querying.
Optionally, in the method for processing software package dependencies of an operating system according to the present invention, the step of querying dependencies of software packages to be queried in the graph database through a query statement includes: inserting the name of the software package to be queried into a statement for querying; and inputting the statement for query into a command input window of a graph database, and querying the dependency relationship of the software package to be queried in the graph database to obtain a picture comprising all the dependency relationships of the software package to be queried.
Optionally, in the method for processing a software package dependency relationship of an operating system according to the present invention, before the step of obtaining metadata packages of software packages corresponding to one or more versions of the operating system, the method further includes: obtaining a repository source of one or more versions of an operating system; and extracting the metadata packages of the software packages corresponding to the one or more versions of the operating systems from the warehouse source.
Optionally, in the method for processing the software package dependency relationship of the operating system according to the present invention, the character string is intercepted and spliced by an echo command of the shell language.
Optionally, in the method for processing the software package dependency relationship of the operating system according to the present invention, the database is a neo4j database.
According to a second aspect of the invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions configured to be suitable for execution by the at least one processor, the program instructions comprising instructions for performing the method as described above.
According to a third 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, the dependency relationship data among all the software packages corresponding to each operating system version is obtained by acquiring and analyzing the metadata packages of the software packages corresponding to the operating systems of one or more versions, and the dependency relationship among all the software packages is written into the graph database, so that the graph database can conveniently and integrally process the dependency relationship among the software packages of the operating systems of all the versions. After the graph database storing the dependency relationships of all software packages of the operating systems of all versions is established, querying the dependency relationship of any software package in the operating system through graph data has the advantages of being clear and intuitive, obtaining the dependency relationship of the software package of the operating system without executing commands on the operating system, querying the dependency relationship of the software package of the operating system of all versions in the graph database, and being simple and efficient.
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 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a method 200 for processing software package dependencies of an operating system according to one embodiment of the invention; and
FIG. 3 is a diagram illustrating a graph output by a graph database including a graph of dependencies of software packages to be queried according to an 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.
The processing method of the software package dependency relationship of the operating system is executed in the computing device. The computing device may be any device with storage and computing capabilities, and may be implemented as, for example, a server, a workstation, or the like, or may be implemented as a personal computer such as a desktop computer or a notebook computer, or may be implemented as a terminal device such as a mobile phone, a tablet computer, a smart wearable device, or an internet of things device, but is not limited thereto.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention. It should be noted that the computing device 100 shown in fig. 1 is only an example, and in practice, the computing device for implementing the processing method of the software package dependency relationship of the operating system of the present invention may be any type of device, and the hardware configuration thereof may be the same as the computing device 100 shown in fig. 1 or different from the computing device 100 shown in fig. 1. In practice, the computing device for implementing the processing method of the software package dependency relationship of the operating system of the present invention may add or delete hardware components of the computing device 100 shown in fig. 1, and the present invention does not limit the specific hardware configuration of the computing device.
As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 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 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 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. The physical memory in the computing device is usually referred to as a volatile memory RAM, and data in the disk needs to be loaded into the physical memory to be read by the processor 104. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 can be arranged to execute instructions on an operating system with program data 124 by one or more processors 104. Operating system 120 may be, for example, Linux, Windows, etc., which includes program instructions for handling basic system services and performing hardware dependent tasks. The application 122 includes program instructions for implementing various user-desired functions, and the application 122 may be, for example, but not limited to, a browser, instant messenger, a software development tool (e.g., an integrated development environment IDE, a compiler, etc.), and the like. When the application 122 is installed into the computing device 100, a driver module may be added to the operating system 120.
When the computing device 100 is started, the processor 104 reads the program instructions of the operating system 120 from the memory 106 and executes them. The application 122 runs on top of the operating system 120, utilizing the operating system 120 and interfaces provided by the underlying hardware to implement various user-desired functions. When the user starts the application 122, the application 122 is loaded into the memory 106, and the processor 104 reads the program instructions of the application 122 from the memory 106 and executes the program instructions.
The computing device 100 also includes a storage device 132, the storage device 132 including removable storage 136 and non-removable storage 138, the removable storage 136 and the non-removable storage 138 each connected to the storage interface bus 134.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication 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 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
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.
In the computing device 100 according to the invention, the program data 124 includes instructions for performing the processing method of the software package dependencies of the operating system of the invention, which may instruct the processor 104 to perform the processing method of the software package dependencies of the operating system of the invention.
FIG. 2 shows a flow diagram of a method 200 for processing software package dependencies of an operating system according to one embodiment of the invention. The method 200 is suitable for execution in a computing device, such as the computing device 100 described above. As shown in fig. 2, the method 200 begins at step S210.
In step S210, metadata packages of software packages corresponding to one or more versions of the operating system are obtained.
The metadata of the software package corresponding to the operating system, that is, the metadata package, records the relevant information of the software package of the operating system, and includes but is not limited to: package name, version number, dependent packages and version numbers, conflicting packages and version numbers, software functional description, software classification, software upstream address, software size, software architecture, software maintainer, and the like. The dependency relationship in the invention refers to the relationship of dependency, conflict and the like between software packages of the operating system. Where a dependency, such as installing software package a, presupposes that software package B must be installed first. A conflict relationship, such as installing software package C, presupposes that software package D must be uninstalled first. It should be noted that the dependency relationships referred to in the present invention include not only the dependency relationships between software packages, but also conflict relationships between software packages, which are collectively referred to as dependency relationships.
According to one embodiment of the invention, metadata packages for one or more versions of an operating system may be obtained from a repository source for each operating system. Specifically, each version of operating system has a corresponding repository source, and a metadata package exists in each repository source, and is usually stored in the/var/lib/apt/lists directory, where the metadata package includes metadata information of all software packages of the version of the operating system corresponding to the repository source. By obtaining a repository source of one or more versions of an operating system, metadata packages for one or more versions of the operating system may be extracted from the repository source. The metadata package comprises a plurality of key value pairs, each row stores one key value pair, the key value pairs are divided through colon, the left side of the colon is a metadata name, the right side of the colon is a value corresponding to the metadata name, and dependency relationship data among all software packages can be obtained by analyzing the key value pairs of the metadata package.
The operating system may be, for example, a Linux, a Debian, a deepin, or a UOS operating system, but is not limited thereto, and may also be another operating system, which is not limited in the present invention. For each operating system, there may be multiple versions, for example: the Debian operating system has at least three release versions, such as a stable version (stable), a testing version (testing), and an unstable version (unstable).
Subsequently, in step S220, the metadata package of the software package corresponding to the obtained one or more versions of the operating system is analyzed, so as to obtain dependency relationship data between all software packages in the operating system.
And for each of the acquired one or more versions of operating systems, executing the step of parsing the metadata package. Optionally, since each operating system has one or more versions, if only one version of one operating system is acquired, the step of parsing the metadata package is performed only for that version of that operating system. If multiple versions of an operating system are obtained, the step of parsing the metadata package is performed for each version of the operating system.
Optionally, an instance is created for each version of the operating system, i.e., each version of each operating system, in the graph database, so as to manage the dependencies among all software packages in one or more versions of the operating system through the graph database. In this way, a graph database can simultaneously manage multiple operating systems, multiple operating systems of different architectures, and different versions of each operating system. Preferably, the graph database is the neo4j database. Other graph databases can be selected, and the selection of the specific graph database is not particularly limited by the invention.
And analyzing the key value pairs included in the metadata packet to obtain an information list, wherein the information list includes information of all software packets in the operating system. The following is an exemplary list of information:
Package:tpm2-abrmd
Version:2.1.0-1
Depends:libc6(>=2.14),libglib2.0-0(>=2.37.3),libtss2-esys0
as can be seen from this exemplary list of information, the package name is tpm2-abrmd, the version number is 2.1.0-1, the dependency list includes libc6 (versions 2.14 and above), libglib2.0-0 (versions 2.37.3 and above), libtss2-esys0 (either version).
The list of information is converted into dependency data between all software packages in the operating system.
The value corresponding to Depends describes the dependency relationship of the software package according to the convention of the apt management software package. If the software package has a plurality of dependency relationships, a plurality of other software packages (hereinafter referred to as dependency packages) on which the software package depends are divided by commas, and if the dependency packages have version requirements, they are described by parentheses. By converting the above exemplary information list, the following exemplary dependency data can be resolved:
tpm2-abrmd (2.1.0-1) dependent libc6(> -2.14)
tpm2-abrmd (2.1.0-1) depends on libglib2.0-0(> < 2.37.3)
tpm2-abrmd (2.1.0-1) was dependent on libtss2-esys0
From this exemplary dependency data, it can be seen that the tpm2-abrmd package of version 2.1.0-1 depends on libc6 packages above version 2.14, the tpm2-abrmd package of version 2.1.0-1 depends on libglib2.0-0 packages above version 2.37.3, and the tpm2-abrmd package of version 2.1.0-1 depends on libtss2-esys0 packages of either version.
Subsequently, in step S230, the dependency relationship data is converted into a statement for creating the software package dependency relationship, and written into the graph database, so as to query the dependency relationship of the software package to be queried in the graph database.
According to the embodiment of the invention, the sentence for creating the software package dependency relationship is obtained by intercepting and splicing the character strings included in the dependency relationship data, wherein the character strings include the name of the software package. For example, truncating the strings included in the above exemplary dependency data may result in "tpm 2-abrmd," "2.1.0-1," "libc 6," "2.14," "libglib 2.0-0," "2.37.3," "libtss 2-esys0," and then concatenating the strings to the corresponding locations of the create statement used to create the package dependency. Alternatively, interception and concatenation of the character strings can be achieved through echo commands of the shell language.
The following is an exemplary translated statement for creating software package dependencies:
create(tpm2abrmd:pkg{name:"tpm2-abrmd",version:"2.1.0-1"});
create(libc6:pkg{name:"libc6",version:"2.28.12-1+eagle"});
create(libglib200:pkg{name:"libglib2.0-0",version:"2.58.3.5-1+eagle"});
create(libtss2esys0:pkg{name:"libtss2-esys0",version:"2.1.0-4"});
create(tpm2abrmd)-[:DEPENDS{version:"2.14",num:"1"}]->(libc6),
(tpm2abrmd)-[:DEPENDS{version:"2.37.3",num:"1"}]->(libglib200),
(tpm2abrmd)-[:DEPENDS]->(libtss2esys0);
first, four new nodes are created, with node names tpm2abrmd (corresponding to the package name tpm2-abrmd), libc6 (corresponding to the package name libc6), libglib200 (corresponding to the package name libglib2.0-0), and libtss2esys0 (corresponding to the package name libtss2-esys0), with corresponding versions 2.1.0-1, 2.28.12-1+ eagle, 2.58.3.5-1+ eagle, and 2.1.0-4, respectively. Then, the relations among the nodes are created through statements for creating the software package dependency relations, and the relations among the nodes are specifically tpm2-abrmd software package dependency 2.14 version libc6 software package, tpm2-abrmd software package dependency 2.37.3 version libglib2.0-0 software package, and tpm2-abrmd software package dependency libtss2-esys0 software package.
The dependency data is converted into statements for creating software package dependencies, and dependencies between software packages can be written into the graph database by the statements for creating software package dependencies. Therefore, the dependency relationship of the software package to be queried can be queried through the graph database, the dependency relationship of the software package does not need to be analyzed through executing commands on the operating system, and the purpose of querying the dependency relationship of the software package independently of the operating system is achieved. The user can inquire the required dependency relationship of the software package to be inquired in the graph database, not only can inquire the dependency relationship of any software package in the operating system used by the computing device, but also can inquire the dependency relationship of any software package in other operating systems. According to the processing method for the software package dependency relationship of the operating system, the graph database can manage the dependency relationship of the software packages in the multiple versions of the multiple operating systems through the multiple database instances, a user can inquire the dependency relationship of any software package in the multiple versions of the multiple operating systems in the graph database without logging in a server for inquiry, and the processing method for the software package dependency relationship of the operating system is more convenient, quicker, safer and more efficient.
The following describes a method for querying the dependency relationship of a software package to be queried in a graph database.
According to the embodiment of the invention, the dependency relationship of the software package to be queried in the graph database is queried through the statement for querying. And inserting the name of the software package to be queried into a statement for querying. Alternatively, the signal may be transmitted by match (n) - [: the terms "DEPENDS ] - > (p) RETURN (n) query the dependency relationship of the software package to be queried, and replace n with the name of the software package to be queried, for example: match (tpm2abrmd) - [: DEPENDS ] - > (p) return tpm2 abrmd. Then, the sentence for query is input into a command input window of the graph database, namely the dependency relationship of the software package to be queried in the graph database can be queried, and the graph database outputs pictures including all the dependency relationships of the software package to be queried. Alternatively, the aforementioned statement for query may also be match (n) - [: DEPENDS ] - > (p) RETURN (n), p limit 10, replace n by the name of the package to be queried, for example: after increasing the p limit 10, the sentence for query is adopted to query the dependency relationship of the tpm2-abrmd software package, and the output dependency relationship is limited to 10 items, wherein the number 10 after the limit can be replaced by other numbers so as to limit the output dependency relationship to a specific number of items. FIG. 3 is a diagram illustrating a graph output by a graph database including a graph of dependencies of software packages to be queried according to an embodiment of the invention. The sentence match (tpm2abrmd) - [: DESENDS ] - > (p) return tpm2abrmd, p limit 10 for query is input into a command input window of a graph database, the graph database outputs a picture comprising the dependency relationship of tpm2-abrmd software packages as shown in FIG. 3, and the three software packages, namely libglib2.0-0, libc6 and libtss2-esys0, of the to-be-queried software package tpm2-abrmd are depended on the picture. The libtss2-esys0 package also relies on the libtss2-udev and libgcrypt20 packages.
The dependency relationship of the software packages to be inquired and output through the graph database is represented by the nodes, the dependency relationship is represented by the arrows, the dependency relationship among the software packages can be clearly and intuitively presented through the direction of the arrows, one software package depends on which software package or packages (dependency packages), and the dependency packages with different dependency relationships can be presented in the output of the graph database. The method has the advantages that the dependency relationship of the software package to be inquired is inquired through the graph database, the graph database can be used for inquiring the software packages of different versions of various operating systems stored in the graph database, the dependency relationship does not depend on the operating system of specific computing equipment, and the flow of inquiring and graph database feedback inquiry results is simple and efficient.
According to the technical scheme of the invention, the dependency relationship data among all the software packages corresponding to each operating system version is obtained by acquiring and analyzing the metadata packages of the software packages corresponding to the operating systems of one or more versions, and the dependency relationship among all the software packages is written into the graph database, so that the graph database can conveniently and integrally process the dependency relationship among the software packages of the operating systems of all the versions. After the graph database storing the dependency relationships of all software packages of the operating systems of all versions is established, querying the dependency relationship of any software package in the operating system through graph data has the advantages of being clear and intuitive, obtaining the dependency relationship of the software package of the operating system without executing commands on the operating system, querying the dependency relationship of the software package of the operating system of all versions in the graph database, and being simple and efficient.
Furthermore, the technical scheme of the invention creates an example in the graph database for each version of the operating system, so that the graph database can simultaneously manage the dependency relationship of all the software packages in the operating systems of multiple versions, the centralized management of the dependency relationship of all the software packages in each operating system and each version of each operating system can be realized, a mode for uniformly and conveniently inquiring the dependency relationship of each operating system and each version of the software packages in the graph database is provided for a user, and the storage and inquiry efficiency of the dependency relationship of the software packages is greatly improved.
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 mobile terminal generally includes 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 inventive method of handling software package dependencies of an operating system according to instructions in said 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 in the embodiments may be combined into one module or unit or component, and furthermore, 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.
Moreover, those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following 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 with respect to the scope of the invention, as defined in the appended claims.

Claims (10)

1. A method of processing software package dependencies of an operating system, the method comprising:
acquiring metadata packages of software packages corresponding to one or more versions of operating systems;
analyzing the metadata package to obtain dependency relationship data among all software packages in the operating system;
and converting the dependency relationship data into a statement for creating the software package dependency relationship, and writing the statement into a graph database so as to query the dependency relationship of the software package to be queried in the graph database.
2. The method of claim 1, wherein the method further comprises:
in the graph database, an instance is created for each version of the operating system to manage dependencies between software packages in one or more versions of the operating system through the graph database.
3. The method according to claim 1 or 2, wherein the step of parsing the metadata package to obtain dependency data between all software packages in the operating system comprises:
analyzing key value pairs included in the metadata packet to obtain an information list, wherein the information list includes information of all software packets in the operating system;
and converting the information list into dependency relationship data among all software packages in the operating system.
4. The method of any of claims 1 to 3, wherein the step of converting the dependency data into statements for creating software package dependencies comprises:
and intercepting and splicing character strings included in the dependency relationship data to obtain statements used for creating the software package dependency relationship, wherein the character strings include the name of the software package.
5. The method according to any one of claims 1 to 4, wherein said step of querying for dependencies of software packages to be queried in said graph database comprises:
inserting the name of the software package to be queried into a statement for querying;
and inputting the sentence for query into a command input window of the graph database, and querying the dependency relationship of the software package to be queried in the graph database to obtain a picture comprising all the dependency relationships of the software package to be queried.
6. The method of any of claims 1 to 5, wherein prior to the step of obtaining metadata packages for software packages corresponding to one or more versions of an operating system, further comprising:
obtaining a repository source of one or more versions of an operating system;
and extracting metadata packages of the software packages corresponding to the one or more versions of the operating systems from the warehouse source.
7. The method of claim 4, wherein the string is intercepted and spliced by echo commands of the shell language.
8. The method according to any one of claims 1 to 7, wherein said graph database is the neo4j database.
9. 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 of any of claims 1 to 8.
10. 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 to 8.
CN202210459295.3A 2022-04-27 2022-04-27 Software package dependency processing method, computing device and readable storage medium Pending CN114879978A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210459295.3A CN114879978A (en) 2022-04-27 2022-04-27 Software package dependency processing method, computing device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210459295.3A CN114879978A (en) 2022-04-27 2022-04-27 Software package dependency processing method, computing device and readable storage medium

Publications (1)

Publication Number Publication Date
CN114879978A true CN114879978A (en) 2022-08-09

Family

ID=82671657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210459295.3A Pending CN114879978A (en) 2022-04-27 2022-04-27 Software package dependency processing method, computing device and readable storage medium

Country Status (1)

Country Link
CN (1) CN114879978A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117891473A (en) * 2024-03-14 2024-04-16 麒麟软件有限公司 Method for integrated development environment plug-in dependency management and plug-in dependency manager
CN117891473B (en) * 2024-03-14 2024-05-31 麒麟软件有限公司 Method for integrated development environment plug-in dependency management and plug-in dependency manager

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117891473A (en) * 2024-03-14 2024-04-16 麒麟软件有限公司 Method for integrated development environment plug-in dependency management and plug-in dependency manager
CN117891473B (en) * 2024-03-14 2024-05-31 麒麟软件有限公司 Method for integrated development environment plug-in dependency management and plug-in dependency manager

Similar Documents

Publication Publication Date Title
US20220253298A1 (en) Systems and methods for transformation of reporting schema
US11620117B2 (en) Systems and methods for code clustering analysis and transformation
US11188319B2 (en) Systems and methods for entry point-based code analysis and transformation
US10481884B2 (en) Systems and methods for dynamically replacing code objects for code pushdown
US8799299B2 (en) Schema contracts for data integration
US8887135B2 (en) Generating test cases for functional testing of a software application
US11062022B1 (en) Container packaging device
US9218137B2 (en) System and method for providing data migration services
US20170220613A1 (en) Systems and methods for database orientation transformation
CN109313547B (en) Query optimizer for CPU utilization and code reformulation
US9990213B2 (en) Systems and methods for data brick creation and use
CN112379888A (en) Code change analysis method
CN113918602A (en) Data caching method and device and electronic equipment
CN113204385A (en) Plug-in loading method and device, computing equipment and readable storage medium
US9507567B2 (en) Facilitating use of techniques implemented by external library functions in process definitions of analytical applications
US9201937B2 (en) Rapid provisioning of information for business analytics
CN114879978A (en) Software package dependency processing method, computing device and readable storage medium
CN112181429B (en) Information processing method and device and electronic equipment
CN113535650A (en) File naming method and computing device
Balbaert Julia 1.0 Programming: Dynamic and high-performance programming to build fast scientific applications
CN111913814B (en) Object copying method and computing device
US11893120B1 (en) Apparatus and method for efficient vulnerability detection in dependency trees
CN114489894A (en) Client user interface updating method and device, client and server
CN114840744A (en) Software recommendation method and device, computing equipment and readable storage medium
CN113946517A (en) Abnormal data determination method and device, electronic equipment and storage medium

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