Bug 1117293 - --installroot proceeds with an undefined conf.releasever
--installroot proceeds with an undefined conf.releasever
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-08 08:57 EDT by Michal Schmidt
Modified: 2014-09-30 19:42 EDT (History)
5 users (show)

See Also:
Fixed In Version: hawkey-0.4.18-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-19 02:03:15 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 Michal Schmidt 2014-07-08 08:57:46 EDT
Description of problem:
I got a traceback from dnf:

$ sudo dnf --installroot=/home/michich/fedora-tree  install systemd passwd dnf fedora-release vim-minimal
...
Transaction Summary
========================================================================
Install  131 Packages

Total download size: 64 M
Installed size: 296 M
Is this ok [y/N]: y
...
  Installing  : libreport-filesystem-2.2.2-5.fc21.x86_64      128/131
  Installing  : dnf-0.5.3-1.fc21.noarch                       129/131
  Installing  : passwd-0.79-3.fc21.x86_64                     130/131
  Installing  : vim-minimal-2:7.4.307-2.fc21.x86_64           131/131 
  Verifying   : systemd-215-2.fc21.x86_64                       1/131 
Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 200, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 83, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 140, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 165, in resolving
    return_code, resultmsgs = base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 233, in do_transaction
    return_code, resultmsgs = super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 634, in do_transaction
    return_code = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/dnf/lock.py", line 93, in wrapped
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 744, in runTransaction
    self.verify_transaction(return_code, cb.verify_tsi_package)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 808, in verify_transaction
    yumdb_info.releasever = self.conf.releasever
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 295, in __setattr__
    self._write(attr, value)
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 232, in _write
    dnf.pycomp.write_to_file(fo, value)
  File "/usr/lib/python2.7/site-packages/dnf/pycomp.py", line 75, in write_to_file
    f.write(content.encode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'encode'


Version-Release number of selected component (if applicable):
dnf-0.5.3-1.fc21.noarch
hawkey-0.4.17-1.fc21.x86_64
librepo-1.7.4-3.fc21.x86_64
rpm-4.11.90-0.git12844.5.fc21.x86_64


How reproducible:
2 of 2 tries, so maybe always

Steps to Reproduce:
1. sudo dnf --installroot=/home/michich/fedora-tree  install systemd passwd dnf fedora-release vim-minimal
2.
3.

Actual results:
The above traceback at the "Verifying" stage.

Expected results:
successful finish
Comment 1 Ales Kozumplik 2014-07-08 12:06:52 EDT
Interesting, looks like we end up with undefined releasever on a --installroot described in comment 0.
Comment 2 Radek Holy 2014-07-09 03:04:40 EDT
Well, it's not that interesting as it behaves the same as Yum (except the unhandled exception). With Yum, you always have to specify --releasever, if the chroot is empty.
Comment 3 Ales Kozumplik 2014-07-09 03:24:37 EDT
I see, thanks Radek!
Comment 4 Ales Kozumplik 2014-07-09 07:23:22 EDT
Fixed by 7f0496c.
Comment 5 Fedora Update System 2014-07-17 02:42:44 EDT
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/hawkey-0.4.18-2.fc20,dnf-0.5.4-1.fc20,libsolv-0.6.4-0.git2a5c1c4.fc20
Comment 6 Fedora Update System 2014-07-19 02:03:15 EDT
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been pushed to the Fedora 20 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.