• [gentoo-user] ebuild failure in unpack

    From n952162@21:1/5 to All on Tue Feb 25 09:10:01 2025
    I just successfully updated world.  In order to make room in my root, I subsequently moved /var/tmp/portage to a mounted usb stick and symlinked
    it to /var/tmp.

    /var/cache/{binpkgs,distfiles} are already successfully located on that
    device, over symlinks.

    Now, when I try to emerge pavucontrol, all 10 required packages fail,
    with a failure in the unpack phase of ebuild.

    My mounted storage is:

     /dev/sdb2 on /lcl/USB_SanDisk_3.2Gen1_0901709d...ad012f/2 type ext4 (rw,nosuid,nodev,relatime)

    I also have such error messages:

    /usr/bin/install: cannot create directory "/var/tmp/portage": Permission
    denied
     * ERROR: app-text/iso-codes-4.17.0::gentoo failed (unpack phase):

    Apparently, the unpack phase wants to create /var/tmp/portage, and if it already exists, it failes?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Jolly@21:1/5 to All on Tue Feb 25 09:20:02 2025
    Hi,

    On 25/2/25 18:05, n952162 wrote:
    In order to make room in my root, I
    subsequently moved /var/tmp/portage to a mounted usb stick and symlinked
    it to /var/tmp.

    Have you tried mounting (or bind mounting) to /var/tmp/portage instead
    of symlinking?

    Regards,

    Matt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From n952162@21:1/5 to Matt Jolly on Tue Feb 25 09:30:01 2025
    That's an option.  It means I'd have to dedicate an entire volume to
    that, but it's doable.

    But if the unpack phase insists on doing a "mkdir /var/tmp/portage",
    would that work with a mounted drive?

    In fact, it's hard for me to image that the unpack phase would fail on
    that, it's just a first guess.  I just want to understand what's going
    on and be sure I'm not making some mistake that'll bite me later.



    On 2025/02/25 09:16, Matt Jolly wrote:
    Hi,

    On 25/2/25 18:05, n952162 wrote:
    In order to make room in my root, I
    subsequently moved /var/tmp/portage to a mounted usb stick and symlinked
    it to /var/tmp.

    Have you tried mounting (or bind mounting) to /var/tmp/portage instead
    of symlinking?

    Regards,

    Matt



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From n952162@21:1/5 to All on Tue Feb 25 09:30:01 2025
    This is a multi-part message in MIME format.
    On 2025/02/25 09:05, n952162 wrote:


    I have a second  question that's a follow up to that.

    As explained, I moved /var/tmp/portage to a mounted drive and symlinked
    it.  When that failed, I copied that directory back to /var/tmp/portage
    and was able to emerge pavucontrol.

    But now I observe something I don't understand.  The moved directory
    tree has these contents:

    drwxrwxr-x 3 portage portage 4096 Feb 25 07:20 app-text
    drwxrwxr-x 4 portage portage 4096 Feb 25 07:20 dev-libs
    drwxrwxr-x 3 portage portage 4096 Feb 25 05:04 dev-python
    drwxrwxr-x 3 portage portage 4096 Feb 24 22:25 mail-client
    drwxrwxr-x 3 portage portage 4096 Feb 25 07:20 media-libs
    drwxrwxr-x 3 portage portage 4096 Feb 25 05:53 net-misc
    drwxrwxr-x 3 portage portage 4096 Feb 25 04:50 www-client

    But the copied-back directory tree only has these contents:

    drwxrwxr-x 3 portage portage 4096 Feb 25 05:04 dev-python
    drwxrwxr-x 3 portage portage 4096 Feb 24 22:25 mail-client
    drwxrwxr-x 3 portage portage 4096 Feb 25 05:53 net-misc
    drwxrwxr-x 3 portage portage 4096 Feb 25 04:50 www-client

    Does portage *remove* some files in /var/tmp/portage but retain others?

    This is important to me because I want to use this system as a local
    binary server to other gentoo systems and because I want to retain the
    build environments.


    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <div class="moz-cite-prefix">On 2025/02/25 09:05, n952162 wrote:<br>
    </div>
    <p><br>
    </p>
    <p>I have a second  question that's a follow up to that.</p>
    <p>As explained, I moved /var/tmp/portage to a mounted drive and
    symlinked it.  When that failed, I copied that directory back to
    /var/tmp/portage and was able to emerge pavucontrol.</p>
    <p>But now I observe something I don't understand.  The moved
    directory tree has these contents:</p>
    <p><font face="monospace">drwxrwxr-x 3 portage portage 4096 Feb 25
    07:20 app-text<br>
    drwxrwxr-x 4 portage portage 4096 Feb 25 07:20 dev-libs<br>
    drwxrwxr-x 3 portage portage 4096 Feb 25 05:04 dev-python<br>
    drwxrwxr-x 3 portage portage 4096 Feb 24 22:25 mail-client<br>
    drwxrwxr-x 3 portage portage 4096 Feb 25 07:20 media-libs<br>
    drwxrwxr-x 3 portage portage 4096 Feb 25 05:53 net-misc<br>
    drwxrwxr-x 3 portage portage 4096 Feb 25 04:50 www-client</font></p>
    <p>But the copied-back directory tree only has these contents:</p>
    <p><font face="monospace">drwxrwxr-x 3 portage portage 4096 Feb 25
    05:04 dev-python<br>
    drwxrwxr-x 3 portage portage 4096 Feb 24 22:25 mail-client<br>
    drwxrwxr-x 3 portage portage 4096 Feb 25 05:53 net-misc<br>
    drwxrwxr-x 3 portage portage 4096 Feb 25 04:50 www-client</font></p>
    <p>Does portage <b>remove</b> some files in <font face="monospace">/var/tmp/portage</font>
    but retain others?</p>
    <p>This is important to me because I want to use this system as a
    local binary server to other gentoo systems and because I want to
    retain the build environments.</p>
    <p><br>
    </p>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Jolly@21:1/5 to All on Tue Feb 25 09:40:02 2025
    On 25/2/25 18:23, n952162 wrote:
    I have a second  question that's a follow up to that.

    Does portage *remove* some files in /var/tmp/portage but retain others?

    Yes. Successful merges are purged, otherwise you'd quickly run out of
    disk space.

    This is important to me because I want to use this system as a local
    binary server to other gentoo systems and because I want to retain the
    build environments.


    See `man make.conf` - keyword "keepwork"[1]. It's a feature that does
    precisely that. It's really not recommended though. What sort of
    workflow are you envisioning that would make this useful?

    Things can go wrong using keepwork; the existing ebuild environment is
    not sourced when reusing ${WORKDIR} (among other things) which I assume
    is the intent here, and that can result in unpredictable behaviour.

    Regards,

    Matt

    1: https://devmanual.gentoo.org/eclass-reference/make.conf/index.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From n952162@21:1/5 to Matt Jolly on Tue Feb 25 10:00:02 2025
    On 2/25/25 09:35, Matt Jolly wrote:
    Hi,

    That's an option.  It means I'd have to dedicate an entire volume to
    that, but it's doable.

    A bind mount will not require this.

    Bind mount operation
       Remount part of the file hierarchy somewhere else. The call is: >      mount --bind olddir newdir
    . . .
           After this call the same contents are accessible in two places.
    -- `man 8 mount`


    Ah!  Excellent idea!  Thank you!


    But if the unpack phase insists on doing a "mkdir /var/tmp/portage",
    would that work with a mounted drive?

    It seems to be `/usr/bin install`, fwiw. A full build log would make troubleshooting anything more than a stab in the dark.

    Let's find out. Maybe it doesn't like the symlink?

    In fact, it's hard for me to image that the unpack phase would fail on
    that, it's just a first guess.  I just want to understand what's going
    on and be sure I'm not making some mistake that'll bite me later.

    I don't know off the top of my head. If you really want to understand
    what's going on you'll need to read the Portage sources.

    Regards,

    Matt


    I think I'll try the really fitting idea from Viorel: PORTAGE_TMPDIR.

    I'm still curious about what the problem with the symlink is, in this
    case, but I can't get to it right now.


    Thanks, all!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)