Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

emerge 9999 from forked repository.

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
linux_os2
Apprentice
Apprentice
Posts: 278
Joined: Wed Aug 29, 2018 8:00 am
Location: Zedelgem Belgium

emerge 9999 from forked repository.

  • Quote

Post by linux_os2 » Sat Apr 05, 2025 9:23 am

I know how to install from a specific branch :

Code: Select all

EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume emerge xxxx.9999
howto emerge from a specific fork of repository?
Thanks
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

Re: emerge 9999 from forked repository.

  • Quote

Post by logrusx » Sat Apr 05, 2025 9:53 am

linux_os2 wrote:I know how to install from a specific branch :

Code: Select all

EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume emerge xxxx.9999
I sense there's confusion here. Say again, what do you think that does and how do you know it does it? Because I don't see such a variable in git-r3 man page.
linux_os2 wrote:howto emerge from a specific fork of repository?
Thanks
Change the EGIT_REPO_URI, but I don't know if that would work on the command line. I think you need to modify the ebuild in a local user overlay.

Best Regards,
Georgi
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Apr 05, 2025 11:09 am

linux_os2,

Do you fork or branch?
A fork is a copy of a repository
A branch is a the same repository but contains work that is being developed, for whatever reason.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
sam_
Developer
Developer
User avatar
Posts: 2816
Joined: Fri Aug 14, 2020 12:33 am

Re: emerge 9999 from forked repository.

  • Quote

Post by sam_ » Sat Apr 05, 2025 11:44 am

logrusx wrote:
linux_os2 wrote:I know how to install from a specific branch :

Code: Select all

EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume emerge xxxx.9999
I sense there's confusion here. Say again, what do you think that does and how do you know it does it? Because I don't see such a variable in git-r3 man page.
linux_os2 wrote:howto emerge from a specific fork of repository?
Thanks
Change the EGIT_REPO_URI, but I don't know if that would work on the command line. I think you need to modify the ebuild in a local user overlay.

Best Regards,
Georgi
EGIT_OVERRIDE variants exist for all of the EGIT_* variables like that, it prints it on emerging (see bug 764422 for improved docs).
Top
linux_os2
Apprentice
Apprentice
Posts: 278
Joined: Wed Aug 29, 2018 8:00 am
Location: Zedelgem Belgium

  • Quote

Post by linux_os2 » Sat Apr 05, 2025 1:16 pm

NeddySeagoon wrote:linux_os2,

Do you fork or branch?
A fork is a copy of a repository
A branch is a the same repository but contains work that is being developed, for whatever reason.
I made a fork of the repository "desultory/ugrd" and cloned "main" and "resume" branch into the "linuxandos2/ugrd".
I want to emerge from the "resume" branch from my own "linuxandos2/ugrd" repository.
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3530
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Sat Apr 05, 2025 4:18 pm

sam_ wrote: EGIT_OVERRIDE variants exist for all of the EGIT_* variables like that, it prints it on emerging (see bug 764422 for improved docs).
Thanks Sam!
linux_os2 wrote:
NeddySeagoon wrote:linux_os2,

Do you fork or branch?
A fork is a copy of a repository
A branch is a the same repository but contains work that is being developed, for whatever reason.
I made a fork of the repository "desultory/ugrd" and cloned "main" and "resume" branch into the "linuxandos2/ugrd".
I want to emerge from the "resume" branch from my own "linuxandos2/ugrd" repository.
From the bug Sam referenced:
- EGIT_OVERRIDE_REPO_${NAME} -- to override the repository URI,

- EGIT_OVERRIDE_BRANCH_${NAME} -- to override the branch,

- EGIT_OVERRIDE_COMMIT_${NAME} -- to override the commit id or tag,

- EGIT_OVERRIDE_COMMIT_DATE_${NAME} -- to request last commit older than
the specified date.
Those shod work for you. You need to override the repo URI. If you want particular branch from it, override that too the same way you've done it in the first post.

