ginger
ginger copied to clipboard
Ginger has failed to load on s390x due to new dependency introduced by servers.py
@danielhb , Ginger has failed to load on s390x due to new dependency python module introduced by servers.py.
from Crypto.Cipher import AES
Problem we are introducing here is package dependency which might not be available on supported distros.
Questions are:
- How can we make sure we will not brake distros with package dependencies ?
- How can we avoid situations where package available on certain distros but will not brake other distros if not available ?
some thing like we did in ginger repository management: def init(self): try: import('dnf') self._pkg_mnger = YumRepo() except ImportError: try: import('yum') self._pkg_mnger = YumRepo() except ImportError: try: import('apt_pkg') self._pkg_mnger = AptRepo() except ImportError: raise InvalidOperation('GGBREPOS0014E')
@jay-katta on my system (Fedora 24 x86_64) this modules is provided by the package python2-crypto-2.6.1-10.fc24.x86_64.
Are s390x distros providing something like? You need to have PyCrypto (https://pypi.python.org/pypi/pycrypto) installed in your system.
Unfortunately this package readily available on s390x (KVM distribution)
Debian has: https://packages.debian.org/jessie/python-crypto
On 08/24/2016 08:29 AM, Chandra Shekhar Reddy wrote:
Problem we are introducing here is package dependency which might not be available on supported distros.
Questions are:
- How can we make sure we will not brake distros with package dependencies ?
- How can we avoid situations where package available on certain distros but will not brake other distros if not available ?
I don't have access to a s390x to testing so I can't tell if a package is available there or not. The one thing we can do to avoid this is to have Z folks testing the new backend contributions to spot this problems while the patch is on review.
some thing like we did in ginger repository management: def init(self): try: import('dnf') self./pkg_mnger = YumRepo() except ImportError: try: _import/('yum') self./pkg_mnger = YumRepo() except ImportError: try: _import/('apt_pkg') self._pkg_mnger = AptRepo() except ImportError: raise InvalidOperation('GGBREPOS0014E')
Yeah, usage of relative imports can workaround this problem.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kimchi-project/ginger/issues/386#issuecomment-242032247, or mute the thread https://github.com/notifications/unsubscribe-auth/AA053IYVH5pwAYGEEEJs0CZ5jvqfgUkmks5qjCsJgaJpZM4Jr320.
To solve the problem for s390x, since the package is not readily available, will try out the relative imports.. But would need some help in testing in the s390x environment.
Hi, I made a change to servers.py to do a dynamic import. Would some one from the s390x team be able to try out the change & see if the issue is getting resolved? Thanks.
@pvital I see two python packages for crytpo library.
https://www.rpmfind.net/linux/rpm2html/search.php?query=python-crypto http://www.rpmfind.net/linux/rpm2html/search.php?query=python2-crypto
Any reason why we are keeping python2-crypto has dependency for x86 fedora/redhat environments ?
@chandrureddy I used as base to add the dependency a Fedora 24 system, that will be the next Fedora supported version of ginger (and all other packages). python-crypto is not available on Fedora 24.
You can check that README file is listen different package names for each system.