Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

How to change branch of kits from meta-repo


cafaia

Question

Hello everyone!

 

I would like to change the branch of "xorg-kit" from 1.17-prime to master permanently, because I did it but it did not work:

 

# cd /var/git/meta-repo/kits/xorg-kit
# git branch
* (HEAD detached at 52fa72a)
  1.17-prime
# git checkout 1.17-prime
Switched to branch '1.17-prime'
Your branch is up-to-date with 'origin/1.17-prime'.
# git branch 
* 1.17-prime
# git checkout master
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
# git branch
  1.17-prime
* master
 
I wait for help.
Thanks to all!
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

At first

 

# install -d /var/git
# cd /var/git
# git clone https://github.com/funtoo/meta-repo.git
# cd meta-repo
# git submodule init
# git submodule update
# rm /usr/share/portage/config/repos.conf
# mv /etc/portage/repos.conf /etc/portage/repos.conf.bak
# ln -s /var/git/meta-repo/repos.conf /etc/portage/repos.conf
# chown -R portage:portage /var/git/meta-repo

 

Then I use to update this this "little" script in root dir.

ci74771ht ~ # cat Aggiorna  
eix-sync
cd /var/git/meta-repo
git pull
git submodule update
chown -R portage:portage /var/git/meta-repo
layman -S
cd -
emerge -DNu world --with-bdeps=y

Then

ci74771ht ~ # cd /var/git/meta-repo/kits/xorg-kit/ 
ci74771ht xorg-kit # git branch -a 
* (HEAD detached at 52fa72a) 
 1.17-prime
 master
 remotes/origin/1.17-prime 
 remotes/origin/HEAD -> origin/1.17-prime 
 remotes/origin/master 
ci74771ht xorg-kit # git checkout master 
La precedente posizione di HEAD era 52fa72a... updates
Si ? passati al branch 'master'
Your branch is up-to-date with 'origin/master'.
ci74771ht xorg-kit # git branch -a       
 1.17-prime
* master 
 remotes/origin/1.17-prime 
 remotes/origin/HEAD -> origin/1.17-prime 
 remotes/origin/master
Link to comment
Share on other sites

  • 0

Hello, Oleg!

 

Thank you very much for the information!

I created a script with this:

 

#!/bin/sh
 
cd /var/git/meta-repo/
git pull
git submodule update
cd /var/git/meta-repo/kits/xorg-kit/
git checkout master
git pull
cd /root/
chown -R portage:portage /var/git/meta-repo
 
And now everything is going well!
Thanks so much for the help!
Link to comment
Share on other sites

  • 0

Based on the above script from @cafaia, I created a tool (shell + gawk) to do syncs on each metarepo section, allow selection of desired branches per kit, and persist those branch selections across syncs.  Perhaps this can be useful to someone until ego does this internally.

Its available here: https://github.com/gissf1/funtoo-metarepo-esync/

I don't expect it to be needed for long, but feel free to contribute to or borrow from its code as desired.

Link to comment
Share on other sites

  • 0

I think I noticed some of that functionality when I installed ego-2.2.0 earlier, and I love the interface's color output!  It is much easier to read and more informative than what I did in my script's dumb output.

I've already updated my system to ego-2.2.1 and added the entries manually to ego.conf.  Thanks for the great feature!

As for my script, it should probably be deprecated now (even though it hasn't been posted for long), but if I consider making updates, I'll dig a bit more and see how hard it would be to add the functionality directly into ego's kit module and try to submit a pull/merge request instead :)

One thing I would consider adding is the ability to set from the command line without an editor, as my script allowed "esync set <kit-name> <branch-name>" to set the branch for a kit.  This is likely trivial to add to ego since it obviously has an ini-style parser already in use for the ego.conf file.  If I get through my current system update process any time soon, I may try to do this myself.

Thanks again for all you do!

Link to comment
Share on other sites

×
×
  • Create New...