Software repository file path coverage conflict detection method and device, equipment and medium
By merging the software package installation file lists in the software repository and performing group installation verification, the problem of difficult detection of file path overwriting conflicts in the software repository is solved, achieving efficient conflict location and accurate conflict detection.
Patent Information
- Application Number
- CN202510954623.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-17
AI Technical Summary
In software repositories, it is difficult to detect file path conflicts between different software packages, which can lead to installation failures, and existing methods consume a lot of manpower and system resources.
Extract the package installation file list from each software repository, merge them into a total installation file list, find packages with the same path and group them, perform pairwise installation verification, and determine conflicts based on the installation results.
It improves the accuracy and efficiency of file path conflict detection, enabling rapid location of conflict points, reducing detection difficulty, and saving resources.
Smart Images

Figure CN120803941A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of file path conflict detection, and in particular to a software repository file path conflict detection method, device, equipment and medium. BACKGROUND
[0002] When using a software repository (a package management system of a Linux distribution), some conflicts between software packages in the software repository are not easy to be found and detected, which is mainly related to the design of the package management mechanism and the complexity of the dependency relationship. Among them, the package conflict caused by file path coverage often occurs, and multiple software packages may generate the same path file (such as / usr / bin / example.txt), which causes mutual coverage during installation, and causes package conflict to cause installation failure error.
[0003] When detecting the file path coverage conflict of the software repository, it is only possible to find out whether there is a real conflict by installing the software package, but since the software repository often provides a large number of software packages for various actual production environments, and different software repositories are often used for different use requirements, it is difficult to find the phenomenon that different software packages use the same file path, and even if testing or verification is performed, a large amount of manpower and system resources are consumed. SUMMARY
[0004] The embodiments of the present application provide a software repository file path coverage conflict detection method, device, equipment and medium, to solve the technical problem that it is difficult to detect the file path coverage conflict between different software packages.
[0005] In a first aspect, the embodiments of the present application provide a software repository file path coverage conflict detection method, comprising:
[0006] S101, extracting the software package installation file list of each software repository to be detected, integrating the software package installation file list of all software repositories to be detected, and forming a total installation file list;
[0007] S102, traversing the total installation file list, finding software packages with the same installation file path, grouping the software packages according to the installation file path, dividing the software packages with the same installation file path in the same group, and forming a plurality of path conflict package groups;
[0008] S103, grouping the software packages contained in each path conflict package group two by two, for the path conflict package group containing more than 2 software packages, grouping any two software packages in the group, for the path conflict package group containing not more than 2 software packages, grouping the two software packages in the group, and forming a plurality of conflict package pairs to be verified;
[0009] S104, respectively, installing verification is carried out on each to-be-verified conflict package pair, and two software packages in the to-be-verified conflict package pair are installed, and whether there is a file path covering conflict in each to-be-verified conflict package pair is determined according to whether the installation is successful, and a conflict file list is formed.
[0010] Further, the S104 comprises:
[0011] The two software packages in each to-be-verified conflict package pair are installed respectively, and installation results of the two software packages are collected respectively;
[0012] If the installation result is successful and there is no abnormal output, it indicates that the two software packages in the current to-be-verified conflict package pair do not have a file path covering conflict.
[0013] If the installation result is failed, a reason for the installation failure is found according to an installation log, and the installation log prompts a file conflict, so that the two software packages in the current to-be-verified conflict package pair have a file path covering conflict.
[0014] Further, the method further comprises:
[0015] Before the installation verification is performed, homologous verification is performed on each to-be-verified conflict package pair, and a homologous conflict package pair is formed.
[0016] All homologous conflict package pairs in the to-be-verified conflict package pair are removed.
[0017] Further, the S101 further comprises:
[0018] When it is detected that there is a to-be-detected software repository, metadata of a locally cached software repository is cleaned up.
[0019] Metadata of each to-be-detected software repository is cached again.
[0020] Further, the S101 further comprises:
[0021] After all software package installation file lists of the to-be-detected software repositories are extracted, all software package installation file list files are checked to determine whether there is a compressed software package installation file list file.
[0022] If there is a compressed software package installation file list file, the compressed software package installation file list file is decompressed, and then all software package installation file list files are merged to form a total installation file list.
[0023] Further, the S103 comprises:
[0024] For a path conflict package group containing more than two software packages, a binary combination is used to combine any two software packages in the path conflict package group to form a plurality of to-be-verified conflict package pairs.
[0025] Further, the S102 further includes:
[0026] In the total installation file list, after finding the software packages with the same installation file path, the software package name check is performed on each group of software packages with the same installation file path, and the software packages with the same software package name are all removed.
[0027] In a second aspect, an embodiment of the present application provides a software warehouse file path coverage conflict detection device, which comprises:
[0028] A total installation file list generation module is configured to extract a software package installation file list of each software warehouse to be detected, integrate the software package installation file lists of all software warehouses to be detected, and form a total installation file list.
[0029] An installation file path comparison module is configured to traverse the total installation file list, find software packages with the same installation file path, divide the software packages with the same installation file path into the same group, and form a plurality of path conflict package groups.
[0030] A conflict software package group comparison module is configured to compare the software packages in each path conflict package group in pairs, and form a plurality of to-be-verified conflict package pairs.
[0031] An installation verification module is configured to perform installation verification on each to-be-verified conflict package pair, determine whether there is a file path coverage conflict in each to-be-verified conflict package pair according to whether the installation is successful, and form a conflict file list.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, which comprises:
[0033] One or more processors;
[0034] A storage device configured to store one or more programs,
[0035] When the one or more programs are executed by the one or more processors, the one or more processors implement the above software warehouse file path coverage conflict detection method.
[0036] In a fourth aspect, an embodiment of the present application provides a storage medium containing computer executable instructions, which are used to execute the above software warehouse file path coverage conflict detection method when executed by a computer processor.
[0037] The embodiment of the application provides a software warehouse file path coverage conflict detection method, device, equipment and medium, the method extracts the software package installation file list of each but the detected software warehouse and combines the total installation file list, finds the software package with the same installation file path in the total installation file list, forms a path conflict package group, then performs installation verification on the software package pair formed by the to-be-verified conflict package pair in the path conflict package group, and judges whether there is a file path coverage conflict between the software packages according to whether the installation verification is successful. By combining into a total installation file list and finding the same installation file path, the test range is reduced, then the software packages are grouped, the software packages with conflicts can be accurately positioned, the detection precision is improved, the positioning difficulty is reduced, and the file path conflict point can be quickly positioned. BRIEF DESCRIPTION OF DRAWINGS
[0038] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and are used to interpret the illustrative embodiments of the present application and their descriptions, and do not constitute improper limitations to the present application. In the drawings:
[0039] Figure 1 A flowchart of a software warehouse file path coverage conflict detection method according to the first embodiment of the present application;
[0040] Figure 2 A grouping schematic diagram of a path conflict package group according to the first embodiment of the present application;
[0041] Figure 3 A schematic diagram of a conflict file list according to the first embodiment of the present application;
[0042] Figure 4 A flowchart of a software warehouse file path coverage conflict detection method according to the second embodiment of the present application;
[0043] Figure 5 A schematic diagram of an installation log according to the second embodiment of the present application;
[0044] Figure 6 A flowchart of a software warehouse file path coverage conflict detection method according to the third embodiment of the present application;
[0045] Figure 7 A structural schematic diagram of a software warehouse file path coverage conflict detection device according to the fourth embodiment of the present application;
[0046] Figure 8 A structural diagram of an electronic device according to the fifth embodiment of the present application. DETAILED DESCRIPTION
[0047] The application will be described in further detail below with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not to be used to limit the scope of the application. In addition, it should be noted that, for the sake of brevity, only the portions of the drawings that are needed to understand the application have been shown in the drawings.
[0048] A software repository (a package management system of a Linux distribution) is a repository for storing software packages, including application programs, libraries, drivers, etc., and can download and install software packages from the software repository according to the needs of a user. During installation, it automatically parses the dependency relationship of the software package and installs the corresponding files in the specified path. When installing software packages using a software repository, due to the design of the package management mechanism of the software repository, the functions and dependency relationships of different software packages, etc., there is a possibility that different software packages will install files in the same file path when installed, thereby causing file path conflict, resulting in installation failure or file unavailability.
[0049] Embodiment one
[0050] Figure 1 A flowchart of a software repository file path conflict detection method according to Embodiment one of the application, the present embodiment combines the software package installation file lists of the software repositories, finds software packages with the same installation file path and groups them, and performs installation verification on each pair of software packages in each group to check the file path conflict between the software packages, and specifically includes the following steps:
[0051] S101, extract the software package installation file list of each software repository to be detected, integrate the software package installation file lists of all software repositories to be detected to form a total installation file list.
[0052] Each software repository has an installation file list file for saving the file paths to be generated when installing all software packages in the software repository, which records the paths in which each software package is installed when installed. The extracted installation file list of each software repository is combined to form a list, i.e., a total installation file list. The total installation file list contains the paths in which all software packages of all software repositories will be installed when installed. When forming the total installation file list, different package managers have different software package management logic or formats, and the list file can be cached to the local from the server by the package manager, and then the multiple local files can be combined.
[0053] S102, traverse the total installation file list, find software packages with the same installation file path, group the software packages according to the installation file path, divide the software packages with the same installation file path into the same group, and form multiple path conflict package groups.
[0054] Traverse all the installation file paths in the total installation file list to find the same installation file path and the software packages corresponding to the installation file path. Group the found software packages according to the installation file path, and divide the software packages with the same installation file path into the same group to form multiple path conflict package groups. If a software package corresponds to multiple installation file paths with the same situation at the same time, each path conflict package group will include the software package during grouping, and each path conflict package group represents multiple software packages with the same installation file path. For example, Figure 2 As shown, packages A and B share the same / etc / common path, so they are grouped together. Packages A, B, and C share the same / user / bin / abc_common path, so they are grouped together. The same package can exist in different groups, and a single package can exist in multiple groups with conflicting paths. It's important to note that all paths mentioned in this solution are absolute paths, meaning they ultimately point to a specific directory (e.g., / user / bin) or file (e.g., / user / bin / abc_common.com).
[0055] S103: Pair the software packages contained in each path conflict package group. For a path conflict package group containing more than two software packages, pair any two software packages in the group. For a path conflict package group containing no more than two software packages, pair two software packages in the group to form multiple conflict package pairs to be verified.
[0056] The packages within each conflicting package group are grouped together to form multiple package pairs. If a package group contains only two packages, these two packages are grouped together as a package pair. If a package group contains more than two packages, the packages within the group are grouped together into multiple pairs of two packages each, forming multiple conflicting package pairs to be verified. A package pair is a pair of two packages, and each package pair contains a combination of two packages.
[0057] S104: perform installation verification on each conflicting package pair to be verified, and simultaneously install the two software packages in the conflicting package pair to be verified. Based on whether the installation is successful, determine whether each conflicting package pair to be verified has a file path overwriting conflict, and form a conflict file list.
[0058] The installation verification is performed on the two software packages in each to-be-verified conflict package pair, and the two software packages in each package pair are installed on the same system (the same architecture of the operating system version, for example, the Galaxy Kirin server V10SP3) in any order. According to the installation results of the two software packages after installation, it is determined whether there is a file path covering conflict between the two software packages. If the two software packages are successfully installed, there is no conflict between the two software packages in the current to-be-verified conflict package pair. If the first software package is successfully installed, the second software package fails to be installed, or the installation of the two software packages in the package pair fails to prompt the conflict, it indicates that there is a file path covering conflict between the two software packages. The current to-be-verified conflict package pair is recorded as a conflict package pair. The conflict file list is formed by using all the conflict package pairs. As shown in Figure 3 , the conflict file list records the two software packages in each group having a conflict relationship, and can accurately locate the conflict between the software packages.
[0059] In this embodiment, the installation file lists of the software packages in each but detection software warehouse are extracted and combined into a total installation file list. The software packages having the same installation file path are found in the total installation file list, a path conflict package group is formed, and then the to-be-verified conflict package pairs formed by the two-by-two grouping of the software packages in the path conflict package group are subjected to installation verification. Whether there is a file path covering conflict between the software packages is determined according to whether the installation verification is successful. By combining into a total installation file list and finding the same installation file path, the test range is reduced. Then, by grouping the software packages, the software packages having a conflict can be accurately located, the detection accuracy is improved, the positioning difficulty is reduced, and the file path conflict point can be quickly located.
[0060] In an optional implementation of this embodiment, the S103 includes:
[0061] For the path conflict package group containing more than two software packages, the binary combination is used to combine any two software packages in the path conflict package group, to form a plurality of to-be-verified conflict package pairs.
[0062] When the software packages in the path conflict package group are grouped, for the package group containing more than two software packages, the binary combination is used for grouping. The order of the software package grouping is not limited. Any two software packages are combined, the combination mode is not repeated, and the same software package can exist in a plurality of combined package pairs, that is, the permutation and combination mode is used to generate to-be-verified conflict package pairs. n is the number of software packages contained in the path conflict package group, and 2 is the number of combined software packages, that is, a package pair contains two combined software packages.
[0063] Optionally, the S102 further includes:
[0064] In the total installation file list, after finding the packages with the same installation file path, the package name check is performed on each group of packages with the same installation file path, and the packages with the same package name are all removed.
[0065] In the software warehouse, there are often multiple different versions of the same package, and there are often differences in some functions and installation files between different versions of the same package. However, in order to reduce the burden of installation verification, after obtaining the total installation file list, when the packages with the same installation file path are found in the total installation file list, in each group of packages with the same installation file path, the packages with the same package name are found and removed, and are not divided into the path conflict package group, so as to avoid repeated verification of the homologous packages, reduce the installation verification difficulty, and improve the positioning accuracy of the file path coverage conflict.
[0066] Embodiment Two
[0067] Figure 4 The flowchart of the software warehouse file path coverage conflict detection method described in Embodiment Two of the application, the present embodiment is optimized on the basis of the above-mentioned embodiment. In the present embodiment, S104 is specifically optimized as follows:
[0068] The two software packages in each to-be-verified conflict package pair are installed respectively, and the installation results of the two software packages are collected respectively;
[0069] If the installation result is successful and there is no abnormal output, it indicates that the two software packages in the current to-be-verified conflict package pair do not have file path coverage conflict;
[0070] If the installation result is failed, the installation log is searched according to the installation failure reason. If the installation log prompts file conflict, it indicates that the two software packages in the current to-be-verified conflict package pair have file path coverage conflict.
[0071] Correspondingly, the software warehouse file path coverage conflict detection method provided in the present embodiment specifically includes:
[0072] S201, extracting the software package installation file list of each to-be-detected software warehouse, integrating the software package installation file lists of all to-be-detected software warehouses, and forming a total installation file list.
[0073] S202, traversing the total installation file list, finding the packages with the same installation file path, grouping the packages according to the installation file path, dividing the packages with the same installation file path into the same group, and forming multiple path conflict package groups.
[0074] S203, the software packages contained in each path conflict package group are paired two by two, for the path conflict package group containing more than 2 software packages, any two software packages in the group are paired, for the path conflict package group containing no more than 2 software packages, the two software packages in the group are paired, forming a plurality of to-be-verified conflict package pairs.
[0075] S204, the two software packages in each to-be-verified conflict package pair are installed respectively, and the installation results of the two software packages are collected respectively.
[0076] The installation verification is the most direct and effective way to verify whether there is a conflict between software packages. Compared with other ways of analyzing software packages, it is relatively simple, requires fewer tools, and the verification process is not complex, which can save part of the resource occupation. After installing the two software packages in each to-be-verified conflict package pair respectively, the installation results of the two software packages are collected.
[0077] S205, if the installation result is successful and there is no abnormal output, it indicates that the two software packages in the current to-be-verified conflict package pair do not have file path overlap conflict.
[0078] According to the collected installation results of the two software packages, if both software packages are installed successfully, it indicates that there is no conflict between the two software packages in the current package pair, and the files can be successfully installed to the specified path.
[0079] If the installation result is failed, the installation log is checked to find the installation failure reason. If the installation log prompts file conflict, it indicates that the two software packages in the current to-be-verified conflict package pair have file path overlap conflict.
[0080] If the installation of the two software packages fails, it indicates that there is a file conflict between the two installation packages. Through the installation log, the reason for the installation failure can be found. If the installation log prompts file conflict, as shown in Figure 5 The red box part in the figure indicates that there is a file path overlap conflict between the two software packages in the current to-be-verified conflict package pair, that is, both software packages will install files to the same file path during installation, the file names are the same, but in essence the two files with the same file name are different files (different code and function), so a conflict will occur, resulting in software package installation failure and affecting subsequent use. After the installation of the previous software package is successful, the installation of the latter software package fails. Even if both software packages are installed successfully due to some reason, the previous software package will be affected by the file overlap during the installation of the latter software package, resulting in that the installed software cannot be used normally.
[0081] By installing and verifying the two software packages in each to-be-verified conflict package pair, the embodiment can accurately detect software packages with file path overlap conflict, reduce detection difficulty, and conveniently and quickly locate the file path conflict point.
[0082] Specifically, before performing the installation verification, the homologous verification is performed on each conflict package pair to be verified to form a homologous conflict package pair.
[0083] In order to reduce the number of software packages for installation verification, before performing the installation verification, the homologous compilation verification is performed on the two software packages in each conflict package pair to be verified. When the two software packages in the conflict package pair to be verified use the same installation file path, it does not necessarily mean that there is a real conflict between the two software packages. There can be two software packages using the same compilation encapsulated multiple different named packages, because they come from the same compilation, even if they are packaged in multiple packages, they will not conflict, and can be used by multiple software packages or as a dependency. For example, it can be implemented by a system command according to different query source code package methods provided by different package managers, for example, the rpm format package uses dnf repoquery--queryformat"%{source_name}"--quiet <package-name>; deb-format packages use apt-cache show <package-name>|grep -m1 "Source:". Mark the conflicting package pairs whose two packages have passed the same-source compilation verification as conflicting package pairs with the same source.
[0084] Eliminate all conflicting package pairs of the same origin from the conflicting package pairs to be verified.
[0085] Since the conflicting packages of the same origin are from the same compiled and packaged package, there will be no conflict between the two software packages. The conflicting packages of the same origin will be removed from the conflicting packages to be verified, and no subsequent installation verification will be performed on the conflicting packages of the same origin. This can greatly save the time required for installation verification, improve installation verification efficiency, narrow the test scope, and improve the accuracy of the inspection results to a certain extent.
[0086] Example 3
[0087] Figure 6 This is a flowchart of a method for detecting a software warehouse file path overlay conflict according to a third embodiment of the present invention. This embodiment is optimized based on the above embodiment. In this embodiment, S101 further includes:
[0088] When a software repository to be detected is detected, the metadata of the locally cached software repository is cleaned up;
[0089] Re-cache the metadata for each repository to be checked.
[0090] Accordingly, the software repository file path overlay conflict detection method provided in this embodiment specifically includes:
[0091] S301: When it is detected that there is a software warehouse to be detected, the metadata of the locally cached software warehouse is cleared.
[0092] In order to ensure that the software package installation file list obtained from the software warehouse is the latest, it is necessary to first detect which software warehouses are available. After detecting the software warehouses, clear the metadata of the locally cached software warehouses and clear the old information to prepare for caching new data.
[0093] S302: Re-cache the metadata of each software repository to be detected.
[0094] After clearing the local cache, the metadata for all detected repositories is re-cached locally for subsequent extraction of package installation lists from each repository. Clearing the local cache and re-caching ensures that the locally cached repository metadata is up to date, ensuring the accuracy of subsequent file path overwrite conflict detection results.
[0095] S303, extract the software package installation file list of each software repository to be detected, integrate the software package installation file lists of all software repositories to be detected to form a total installation file list.
[0096] Specifically, after extracting the software package installation file list of all software repositories to be detected, check all software package installation file list files to determine whether there is a compressed software package installation file list file.
[0097] In order to ensure that the software package installation file lists of all software repositories can be combined, it is necessary to first check whether there is a compressed file in the extracted installation file list file. Since the number of software packages in the software repository is large, storage space can be saved by compression, but the compressed file cannot be combined like the list file, so it is necessary to first check whether there is a compressed software package installation file list file.
[0098] If there is a compressed software package installation file list file, it is decompressed, and then all software package installation file list files are combined to form a total installation file list.
[0099] The found compressed software package installation file list file is decompressed to generate a normal list file, and then all decompressed normal list files and list files that do not need to be decompressed are combined to form a total installation file list. In this way, the total installation file list will contain the correct installation file path of all software repositories.
[0100] S304, traverse the total installation file list to find software packages with the same installation file path, group the software packages according to the installation file path, and divide the software packages with the same installation file path into the same group to form multiple path conflict package groups.
[0101] S305, for each path conflict package group, two-by-two grouping is performed, for a path conflict package group containing more than two software packages, any two software packages in the group are grouped, for a path conflict package group containing not more than two software packages, the two software packages in the group are grouped, to form multiple to-be-verified conflict package pairs.
[0102] S306, for each to-be-verified conflict package pair, installation verification is performed respectively, and two software packages in the to-be-verified conflict package pair are installed simultaneously. According to whether the installation is successful, it is determined whether there is a file path overlap conflict in each to-be-verified conflict package pair, and a conflict file list is formed.
[0103] The embodiment ensures that the file path overlap conflict detection is performed by using the latest state of the software repository, and ensures that the merging of the package installation file lists is smooth by firstly checking whether the extracted package installation file list file has a compressed file, and decompressing the compressed file, so that all the list files are normal files and not compressed files during the merging, and the installation file path in the total installation file list obtained by the merging is correct, and the positioning accuracy of the file path overlap conflict is ensured.
[0104] Embodiment four
[0105] Figure 7 A structural schematic diagram of a software repository file path overlap conflict detection device according to Embodiment Four of the present application is shown in the figure. In this embodiment, the software repository file path overlap conflict detection device comprises:
[0106] A total installation file list generation module 810 is configured to extract the software package installation file list of each software repository to be detected, integrate the software package installation file lists of all the software repositories to be detected, and form a total installation file list.
[0107] An installation file path comparison module 820 is configured to traverse the total installation file list, find the software packages with the same installation file path, divide the software packages with the same installation file path into the same group, and form a plurality of path conflict package groups.
[0108] A conflict software package group pairing module 830 is configured to pair the software packages in each path conflict package group two by two, and form a plurality of conflict package pairs to be verified.
[0109] An installation verification module 840 is configured to perform installation verification on each conflict package pair to be verified, determine whether there is a file path overlap conflict in each conflict package pair to be verified according to whether the installation is successful, and form a conflict file list.
[0110] The embodiment extracts the software package installation file list of each to-be-detected software warehouse through the total installation file list generation module, merges to form a total installation file list, traverses the total installation file list through the installation file path comparison module to find software packages with the same installation file path and divides into multiple path conflict package groups, performs two-by-two grouping on the software packages in each path conflict package group through the conflict software package group module to form multiple to-be-verified conflict package pairs, and performs installation verification on each to-be-verified conflict package pair through the installation verification module to judge whether the two software packages in the to-be-verified conflict package pair exist file path covering conflicts. The software package installation file list of each to-be-detected software warehouse is extracted and merged into a total installation file list, the software packages with the same installation file path are found in the total installation file list, the path conflict package groups are formed, then the to-be-verified conflict package pairs formed by performing two-by-two grouping on the software packages in the path conflict package groups are subjected to installation verification, and whether the file path covering conflicts exist between the software packages is judged according to whether the installation verification is successful. By merging into a total installation file list and finding the same installation file path, the test range is reduced, then the software packages are grouped, the software packages with conflicts can be accurately positioned, the detection precision is improved, the positioning difficulty is reduced, and the file path conflict point can be quickly positioned.
[0111] The software warehouse file path covering conflict detection device provided by the embodiment of the application can perform the software warehouse file path covering conflict detection method provided by any embodiment of the application, has the function modules and beneficial effects corresponding to the execution method.
[0112] Embodiment five
[0113] Figure 8 A structural diagram of an electronic device according to the fourth embodiment of the application, Figure 8 A block diagram of an exemplary device 12 suitable for use in implementing embodiments of the application is shown. Figure 8 The device 12 shown is merely one example and should not be taken as limiting the scope of the embodiments of the application.
[0114] As shown in Figure 8 The device 12 is represented in the form of a general computing device. The components of the device 12 can include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects the various system components, including the system memory 28 and the processing unit 16.
[0115] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0116] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
[0117] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 8 Not shown, usually called a "hard drive"). Although Figure 8 Although not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0118] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0119] Device 12 can also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc.; one or more devices that enable a user to interact with device 12; and / or any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface(s) 22. Still yet, device 12 can communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet) via network adapter 20. As depicted, network adapter 20 communicates with the other components of device 12 via bus 18. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with device 12. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0120] Processing unit 16 can execute a variety of functions provided by one or more application programs, other computer programs, and / or program modules, e.g., software repository file path override conflict detection method provided by embodiments of the present application, stored in system memory 28. In this regard, processing unit 16 can be
[0121] Embodiment Six
[0122] Embodiment Six of the present application also provides a storage medium containing computer-executable instructions that, when executed by a computer processor, perform a software repository file path override conflict detection method as provided by the above embodiments.
[0123] The computer storage media of embodiments of the present application can be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired computer program code in the form of computer-executable instructions or data structures and that can be accessed by a computer. Also, functional computer-readable media
[0124] A computer readable signal medium can include a propagated data signal with computer executable code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport programming code.
[0125] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0126] Computer program code for carrying out operations for aspects of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0127] Note that the foregoing examples have been provided merely for the purpose of explanation and are in no way to be construed as limiting of the present application. While the application has been described with reference to preferred embodiments and specific mountings, it will be apparent to one skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the application. Accordingly, the scope of the application is to be limited only by the appended claims.
Claims
1. A software warehouse file path overlay conflict detection method, characterized in that: include: S101, extracting the software package installation file list of each software warehouse to be detected, integrating the software package installation file lists of all software warehouses to be detected, and forming a total installation file list; S102, traversing the total installation file list to find software packages with the same installation file path, grouping the software packages according to the installation file path, and grouping the software packages with the same installation file path into the same group to form multiple path conflict package groups; S103: Pair the software packages contained in each path-conflicting package group. For a path-conflicting package group containing more than two software packages, pair any two software packages in the group. For a path-conflicting package group containing no more than two software packages, pair two software packages in the group to form multiple conflicting package pairs to be verified. S104: perform installation verification on each conflicting package pair to be verified, and simultaneously install the two software packages in the conflicting package pair to be verified. Based on whether the installation is successful, determine whether each conflicting package pair to be verified has a file path overwriting conflict, and form a conflict file list.
2. The method according to claim 1, characterized in that The S104 includes: Install the two software packages in each conflicting package pair to be verified separately, and collect the installation results of the two software packages respectively; If the installation result is successful and there is no abnormal output, it means that there is no file path overlap conflict between the two software packages in the conflicting package pair to be verified; If the installation result is failed, find the reason for the installation failure according to the installation log. If the installation log indicates a file conflict, then there is a file path overlay conflict between the two software packages in the conflicting package pair to be verified.
3. The method according to claim 2, characterized in that The method further comprises: Before performing installation verification, perform homology verification on each conflicting package pair to be verified to form a homology conflicting package pair; Eliminate all conflicting package pairs of the same origin from the conflicting package pairs to be verified.
4. The method according to claim 1, wherein The S101 further includes: When a software repository to be detected is detected, the metadata of the locally cached software repository is cleaned up; Re-cache the metadata for each repository to be checked.
5. The method according to claim 4, characterized in that The S101 further includes: After extracting the software package installation file lists of all the software repositories to be detected, all the software package installation file list files are checked to determine whether there is a compressed software package installation file list file among them; If there is a compressed software package installation file list file, it is decompressed, and then all software package installation file list files are merged to form a total installation file list.
6. The method according to claim 1, characterized in that The S103 includes: For a path conflict package group containing more than two software packages, any two software packages in the path conflict package group are combined in a binary combination manner to form multiple conflict package pairs to be verified.
7. The method according to claim 1, characterized in that The S102 further includes: After finding the software packages with the same installation file path in the total installation file list, the software package name of each group of software packages with the same installation file path is checked, and the software packages with the same software package name are removed.
8. A software warehouse file path overlay conflict detection device, characterized in that: include: A total installation file list generation module is used to extract the software package installation file list of each software warehouse to be detected, integrate the software package installation file lists of all software warehouses to be detected, and form a total installation file list; The installation file path comparison module is used to traverse the total installation file list, find software packages with the same installation file path, and group software packages with the same installation file path into the same group to form multiple path conflict package groups; The conflicting package pairing module is used to pair the packages contained in each path conflicting package group in pairs to form multiple conflicting package pairs to be verified; The installation verification module performs installation verification on each conflicting package pair to be verified. Based on whether the installation is successful, it is determined whether each conflicting package pair to be verified has a file path overwriting conflict, and a conflicting file list is formed.
9. An electronic device, characterized in that: The device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the software warehouse file path overlay conflict detection method as described in any one of claims 1 to 7.
10. A storage medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform the software warehouse file path overlay conflict detection method according to any one of claims 1 to 7.