Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

[Solved]Help writing ebuild w/ dash in upstream archive name

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
rab0171610
l33t
l33t
Posts: 721
Joined: Sat Dec 24, 2022 1:41 am

[Solved]Help writing ebuild w/ dash in upstream archive name

  • Quote

Post by rab0171610 » Fri Jul 11, 2025 4:30 pm

I am trying to update a local ebuild for Onboard onscreen keyboard.
https://github.com/dr-ni/onboard/releases
The current release version is named v1.4.3-7 .
The line for the SRC_URI is:

Code: Select all

SRC_URI="https://github.com/dr-ni/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
My understanding is that portage dbes not allow for there to be dashes in package names.
If the ebuild was allowed to be named oboard-1.4.3-7, then the SRC_URI should resolve correctly to https://github.com/dr-ni/onboard/archiv ... 3-7.tar.gz
However, since the dash is not allowed, I understandably get:

Code: Select all

ebuild onboard-1.4.3-7.ebuild digest
ebuild: /var/db/repos/localrepo/app-accessibility/onboard/onboard-1.4.3-7.ebuild: app-accessibility/onboard-1.4.3-7: does not follow correct package syntax
If I were to just to experiment and shorten the ebuild name to 1.4.3, without the '-7', which would be onboard-1.4.3.ebuild, obviously it will not correctly resolve the download URL when trying to update the ebuild manifiest.
Per the guidance in:
viewtopic-t-568730-start-0.html
If I add:

Code: Select all

MY_PV="-7"

And change the SRC_URI accordingly:

Code: Select all

SRC_URI="https://github.com/dr-ni/${PN}/archive/refs/tags/${PV}${MY_PV}.tar.gz -> ${P}${MY_PV}.tar.gz"
Then I can update the manifest correctly.
If I step through the ebuild process for troubleshooting purposes:

Code: Select all

 ebuild onboard-1.4.3.ebuild prepare
 * ERROR: app-accessibility/onboard-1.4.3::localrepo failed (prepare phase):
 *   The source directory '/var/tmp/portage/app-accessibility/onboard-1.4.3/work/onboard-1.4.3' doesn't exist
 * 
 * Call stack:
 *            ebuild.sh, line  777:  Called __ebuild_main 'prepare'
 *   phase-functions.sh, line 1090:  Called __dyn_prepare
 *   phase-functions.sh, line  404:  Called die
 * The specific snippet of code:
 *              die "The source directory '${S}' doesn't exist"
I understand this because the actual working directory is named after the downloaded archive, /var/tmp/portage/app-accessibility/onboard-1.4.3/work/onboard-1.4.3-7/ and not /var/tmp/portage/app-accessibility/onboard-1.4.3/work/onboard-1.4.3/

If I stop here and rename the directory in /var/tmp/portage to what portage expects /var/tmp/portage/app-accessibility/onboard-1.4.3/work/onboard-1.4.3/ I can then step through the ebuild and merge the package correctly.

That works and gets the package installed for now, but how do I get this to work correctly? I have come as far on my own as I think I can without further help. For anyone that took the time to read this far, I appreciate it and any guidance would be welcome.

Rab
Last edited by rab0171610 on Sat Jul 12, 2025 2:06 am, edited 1 time in total.
Top
grknight
Retired Dev
Retired Dev
Posts: 2560
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Fri Jul 11, 2025 4:45 pm

If an archive does not unpack to the expected location, you then set the S variable.
For example:

Code: Select all

S="${WORKDIR}/${PN}-${PV}${MY_PV}"
Edit: For consistency sake, I would suggest setting the file name to onboard-1.4.3_p7.ebuild as this author likes post release revisions. (_p7 here is "patch 7")
Then,

Code: Select all

MY_PV="${PV/_p/-}"
SRC_URI="https://github.com/dr-ni/${PN}/archive/refs/tags/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
Last edited by grknight on Fri Jul 11, 2025 5:13 pm, edited 1 time in total.
Top
rab0171610
l33t
l33t
Posts: 721
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Fri Jul 11, 2025 5:12 pm

Thank you, I will look into that. I appreciate your help.
Top
rab0171610
l33t
l33t
Posts: 721
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Fri Jul 11, 2025 7:21 pm

grknight wrote:If an archive does not unpack to the expected location, you then set the S variable.
For example:

Code: Select all

S="${WORKDIR}/${PN}-${PV}${MY_PV}"
Edit: For consistency sake, I would suggest setting the file name to onboard-1.4.3_p7.ebuild as this author likes post release revisions. (_p7 here is "patch 7")
Then,

Code: Select all

MY_PV="${PV/_p/-}"
SRC_URI="https://github.com/dr-ni/${PN}/archive/refs/tags/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
grknight, thank you for your insights. That works perfectly.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic