Bug 975858 - dnf can't install in an empty installroot
Summary: dnf can't install in an empty installroot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-19 13:25 UTC by Harald Hoyer
Modified: 2014-09-30 23:41 UTC (History)
4 users (show)

Fixed In Version: libsolv-0.3.0-5.git228d412.fc19
Clone Of:
Environment:
Last Closed: 2013-07-01 01:37:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Harald Hoyer 2013-06-19 13:25:26 UTC
$ mkdir container
$ sudo dnf -y --releasever=19 --nogpg --installroot=$(pwd)/container --disablerepo='*' --enablerepo=fedora install filesystem 
Config Error: No such file or directory: '/home/harald/git/fedora/filesystem/container/var/log/dnf.log'

$ mkdir -p container/var/log
$ sudo dnf -y --releasever=19 --nogpg --installroot=$(pwd)/container --disablerepo='*' --enablerepo=fedora install filesystem
mkdir: cannot create directory ‘container’: File exists
load_system_repo() failed.

Comment 1 Kay Sievers 2013-06-19 13:31:40 UTC
Note:
Things in general must be *very* careful when creating anything in the empty
and fresh root directory.

The filesystem.rpm sets up a couple of symlinks to directories, blindly
creating real directories instead of symlinks here will break setups.

Comment 2 Ales Kozumplik 2013-06-19 14:13:22 UTC
(In reply to Kay Sievers from comment #1)
> Note:
> Things in general must be *very* careful when creating anything in the empty
> and fresh root directory.

Kay, can you be more specific? DNF needs at least to put the .pid files somewhere, the logs, the metadata cache and the yumdb. Right now it's:

/var/run/dnf.pid
/var/log/dnf*log
/var/cache/dnf/
/var/lib/dnf/yumdb/

How should DNF ideally place these? 

Also, it is definitely not possible to wait until the filelist RPM is installed (it might not even be a part of the transaction and we need the cache dir before even downloading any RPMs).

Comment 3 Harald Hoyer 2013-06-19 14:34:48 UTC
/var/run/dnf.pid -> /run/dnf.pid

Comment 4 Kay Sievers 2013-06-19 14:40:41 UTC
(In reply to Harald Hoyer from comment #3)
> /var/run/dnf.pid -> /run/dnf.pid

This should be safe for now, for the current status quo, yes.

But the whole approach to place things into deeper-level subdirs in an
empty / before filesystem.rpm is installed is just a recipe for future
problems. :)
I guess we need some general solution to that problem, I'm confident
other tools or future changes will run into the same problem again.

Comment 5 Ales Kozumplik 2013-06-21 13:21:45 UTC
fixed by ae1e78f, included in dnf-0.3.8.

Comment 6 Fedora Update System 2013-06-24 13:25:57 UTC
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19

Comment 7 Fedora Update System 2013-06-24 18:50:25 UTC
Package libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libsolv-0.3.0-5.git228d412.fc19 librepo-0.0.4-2.fc19 hawkey-0.3.14-1.git78b3aa0.fc19 dnf-0.3.8-2.git85524ae.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11602/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-07-01 01:37:41 UTC
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been pushed to the Fedora 19 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.