A yum source integrity test method

By analyzing the software package dependencies of the yum source in the Linux operating system, generating a conflict list and performing installation verification, it solves the problem of dependency damage when software packages are upgraded or introduced, improves system stability and user experience, and ensures that software packages are compatibility and security.

CN117873870BActive Publication Date: 2024-09-03CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311716170.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-14
Publication Date
2024-09-03
Estimated Expiration
2043-12-14

AI Technical Summary

Technical Problem

The existing technology lacks a software package dependency integrity check tool in the Linux operating system, which may destroy the dependencies of the yum source when the software package is upgraded or introduced, causing the software to fail to be installed, reducing user experience and increasing maintenance costs.

Method used

A yum source integrity testing method is adopted to read all software packages in the current software source, analyze dependencies, generate a list of conflicting software packages, and verify installation compatibility to ensure that software packages are installed in the correct list to avoid dependencies. Relationship destruction.

Benefits of technology

By classifying and verifying software packages, manual intervention is reduced, system stability and user experience are improved, and the compatibility and security of the software package installation process are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117873870B
    Figure CN117873870B
Patent Text Reader

Abstract

The invention belongs to the technical field of Linux software management, and specifically relates to a yum source integrity test method, comprising the following steps: reading all software packages in the current existing software source, analyzing the dependency relationship of each software package, and finding software packages with conflicting relationships; putting software packages with conflicting relationships into different lists to generate multiple lists; selecting a software package from the basic software package list, and trying to install the software package on the basis of the basic software package list; after the installation is completed, performing compatibility verification with the update software source, and outputting the verification result; wherein, when changing the software, calling the conflicting software package classification subsystem to determine which list the software package to be tested should be in. The invention can be used for checking the dependency integrity of the yum source after the software package is upgraded or a new software package is introduced, so as to avoid the software package dependency relationship being destroyed after going online, resulting in the inability to install the software or the failure of the installation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of Linux software management, and in particular relates to a yum source integrity testing method. Background Art

[0002] The Yum source provides a remote open source software repository as native open source software for operating systems such as CTyunos, OpenEuler, and CentOS. When the system needs a certain open source software during use, the software can be installed online through the yum or dnf command and the dependency problems between the software being installed can be automatically resolved.

[0003] The current yum source is maintained by various operating system vendors. With the increase in the number of open source software in the warehouse and the upgrade of open source software versions, the upgrade or introduction of a certain open source software package may break the dependencies of the software packages in the original warehouse. These packages may have conflicts with the current software packages in terms of dependencies, versions, and files, which will eventually lead to the inability to install the introduced software package or other software packages in the source. Software dependency checks usually encounter problems during use to verify the software package. The existing technology mainly verifies through a single software package. If there is no conflict in the use of software packages, this problem will not occur, which is a hidden problem. This problem will only occur when the customer encounters it during the use of the system, which reduces the user experience.

[0004] It is relatively easy to test the installation of open source software packages on a minimal installation system. You only need to create a minimal installation system environment for installation. The number of rpm packages in the current software source is currently 3,000 or more. When testing, it is not possible to directly confirm whether the introduced or upgraded software packages have an impact on each software package. There is currently no tool for checking the integrity of software package dependencies in the Linux operating system. When introducing or upgrading software packages, the package dependencies in the yum source may be destroyed, resulting in the user being unable to install some software packages, reducing user experience and increasing software source maintenance costs. Summary of the invention

[0005] The purpose of the present invention is to provide a yum source integrity testing method, which can be used to perform a yum source dependency integrity check after a software package is upgraded or a new software package is introduced, so as to avoid the software package dependency being destroyed after going online, resulting in the inability to install the software or the failure of the installation.

[0006] The technical solution adopted by the present invention is as follows:

[0007] A yum source integrity testing method comprises the following steps:

[0008] Read all software packages in the current software source, analyze the dependencies of each software package, and find out the software packages with conflicting relationships;

[0009] Putting conflicting software packages into different lists to generate multiple lists, wherein the multiple lists include a basic software package list, a conflicting software package list 1, a conflicting software package list 2, ..., a conflicting software package list n;

[0010] Select a package from the base package list and try to install the package on the basis of the base package list;

[0011] After the installation is complete, the compatibility with the update software source is verified and the verification results are output;

[0012] Among them, when changing the software, the conflicting software package classification subsystem is called to determine in which list the software package to be tested should be;

[0013] According to the determined list, the software package installation verification subsystem is called to perform installation compatibility verification and output the verification result.

[0014] In a preferred solution, the software packages in the basic software package list can be installed together with the software packages in any conflicting software package list, and the software packages in the conflicting software package list cannot be installed together with the software packages in other conflicting software package lists.

