[16:14] xnox: Seems complicated for the task of saving top-level things - couldn't you check for '/' in the path? [16:14] (moving here from release :P) [16:15] Laney, this would only fix symlinks in the top-level dir though.... there might be symlinks to dirs in packages too, which should be copied..... [16:15] why would they be blacklisted? [16:16] or we can declare we don't care, than a '/' in relpath would do. [16:16] Laney, because blacklisted package ships it as a dir; whilst top-level one decided to move e.g. plugins dir elsewhere, hence declares a symlink dir. [16:18] doesn't your proposal do this 'bad' thing anyway? [16:19] Laney, also i noticed that libgtk2.0-0 ships a broken symlink. [16:19] $ ls /usr/share/doc/libgtk2.0-0/changelog.gz [16:19] lrwxrwxrwx 1 root root 32 Sep 21 11:54 /usr/share/doc/libgtk2.0-0/changelog.gz -> ../libgtk2.0-common/changelog.gz [16:19] Laney, with my proposal, the top-level package which is kept, will have its symlink installed into target. as is correct what dpkg did. [16:20] Laney, to be fair this is all very hackish. ideally we'd be using stacked squashfs ;-) or like actually execute dpkg to remove packages. [16:20] I see this "return '/' in relpath at the end" [16:20] so I don't get why it would work [16:20] Laney, but by that point all conditions above are true [16:21] as in, it is a blacklisted filename, it is a symlink, it is a symlink to a dir, it is not a broken symlink, and it's not a top level one. [16:21] and is kind of what infinity asked for [16:21] funny he is not in this channel. [16:21] yes and True means blacklisted no? [16:21] yes [16:21] horum. [16:22] as in do not copy. [16:22] argh [16:23] i do wonder if all of the conditions in between simply reduce to to '/i' in relpath [16:23] i do wonder if all of the conditions in between simply reduce to to '/' in relpath [16:24] also not sure if we should be copying broken symlinks from /rofs to /target [16:25] e.g. /usr/share/doc/libgtk2.0-0/changelog.gz [16:25] if the deb has it, I'd say you should keep it [16:25] right, it's just dirs and symlinks are funny. cause they exist in both list to keep and list to blacklist. [16:26] i wonder this [16:26] maybe directories should not be in the blacklist to begin with. [16:26] i.e. /usr /usr/bin should not be in the blacklist..... [16:27] they're all not considered anyway [16:27] what do you mean? [16:27] in this part of the code we decide what to copy from /rofs to /target [16:27] ubiquity stats the things and if it's a directory skips blacklisting [16:27] and /rofs has everything preinstalled. [16:29] meaning we potentially install many empty redundant dirs in /target, if they are fully blacklisted. [16:30] ref count them :-) [16:30] really though, more than a minimal amount of fixing in ubiquity is probably not a great idea at this point [16:31] given Installer NG™ [16:31] Installer NG.io [16:31] hahahahhahaha [16:33] Laney, so i guess i should test this instead http://paste.ubuntu.com/p/kFPTzBMjNC/ [16:34] cause this means our top-level tree stays. [16:34] and it will break when we decide to do usr/sbin -> usr/bin [16:34] kicking the can down the road. [16:34] right [16:34] so my long code works for nested symlinks to dirs. [16:35] because it does a stat on the symlink target, and if that is a dir, it skips blacklisting. [16:35] thus probably i never actually get to the '/' in relpath fallthrough. [16:35] maybe [16:38] how does usrmerge actually work? [16:38] something ships the symlink and dpkg follows that when unpacking packages? [16:46] Laney, debootstrap pre-creates /bin -> usr/bin symlink; dpkg never replaces a symlink with a dir; thus when it unpacks base-files or debs that ship /bin (dir) /bin/true (file) the `true` binary ends up in /usr/bin/true on disk