Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eix-sync vs emerge --sync
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Sat May 30, 2020 8:30 pm    Post subject: eix-sync vs emerge --sync Reply with quote

Hi,

Just curious, although eix-sync actually uses emerge --sync under the hood i can't say i saw a lot of people saying that it's what they are using.
Instead i think the majority uses emerge --sync

I was wondering why is that, if eix actually takes care of everything and eix-update is also widely used along with emerge --sync anyway.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3432

PostPosted: Sat May 30, 2020 9:46 pm    Post subject: Reply with quote

Gentoo and portage are pretty much the same thing. I know there are other package managers (and I have built Gentoo images without any package manager inside), but they are the exception rather than the rule. The rule is "there is no Gentoo without emerge"
Eix is just search helper. A convenience tool that merely speeds up execution of your query. And it's not even installed by default - unlike emerge.

So we rely on emerge being there, while relying on eix being there would confuse all the newbies who haven't installed it yet. And then you have to emerge that new package anyway, and you have to sync for the first time before you can install eix, so just use that damn emerge --sync directly instead of inventing fancy ways to invoke the same thing.
This my reason behind your observation.

Also, yeah, I think eix --sync uses emerge --sync followed by eix-update.
You can call eix-update manually after emerge --sync. It will regenerate metadata used for fast searches. There is no need to eix --sync ever. That's - again - a convenience option which replaces 2 commands with a single one and performs repeatable steps automatically.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2853

PostPosted: Sat May 30, 2020 11:56 pm    Post subject: Reply with quote

Reminder there's also /etc/portage/postsync.d/ that can be used. I personally prefer have eix handled there (along with my other postsync scripts) and use normal sync commands.

I believe eix-sync heralds from a time that directory wasn't an option and is still used today anyway (not like it matters :))
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 497
Location: Gainesville, FL, USA

PostPosted: Sun May 31, 2020 2:03 am    Post subject: Reply with quote

One more consideration. I share a single Portage tree via either bind mounts (when on the same host as the tree) or NFS mounts. That means that a single emerge --sync does it for all the machines on the network. I don't try to share an eix database, though. That means I do eix --update in multiple places after doing the single emerge --sync.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3425
Location: Canada

PostPosted: Sun May 31, 2020 4:08 am    Post subject: Reply with quote

szatox wrote:


Also, yeah, I think eix --sync uses emerge --sync followed by eix-update.
You can call eix-update manually after emerge --sync. It will regenerate metadata used for fast searches. There is no need to eix --sync ever. That's - again - a convenience option which replaces 2 commands with a single one and performs repeatable steps automatically.


Three commands: emerge --sync, eix-update and eix-diff
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sun May 31, 2020 11:18 am    Post subject: Reply with quote

miket wrote:
That means I do eix --update in multiple places after doing the single emerge --sync.

You can add
/etc/eixrc/20-eix-sync-does-not-sync wrote:
# Make options -uT the default for eix-sync,
# i.e. make it only update the database.
EIX_SYNC_CONF="${EIX_SYNC_CONF}
-uT"

after which you can still use "eix-sync" instead of "eix-update".
The advantage is that "eix-sync" would keep a backup of the previous database so that eix-diff can be used. (And by default, eix-sync would also call eix-diff at the end.)
Back to top
View user's profile Send private message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Sun May 31, 2020 11:20 am    Post subject: Reply with quote

So i see most of you would prefer running 2 or 3 commands instead of 1, this is interesting.
Although it's true portage is built in while eix needs to get emerged first, no real reason using several commands unless you want that separation for better control or some complicated situation.
I don't know maybe i'm just a lazy programmer but after you know what you are doing running a single command or shortcut makes more sense.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sun May 31, 2020 11:21 am    Post subject: Reply with quote

szatox wrote:
You can call eix-update manually after emerge --sync. It will regenerate metadata used for fast searches. There is no need to eix --sync ever.

If you just call emerge --sync + eix-update manually without any other configuration, then eix-diff will not work.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3432

PostPosted: Sun May 31, 2020 12:24 pm    Post subject: Reply with quote

Troopo wrote:
So i see most of you would prefer running 2 or 3 commands instead of 1, this is interesting.

No, I only run one command. And every time someone in the forums suggests running emerge --sync it also is just one command, since we already know what packages have to be installed, and there is no need to search for them with eix.

There is no point in running emerge --sync and then eix --sync. If you need eix, there is no reason not to use it instead.
If you don't need it (I haven't used it for years!), you can stick with emerge --sync. And this one is basic enough it works for everybody, therefore it's preferred in support topics.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun May 31, 2020 2:26 pm    Post subject: Reply with quote

szatox wrote:
If you don't need it (I haven't used it for years!), you can stick with emerge --sync. ...

I use it all the time to resolve blockers and to see which flags are available/ defaulted.
Back to top
View user's profile Send private message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Sun May 31, 2020 9:36 pm    Post subject: Reply with quote

szatox wrote:
Troopo wrote:
So i see most of you would prefer running 2 or 3 commands instead of 1, this is interesting.

