Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What if a dependency has updated?
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
krokoziabla
n00b
n00b


Joined: 09 May 2013
Posts: 40
Location: Russia

PostPosted: Fri May 24, 2013 7:10 pm    Post subject: What if a dependency has updated? Reply with quote

The subject field is too short therefore my question looks subtle.

Let me give you an example. I use VirtualBox. Each time a new kernel is released app-emulation/virtualbox-modules package should be rebuild to be compatible with the new kernel. So does emerge have any magic option to check whether any packages need to be reinstalled in case their dependencies have changed? I know I can explicitly issue the command 'emerge virtualbox-modules' to rebuild the package. But what about other similar situations about which I do not have any notion and which potentially can be many?
_________________
Vitaly
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri May 24, 2013 7:23 pm    Post subject: Reply with quote

Vitaly ...

the package sys-kernel/module-rebuild should handle such situations, I've not used it with virtualbox-modules but it should work for any package which installs modules.

best ... khay
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri May 24, 2013 7:38 pm    Post subject: Reply with quote

kyayyam & krokoziabla,

With Portage 2.2, there's now a set for that: @module-rebuild. No need for the sys-kernel/module-rebuild package any more.

In addition, lots of features from Portage 2.2 have been back-ported to the 2.1 (stable) branch, but I'm not personally aware if this is one of them.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri May 24, 2013 7:55 pm    Post subject: Reply with quote

John ...

with portage-2.1.11.62 @module-rebuild is listed in 'emerge --list-sets', but like @preserved-rebuild I don't think its active, though I can't test as I have no package installed modules that might show up in the set. Anyhow, this probably needs to be enabled in FEATURES, and so would obsolete sys-kernel/module-rebuild, I'm just not sure how well supported the feature is.

best ... khay
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri May 24, 2013 9:29 pm    Post subject: Reply with quote

Understood. It is supported in 2.2, though.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
krokoziabla
n00b
n00b


Joined: 09 May 2013
Posts: 40
Location: Russia

PostPosted: Fri May 24, 2013 10:17 pm    Post subject: Reply with quote

khayyam & John R. Graham

So, how do I use the set? Should I simply run 'emerge @module-rebuild'?
_________________
Vitaly
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat May 25, 2013 2:30 am    Post subject: Reply with quote

krokoziabla wrote:
So, how do I use the set? Should I simply run 'emerge @module-rebuild'?

krokoziabla ... I'm not sure, I don't see any mention of it under FEATURES in 'man make.conf' and as I don't have any package that install modules I can say if the set has packages automatically added to it or not. It may be that virtualbox-modules (and others) are already in the set so try:

Code:
# emerge -pv @module-rebuild

HTH & best ... khay
Back to top
View user's profile Send private message
krokoziabla
n00b
n00b


Joined: 09 May 2013
Posts: 40
Location: Russia

PostPosted: Sat May 25, 2013 10:37 am    Post subject: [solved] Reply with quote

Well, virtualbox-modules is really in @module-rebuild set on my PC and portage version is 2.1.11.62.

So that's the answer. Thank you.
_________________
Vitaly
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat May 25, 2013 11:39 am    Post subject: Reply with quote

krokoziabla, it's a good habit to get into to include the --oneshot option when you're goal is to rebuild something that's already installed. Prevents @world set pollution.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat May 25, 2013 11:18 pm    Post subject: Reply with quote

update has flags for this task, as outlined in the help:
Code:
-W rebuild kernel modules (uses module-rebuild)
-Y rebuild kernel deps like cups (config)
You can tell it what packages to rebuild after a kernel upgrade, if they're not handled by module-rebuild or the set, by editing the config file /etc/update (see update -h config for the variables you can set and their meanings. They come directly from the script, so it's always current.)

If you do try it, I'd recommend installing the git version as master is used by Griz and it's where bugfixes he reports get pushed to straightaway. It also means you don't need to keep downloading new versions of the ebuild. (Though I do need to put a new release out, it's been a while and there's been a few changes.)

HTH,
steveL.

edit: just saw this:
John R. Graham wrote:
it's a good habit to get into to include the --oneshot option when you're goal is to rebuild something that's already installed. Prevents @world set pollution.

update uses the -1 flag to emerge by default. You have to tell it if you want to install something to world with update -i foobar. I found that I just kept forgetting -1 with emerge, and it means we can use -[0-9] to mean a separate emerge run, if you need to update a part of the system and don't want to lose the main list.
By default, with no parameters it tries to do the standard system upgrade after a sync (if you add -s) emerge -DN --changed-use world --with-bdeps y (with -pv to view, or edit the list/USE flags and confirm) then glsa-check, depclean and revdep-rebuild.
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