Bug 1312087 - dnf.arch.basearch unexpectedly moved to dnf.rpm.basearch
dnf.arch.basearch unexpectedly moved to dnf.rpm.basearch
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lorax (Show other bugs)
24
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-25 12:19 EST by Brian Lane
Modified: 2016-04-05 12:19 EDT (History)
9 users (show)

See Also:
Fixed In Version: lorax-23.20-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-05 09:51:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian Lane 2016-02-25 12:19:37 EST
Commit 19766a601550a47234fe58abdb6afc8c637dc401 broke the dnf API for anyone using dnf.arch

This is not the right way to do this. You need to warn users before making changes like this, and at least provide a backwards compatible stub for minor releases. Breaking API in a minor version release (1.1.6 to 1.1.7) means that we can't trust your API to be stable at all.
Comment 1 Honza Silhan 2016-03-07 07:22:19 EST
We have added this undocumented function back [1] to the non-API code to ease the transition. It will be erased in the next DNF versions. Please, fix lorax to use documented alternative [2] of this function. Reassigning...

[1] https://github.com/rpm-software-management/dnf/commit/c8c98c8b70577674b606e7b05430ac3c6cb4d15c
[2] https://dnf.readthedocs.org/en/latest/api_rpm.html#dnf.rpm.basearch
Comment 2 Honza Silhan 2016-03-11 08:21:22 EST
It seems that the import in Lorax is wrong. In lorax there are just `import dnf` statements. Previously in DNF and the same in compatible commit [1] the function is in a special file - which should be imported in Python by `import dnf.arch`. Previously it was internally loaded by DNF and that was the reason why it worked before. Nevertheless you should not rely on that fact. There are many Python nested modules in Python standard library which have to be imported separately when you need them.

To sum up. The compatibility commit [1] is not needed (and will be removed) as there still needs to be change in Lorax which should be done in the right way. Please, adapt Lorax to use correct API function [2] and do a release for F22+. Thanks.

This is blocking any release of DNF which implies it's a blocker for any bug report on DNF [3].

[1] https://github.com/rpm-software-management/dnf/commit/c8c98c8b70577674b606e7b05430ac3c6cb4d15c
[2] https://dnf.readthedocs.org/en/latest/api_rpm.html#dnf.rpm.basearch
[3] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/UBEL7ZLMLPRTR7PEAFUIHEZ23RAWPFQV/
Comment 3 Brian Lane 2016-03-11 10:08:45 EST
Well, the compatiblity *is* needed, you just didn't do it in a compatible way :)

So I guess I'll backport the change to all the places since that appears to be the path of least resistance at this point.
Comment 4 Fedora Update System 2016-03-11 14:05:40 EST
lorax-23.19-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-910ddbf4c8
Comment 5 Fedora Update System 2016-03-11 14:08:14 EST
lorax-24.15-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-12fa84d66e
Comment 6 Fedora Update System 2016-03-12 02:49:49 EST
lorax-24.15-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-12fa84d66e
Comment 7 Fedora Update System 2016-03-12 12:24:44 EST
lorax-23.19-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-910ddbf4c8
Comment 8 Fedora Update System 2016-03-30 11:08:43 EDT
lorax-23.20-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7190703cf1
Comment 9 Fedora Update System 2016-03-30 18:54:22 EDT
lorax-23.20-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7190703cf1
Comment 10 dearfriend 2016-04-03 07:49:43 EDT
New error with /usr/share/doc/lorax/fedora-minimized.ks 

Not sure, is this lorax or dracut bug.

rebuilding boot/initramfs-4.4.6-300.fc23.x86_64.img
Traceback (most recent call last):
  File "/sbin/livemedia-creator", line 1244, in <module>
    main()
  File "/sbin/livemedia-creator", line 1175, in main
    result_dir = make_livecd(opts, mount_dir, work_dir)
  File "/sbin/livemedia-creator", line 497, in make_livecd
    tb.rebuild_initrds(add_args=dracut_args)
  File "/usr/lib/python3.4/site-packages/pylorax/treebuilder.py", line 287, in rebuild_initrds
    runcmd(cmd, root=self.vars.inroot)
  File "/usr/lib/python3.4/site-packages/pylorax/executils.py", line 339, in runcmd
    return execWithRedirect(cmd[0], cmd[1:], **kwargs)
  File "/usr/lib/python3.4/site-packages/pylorax/executils.py", line 226, in execWithRedirect
    env_add=env_add, reset_handlers=reset_handlers, reset_lang=reset_lang)[0]
  File "/usr/lib/python3.4/site-packages/pylorax/executils.py", line 199, in _run_program
    raise subprocess.CalledProcessError(proc.returncode, argv, output)
subprocess.CalledProcessError: Command '['dracut', '--nomdadmconf', '--nolvmconf', '--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom', '--omit', 'plymouth', '--no-hostonly', '--debug', '--force', 'boot/initramfs-4.4.6-300.fc23.x86_64.img', '4.4.6-300.fc23.x86_64']' returned non-zero exit status 1

dnf list installed lorax
Last metadata expiration check: 2:50:47 ago on Sun Apr  3 11:57:50 2016.
Installed Packages
lorax.x86_64                                                                                                                    23.20-1.fc23                                                                                                                    @updates-testing
Comment 11 Brian Lane 2016-04-04 12:15:17 EDT
(In reply to dearfriend from comment #10)
> New error with /usr/share/doc/lorax/fedora-minimized.ks 
> 
> Not sure, is this lorax or dracut bug.

Please open a new bug for this (against lorax) and include the logs, especially program.log from lmc. It is likely to be a problem with the example kickstart.
Comment 12 Fedora Update System 2016-04-05 09:51:42 EDT
lorax-23.20-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2016-04-05 12:19:27 EDT
lorax-23.20-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.