[0015] In a preferred solution, the conflict list of the software packages is analyzed and classified through repodata in the yum source.

[0016] In a preferred solution, the conflict list of the software packages is analyzed and classified by repodata in the yum source as follows:

[0017] Get the repoda of everything and get all the items in list1;

[0018] Get all items in the conflicting packages list2 and list3;

[0019] Merge the packages and their dependencies in list2 and list3 into a total package list;

[0020] Remove the dependency on list2 and list3 from list1;

[0021] Install and verify list1 and the combined list2, then adjust list2 as needed.

[0022] You need to install and verify list1 and the integrated list3, and then adjust list3 as needed.

[0023] Verification completed.

[0024] In a preferred solution, before attempting to install the software package based on the basic software package list, compatibility verification of the software packages in the basic software package list and the software packages in each conflicting software package list is performed to determine whether any software package in the conflicting software package list can be installed based on the basic software package list.

[0025] In a preferred solution, the software change includes introducing a new software package or upgrading a software package.

[0026] In a preferred solution, the conflicting software package classification subsystem, the software package installation verification subsystem and the software package change testing subsystem are all integrated into an automated software package management system.

[0027] In a preferred solution, the changed software package testing subsystem can also verify only a specific conflicting software package list according to user selection.

[0028] The present invention also provides a yum source integrity testing system, characterized in that it is applied to the above-mentioned yum source integrity testing method, and the system comprises:

[0029] A conflicting software package classification subsystem, wherein the conflicting software package classification subsystem is used to:

[0030] Read all software packages in the current software source, analyze the dependencies of each software package, and find out the software packages with conflicting relationships;

[0031] Put conflicting packages into different lists to generate multiple lists: basic package list, conflicting package list 1, conflicting package list 2, and conflicting package list n;

[0032] The software package installation verification subsystem is used to:

[0033] Select a package from the list of base packages;

[0034] Try to install the package on top of the base package list;

[0035] After the installation is complete, verify the compatibility with the update software source;

[0036] Output verification results;

[0037] Change software package testing subsystem: The change software package testing subsystem is used to:

[0038] Invokes the conflicting package classification subsystem and determines in which list the package to be tested should be;

[0039] Based on the determined list, the software package installation verification subsystem is called to perform installation compatibility verification.

[0040] The present invention also provides a computer-readable storage medium on which instructions are stored. When the instructions are executed, the above-mentioned yum source integrity testing method is implemented.

[0041] The technical effect achieved by the present invention is as follows: by analyzing the repodata in the yum source, the software packages are classified according to the conflict relationship, the need for manual intervention is reduced, and the user can clearly understand the conflict relationship of each software package. By putting the software packages with conflict relationships into different lists, the problems caused by the simultaneous installation of software packages in different conflicting software package lists can be avoided, and the stability of the system can be improved. The software packages in the basic software package list can be installed together with the software packages in any conflicting software package list, which simplifies the user's operation process and improves the user experience.

[0042] The software package installation verification subsystem of the present invention can verify the compatibility of the software packages in the basic software package list and the software packages in each conflicting software package list to ensure that no problems will occur during the installation process. After the installation is completed, the compatibility verification with the update software source can also be completed to ensure the stability and security of the system.

[0043] The software package change test subsystem of the present invention can call the conflicting software package classification subsystem as needed to determine the list where the software package should be, and perform corresponding installation compatibility verification, so as to facilitate change management. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is the overall architecture diagram of the present invention;

[0045] Figure 2 This is a schematic diagram of dividing the conflicting software package list in the present invention; DETAILED DESCRIPTION

[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0047] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0048] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present invention. The phrase "in a preferred embodiment" that appears in different places in this specification does not refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0049] Secondly, the present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0050] Example 1

[0051] Please see attached Figure 1 As shown, the first embodiment of the present invention provides a yum source integrity testing method, comprising the following steps:

[0052] Read all software packages in the current software source, analyze the dependencies of each software package, and find out the software packages with conflicting relationships;

[0053] Putting conflicting software packages into different lists to generate multiple lists, wherein the multiple lists include a basic software package list, a conflicting software package list 1, a conflicting software package list 2, ..., a conflicting software package list n;

[0054] Select a package from the base package list and try to install the package on the basis of the base package list;

[0055] After the installation is complete, the compatibility with the update software source is verified and the verification results are output;

[0056] When changing the software, the conflicting software package classification subsystem is called to determine in which list the software package to be tested should be included. The changing software includes introducing a new software package or upgrading a software package.

[0057] According to the determined list, the software package installation verification subsystem is called to perform installation compatibility verification and output the verification result.

