[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[atomic-devel] rpm-ostree: dead code that copies aside yum repos


In older versions of rpm-ostree there was a bug in the fact that 6fd8515
looked for yum repo files in the same directory as treefiles (thus rpm-ostree 
added "--setopt=reposdir=<path>" to the yum command), but did not account
for this in the "Hideous workaround"[1] for yum prefering directories within 
the installroot. This means that if your treefile directory happened to be a
directory that existed inside of the installroot (i.e. /root/) then the second
yum transaction[2] would fail because the directory inside the installroot, 
which yum prefers, didn't have the repo files.

This bug is no longer hit because of 827e711 in which the second yum transaction 
was deleted because it is no longer needed.

Is there ever a case where the second transaction will be needed again? 

If so then there is a bug here that needs to be fixed. If not then I believe 
some of the code within rpmostree-compose-builtin-tree.c is no longer needed and
can be removed. I have created and (at least minorly) tested a git commit that 
removes this dead code [3] (I'll create a pull request if desired). 

- Dusty 

[1] https://github.com/projectatomic/rpm-ostree/blob/v2014.103/src/rpmostree-compose-builtin-tree.c#L462
[2] https://github.com/projectatomic/rpm-ostree/blob/v2014.103/src/rpmostree-compose-builtin-tree.c#L997
[3] https://github.com/dustymabe/rpm-ostree/commit/1f841906f26f503d7f43d53ce0bb91c0fab43c58

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]