Project

General

Profile

Bug #731

[libretools] /srcdest is never emptied

fauno - almost 9 years ago - . Updated almost 7 years ago.

Status:
fixed
Priority:
bug
Category:
-
Assignee:
% Done:

100%


Description

i noticed sourceballs are kept in chroot's /srcdest, i'd expected `librechroot` to clean them, no?

History

#1

Updated by lukeshu almost 9 years ago

sourceballs are kept in chroot's /srcdest

No, they aren't. Everything there is a symlink (so it's not taking up much space).

And they are wiped out every time libremakepkg is run, so it isn't never emptied either. (The reason they are there at all is that makepkg checks that $SRCDEST is writable, even if it won't need to do any writing, so we symlink all of the files in /srcdest_host into /srcdest to make the directory writable, without actually giving write access to the sources.)

Even so, libremakepkg should probably clean up before it exits, instead of cleaning up from the last run at initialization.

#2

Updated by fauno almost 9 years ago

well it's true i didn't check if they were symlinks (they are), but /srcdest_host is empty and i now see a lot of dead symlinks in /srcdest even after i removed them. i ran `librechroot update`, `libremakepkg` and `librerelease`, in which stage are they removed?

#3

Updated by fauno almost 9 years ago

or you mean it doesn't matter because they're just dead symlinks

#4

Updated by lukeshu almost 9 years ago

/srcdest_host is empty because it's a mount point. libremakepkg bind-mounts the outside makepkg.conf:$SRCDEST to it.

The symlinks from the last run are removed by libremakepkg before building a new package. So it wipes out the old links, makes new ones, then leaves the new ones there after it exits.

The flow in libremakepkg goes something like

 - libremakepkg:build()
   - makechrootpkg.sh:prepare_chroot()
     - writes makechrootpkg.sh:_chrootprepare() to $chrootdir/chrootprepare
     - writes makechrootpkg.sh:_chrootbuild() to $chrootdir/chrootbuild
   - librechroot    run /chrootprepare
   - run_hook pre_build
   - librechroot -N run /chrootbuild
   - run_hook post_build

#5

Updated by lukeshu almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from open to fixed

In git, this no longer happens, as srcdest is bind-mounted directly.

Also available in: Atom PDF