[0058] In the above method, by analyzing the dependencies of the software packages, finding out the software packages with conflicting relationships and placing them in different lists, conflicts can be avoided during the installation process and the stability of the system can be improved. At the same time, the software packages with conflicting relationships are divided into different lists, and the user only needs to pay attention to the software packages in a specific list to avoid confusion and errors. After the installation is completed, compatibility verification with the update software source can ensure that the newly installed software package is compatible with other software packages in the existing system to avoid potential problems and conflicts.

[0059] It should be noted that the packages in the basic package list can be installed together with the packages in any conflicting package list, but the packages in the conflicting package list cannot be installed together with the packages in other conflicting package lists.

[0060] By adopting the above method, by classifying the software packages according to whether they have conflicts, the user only needs to pay attention to the software packages in a specific list, avoiding confusion and errors, making the management of software packages clearer and more convenient. After the installation is complete, compatibility verification with the update software source can ensure that the newly installed software package is compatible with other software packages in the existing system, avoiding potential problems and conflicts. Moreover, since the software packages with conflicting relationships have been classified and managed, errors caused by the coexistence of conflicting software packages can be avoided during installation.

[0061] In one of the preferred implementations, the conflict list of the software packages is analyzed and classified through repodata in the yum source;

[0062] See also Figure 2 , the specific classification method is:

[0063] Get the repoda of everything and get all the items in list1;

[0064] Get all items in the conflicting packages list2 and list3;

[0065] Merge the packages and their dependencies in list2 and list3 into a total package list;

[0066] Remove the dependency on list2 and list3 from list1;

[0067] Install and verify list1 and the combined list2, then adjust list2 as needed.

[0068] You need to install and verify list1 and the integrated list3, and then adjust list3 as needed.

[0069] Verification completed.

[0070] In the above classification, the software packages of multiple lists are integrated and managed, making the management of software packages clearer and more convenient. For example, the software packages and their dependencies in list1, list2, and list3 can be integrated into a total software package list, and then adjusted as needed. In the process of installing and verifying the software packages, it can be ensured that the newly installed software packages are compatible with other software packages of the existing system to avoid potential problems and conflicts. For example, after installing and verifying list1 and the integrated list2, list2 can be adjusted as needed to ensure its compatibility with list1. In the process of installing and verifying the software packages, the stability and reliability of the software packages can be ensured. For example, after installing and verifying list1 and the integrated list2, list2 can be adjusted as needed to ensure its stability and reliability.

[0071] In one of the preferred implementations, before attempting to install the software package based on the basic software package list, compatibility verification of the software packages in the basic software package list and the software packages in each conflicting software package list is performed to determine whether any software package in the conflicting software package list can be installed based on the basic software package list.

[0072] Specifically, before attempting to install a package in the conflicting package list, compatibility verification is required. This is because there may be dependencies or compatibility issues between the packages in the base package list and the packages in the conflicting package list. If you install them directly without verification, it may cause system instability, missing functions, or other potential problems. After completing the compatibility verification of all conflicting packages, you can selectively install one or more of the conflicting packages. During the installation process, be sure to pay close attention to the system status so that you can promptly discover and resolve possible problems.

[0073] In one of the preferred implementations, the conflicting software package classification subsystem, the software package installation verification subsystem, and the software package change test subsystem are all integrated into an automated software package management system. All operations in the deployment process are fully automated without manual intervention. For traditional manual deployment, once the number of projects increases and deployment becomes frequent, the overall efficiency will be low, and automated deployment can significantly improve efficiency. It allows users to more conveniently manage the software in the system and ensure the correctness and stability of the software. It usually contains a software warehouse, which stores various software packages and related information, including versions, dependencies, and licenses.

[0074] In a preferred implementation, the software package change test subsystem can also verify only a specific list of conflicting software packages based on the user's selection. When it is not necessary to verify all software packages, only specific conflicting software packages can be verified, which can save computing resources and increase the verification speed. Users can choose the software packages that need to be verified according to their needs, thereby improving the flexibility of the system.

[0075] Example 2

[0076] The present invention also provides a yum source integrity testing system, the system comprising:

[0077] A conflicting software package classification subsystem, wherein the conflicting software package classification subsystem is used to:

[0078] Read all software packages in the current software source, analyze the dependencies of each software package, and find out the software packages with conflicting relationships;

[0079] Put conflicting packages into different lists to generate multiple lists: basic package list, conflicting package list 1, conflicting package list 2, and conflicting package list n;

[0080] The software package installation verification subsystem is used to:

[0081] Select a package from the list of base packages;

[0082] Try to install the package on top of the base package list;

[0083] After the installation is complete, verify the compatibility with the update software source;

[0084] Output verification results;

[0085] Change software package testing subsystem: The change software package testing subsystem is used to:

[0086] Invokes the conflicting package classification subsystem and determines in which list the package to be tested should be;

