Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Specifying apps to update?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
NiBe
n00b
n00b
Posts: 38
Joined: Thu Jan 08, 2004 8:39 pm

Specifying apps to update?

  • Quote

Post by NiBe » Thu Jan 08, 2004 9:03 pm

I've quite recently migrated from slackware to gentoo linux on my main workstation and I am this far quite impressed, however I have a few problems with portage.

Due to the fact that the availability to broadband or DSL is quite limited here in Sweden, I'm stuck on a 56k-connection, thus running "emerge world" takes AGES.
What do I want? I would like to specify which apps to update/fetch ebuilds for, not fetch every single one of them! The FreeBSD ports-system, for example, lets you specify which categories of apps you want updated. If you don't want to update your database daemons/clients' makefiles you can simply comment them out. Have I missed a vital config in the portage system here?

Let's say that i want to update mplayer, is there any emerge-command I can run to simply get the latest ebuilds for mplayer and its dependencies (and the dependencies dependencies, and the dependencies dependencies dependencies.. and uh... you get the picture ;))?
Browsing around at packages.gentoo.org gives nice info about the ebuilds, but they're not downloadable.

I hope I'm understandable enough.
Bus error - Driver executed
Top
Cobron
n00b
n00b
User avatar
Posts: 45
Joined: Sat Feb 01, 2003 10:16 pm

  • Quote

Post by Cobron » Thu Jan 08, 2004 9:21 pm

If you say "emerge <appname>" (look in /usr/portage/ for a listing of available packages) it will download the program and its required dependencies to be able to compile and run that program.
To update mplayer, for instance, type "emerge -up mplayer" to see which files are required to upgrade.
"emerge -uDp" lists all files required + looks at all the dependencies and their dependencies and... to upgrade them as well.
"Emerge -uDp world" checks out all of your packages installed to see which are upgradeable, "emerge -up world" only checks out the packages which were manually installed.
leave out the "-p" in above commands to actually upgrade.

check out "man emerge" for more (better ;) ) info.
Top
slais-sysweb
Apprentice
Apprentice
User avatar
Posts: 221
Joined: Fri Jun 14, 2002 8:01 pm
Location: London
Contact:
Contact slais-sysweb
Website

  • Quote

Post by slais-sysweb » Thu Jan 08, 2004 9:33 pm

Code: Select all

emerge -puv mplayer
or for deep dependencies

Code: Select all

emerge -puvD mplayer
It is usually better to only run emerge -pu world to find out what might be needed and then update only the things you really need.
--
djc
sysweb SLAIS UCL
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Fri Jan 09, 2004 12:22 am

Hmm, you say `emerge world` but from the text it sounds that you mean `emerge --sync`, is that correct ? If so then unfortunately the answer is no. You could update single packages/categories by running the rsync command yourself, however it won't check dependencies and is therefore not supported by portage itself.
Top
slais-sysweb
Apprentice
Apprentice
User avatar
Posts: 221
Joined: Fri Jun 14, 2002 8:01 pm
Location: London
Contact:
Contact slais-sysweb
Website

  • Quote

Post by slais-sysweb » Fri Jan 09, 2004 1:13 am

If the original question was really one of how to minimise downloads on a slow connection the setting up an /etc/portage/rsync_excludes file and enabling it in /etc/make.conf may be part of the solution.
--
djc
sysweb SLAIS UCL
Top
NiBe
n00b
n00b
Posts: 38
Joined: Thu Jan 08, 2004 8:39 pm

  • Quote

Post by NiBe » Fri Jan 09, 2004 10:36 am

Genone wrote:Hmm, you say `emerge world` but from the text it sounds that you mean `emerge --sync`, is that correct ?
Uhm.. whoops... right you are, Genone! ;)

slais-sysweb: Thanks for the tip, but the other solutions offered seem more viable to me.

I'll try this out as soon as I get my new parts for my workstation.
Bus error - Driver executed
Top
hadfield
Retired Dev
Retired Dev
User avatar
Posts: 308
Joined: Tue Mar 18, 2003 8:06 pm
Location: Vancouver, BC, Canada

  • Quote

Post by hadfield » Fri Jan 09, 2004 7:15 pm

For your emerge world request I just came up with a very basic bash script that can emerge everything and their dependencies from just a single specified group.

mergegroup.sh

Code: Select all

#!/bin/bash

GROUP=$1
EMERGE_OPTIONS=$2

APPS=$(emerge -p world | grep ${GROUP} | awk -F "]" '{print $2}' | sed 's/\(.*\) \[/\1/g' | sed 's/\(.*\)-[0-9].*/\1/g')
[ -z "${APPS}" ] && echo "No packages to emerge for group ${GROUP}" && exit 0   

emerge ${EMERGE_OPTIONS} ${APPS}
It greps the emerge -p world output for all packages in the specified group. Then it emerges them all. So if you want to fetch everything in sys-apps just run:

Code: Select all

./mergegroup.sh sys-apps "-f"
I also found this script that will just sync a specified category, however it won't sync their dependencies.
http://forums.gentoo.org/viewtopic.php?t=118345

Edited: January 9, 2004 19:48
Top
Post Reply

7 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic