View previous topic :: View next topic |
Author |
Message |
jordan83 Apprentice


Joined: 17 Apr 2006 Posts: 222 Location: check your closet...
|
Posted: Thu Dec 14, 2006 12:25 pm Post subject: |
|
|
My use.conf is the following:
Code: | # use.conf
# This file created by portage2paludis.bash
* Xaw3d a52 aac acpi ada addbookmarks aiglx alias amr asf async audiofile automount autoreplace bash-completion bidi bl bzip2 cdparanoia cjk connectionstatus contact
notes cpudetection css curl cvs dbx dga divx doc dts dvdread emacs ethereal exif fat fbcon fbsplash ffmpeg flac gadu gatos gd glsa glut gmedia gmp gphoto2 gs gzip ha
skell highlight history icq idea idn imagemagick imlib irc jabber java javascript jingle jpeg2k kqemu latex lcms live logitech-mouse logrotate lzo madwifi matroska m
box mime mjpeg mmx mmxext mng mplayer msn musepack musicbrainz network nowin nowlistening nsplugin offensive openexr pascal pcmcia pdf php rar real realmedia ruby sa
mba slang sms speex sql sse sse2 statistics stats subversion svg svga tetex texteffect theora tidy tiff translator usb userlocales utempter vcd vidix visualization w
ebpresence wifi winpopup wmp xcomposite xine xosd xscreensaver xvid yahoo -cairo -eds -emboss -esd -gnome -isdnlog -pppd
* INPUT_DEVICES: -* keyboard mouse synaptics
* LINGUAS: -* en it
* VIDEO_CARDS: -* radeon vesa fbdev
app-office/lyx -gtk
x11-libs/qt examples
x11-libs/evas cairo
net-p2p/mldonkey magic
app-portage/portage-utils paludis
x11-libs/gtk+ -doc |
As you can see I don't have -* in front of the first *.
You have to put -* only in front of INPUT_DEVICES, VIDEO_CARDS and LINGUAS not everywhere, as stated in the documentation:
Quote: | For USE_EXPAND variables such as LINGUAS and VIDEO_CARDS, atom VARIABLE: value value ... should be used. To avoid inheriting values from your profile, include -*. |
_________________ Time is a great teacher, but unfortunately it kills all its pupils.
Louis-Hector Berlioz
--
When the Boogeyman goes to sleep every night, he checks his closet for Chuck Norris.
chucknorrisfacts.com |
|
Back to top |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Thu Dec 14, 2006 3:42 pm Post subject: |
|
|
slycordinator wrote: | Though when I tried to update my world (including changed USE flags), the first package appeared to install perfectly then I got hundreds of lines saying the same warning as before.
And the messages only stopped when I hit ctrl-c. |
That's normal, I think it's building some sort of cache. Let it complete, it only does it for the first package you install. |
|
Back to top |
|
 |
zxy Veteran


Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Thu Dec 14, 2006 7:05 pm Post subject: |
|
|
I want to set an overlay for einit. It syncs with cvs not with svn.
Has somebody made cvs sync work, or even better made einit overlay work? _________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu |
|
Back to top |
|
 |
Janax Apprentice


Joined: 17 Aug 2004 Posts: 162 Location: Iowa
|
Posted: Thu Dec 14, 2006 7:41 pm Post subject: |
|
|
Probably not what you're really asking for, but I have the einit overlay supported through layman. So I have:
Code: |
$ more /etc/paludis/repositories/einit.conf
location = ${ROOT}/var/paludis/layman/einit
sync =
profiles = ${ROOT}/var/paludis/repositories/gentoo/profiles/default-linux/amd64/2006.1
eclassdirs = ${ROOT}/var/paludis/repositories/gentoo/eclass
cache = /var/empty
format = portage
names_cache = ${location}/.cache/names
provides_cache = ${location}/.cache/provides
|
... and layman, of course, is set to use '/var/paludis/layman' as its dump dir. _________________ Americans for Fair Taxation because the current tax system is not only burdensome but corrupt as well! |
|
Back to top |
|
 |
slycordinator Advocate


Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Thu Dec 14, 2006 7:52 pm Post subject: |
|
|
jordan83 wrote: | As you can see I don't have -* in front of the first *.
You have to put -* only in front of INPUT_DEVICES, VIDEO_CARDS and LINGUAS not everywhere, as stated in the documentation: |
I am well aware that -* doesn't have to be everywhere. Kindly read my original post and you'll see that I used the portage to paludis migration script. So the reason I've got -* in use.conf is because I had it in make.conf
My /etc/make.conf has:
USE="-* [list of USE flags].
So when I used the portage to paludis conversion script it put "* -* [list of same USE flags]"
And I had no idea that this kind of configuration was frowned upon or "dangerous" and even if it is, making this known to the user doesn't require spamming with the same message hundreds of times. Also, I assumed from the output that this was paludis being frozen and not just creating a cache or something; later I'll reinstall paludis to see if everything really was fine. |
|
Back to top |
|
 |
micr0c0sm Tux's lil' helper


Joined: 29 Oct 2005 Posts: 148 Location: New York
|
Posted: Thu Dec 14, 2006 9:49 pm Post subject: |
|
|
Nope, that output is perfectly self described as a *warning* and nothing else. |
|
Back to top |
|
 |
slycordinator Advocate


Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Thu Dec 14, 2006 9:54 pm Post subject: |
|
|
micr0c0sm wrote: | Nope, that output is perfectly self described as a *warning* and nothing else. |
You didn't understand what I was saying.
When I saw a seemingly unending list of warnings all of the exact same type I assumed that it was stuck in a loop.
Also, this warning isn't particularly useful but whatever.
edit: What I'm trying to say is: The warning itself didn't make me think something was wrong. The fact that the same, identical message was displayed non-stop, though, did. |
|
Back to top |
|
 |
floffe Guru


Joined: 24 Nov 2003 Posts: 414 Location: Linköping, Sweden
|
Posted: Thu Dec 14, 2006 11:15 pm Post subject: |
|
|
I saw this issue come up in #paludis a couple of weeks ago, and the devs won't negotiate on that warning being shown once per paludis invocation. I'm not sure how many times it's invoked when (re-)building the cache. How long did you wait? |
|
Back to top |
|
 |
zxy Veteran


Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Thu Dec 14, 2006 11:19 pm Post subject: |
|
|
@Janax
Thanks. I tried this,
Code: | location = ${ROOT}/usr/portage/overlays/einit
sync = rsync://rsync.jyujin.de/einit-overlay/
|
And it looks like it works.
So I don't need layman at all. (In fact I copied the sync line from layman output).
The questinon is. Layman uses more rsync options (--exclude,...). How to tell paludis about these options. It's probably in some documents, that I didn't check. _________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu |
|
Back to top |
|
 |
slycordinator Advocate


Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Thu Dec 14, 2006 11:31 pm Post subject: |
|
|
floffe wrote: | I saw this issue come up in #paludis a couple of weeks ago, and the devs won't negotiate on that warning being shown once per paludis invocation. I'm not sure how many times it's invoked when (re-)building the cache. How long did you wait? |
20 seconds? I don't know. And it'll probably be tomorrow before I check on this again as I work tonight.
edit: Hmm... it's not doing it anymore now; I think it's because this time I read the docs and updated the cache's before doing anything. Though it'd be a good idea to have it (assuming you've never done anything with paludis yet) create the aforementioned caches for you upon invocation. |
|
Back to top |
|
 |
truc Advocate


Joined: 25 Jul 2005 Posts: 3199
|
Posted: Fri Dec 15, 2006 10:07 am Post subject: |
|
|
zxy wrote: | @Janax
Thanks. I tried this,
Code: | location = ${ROOT}/usr/portage/overlays/einit
sync = rsync://rsync.jyujin.de/einit-overlay/
|
And it looks like it works.
So I don't need layman at all. (In fact I copied the sync line from layman output).
The questinon is. Layman uses more rsync options (--exclude,...). How to tell paludis about these options. It's probably in some documents, that I didn't check. |
since Code: | paludis --list-repositories | reports a sync_exclude entry, you can probably use it as a key in the repo conf _________________ The End of the Internet! |
|
Back to top |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Fri Dec 15, 2006 2:34 pm Post subject: |
|
|
mod edit (added on request): Please look here for updated versions --Earthwings
ciaranm wrote: | Quote: | Quote: | Quote: | 2) Is there an equivalent of FEATURES="collision-protect"? |
No. That feature is an osx thing. |
OK, but I like not having to worry about my packages trying to kill each other, at least in this particular way. If you're not interested in including it in Paludis itself, I might have a go at writing a hook for it, does that sound reasonably sane? I haven't looked into the hook mechanism much yet, but on a quick glance it looks like ebuild_merge_pre would be the proper place, right? |
You could do it as an ebuild_merge_pre hook, yes. |
OK, in case anyone else is interested, here it is. It's been through a grand total of 3 world updates without exploding much, and now seems to work pretty well (although it may be a bit slow in rare cases). To use it, save it as /etc/paludis/hooks/ebuild_merge_pre/collision-protect.bash. I've been testing it with Paludis from svn, but it will probably work with 0.12 if you change all the "einfo_unhooked" to "einfo".
You can have some extra control over the protection by setting the COLLISION_IGNORE variable in /etc/paludis/bashrc. It should be a space-seperated list of directories in which collisions will be ignored (you can disable it completely by including / in the list). As with anything in bashrc, you can make it conditional on package name, version, phase of the moon, or whatever else you can express in bash code.
WARNING: it seems that some browsers insert extra spaces at the ends of lines when copying the code, and this will break the script. Please make sure that none of the lines in the file end with spaces when you save it.
I won't keep posting if/when I update it, I'll just edit this post, so check back every now and again.
Changelog
2006-12-15: Initial release.
2006-12-15: Be more robust against stupid file names.
2006-12-17: Big rework, should be faster (and not make bash segfault ) on large packages.
2006-12-20: Don't spew useless error messages on nvidia-drivers (and possibly other OpenGLish things).
2006-12-28: Work round Portage not recording /usr/share/{gcc,binutils}-data/*/*/info/dir in the VBD for some unknown reason.
2006-12-31: Make previous fix less sloppy.
2006-12-31: Seems previous fix isn't necessary for binutils.
2007-01-04: Remove redundant --no-colour.
2007-01-15: Clean up a couple of comments (no code changes).
2007-01-23: Implement COLLISION_IGNORE (see above).
WARNING: this script comes with NO WARRANTY, use it at your own risk. It is NOT SUPPORTED by the Paludis developers. Feel free to ask me if you have problems, but I can't promise to be able to solve them.
Code: | #! /bin/bash
if [[ " ${COLLISION_IGNORE} " == *" / "* ]]; then
einfo_unhooked "\${COLLISION_IGNORE} contains /, skipping collision check"
return
fi
einfo_unhooked "Checking for collisions..."
(
# Uncomment this and the corresponding bit at the end if you
# want to know how long it takes.
## "times" doesn't return real time, and "time" is too awkward to
## use in this context.
#starts=$( date +%s )
#startns=$( date +%N )
installed="$( ${PALUDIS_COMMAND} --best-version \
"${CATEGORY}/${PN}:${SLOT}" )"
cd "${D}"
# Not using bash arrays here because it makes it harder to pass
# to external commands.
if [[ -n "${installed}" ]]; then
inst_files="$( ${PALUDIS_COMMAND} --contents "=${installed}" |
sed -ne 's/ -> .*//;s/^ \+//p' | sort )"
new_files="$( find . ! -type d -print | sed -e 's/^.//' | sort )"
files="$( comm -2 -3 <( echo "${new_files}" ) \
<( echo "${inst_files}" ) )"
else
files="$( find . ! -type d -print | sed -e 's/^.//' )"
fi
# Use ls -d 2>/dev/null to find files that already exist. The
# -d'\n' is needed to stop xargs from interpreting special
# characters. Use cd to handle ${ROOT}, rather than adding it
# with sed, to avoid the chance of evil characters messing things
# up. grep out the Info directory because some packages try to
# update it, but Paludis handles that anyway so it doesn't matter.
collisions="$( sed -e 's,^,.,' <<<"${files}" |
( cd "${ROOT}" && xargs -r -d'\n' ls -d 2>/dev/null ) |
sed -e 's,^\.,,' |
grep -v '^/usr/share/\(gcc-data/.*/\)\?info/dir\(\|.gz\|.bz2\)$' )"
# Handle the case that a package installs files to the same
# directory as the previous version but under a different name,
# via symlinking. For example, a package that's made
# multilib-aware (lib -> lib64) or an X program that was moved
# from /usr/X11R6 to /usr.
if [[ -n "${collisions}" && -n "${installed}" ]]; then
# Two files are "the same" for our purposes if they have the
# same name and their directories (after resolving symlinks)
# have the same device and inode numbers.
dev_inode_names() {
# first sed: Find the directory names.
# xargs stat: Find the dev/inode numbers of said
# directories.
# second sed: Find the filenames.
# ${2} "${1}": Optionally add the full path/filename to the
# end.
paste <( sed -e 's,^\(.*\)/[^/]*$,.\1,' <<<"$1" |
( cd "${ROOT}" && xargs -r -d'\n' \
stat -L -c '%D %i' 2>/dev/null ) ) \
<( sed -e 's,^.*/,,' <<<"$1" ) \
<( ${2} "${1}" )
}
# Find the info of all the potential collisions. Sort it up
# to but not including the first slash (i.e. up to the start
# of the full pathname).
dins="$( dev_inode_names "${collisions}" echo | sort -t/ -k1 )"
# comm: Chop off the pathname part and compare with the
# pathless info of the files from the previously
# installed version.
# paste: Stick the pathnames back on.
# sed: Find those files that were /not/ in the installed
# version (aka the lines from comm that do not start
# with tabs) and chop off the dev/inode information,
# leaving only the pathnames.
collisions="$( paste <( comm -2 <( cut -d/ -f1 <<<"${dins}" ) \
<( dev_inode_names "${inst_files}" : |
sort ) ) \
<( echo "${dins}" ) |
sed -ne 's,^[^\t][^/]*\(/.*\)$,\1,p' )"
fi
okay=true
if [[ -n "${collisions}" ]]; then
# COLLISION_IGNOREd and CONFIG_PROTECTed files are exempt;
# clean the variables up a bit to make matching easier. We
# check this last because it's the slowest part of the script.
my_COLLISION_IGNORE=()
for p in ${COLLISION_IGNORE}; do
my_COLLISION_IGNORE+=( "$( tr -s / <<<"${p}/*" )" )
done
my_CONFIG_PROTECT=()
for p in ${CONFIG_PROTECT}; do
my_CONFIG_PROTECT+=( "$( tr -s / <<<"${p}/*" )" )
done
my_CONFIG_PROTECT_MASK=()
for p in ${CONFIG_PROTECT_MASK}; do
my_CONFIG_PROTECT_MASK+=( "$( tr -s / <<<"${p}/*" )" )
done
collision_ignore() {
for p in "${my_COLLISION_IGNORE[@]}"; do
# Don't put quotes round ${p}, or it isn't treated as
# a wildcard.
[[ "${1}" == ${p} ]] && return 0
done
for p in "${my_CONFIG_PROTECT[@]}"; do
if [[ "${1}" == ${p} ]]; then
for p in "${my_CONFIG_PROTECT_MASK[@]}"; do
if [[ "${1}" == ${p} ]]; then
return 1
fi
done
return 0
fi
done
return 1
}
while read file; do
if ! collision_ignore "${file}"; then
eerror "${file} already exists in ${ROOT}"
okay=false
fi
done <<<"${collisions}"
fi
# Uncomment this and the corresponding bit at the beginning if you
# want to know how long it takes.
#ends=$( date +%s )
#endns=$( date +%N )
#elapsed=$(( (${ends} - ${starts}) * 1000
# + (10#${endns} / 1000000) - (10#${startns} / 1000000) ))
#einfo_unhooked "Elapsed time: $( printf %d.%03d \
# $(( ${elapsed} / 1000 )) \
# $(( ${elapsed} % 1000 )) ) seconds"
${okay}
) || die "Package collides with existing files"
einfo_unhooked "Hooray! No collisions"
|
Last edited by dleverton on Tue Jan 23, 2007 12:18 am; edited 9 times in total |
|
Back to top |
|
 |
zxy Veteran


Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Sat Dec 16, 2006 5:16 pm Post subject: |
|
|
@dleverton
When this code gets tested by a few users, it can have it's home on the wiki.
I'm interreseted what Paludis devs have to say about this script. (the ones that are not banned)
--- EDIT ---
Does anybody know what is the status of the GUI, that was in development? _________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu |
|
Back to top |
|
 |
floffe Guru


Joined: 24 Nov 2003 Posts: 414 Location: Linköping, Sweden
|
Posted: Tue Dec 19, 2006 5:46 pm Post subject: |
|
|
Is there any interest in compiling a list of packages that fail the test phase? The wiki seems like the place for it. It's rather annoying having builds die just before merging. |
|
Back to top |
|
 |
zxy Veteran


Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Tue Dec 19, 2006 6:44 pm Post subject: |
|
|
Here is mine after reinstalling the whole world.
Code: |
bash|tar|libtool|openldap|glibc|automake|coreutils|pkgconfig|pam|e2fsprogs|
lcms|wxGTK|confuse|mysql|poppler-bindings|ruby|ccache|lighttpd|gpgme|libkcal|
libksieve|gnome-vfs|gnome-icon-theme|gnome-doc-utils|alsa-utils|elfutils|prelink|
nautilus|control-center|zope|plone|XML-Simple|kdebase-kioslaves
|
Some of them (like kdebase-kioslaves) failed test because I don't have some part of X installed. It must be here on this post. I asked before about this. _________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu |
|
Back to top |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Tue Dec 19, 2006 6:48 pm Post subject: |
|
|
Aside from the ones listed on various websites, I've also had gnu-smalltalk, gdome2, kqemu and libbonobo failing tests, but I haven't tried rebuilding world. |
|
Back to top |
|
 |
yoshi314 l33t


Joined: 30 Dec 2004 Posts: 850 Location: PL
|
Posted: Wed Dec 20, 2006 10:11 am Post subject: |
|
|
how can i make paludis cfg_protect kernel modules?
because if i e.g. install unionfs with paludis ,it removes previously installed unionfs for a different kernel (which i still have). which is a bad thing. _________________ ~amd64
shrink your /usr/portage with squashfs+aufs |
|
Back to top |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Wed Dec 20, 2006 2:48 pm Post subject: |
|
|
yoshi314 wrote: | how can i make paludis cfg_protect kernel modules?
because if i e.g. install unionfs with paludis ,it removes previously installed unionfs for a different kernel (which i still have). which is a bad thing. |
Try this in /etc/paludis/bashrc:
Code: | kernel_ver="$(readlink /usr/src/linux)"
kernel_ver="${kernel_ver##*linux-}"
export CONFIG_PROTECT="${CONFIG_PROTECT} /lib/modules /lib64/modules"
export CONFIG_PROTECT_MASK="${CONFIG_PROTECT_MASK} /lib/modules/${kernel_ver} /lib64/modules/${kernel_ver}"
|
You won't need the /lib64 stuff unless you're on a 64-bit arch (and if you are, you probably won't need the /lib stuff, but just in case...).
The effect isn't exactly the same as Portage (AFAIK, Portage won't remove the modules even if you unmerge the package explicitly, whereas this only preserves modules built for a kernel other than the current one) but it should do what you want. |
|
Back to top |
|
 |
Bapt Veteran


Joined: 14 Apr 2003 Posts: 1152 Location: Paris
|
Posted: Thu Dec 21, 2006 5:10 pm Post subject: |
|
|
I don't know if there is any zsh users here, if any, they should be interesting by the following zsh completion function for paludis.
I think this one is better than the one provided with paludis for bash, because it has comments on each(nearly) completion proposition, I'have tried to not allow completion that are not compatible with ever provided arguments ie: -iu for example.
It's not perfect, but it works, at least for me
create this file: /usr/share/zsh/site_functions/_paludis_packages
Code: |
#autoload
#Author: Bapt <baptux@free.fr>
# function for paludis packages
# Usage _paludis_packages installed|available|repositories|categories|sets
local flags prepo packages categories
_paludis_packages_update_available(){
categories=(${${(M)${(f)"$(paludis --list-categories)"}:#\* *}##\* })
if [[ $PREFIX != */* ]];then
_wanted cat_packages expl "category/packages" compadd -S "/" $categories
else
compset -P '*/'
# packages=(${${(M)${(f)"$(paludis --category ${PREFIX//\//} --list-packages)"}:#\* *}##\* })
packages=(${${${(M)${(f)"$(paludis --category ${IPREFIX//\//} --list-packages)"}:#\* *}##\* }//$IPREFIX/})
_wanted cat_packages expl "category/packages" compadd ${(@)packages}
fi
}
_paludis_packages_update_installed(){
packages=(${${(M)${(f)"$(paludis --repository installed --list-packages)"}:#\* *}##\* })
compadd ${(@)packages}
}
_paludis_packages_update_categories(){
packages=(${${${(M)${(f)"$(paludis --list-categories)"}:#\* *}##\* }:#*(virtual|installed)*})
compadd ${(@)packages}
}
_paludis_packages_update_repositories(){
packages=(${${${(M)${(f)"$(paludis --list-repositories)"}:#\* *}##\* }:#*(virtual|installed)*})
compadd ${(@)packages}
}
_paludis_packages_update_sets(){
packages=(${${${(M)${(f)"$(paludis --list-sets)"}:#\* *}##\* }:#*(virtual|installed)*})
compadd ${(@)packages}
}
_paludis_packages(){
local command="$argv[$#]" expl cachevar pkgset update_policy
zstyle -s ":completion:*:*:$service:*" cache-policy update_policy
if [[ -z "$update_policy" ]]; then
zstyle ":completion:*:*:$service:*" cache-policy _paludis_cache_policy
fi
[[ "$command" == (installed|available|categories|repositories|sets) ]] || {
_message "unknown command: $command"
return
}
[[ "$pkgset" == (installed|available|categoriesrepositories|sets) ]] || {
pkgset="$command"
}
expl=("${(@)argv[1,-2]}")
_paludis_packages_update_$pkgset
}
_paludis_cache_policy () {
# rebuild if cache is more than a week old
oldp=( "$1"(mw+1) )
(( $#oldp )) && return 0
}
_paludis_packages "$@"
|
and this one /usr/share/zsh/site_functions/_paludis
Code: |
#compdef paludis
_paludis () {
local actions action_args query_args general_args deplist_args install_uninstall_args list_args lists
actions=( --query --install -i --uninstall -u --sync -s --report --contents -k --owner -o --version -V --info -I --help -h \
--has-version --best-version --environnement-variable --list-repositories --list-categories --list-packages --list-sets --list-sync-protocols --list-repository-formats --list-dep-tag-categories --regenerate-installed-cache --update-news --regenerate-installable-cache)
query_args=(
'(--show-deps -D)'{--show-deps,-D}"[Show dependencies]"
'(--show-metadata -M)'{--show-metadata,-M}"[Show raw metadata]"
)
install_uninstall_args=(
'(--pretend -p)'{--pretend,-p}"[Pretend only]"
'(--preserve-world -1)'{--preserve-world,-1}"[Don t modify the world file]"
'--no-config-protection[Disable config file protection (dangerous)]'
'--debug-build[What to do with debug information]:Debug Build:(( none\:Discard\ debug\ information split\:Split\ debug\ information internal\:Keep\ debug\ information\ with\ binaries ))'
'(--fetch -f)'{--fetch,-f}'[Only fetch sources; don t install anything]'
'--show-install-reasons[Show why packages are being installed]:Verbosity:((none\:Don\ t\ show\ any\ information summary\:Show\ a\ summary full\:Show\ full\ output))'
'--with-unused-dependencies[Also uninstall any dependencies of the target that are no longer used]'
'--with-dependencies[Also uninstall packages that depend upon the target]'
)
list_args=(
'--repository[Matches with this repository name only]:repository:_paludis_packages repositories'
'--category[Matches with this category name only]:category:_paludis_packages category'
'--package[Matches with this package name only]:package:_paludis_packages available'
'--set[Matches with this package set name only]:set:_paluldis_packages set'
)
lists=(
'(: -)--list-repositories[List available repositories]'
'(: -)--list-categories[List available categories]'
'(: -)--list-packages[List available packages]'
'(: -)--list-sets[List available package sets]'
'(: -)--list-sync-protocols[List available sync protocols]'
'(: -)--list-repository-formats[List available repository formats]'
'(: -)--list-dep-tag-categories[List known dep tag categories]'
)
general_args=(
'--log-level[Specify the log level]:log level:((debug\:Show\ debug\ output qa\:Show\ QA\ messages\ and\ warnings\ only warning\:Show\ warnings\ only silent\:Suppress\ all\ log\ messages))'
'(--no-colour --no-color)'{--no-colour,--no-color}"[Do not use colour]"
'(--config-suffix -c)'{-c,--config-suffix}"[Config directory suffix]"
)
action_args=(
"($actions)"{-q,--query}"[Query for package information]"
"($actions)"{-i,--install}"[Install one or more packages]"
"($actions)"{-u,--uninstall}"[Uninstall one or more packages]"
"(: -)"{--sync,-s}"[Sync all or specified repositories]:repository:_paludis_packages repositories"
"($actions)--uninstall-unused[Uninstall unused packages]"
"(: -)"{--report,-r}"[Report the current state of the system]"
"(: -)"{--contents,-k}"[Display contents of a package]:package:_paludis_packages installed"
"(: -)"{--owner,-o}"[Display the owner of a file]:File:_files"
"(: -)"{--version,-V}"[Display program version]"
"(: -)"{--info,-I}"[Display program version and system information]"
"(: -)"{--help,-h}"[Display program help]"
"(: -)--has-version[Check whether the specified atom is installed]:package:_paludis_packages available"
"(: -)--best-version[Display the best version of the specified atom]:package _paludis_packages available"
"(: -)--environment-variable[Display the value of an environment variable for a particular package]:package:_paludis_packages available"
"(: -)--configuration-variable[Display the value of a configuration variable for a particular repository]:_paludis_packages repositories"
"(: -)--update-news[Regenerate news.unread files]"
"(: -)--regenerate-installed-cache[Regenerate (non-metadata) cache for installed repositories]"
"(: -)--regenerate-installable-cache[Regenerate (non-metadata) cache for installable repositories]"
)
deplist_args=(
"--dl-reinstall[When to reinstall packages]:When:(never always if-use-changed)"
"--dl-reinstall-scm[When to reinstall scm packages]:When:(never always daily weekly)"
"--dl-upgrade[When to upgrade packages]:When:(always as-needed)"
"--dl-installed-deps-pre[How to handle pre dependencies for installed packages]:How:(pre pre-or-post post try-post discard)"
"--dl-installed-deps-runtime[How to handle runtime dependencies for installed packages]:How:(pre pre-or-post post try-post discard)"
"--dl-installed-deps-post[How to handle post dependencies for installed packages]:How:(pre pre-or-post post try-post discard)"
"--dl-uninstalled-deps-pre[How to handle pre dependencies for uninstalled packages]:How:(pre pre-or-post post try-post discard)"
"--dl-uninstalled-deps-post[How to handle post dependencies for uninstalled packages]:How:(pre pre-or-post post try-post discard)"
"--dl-circular[How to handle circular dependencies]:How:(error discard)"
"--dl-fall-back[When to fall back to installed packages]:When:(as-needed-except-targets as-needed never)"
)
#dispatch
if (( $words[(I)(--(uninstall)|-[[:alpha:]]#(u)[[:alpha:]]#)] )) ; then
_arguments -s \
$general_args[@] $deplist_args[@] $install_uninstall_args[@] \
"*:installed package:_paludis_packages installed" && return 0
elif (( $words[(I)--uninstall-unused] )) ; then
_arguments -s \
$deplist_args[@] $install_uninstall_args[@] && return 0
elif (( $words[(I)(--(install)|-[[:alpha:]]#(i)[[:alpha:]]#)] )) ;then
_arguments -s \
$general_args[@] $deplist_args[@] $install_uninstall_args[@] \
"*:available packages:_paludis_packages available" && return 0
elif (( $words[(I)(--(query)|-[[:alpha:]]#(q)[[:alpha:]]#)] )) ;then
_arguments -s \
$general_args[@] $query_args[@]\
"*:available packages:_paludis_packages available" && return 0
elif (( $words[(I)--(repository|package|category|set)] ));then
_arguments \
$lists[@] && reruen 0
else
_arguments -s \
$general_args[@] $deplist_args[@] $list_args[@] $lists[@] $install_uninstall_args[@] "$action_args[@]" && return 0
fi
}
_paludis "$@"
|
filenames are important but the repository can be change to any that is define in your $fpath.
paludis -[tab]  |
|
Back to top |
|
 |
Lepaca Kliffoth l33t


Joined: 28 Apr 2004 Posts: 737 Location: Florence, Italy
|
Posted: Thu Dec 21, 2006 6:33 pm Post subject: |
|
|
Bapt wrote: | I don't know if there is any zsh users here, if any, they should be interesting by the following zsh completion function for paludis. |
I LOVE YOU
edit:
Actually, not yet:
Quote: | paludis -[tab]
_arguments:comparguments:208: invalid argument:
_paludis:95: command not found: --log-level[Specify the log level]:log level:((debug\:Show\ debug\ output qa\:Show\ QA\ messages\ and\ warnings\ only warning\:Show\ warnings\ only silent\:Suppress\ all\ log\ messages)) |
Could it be some zsh setting that breaks your script? _________________ It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox! |
|
Back to top |
|
 |
Bapt Veteran


Joined: 14 Apr 2003 Posts: 1152 Location: Paris
|
Posted: Thu Dec 21, 2006 6:56 pm Post subject: |
|
|
No it's a copy/paste problem here are links you can download :
_paludis
_paludis_packages
Last edited by Bapt on Fri Dec 22, 2006 10:12 am; edited 1 time in total |
|
Back to top |
|
 |
Lepaca Kliffoth l33t


Joined: 28 Apr 2004 Posts: 737 Location: Florence, Italy
|
Posted: Thu Dec 21, 2006 7:19 pm Post subject: |
|
|
NOW I LOVE YOU!! _________________ It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox! |
|
Back to top |
|
 |
gringo Advocate


Joined: 27 Apr 2003 Posts: 3793
|
Posted: Thu Dec 21, 2006 7:37 pm Post subject: |
|
|
whoa, me too
thanks ! _________________ Error: Failing not supported by current locale |
|
Back to top |
|
 |
Bapt Veteran


Joined: 14 Apr 2003 Posts: 1152 Location: Paris
|
Posted: Fri Dec 22, 2006 10:03 am Post subject: |
|
|
this one is for adjutrix : _adjutrix |
|
Back to top |
|
 |
zxy Veteran


Joined: 06 Jan 2006 Posts: 1160 Location: in bed in front of the computer
|
Posted: Fri Dec 22, 2006 12:17 pm Post subject: |
|
|
@Bapt: Could you put this scripts on the wiki, with some sort of instructions how to install it. I think It would be cool. _________________ Nature does not hurry, yet everything is accomplished.
Lao Tzu |
|
Back to top |
|
 |
|
|
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
|
|