Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Keep gentoo-sources from updating
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
hololeap
n00b
n00b


Joined: 05 Oct 2013
Posts: 30

PostPosted: Mon Oct 14, 2013 7:29 pm    Post subject: [SOLVED] Keep gentoo-sources from updating Reply with quote

I apologize if this has already been asked a million times, but I wasn't able to find an answer for my specific problem.

Basically, I want to keep Portage from upgrading sys-kernel/gentoo-sources when I do a "emerge -DNu --with-bdeps y world".

I have the following entry in my world file:

Code:
# grep sources /var/lib/portage/world
sys-kernel/gentoo-sources:3.10.7


However, it installs version 3.10.7-r1 when I do a world update. When I check for dependencies, it shows that it is being pulled in by virtual/linux-sources-0

Code:
# emerge --depclean -vp =gentoo-sources-3.10.7-r1
Calculating dependencies... done!
  sys-kernel/gentoo-sources-3.10.7-r1 pulled in by:
    virtual/linux-sources-0 requires sys-kernel/gentoo-sources


Shouldn't virtual/linux-sources be fulfilled by gentoo-sources-3.10.7? I would think that since 3.10.7 is in my world file and it fulfils virtual/linux-sources, "emerge -DNu --with-bdeps y world" would not pull in another version of gentoo-sources. Is this normal behavior or a bug?


Last edited by hololeap on Wed Oct 16, 2013 12:29 am; edited 1 time in total
Back to top
View user's profile Send private message
nemectic
Apprentice
Apprentice


Joined: 20 Aug 2004
Posts: 182

PostPosted: Mon Oct 14, 2013 8:29 pm    Post subject: Reply with quote

Code:
echo ">sys-kernel/gentoo-sources-3.10.7" >> /etc/portage/package.mask


That should be what you're looking for?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Oct 14, 2013 8:39 pm    Post subject: Reply with quote

hololeap,

sys-kernel/gentoo-sources is slotted. Its one slot per vesrion so you can have many versions installed at the same time.
Your world file entry
Code:
sys-kernel/gentoo-sources-3.10.7
is recording that sys-kernel/gentoo-sources fpr the 3.10.7 slot is installed.

When you do
Code:
emerge -DNu --with-bdeps y world
the -uD looks to update everything, so you get newer sys-kernel/gentoo-sources too.
These updates will be in their own slot and recorded in your world file too.

While nemectic is correct. That will prevent kernel updates, its easy to forget and is a pain on the odd occasions when you do want a kernel update.
My preference is to use
Code:
--exclude gentoo-sources
on the emerge command line. I also like the -av options to emerge.
_________________
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
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Mon Oct 14, 2013 8:48 pm    Post subject: Reply with quote

The linux-sources have an only but important internal USE flag: firmware. When the flag is active, if the linux-sources are updated, the linux-firmware package will be updated at the same time for the kernel and modules of the new version be able to access the appropriate firmware files who change from a kernel version to another.

I think it's a good idea to keep this virtual package install. Did you edit manually var/lib/portage/world? I have only the line
Code:
sys-kernel/gentoo-sources

without any version. I keep installed only the latest stable version.

If you want to fix the gentoo-sources to the 3.10.7 version, you have to edit a .conf file in /etc/portage instead I think, but I am not sure of what to write exactly in which file.

I do not think there's a bug, just a dependancy of the specific package, the gentoo-sources who is in world favorites to a generic package, the linux-sources installed as a dependancy of the first one.
_________________
Paul
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Mon Oct 14, 2013 11:14 pm    Post subject: Reply with quote

-r1 is a revision bump fixing a common random hang as well as security fixes; if you don't want it, just mask it.

Quote:
25 Sep 2013; Tom Wijsman <TomWij@gentoo.org> +gentoo-sources-3.10.7-r1.ebuild:
Revision bump for 3.10.7. Fixed an important buffer overflow in add_page_map()
causing kernel panics, backported from 3.10.8; reported by stintel on IRC.
Fixed PID Spoofing Privilege Escalation, backported from 3.11, see bug
#483614; CVE-2013-4300. Fixed multiple HID security flaws, backported from
GregKH's stable queue and Linus' master, see bug #482896; from CVE-2013-2888
till CVE-2013-2899. Users that had kernel panics due to buffer overflows or
need additional security are suggested to update.
Back to top
View user's profile Send private message
hololeap
n00b
n00b


Joined: 05 Oct 2013
Posts: 30

PostPosted: Tue Oct 15, 2013 4:38 am    Post subject: Reply with quote

Thanks for the responses.

My question is more theoretical and less pragmatic (I already know about the package.mask and --exclude options). What I don't understand is where the update is coming from. It would make sense if I had "sys-kernel/gentoo-sources" in my world file, as that would include any available version. But, since the world entry is one specific slot, it should only pull in ebuilds from that slot. The 3.10.7-r1 version is getting pulled in by virtual/linux-kernel, but that package's dependencies should be fulfilled by version 3.10.7 and I don't see why it wants a later version.

UPDATE:

I removed 3.10.7 and installed 3.10.9. Still, emerge is trying to pull in 3.10.7-r1. I'll investigate further, but this doesn't seem like ideal behavior. Virtual packages should only pull in packages if they are needed for a dependency and that dependency is currently unmet. Wasn't that what bug 370295 was all about?
Back to top
View user's profile Send private message
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Tue Oct 15, 2013 6:09 am    Post subject: Reply with quote

I placed the line
Code:
EMERGE_DEFAULT_OPTS="--exclude gentoo-sources"
into make.conf. It lets you manage kernel sources by hand.
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Tue Oct 15, 2013 6:23 pm    Post subject: Reply with quote

hololeap wrote:
What I don't understand is where the update is coming from. It would make sense if I had "sys-kernel/gentoo-sources" in my world file, as that would include any available version. But, since the world entry is one specific slot, it should only pull in ebuilds from that slot. The 3.10.7-r1 version is getting pulled in by virtual/linux-kernel, but that package's dependencies should be fulfilled by version 3.10.7 and I don't see why it wants a later version.


A 3.10.7 slot pulls in 3.10.7-r1 if you pass -u to emerge, which you do.

hololeap wrote:
I removed 3.10.7 and installed 3.10.9. Still, emerge is trying to pull in 3.10.7-r1. I'll investigate further, but this doesn't seem like ideal behavior. Virtual packages should only pull in packages if they are needed for a dependency and that dependency is currently unmet. Wasn't that what bug 370295 was all about?


Do you perhaps still have the 3.10.7 slot entry in your world file?
Back to top
View user's profile Send private message
hololeap
n00b
n00b


Joined: 05 Oct 2013
Posts: 30

PostPosted: Tue Oct 15, 2013 6:55 pm    Post subject: Reply with quote

Actually it looks like the reason is that 3.10.9 has been taken out of portage tree.

So the question has boiled down to: Is there a way to make virtual packages "lazy" in that they do not upgrade their dependencies if the -u flag is used?
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Tue Oct 15, 2013 7:14 pm    Post subject: Reply with quote

The --exclude suggested by Budoka does that.
Back to top
View user's profile Send private message
hololeap
n00b
n00b


Joined: 05 Oct 2013
Posts: 30

PostPosted: Wed Oct 16, 2013 12:29 am    Post subject: Reply with quote

I thought that --exclude only kept specified packages from being installed. I'm asking about changing the behavior of emerge, not a workaround for a specific package. That's ok. I figure if the functionality existed, someone would have mentioned it by now.

I see that Paludis has a --lazy flag, so maybe I'll look into using that. Thanks for the suggestions, though. I didn't know about the firmware flag.
Back to top
View user's profile Send private message
SiberianSniper
Guru
Guru


Joined: 06 Apr 2006
Posts: 378
Location: Dayton, OH, USA

PostPosted: Wed Oct 16, 2013 2:38 am    Post subject: Reply with quote

Whenever I mask off future versions of a package, it seems useful to copy over the package directory from /usr/portage/abc/xyz to /usr/local/portage/abc/xyz and add PORTDIR_OVERLAY="/usr/local/portage" to /etc/make.conf. That way, should you ever need to recompile something, you'll be somewhat protected from your version - or the package as a whole - being removed from the main portage tree.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Oct 16, 2013 6:57 pm    Post subject: Reply with quote

SiberianSniper,

The ebuilds can always be recovered from the portage attic.
The sources may be a problem after a package has been removed from the tree.
_________________
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
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