Best Regards,
Georgi
Top
linux_os2
Apprentice
Apprentice
Posts: 278
Joined: Wed Aug 29, 2018 8:00 am
Location: Zedelgem Belgium

  • Quote

Post by linux_os2 » Sat Apr 05, 2025 9:10 pm

Those shod work for you. You need to override the repo URI. If you want particular branch from it, override that too the same way you've done it in the first post.
If I do:

Code: Select all

EGIT_OVERRIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd" emerge ugrd -1
then main of my repository is taken.

Code: Select all

>>> Unpacking source...
 * Repository id: desultory_ugrd.git
 * Using EGIT_OVERRIDE_REPO_DESULTORY_UGRD=https://github.com/linuxandos2/ugrd
 * No support will be provided.
 * Fetching https://github.com/linuxandos2/ugrd ...
git fetch https://github.com/linuxandos2/ugrd +HEAD:refs/git-r3/HEAD
From https://github.com/linuxandos2/ugrd
if I combine like:

Code: Select all

EGIT_OVERIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd" EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume emerge ugrd -1
then the resume branch of the desultory/ugrd repository is fetched.

Code: Select all

>>> Emerging (1 of 1) sys-kernel/ugrd-9999::gentoo
>>> Unpacking source...
 * Repository id: desultory_ugrd.git
 * Using EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume
 * No support will be provided.
 * Fetching https://github.com/desultory/ugrd ...
git fetch https://github.com/desultory/ugrd +refs/heads/resume:refs/heads/resume
git symbolic-ref refs/git-r3/sys-kernel/ugrd/0/__main__ refs/heads/resume
 * Checking out https://github.com/desultory/ugrd to /var/tmp/portage/sys-kernel/ugrd-9999/work/ugrd-9999 ...
git checkout --quiet resume
if I do this:

Code: Select all

EGIT_OVERIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd" EGIT_OVERRIDE_BRANCH_LINUXANDOS2_UGRD=resume emerge ugrd -1
then interesting messages are posted:

Code: Select all

>>> Emerging (1 of 1) sys-kernel/ugrd-9999::gentoo
>>> Unpacking source...
 * Repository id: desultory_ugrd.git
 * To override fetched repository properties, use:
 *   EGIT_OVERRIDE_REPO_DESULTORY_UGRD
 *   EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD
 *   EGIT_OVERRIDE_COMMIT_DESULTORY_UGRD
 *   EGIT_OVERRIDE_COMMIT_DATE_DESULTORY_UGRD
 * 
 * Fetching https://github.com/desultory/ugrd ...
git fetch https://github.com/desultory/ugrd +HEAD:refs/git-r3/HEAD
Also the wrong repo is fetched.

Ended up making the resume branch the default one on github.
and specifying only EGIT_OVERRIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd"

Maybe emerge could be enhanced to allow a combination of overrides.

Lots of thanks for your support.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Apr 05, 2025 10:24 pm

Strictly speaking, this is an eclass behavior, not an emerge behavior. What happens if you spell override correctly? Your failing examples all spell it as overide (too few r), so emerge does not notice it is set.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Sat Apr 05, 2025 10:54 pm

linux_os2 wrote:
Those shod work for you. You need to override the repo URI. If you want particular branch from it, override that too the same way you've done it in the first post.
If I do:

Code: Select all

EGIT_OVERRIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd" emerge ugrd -1
then main of my repository is taken.

Code: Select all

>>> Unpacking source...
 * Repository id: desultory_ugrd.git
 * Using EGIT_OVERRIDE_REPO_DESULTORY_UGRD=https://github.com/linuxandos2/ugrd
 * No support will be provided.
 * Fetching https://github.com/linuxandos2/ugrd ...
git fetch https://github.com/linuxandos2/ugrd +HEAD:refs/git-r3/HEAD
From https://github.com/linuxandos2/ugrd
if I combine like:

Code: Select all

EGIT_OVERIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd" EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume emerge ugrd -1
then the resume branch of the desultory/ugrd repository is fetched.

Code: Select all

>>> Emerging (1 of 1) sys-kernel/ugrd-9999::gentoo
>>> Unpacking source...
 * Repository id: desultory_ugrd.git
 * Using EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume
 * No support will be provided.
 * Fetching https://github.com/desultory/ugrd ...
git fetch https://github.com/desultory/ugrd +refs/heads/resume:refs/heads/resume
git symbolic-ref refs/git-r3/sys-kernel/ugrd/0/__main__ refs/heads/resume
 * Checking out https://github.com/desultory/ugrd to /var/tmp/portage/sys-kernel/ugrd-9999/work/ugrd-9999 ...
git checkout --quiet resume
if I do this:

Code: Select all

EGIT_OVERIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd" EGIT_OVERRIDE_BRANCH_LINUXANDOS2_UGRD=resume emerge ugrd -1
then interesting messages are posted:

Code: Select all

>>> Emerging (1 of 1) sys-kernel/ugrd-9999::gentoo
>>> Unpacking source...
 * Repository id: desultory_ugrd.git
 * To override fetched repository properties, use:
 *   EGIT_OVERRIDE_REPO_DESULTORY_UGRD
 *   EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD
 *   EGIT_OVERRIDE_COMMIT_DESULTORY_UGRD
 *   EGIT_OVERRIDE_COMMIT_DATE_DESULTORY_UGRD
 * 
 * Fetching https://github.com/desultory/ugrd ...
git fetch https://github.com/desultory/ugrd +HEAD:refs/git-r3/HEAD
Also the wrong repo is fetched.
I think it is because you name the "EGIT_OVERIDE_REPO_DESULTORY_UGRD" incorrectly. First missing a "R" in the word "OVERIDE" It should be "EGIT_OVERRIDE_REPO_XXXXX_UGRD. Secondly the XXXXX portion should be "LINUXANDOS2".
Top
linux_os2
Apprentice
Apprentice
Posts: 278
Joined: Wed Aug 29, 2018 8:00 am
Location: Zedelgem Belgium

  • Quote

Post by linux_os2 » Sun Apr 06, 2025 8:44 am

I think it is because you name the "EGIT_OVERIDE_REPO_DESULTORY_UGRD" incorrectly. First missing a "R" in the word "OVERIDE" It should be "EGIT_OVERRIDE_REPO_XXXXX_UGRD. Secondly the XXXXX portion should be "LINUXANDOS2".
silly fault of me.
This works:

Code: Select all

EGIT_OVERRIDE_REPO_DESULTORY_UGRD="https://github.com/linuxandos2/ugrd" EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume emerge ugrd -1

Code: Select all

Calculating dependencies... done!
Dependency resolution took 3.70 s (backtrack: 0/20).


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-kernel/ugrd-9999::gentoo
>>> Unpacking source...
 * Repository id: desultory_ugrd.git
 * Using EGIT_OVERRIDE_REPO_DESULTORY_UGRD=https://github.com/linuxandos2/ugrd
 * Using EGIT_OVERRIDE_BRANCH_DESULTORY_UGRD=resume
 * No support will be provided.
 * Fetching https://github.com/linuxandos2/ugrd ...
git fetch https://github.com/linuxandos2/ugrd +refs/heads/resume:refs/heads/resume
From https://github.com/linuxandos2/ugrd
   9b4363a..043f5ab  resume     -> resume
git symbolic-ref refs/git-r3/sys-kernel/ugrd/0/__main__ refs/heads/resume
 * Checking out https://github.com/desultory/ugrd to /var/tmp/portage/sys-kernel/ugrd-9999/work/ugrd-9999 ...
git checkout --quiet resume
pingtoo & Hu thanks a lot.
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

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