🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.gentoo.user
Article #126

[gentoo-user] custom ebuild issues: tar archive extraction

#126
From: Pocket
Date: Thu, 12 Nov 2026 02:00
53 lines
2992 bytes
It's me again, I need a bit more help.....

I have the ebuild working up to but not including the prepare phase.

This is the error

gentoo /var/db/repos/pocket/sys-kernel/linux-rpi # ebuild 
linux-rpi-6.18.50.ebuild configure
 >>> Not marked as unpacked; recreating WORKDIR...
  * linux-stable_20260911.tar.gz BLAKE2B SHA512 size ;-) ... 
                                   [ ok ]
 >>> Unpacking source...
 >>> Unpacking 'linux-stable_20260911.tar.gz' to 
/var/tmp/portage/sys-kernel/linux-rpi-6.18.50/work
 >>> Source unpacked in /var/tmp/portage/sys-kernel/linux-rpi-6.18.50/work
  * ERROR: sys-kernel/linux-rpi-6.18.50::pocket failed (prepare phase):
  *   The source directory 
'/var/tmp/portage/sys-kernel/linux-rpi-6.18.50/work/linux-rpi-6.18.50' 
doesn't exist
  *
  * Call stack:
  *            ebuild.sh, line  850:  Called __ebuild_main 'prepare'
  *   phase-functions.sh, line 1164:  Called __dyn_prepare
  *   phase-functions.sh, line  453:  Called die
  * The specific snippet of code:
  *              die "The source directory '${S}' doesn't exist"


The source archive actually extracts to
/var/tmp/portage/sys-kernel/linux-rpi-6.18.50/work/linux-stable_20260911/

It is looking for
  /var/tmp/portage/sys-kernel/linux-rpi-6.18.50/work/linux-rpi-6.18.50

How do I tweak the ebuild to correct the issue above?
IE the tar archive extracts to a directory that is not the same as the 
archives filename.  I know how to do this in an archlinux PKGBUILD but 
not in a ebuild.


Also the symlink
/var/tmp/portage/sys-kernel/linux-rpi-6.18.50/work/ files -> 
/var/db/repos/pocket/sys-kernel/linux-rpi/files is broken

/var/db/repos/pocket/sys-kernel/linux-rpi/files doesn't exist

It is a bit hard to grok this because the wiki information is spread out 
over multiple files so I get lost sometimes.

Once I get this to work I will have a better understanding.

-- 
Hindi madali ang maging ako
Technical Details
Message-ID: <NYsgx-bkTc-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Pocket <pocket@oldfart.online>
Newsgroups: linux.gentoo.user
Subject: [gentoo-user] custom ebuild issues: tar archive extraction
Date: Thu, 12 Nov 2026 03:00:01 +0100
Message-ID: <NYsgx-bkTc-5@gated-at.bofh.it>
List-ID: Gentoo Linux mail <gentoo-user.gentoo.org>
Reply-To: gentoo-user@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Envelope-From: pocket@oldfart.online
Approved: robomod@news.nic.it
Lines: 53
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Wed, 11 Nov 2026 20:52:26 -0500
X-Original-Message-ID: <6efebe75-8e79-4402-b916-6947d93c7869@oldfart.online>