No, I only run one command. And every time someone in the forums suggests running emerge --sync it also is just one command, since we already know what packages have to be installed, and there is no need to search for them with eix.

There is no point in running emerge --sync and then eix --sync. If you need eix, there is no reason not to use it instead.
If you don't need it (I haven't used it for years!), you can stick with emerge --sync. And this one is basic enough it works for everybody, therefore it's preferred in support topics.


Solid point, only thing missing is why would one need it or wouldn't need it.

Tony0945 wrote:
szatox wrote:
If you don't need it (I haven't used it for years!), you can stick with emerge --sync. ...

I use it all the time to resolve blockers and to see which flags are available/ defaulted.


This is very useful, szatox how do you manage this without eix?
Back to top
View user's profile Send private message
Corbit
n00b
n00b


Joined: 22 May 2020
Posts: 7

PostPosted: Mon Jun 01, 2020 2:33 pm    Post subject: Reply with quote

Isn't emaint sync --allrepos the new emerge --sync?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3432

PostPosted: Mon Jun 01, 2020 6:53 pm    Post subject: Reply with quote

Oh, it's really simple, I'm just a freakin' genius :lol:
And seriously now, my systems have matured over time, so there is little need to search for new stuff. My toys reached the point, where that stuff just works, and I'm busy with other (real-life) things than intentionally breaking them. Not breaking my stuff intentionally greatly reduces total time spent maintaining said stuff. Upgrade once every 2 weeks is good enough.

I inspect USE flags during updates with good, old emerge -avuND @world. Emerge resolves dependencies, shows me the plan, I accept it and leave for other things.
Failures and blockers don't happen very often, and wen they do, masking one package (or updating it explicitly with emerge -1 <package> ) usually helps.
And emerge is kind enough to tell you exactly where the immediate problem is.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2853

PostPosted: Tue Jun 02, 2020 3:04 am    Post subject: Reply with quote

Corbit wrote:
Isn't emaint sync --allrepos the new emerge --sync?
Technically they're actually the same thing, they both use the same python module to do the sync behind the scenes. There is also no plan to remove one or the other last I read on gentoo-dev, so you can keep using whatever you prefer.

I did take the habit to use emaint -a sync myself though (and as I mentioned in a previous post, eix-update/diff are ran from /etc/portage/postsync.d/2-eix :)). I also use emaint for other things already and when I'm not emerging something I feel it makes more sense to use than .. emerge.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3425
Location: Canada

PostPosted: Tue Jun 02, 2020 4:41 am    Post subject: Reply with quote

Ionen wrote:
Corbit wrote:
Isn't emaint sync --allrepos the new emerge --sync?
Technically they're actually the same thing, they both use the same python module to do the sync behind the scenes. There is also no plan to remove one or the other last I read on gentoo-dev, so you can keep using whatever you prefer.

I did take the habit to use emaint -a sync myself though (and as I mentioned in a previous post, eix-update/diff are ran from /etc/portage/postsync.d/2-eix :)). I also use emaint for other things already and when I'm not emerging something I feel it makes more sense to use than .. emerge.



Never looked at emaint before, but hei that is a bizarrely twisted syntax when commands ( check fix ) are called options, and targets of the commands ( what to check, fix - world logs binhost) are called commands.
That will never fit into my small brain :)
Back to top
View user's profile Send private message
ian.au
l33t
l33t


Joined: 07 Apr 2011
Posts: 606
Location: Australia

PostPosted: Tue Jun 02, 2020 10:59 am    Post subject: Reply with quote

Troopo wrote:

Solid point, only thing missing is why would one need it or wouldn't need it.

I use eix-sync over emerge-sync so I can ssh in and start a sync in a screen instance, detach and come back to a diff summary of what the proposed emerge is going to look like, including any action prposed from overlays..

Tony0945 wrote:

I use it all the time to resolve blockers and to see which flags are available/ defaulted.

Troopo wrote:
This is very useful, szatox how do you manage this without eix?

I actually prefer the equery output when it comes to flags, but eix for wrangling blocks, and quickly determining what I've installed from a particular (or any) overlay.

On a mixed-arch system, I'd say eix is an invaluable tool.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Jun 02, 2020 12:23 pm    Post subject: Reply with quote

ian.au wrote:

I actually prefer the equery output when it comes to flags, but eix for wrangling blocks, and quickly determining what I've installed from a particular (or any) overlay.

I consider most portage blocker output to be unreadable verbal diarrhea. All I can glean is that there is a flag problem. Eix helps me see the flags and available flags without changing directories and reading ebuilds.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3425
Location: Canada

PostPosted: Tue Jun 02, 2020 6:24 pm    Post subject: Reply with quote

ian.au wrote:

I actually prefer the equery output when it comes to flags, but eix for wrangling blocks, and quickly determining what I've installed from a particular (or any) overlay.

On a mixed-arch system, I'd say eix is an invaluable tool.


same here, I find "equery uses package" the cleanest output about USE flags. Together with 'equery hasuse' 'equery files' 'equery belongs' are my everyday tools.
On the other hand eix is great into looking what versions of a package exist, which is install, and, importantly - when it is installed. Vastly superior to 'emerge --search'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum