Skip to content

Add support for AIX #241

Closed
Closed

Description

@jokurz

Add support for AIX. Currently disto returns the following for a AIX 7.2:

{
    "codename": "",
    "id": "aix",
    "like": "",
    "version": "2",
    "version_parts": {
        "build_number": "",
        "major": "2",
        "minor": ""
    }
}

Source could be cmd oslevel:

$ oslevel
7.2.0.0

7 --> major
2 --> minor

Activity

  1. nir0s commented on May 20, 2019

    @nir0s
    Collaborator

    Can you share the release file?

  2. jokurz commented on May 21, 2019

    @jokurz
    Author

    As far as I know there is no release file on AIX.

  3. nir0s commented on May 21, 2019

    @nir0s
    Collaborator

    There must be something.. lsb.. something.. otherwise how would distro know that it's aix?

  4. jokurz commented on May 21, 2019

    @jokurz
    Author

    It seems that this information was gathered from uname -rs:

    $ uname -rs
    AIX 2
  5. HorlogeSkynet commented on Sep 26, 2021

    @HorlogeSkynet
    Member

    Hey @jokurz, would it be possible to read these version components from a file instead of calling oslevel ? Thanks 🙇

  6. jokurz commented on Sep 27, 2021

    @jokurz
    Author

    @HorlogeSkynet - I am not aware of such a file. I would fully understand if you will not support AIX as the platform might not be the first choice for python development.

  7. HorlogeSkynet commented on Sep 27, 2021

    @HorlogeSkynet
    Member

    @jokurz thanks for your fast feedback ! We'll do our best to support (and maintain) what distro should.
    I was asking about a specific "release" file, as sourcing such would be faster than calling another external program. Do you know a substitute for Linux strace command that you could run against oslevel to see what it does ? Bye 👋

  8. nir0s commented on Sep 27, 2021

    @nir0s
    Collaborator

    @HorlogeSkynet, while I agree that a file would be nicer, I think that we can simply try to execute oslevel as a last resort (assuming nothing else is found, e.g. release file, uname, etc..).

    If that's the case, it won't cost anything, as oslevel will indeed only run when no other option is available (supposedly, only on AIX, AFAIK).

    WDYT?

  9. HorlogeSkynet commented on Sep 27, 2021

    @HorlogeSkynet
    Member

    @nir0s Unless I'm missing something here, I don't think it would be that easy as uname -rs output is definitely working (see #241 (comment)) 🙄

  10. nir0s commented on Sep 28, 2021

    @nir0s
    Collaborator

    Hehe, I'm the one missing something. I didn't read the previous comments.

  11. HorlogeSkynet commented on Sep 30, 2021

    @HorlogeSkynet
    Member

    @nir0s @jokurz So it looks like we could be doing something like that in version method (naive pseudo-code here, implementation must be tougher and tests written of course) :

        def version(self, pretty: bool = False, best: bool = False) -> str:
            versions = [
                # current existing candidates list...
            ]
            if sys.platform.startswith('aix'):
                versions.insert(0, check_output("oslevel"))

    @jokurz Homework chores if you don't mind :

    • verify that somehow we cannot retrieve oslevel output another way ;
    • check whether passing a specific flag to oslevel would be relevant in our case, according to AIX's terminology (manual).

    Thanks, bye 👋

  12. nir0s commented on Sep 30, 2021

    @nir0s
    Collaborator

    @HorlogeSkynet, sounds good. However, while I don't know AIX, it doesn't make sense to me that there isn't a file with that info. Does AIX have a magical way of storing this info that we can't read?

  13. added 4 commits that reference this issue on Oct 3, 2021
    8592fc3
    e4a32ef
    21a1666
    98666e5
  14. linked a pull request that will close this issueAdd support for AIX (closes #241) #311on Oct 4, 2021
  15. HorlogeSkynet commented on Oct 4, 2021

    @HorlogeSkynet
    Member

    Closing here, please see #311.
    An official review is expected from you @nir0s, but I'd be interested from yours too @jokurz. Bye 👋

  16. added this to the 1.6.1 milestone on Oct 9, 2021
  17. added a commit that references this issue on Nov 1, 2021
    af32b40
  18. added a commit that references this issue on Dec 14, 2021
    407db52
  19. added 3 commits that reference this issue on Feb 10, 2022
    5c346a9
    7c32aa4
    7733ba2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions