Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
About the python 3.9 switch
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
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Sat May 08, 2021 6:57 pm    Post subject: About the python 3.9 switch Reply with quote

Hi,

So, it's been a day or two since I (mostly) switched to python 3.9, however, I just remembered that the guide to upgrading included doing

Code:
emerge -1vUD @world



Then I thought,

why the -1 ( --oneshot)

Is there any reason -1 was in there, did I do anything wrong adding -1 to it?

If so, how do I list the packages that were oneshotted & revert them to be normal again?

Cheers!
_________________
Having problems compiling since 2021 :(
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Sat May 08, 2021 7:04 pm    Post subject: Reply with quote

You can't "revert" oneshotting. Why not ask emerge what this means:
Code:
       --oneshot, -1
              Emerge as normal, but do not add the packages to the world file for later updating.

              WARNING:  This  option  should  only  be used for packages that are reachable from the @world package set (those that would not be removed by --dep‐
              clean), since dependencies of unreachable packages are allowed to be broken when satisfying dependencies of other packages.  Broken dependencies  of
              this sort will invalidate assumptions that make it possible for --deep to be disabled by default.

Without this switch, all packages would have been added to your world file, something you definitely don't want.
Back to top
View user's profile Send private message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Sat May 08, 2021 7:05 pm    Post subject: Reply with quote

asturm wrote:
You can't "revert" oneshotting. Why not ask emerge what this means:
Code:
       --oneshot, -1
              Emerge as normal, but do not add the packages to the world file for later updating.

              WARNING:  This  option  should  only  be used for packages that are reachable from the @world package set (those that would not be removed by --dep‐
              clean), since dependencies of unreachable packages are allowed to be broken when satisfying dependencies of other packages.  Broken dependencies  of
              this sort will invalidate assumptions that make it possible for --deep to be disabled by default.

Without this switch, all packages would have been added to your world file, something you definitely don't want.






Well, why wouldn't I want that though?

Sorry if it's a newbie question, I'm still relatively new to Gentoo.
_________________
Having problems compiling since 2021 :(
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat May 08, 2021 7:58 pm    Post subject: Reply with quote

fullbyte,

The world file should contain only things you explicitly install.
Dependencies of the things you explicitly install are managed by portage and can be removed by portage when nothing needs them.
That's what
Code:
emerge --depclean
does.

When you have a package in world. You have told portage that you want to keep that package installed. It will be updated, even if its not used and it will not be removed, even when its not used.
Consider it world pollution.

You won't notice it until the package is removed from the tree. Then portage will shout at you because there will be no ebuilds for this package any more.
You get to hunt it down and fix it.

The -1 is not required with
Code:
emerge -1vUD @world
because the command updates only what is already in the world set, plus all the dependencies.
That can't by definition add new entries to world. However its harmless.

When things fail to build and you are doing single package builds, use --oneshot then as you are fixing things that for one reason or another should be installed anyway.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Sat May 08, 2021 10:43 pm    Post subject: Reply with quote

Most packages shifted across from PYTHON_SINGLE_TARGET="python3_8" to PYTHON_SINGLE_TARGET="python3_9" without incident, however I still have five packages that require 3.8, so have built them by adding that requirement (for those five packages) to package.env. Consequently portage threw up a bunch of dependency conflicts in response to the PYTHON_TARGETS="python3_9" shift and rather than attempt to resolve them I've just left PYTHON_TARGETS at "python3_8 python3_9" for the sake of my five 3.8-dependent packages in world. I'm hoping this is a reasonable compromise and that those five packages will shuffle over the line before my leaving python3_8 as an additional target in make.conf leads to any problems. It's pretty cool how much chaos we're sheltered from by these kinds of options...but I worry sometimes that I'm abusing them in ways that will lead to more chaos in future.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Sun May 09, 2021 8:17 am    Post subject: Reply with quote

psycho wrote:
Most packages shifted across from PYTHON_SINGLE_TARGET="python3_8" to PYTHON_SINGLE_TARGET="python3_9" without incident, however I still have five packages that require 3.8, so have built them by adding that requirement (for those five packages) to package.env. Consequently portage threw up a bunch of dependency conflicts in response to the PYTHON_TARGETS="python3_9" shift and rather than attempt to resolve them I've just left PYTHON_TARGETS at "python3_8 python3_9" for the sake of my five 3.8-dependent packages in world. I'm hoping this is a reasonable compromise and that those five packages will shuffle over the line before my leaving python3_8 as an additional target in make.conf leads to any problems. It's pretty cool how much chaos we're sheltered from by these kinds of options...but I worry sometimes that I'm abusing them in ways that will lead to more chaos in future.


Given that Gentoo has not yet shifted to 3.9, perhaps you are just one step too far ahead :)
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Mon May 10, 2021 12:04 am    Post subject: Reply with quote

Actually that's reassuring, thanks...I realise this is preparation for a shift that's still to come, but still was worrying that perhaps I was ill-prepared and needed to do more to ensure there'd be no nasty surprises...I'll chill now and leave things alone until we're on 3.9 :)
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 500

PostPosted: Mon May 10, 2021 4:06 pm    Post subject: Reply with quote

Where should we be reporting
Code:
  The following REQUIRED_USE flag constraints are unsatisfied:
    python? ( exactly-one-of ( python_single_target_python3_7 python_single_target_python3_8 ) )
ebuild errors or similar? Is it a bit premature for that?
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2931
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Thu May 13, 2021 3:05 pm    Post subject: Reply with quote

NeddySeagoon wrote:


The -1 is not required with
Code:
emerge -1vUD @world
because the command updates only what is already in the world set, plus all the dependencies.
That can't by definition add new entries to world. However its harmless.


does that mean that I've been doing my world updates wrongs for 15 years? I always do
Code:
emerge -uvaDNU world
once a week, should I do
Code:
emerge -uvaDNU1 world
instead? But when I do
Code:
emerge --depclean
, old not needed dependencies are removed. Or did I understand this incorrectly?
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21629

PostPosted: Thu May 13, 2021 3:56 pm    Post subject: Reply with quote

I think that you misunderstood. Neddy meant that you can use, or not use, -1 on an @world update and get the same result either way.

As an aside, you may want to drop -N. Generally, -U will do all the things you need from -N, and skip some things you probably want to skip.
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