Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge usage that is confusing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 93

PostPosted: Tue Oct 15, 2024 3:53 am    Post subject: emerge usage that is confusing Reply with quote

Hello,

I am checking for updates every morning using these steps:

Code:
emerge --sync
emerge -auUDv --with-bdeps=y @world
emerge --ask --depclean
dispatch-conf


I have arrived at those steps while I was reading on the update/upgrade procedures. Would this usage be correct?

What got me confused is, two days in a row, there were no updates for my system. Then I went to the https://wiki.gentoo.org/wiki/Upgrading_Gentoo page and saw some comment like this

Quote:
root #emerge -avuDN @world

--changed-use may be used in place of --newuse, but only if you do not build binary packages. --changed-use will not trigger reinstallation when disabled USE flags are added or removed from a package. See the Binary package guide.


When I did emerge -avuDN --with-bdeps=y @world I had 3 reinstalls. But emerge -auUDv --with-bdeps=y @world does not show any updates.

I want to have my system up to date. And since I only emerge a couple of binary packages (firefox-bin, google-chrome, and libreoffice), and do not build them (as binary packages), I should use --newuse I believe. Would that be correct?

Regards
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1680
Location: Germany

PostPosted: Tue Oct 15, 2024 6:03 am    Post subject: Reply with quote

Your way to keep an updated system looks fine. Update often to avoid any emerge conflicts because of to many changes. But doing it daily is kind of overkill. Once a week or even every two weeks is fine.

Make sure you check the news items, too.

Here is a topic which may shed some light about the emerge --changed-use vs --newuse question: https://forums.gentoo.org/viewtopic-p-8719502.html
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 93

PostPosted: Tue Oct 15, 2024 6:12 am    Post subject: Reply with quote

Banana wrote:
Your way to keep an updated system looks fine. Update often to avoid any emerge conflicts because of to many changes. But doing it daily is kind of overkill. Once a week or even every two weeks is fine.

Make sure you check the news items, too.

Here is a topic which may shed some light about the emerge --changed-use vs --newuse question: https://forums.gentoo.org/viewtopic-p-8719502.html


I got that habit from using a rolling release system prior to gentoo. You might be right about the overkill.

Thanks for the information on --changed-use and --newuse.

Regards
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 93

PostPosted: Tue Oct 15, 2024 8:50 am    Post subject: Reply with quote

Based on the comment in here: https://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet#Package_upgrades

Quote:
Package upgrades

Upgrade all packages in the world set, their dependencies (--deep), and packages that have USE flag changes (avoiding unnecessary rebuilds when USE changes have no impact):

root #emerge --ask --verbose --update --deep --changed-use @world

The --newuse may be used in place of--changed-use to make sure that all package use flags reflect the current state of those in the Gentoo repository, though this will entail more rebuilds. The --with-bdeps=y can be used to update build time dependencies also.


I think I will be using the --newuse option. I would like to keep the use flags to be the same as they are in the gentoo repo's. Would not mind more/extra rebuilds. But will be checking both --changed-use and --newuse when updating my system to see if these agree with each other.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4952
Location: Bavaria

PostPosted: Tue Oct 15, 2024 11:10 am    Post subject: Re: emerge usage that is confusing Reply with quote

rzdndr wrote:
I am checking for updates every morning using these steps:

Code:
emerge --sync
emerge -auUDv --with-bdeps=y @world
emerge --ask --depclean
dispatch-conf


[...] Would this usage be correct?

Yes! ... but, if you have the package "eix", you might try an "eix-sync" instead "emerge --sync" ... for me it is very interesting to see also changes from other packages I dont use ... (because it cold be I see an interesting package :D )

My opinion on the daily update: keep doing it. It's a thousand times better to update frequently than too rarely. Even if I only update once or twice a week, I wouldn't consider it overkill (my former colleague at work also did it daily).
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 93

PostPosted: Tue Oct 15, 2024 2:23 pm    Post subject: Re: emerge usage that is confusing Reply with quote

pietinger wrote:
rzdndr wrote:
I am checking for updates every morning using these steps:

Code:
emerge --sync
emerge -auUDv --with-bdeps=y @world
emerge --ask --depclean
dispatch-conf


[...] Would this usage be correct?

Yes! ... but, if you have the package "eix", you might try an "eix-sync" instead "emerge --sync" ... for me it is very interesting to see also changes from other packages I dont use ... (because it cold be I see an interesting package :D )

My opinion on the daily update: keep doing it. It's a thousand times better to update frequently than too rarely. Even if I only update once or twice a week, I wouldn't consider it overkill (my former colleague at work also did it daily).


Will try eix the next time.

When I do updates every week there will be more things to update, and might take time. So it is much better in my case to do that daily.

Regards
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2306

PostPosted: Tue Oct 15, 2024 4:21 pm    Post subject: Reply with quote

rzdndr wrote:
Based on the comment in here: https://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet#Package_upgrades

Quote:
Package upgrades

Upgrade all packages in the world set, their dependencies (--deep), and packages that have USE flag changes (avoiding unnecessary rebuilds when USE changes have no impact):

root #emerge --ask --verbose --update --deep --changed-use @world

The --newuse may be used in place of--changed-use to make sure that all package use flags reflect the current state of those in the Gentoo repository, though this will entail more rebuilds. The --with-bdeps=y can be used to update build time dependencies also.


I think I will be using the --newuse option. I would like to keep the use flags to be the same as they are in the gentoo repo's. Would not mind more/extra rebuilds. But will be checking both --changed-use and --newuse when updating my system to see if these agree with each other.


New use will rebuild even if a disabled or masked flag gets dropped. Changed use is smarter and will rebuild only when relevant flags change. New use will not keep the use flags to be the same as they are in the Gentoo repo if you think that's what it is for. It'll rebuild on every user change, even if that flag is irrelevant. That's why changed use is not recommended if you're building binary packages. When building binary packages, exactly new use behavior is required, maybe unless you have identical use settings on all systems that will use them.

Best Regards,
Georgi
Back to top
View user's profile Send private message
finoderi
n00b
n00b


Joined: 29 Oct 2021
Posts: 57

PostPosted: Tue Oct 15, 2024 4:50 pm    Post subject: Re: emerge usage that is confusing Reply with quote

rzdndr wrote:

I am checking for updates every morning using these steps:

Code:
emerge -auUDv --with-bdeps=y @world

You can add
Code:
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
- to make.conf to avoid typing it every time. And when you don't need this option use
Code:
--with-bdeps=n
in command line.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2306

PostPosted: Tue Oct 15, 2024 4:56 pm    Post subject: Re: emerge usage that is confusing Reply with quote

finoderi wrote:
rzdndr wrote:

I am checking for updates every morning using these steps:

Code:
emerge -auUDv --with-bdeps=y @world

You can add
Code:
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
- to make.conf to avoid typing it every time. And when you don't need this option use
Code:
--with-bdeps=n
in command line.


I hadn't noticed that part. That's actually useless in this query. It's by default yes when not using binary packages and no when you use binary packages. It's not only useless, but also can cause problems, so no, do not put it in EMERGE_DEFAULT_OPTS and do not change it on the command line unless you know exactly why you're doing it.

man emerge wrote:
--with-bdeps < y | n >
In dependency calculations, pull in build time dependencies that are not strictly required. This option is automatically enabled for installation actions, meaning they will be installed, and de‐
faults to "y" for the --depclean action, meaning they will not be removed. In order to prevent the --with-bdeps option from being automatically enabled for installation actions, specify
--with-bdeps-auto=n in either the command line or EMERGE_DEFAULT_OPTS.

Since many users of binary packages do not want unnecessary build time dependencies installed, this option is not automatically enabled for installation actions when the --usepkg option is enabled.
In order to pull in build time dependencies for binary packages with --usepkg, --with-bdeps=y must be specified explicitly. This also applies to options that enable the --usepkg option implicitly,
such as --getbinpkg.

This setting can be added to EMERGE_DEFAULT_OPTS (see make.conf(5)) and later overridden via the command line.


Best Regards,
Georgi
Back to top
View user's profile Send private message
finoderi
n00b
n00b


Joined: 29 Oct 2021
Posts: 57

PostPosted: Tue Oct 15, 2024 5:02 pm    Post subject: Re: emerge usage that is confusing Reply with quote

logrusx wrote:
It's not only useless, but also can cause problems.

What kind of problems? It will be enabled by default for binary packages?
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2306

PostPosted: Tue Oct 15, 2024 5:11 pm    Post subject: Re: emerge usage that is confusing Reply with quote

finoderi wrote:
logrusx wrote:
It's not only useless, but also can cause problems.

What kind of problems? It will be enabled by default for binary packages?


No, it won't be. It will be what you set it in EMERGE_DEFAULT_OPTS. It will be the default value if you don't change it somewhere. If you put it in EMERGE_DEFAULT_OPTS then you need to manually disable it on the command line when needed, which defeats the purpose, given that it's exactly what it needs to be most all the time.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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