After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710097 - /etc merge fails if a directory in /etc was removed
/etc merge fails if a directory in /etc was removed
Status: RESOLVED FIXED
Product: ostree
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: OSTree maintainer(s)
OSTree maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-10-14 12:45 UTC by Sjoerd Simons
Modified: 2013-10-15 18:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for the testsuite to reproduce the issue (1.21 KB, patch)
2013-10-14 12:45 UTC, Sjoerd Simons
none Details | Review
sysroot: Handle deleting directories in /etc (2.31 KB, patch)
2013-10-15 18:13 UTC, Colin Walters
committed Details | Review

Description Sjoerd Simons 2013-10-14 12:45:10 UTC
Created attachment 257251 [details] [review]
Patch for the testsuite to reproduce the issue

When upgrading after removing a directory under /etc i hit the following error:
  ostree admin: During /etc merge: Is a directory

Problem seems to be that the diff function lists a directory as removed, which then gets passed to ot_gfile_ensure_unlinked which bails as the entry isn't a file. 

Attached is a patch for the testsuite to reproduce this error.
Comment 1 Colin Walters 2013-10-15 18:13:00 UTC
Created attachment 257380 [details] [review]
sysroot: Handle deleting directories in /etc

We need to use the full shutil_rm_rf() in order to actually delete
complete directories.

Test suite code based on a patch from Sjoerd Simons <sjored@luon.net>
Comment 2 Jeremy Whiting 2013-10-15 18:45:18 UTC
That looks good to me, and makes sense. Go for it.
Comment 3 Colin Walters 2013-10-15 18:56:53 UTC
Attachment 257380 [details] pushed as b2a98f4 - sysroot: Handle deleting directories in /etc