18 Aug

Workaround for ‘/usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one character’

There’s a bug in rpm package: https://bugzilla.redhat.com/show_bug.cgi?id=304121

It causes the following error while building rpm packages:

/usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one
character

As a workaround you can use this command:

rpmbuild -bb rpmbuild/SPECS/package.spec -D 'debug_package %{nil}'

It will disable building of debug package and that’s it.

04 Aug

Python: disabling deprecation warning

DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python.

If you get this deprecation warning and you can’t upgrade to a newer Python version, it’s possible to disable this warning:

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)