[0087] Based on the determined list, the software package installation verification subsystem is called to perform installation compatibility verification.

[0088] Example 3

[0089] The present invention also provides a computer-readable storage medium on which instructions are stored. When the instructions are executed, the above-mentioned yum source integrity testing method is implemented.

[0090] The working principle of the present invention is as follows: by analyzing the repodata in the yum source, the software packages are classified according to the conflict relationship, the need for manual intervention is reduced, and the user can clearly understand the conflict relationship of each software package. By putting the software packages with conflict relationships into different lists, the problem caused by the simultaneous installation of software packages in different conflicting software package lists can be avoided, and the stability of the system can be improved. The software packages in the basic software package list can be installed together with the software packages in any conflicting software package list, which simplifies the user's operation process and improves the user experience.

[0091] The software package installation verification subsystem can verify the compatibility of the software packages in the basic software package list and the software packages in each conflicting software package list to ensure that there will be no problems during the installation process. After the installation is complete, it can also complete the compatibility verification with the update software source to ensure the stability and security of the system.

[0092] The above is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention shall be implemented according to the conventional means in the art unless otherwise specified and limited.

Claims

1. A yum source integrity test method, Features: The following steps are involved: Read all software packages in the current software source, analyze the dependencies of each software package, and find out the software packages with conflicting relationships; Putting conflicting software packages into different lists to generate multiple lists, wherein the multiple lists include a basic software package list, a conflicting software package list 1, a conflicting software package list 2, ..., a conflicting software package list n; Select any package in the conflicting package list from the basic package list, and try to install the package in the conflicting package list based on the basic package list; After the installation is complete, the compatibility with the update software source is verified and the verification results are output; Among them, when changing the software, the conflicting software package classification subsystem is called to determine in which list the software package to be tested should be; According to the determined list, the software package installation verification subsystem is called to perform installation compatibility verification and output the verification result; The conflict list of the software packages is analyzed and classified by repodata in the yum source; The conflict list of the software packages is analyzed and classified by repodata in the yum source as follows: Get the repoda of everything and get all items in list1; Get all items in the conflicting packages list2 and list3; Merge the packages and their dependencies in list2 and list3 into a total package list; Remove the dependency on list2 and list3 from list1; Install and verify list1 and the combined list2, and then adjust list2 as needed; You need to install and verify list1 and the integrated list3, and then adjust list3 as needed; Verification completed.

2. The yum source integrity testing method according to claim 1, Features: The software packages in the basic software package list can be installed together with the software packages in any conflicting software package list, while the software packages in the conflicting software package list cannot be installed together with the software packages in other conflicting software package lists.

3. The yum source integrity testing method according to claim 1, Features: Before attempting to install the software package based on the basic software package list, compatibility verification is required to verify the compatibility of the software package in the basic software package list and the software packages in each conflicting software package list to determine whether any software package in the conflicting software package list can be installed based on the basic software package list.

4. The yum source integrity testing method according to claim 1, Features: The software change includes the introduction of a new software package or an upgrade of a software package.

5. The yum source integrity testing method according to claim 1, Features: The conflicting software package classification subsystem, software package installation verification subsystem and software package change testing subsystem are all integrated in an automated software package management system.

6. The yum source integrity testing method according to claim 1, Features: The modified software package testing subsystem can also verify only a specific conflicting software package list according to user selection.

7. A yum source integrity testing system, It is characterized in that The system includes: A conflicting software package classification subsystem, wherein the conflicting software package classification subsystem is used to: Read all software packages in the current software source, analyze the dependencies of each software package, and find out the software packages with conflicting relationships; Put conflicting packages into different lists to generate multiple lists: basic package list, conflicting package list 1, conflicting package list 2, conflicting package list n, where; The software package installation verification subsystem is used to: Select a package from the list of base packages; Try to install the package on top of the base package list; After the installation is complete, verify the compatibility with the update software source; Output verification results; Change software package testing subsystem: The change software package testing subsystem is used to: Invokes the conflicting package classification subsystem and determines in which list the package to be tested should be; Based on the determined list, the software package installation verification subsystem is called to perform installation compatibility verification; The conflict list of the software packages is analyzed and classified by repodata in the yum source; The conflict list of the software packages is analyzed and classified by repodata in the yum source as follows: Get the repoda of everything and get all items in list1; Get all items in the conflicting packages list2 and list3; Merge the packages and their dependencies in list2 and list3 into a total package list; Remove the dependency on list2 and list3 from list1; Install and verify list1 and the combined list2, and then adjust list2 as needed; You need to install and verify list1 and the integrated list3, and then adjust list3 as needed; Verification completed.

8. A computer-readable storage medium having instructions stored thereon, which, when executed, implements the yum source integrity testing method described in any one of claims 1 to 6.