AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  how to solve a reverse dependency in a rpm?

    Posted Tue June 27, 2023 10:26 AM

    Dear community...

    I have the requirement for a RPM, lets say "RPM A", that if RPM A is upgrading to its new version, RPM B must be upgraded too, but after RPM A. RPM B requires parts of RPM A.
    The problem the older version of RPM A is, it cleans everything in its installation folder, so also parts of RPM B...
    I read about the directive suggests and also about %posttrans, but it seems not the best solution?

    Any ideas are very appreciated...

    Thanks a lot in advance.

    Best regards,



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------


  • 2.  RE: how to solve a reverse dependency in a rpm?

    Posted Wed June 28, 2023 04:45 AM

    Hi Joerg,

    Did you try something like

    • rpm -e --justdb A 

    This should leave al the files on the system. Maybe you must use --noscripts. That depends on what the uninstall scripts do. You could list the scripts beforehand with rpm -q --scripts A Maybe you should also use --nodeps. After this you can reinstall package A. 

    • rpm -i A

    Maybe you should list the scripts part in the package also beforehand. (rpm -q --scripts -p <path_to_package_A>

    After this you can upgrade package B

    • rpm -U B

    Hope this helps

    Ane-Pieter Wieringa



    ------------------------------
    Ane-Pieter Wieringa
    ------------------------------



  • 3.  RE: how to solve a reverse dependency in a rpm?

    Posted Wed June 28, 2023 05:50 AM

    Is RPM B dropping files inside RPM A directories ?

    Do you have any control over the build of RPM A or B ?



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 4.  RE: how to solve a reverse dependency in a rpm?

    Posted Wed June 28, 2023 05:56 AM

    Hello Jose,

    I have control now over the new version of RPM A and RPM B, but the Problem is the old package of RPM A and B... They were build without my knowledge.

    regards



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 5.  RE: how to solve a reverse dependency in a rpm?

    Posted Thu June 29, 2023 12:53 PM

    Hi Joerg,

     

    Can you please specifically tell what you want to achieve. I think I am not able to understand.

     

    Thanks,

     

    Sanket Rathi

    STSM - AIX Development

    Member IBM Academy of Technology, IBM Master Inventor

    IBM India Systems Development Lab, Hyderabad, India

    Office : +91-40-71857052

     

     






  • 6.  RE: how to solve a reverse dependency in a rpm?

    Posted Fri June 30, 2023 02:16 AM

    Hello Sanket,

    I will try to explain more in detail:
    We have build rpm packages for ControlM and ControlM for SAP. The old packages are build in a way, that if you update to a newer version, the %postun part does a "rm -r /opt/ctm". And that ends up with a broken "ControlM for SAP", because some files for the SAP part is in the same directory. When I do a "dnf update", I don't have the possibility to tell dnf, that ControlM has to be updated before ControlM for SAP will be updated. 
    The %required option in the ControlM for SAP just checks that ControlM is installed. So the SAP part is some times updated before the main package und then the sap module end up broken because of the "rm" command in the old ControlM package.
    For now we will do the update witch a script, that rules the sequence...

    best regards,
    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 7.  RE: how to solve a reverse dependency in a rpm?

    Posted Fri June 30, 2023 05:19 AM

    What if you put the dependencies correctly in ControlM for SAP for ControlM.

    If you specify the specific version as dependency in ControlM for SAP for ControlM then it will not allow ControlM for SAP to install/update until ControlM is updated to specific version.

    Will that not work?

     

    Thanks,

     

    Sanket Rathi

    STSM - AIX Development

    Member IBM Academy of Technology, IBM Master Inventor

    IBM India Systems Development Lab, Hyderabad, India

    Office : +91-40-71857052

     

     






  • 8.  RE: how to solve a reverse dependency in a rpm?

    Posted Fri June 30, 2023 06:18 AM

    Why didn't I think of it myself? I will try that...
    Thanks Sanket...
    there a German saying: sometime I don't see the forest because of that many trees



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------