Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
maskierte pakete automatisch nach /etc/portage/package.*
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Fri Oct 14, 2005 5:47 am    Post subject: maskierte pakete automatisch nach /etc/portage/package.* Reply with quote

moin.

gibts sowas (s. topic) schon oder muss ich mir das selbst zusammenschrauben?
stört mich halt dass ich aktuell fürs neueste gnome so ziemlich alles was mit gnome zu tun hat in die /etc/portage/package.keywords eintragen darf..

grüße
equi
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
SkaaliaN
Veteran
Veteran


Joined: 21 Apr 2005
Posts: 1363
Location: Valhalla

PostPosted: Fri Oct 14, 2005 6:14 am    Post subject: Reply with quote

am besten geht das mit dem gimme script. das schreibt dir alles automatisch in die dateien rein. guck dafür am besten mal bei wiki-gentoo.
_________________
c'ya !
skaalian
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Fri Oct 14, 2005 10:33 am    Post subject: Reply with quote

ne das reicht mir nicht ganz oder ich habs nicht verstanden oder ich will sowieso immer meinen eigenen code produzieren ;)

hier ne anfangsversion:
Code:
#!/bin/bash
eopts=$1
pkg=$2

source /sbin/functions.sh

[[ $EUID != 0 ]] && ewarn "You are not root!" && exit 1

[ -z "$pkg" ] && eerror "Please specify a package name (eg. supermerge <package-name>)" && exit 1

[ ! -e `which emerge` ] && eerror "Emerge binary not found." && exit 1

[ -d /etc/portage ] || mkdir /etc/portage

function get_arch {
        arch=`ls -l /etc/make.profile | awk {'print $11'} | awk --field-separator="/" {'print $6'}`
}

function scan_merge {
        masked=`emerge -p $mpkg | grep "masked by"`

        if [ -n "$masked" ]; then
                pkg_name=`echo $masked | cut -d ' ' -f 2 | sed -r 's/-[0-9].*//'`
                pkg_mask=`echo $masked | cut -d ' ' -f 5`
               
                einfo "adding $pkg_name (masked by: $pkg_mask)"
               
                [ "$pkg_mask" = "~$arch" ] && echo "$pkg_name $pkg_mask" >> /etc/portage/package.keywords
                [ "$pkg_mask" = "package.mask" ] && echo "$pkg_name" >> /etc/portage/package.unmask
               
                scan_merge $mpkg
        else   
                einfo "no (more) masked packages, now emerging $mpkg"
                emerge $eopts $mpkg
        fi

}

get_arch
mpkg=`ACCEPT_KEYWORDS=~$arch emerge -p $pkg | tail -n 1 | sed 's/\[ebuild.......\]\ //' | sed 's/\[[[:digit:]].*\]//' | sed 's/-[[:digit:]].*$//'`

echo "probing masked dependencies for $mpkg..."
scan_merge $mpkg


und ein wenig output:
Code:
$ supermerge -av gnome
probing masked dependencies for gnome-base/gnome...
 * adding gnome-base/libgnome (masked by: ~x86)
 * adding gnome-base/librsvg (masked by: ~x86)
 * adding media-libs/gstreamer (masked by: ~x86)
 * adding net-libs/libsoup (masked by: ~x86)
 * adding media-gfx/eog (masked by: ~x86)
 * adding media-libs/libexif (masked by: ~x86)
 * adding x11-wm/metacity (masked by: ~x86)
 * adding gnome-base/gnome-session (masked by: ~x86)
 * adding media-libs/gst-plugins (masked by: ~x86)
 * adding dev-libs/liboil (masked by: ~x86)
 * adding media-plugins/gst-plugins-alsa (masked by: ~x86)
 ....
 * no (more) masked packages, now emerging gnome-base/gnome

These are the packages that I would merge, in order:

Calculating dependencies ...done!
 ...

kommentare erwünscht :)
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
padde
n00b
n00b


Joined: 19 Jan 2005
Posts: 54
Location: Germany

PostPosted: Fri Oct 14, 2005 10:59 am    Post subject: Reply with quote

Ohne es getestet zu haben: sieht gediegen aus :)
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Fri Oct 14, 2005 11:00 am    Post subject: Reply with quote

ja das werd ich irgendwie noch erweitern, z.b. automatisches entfernen von demaskierten paketen wenn sie bereits stable geworden sind (gibts schon, wird implementiert), genaues demaskieren der version (in package.unmask), etc ..

feature-requests ?
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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