You are not logged in.
Or a "Would you like to remove leftover dependencies? [Y/N]". That one could be displayed for both makedepends and failed builds.
Offline
I just started using Clyde, and it's asking me to select my default text editor - [request]: check if $EDITOR is set, and if so, USE IT, instead of asking me questions.
Offline
There are problems getting $EDITOR from Lua when sudo is involved (well in general really, it is not 100% bulletproof depending on how the user has set EDITOR), believe me, I tried.... Long story short, I would love to but it will not be happening.
Random trivia: It is not impossible to get EDITOR from $SHELLrcs. I did it in the past before clyde.conf, it just relied on assumptions upon assumptions and was a huge, ugly, unreliable mess. Thus the config was born, which is dozens of times more reliable and clean and allows for cool things. You should have one anyway. (It will whinge until you make one as well so I highly recommend making one...)
Offline
Oh thats interesting, i think sudo doesnt really touch the the environment variables though I dont know any lua. But why not write the default editor in the config file based on $EDITOR when the config is created?
Offline
For sudo to preserve environment variables, you need to run sudo -E or have SETENV set in sudoers
Offline
It wouldn't be as simple as dropping privileges to check that variable, then regaining them and continuing? Just a thought.
Offline
for sudo users
c(){
case $1 in
(-Si|-Ss|-Q*|-T)
clyde "$@" ;;
*)
/usr/bin/sudo -E clyde "$@" || return $? ;;
esac
}
Last edited by quarkup (2010-03-15 11:29:16)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
Hi,
I've ported the bash-completion for pacman to clyde.
Here is the file, just save it as clyde in /etc/bash_completion.d/ and relogin.
# vim: set ft=sh ts=2 sw=2 et:
# file: /etc/bash_completion.d/clyde
# Bash completion for clyde
# Original: Manolis Tzanidakis <mtzanidakis@freemail.gr>
# Ported by: Andrwe Lord Weber lord-weber-andrwe <at> renona-studios <dot> org
#
# Distributed under the terms of the GNU General Public License, v2 or later.
#
## initial functions
rem_selected ()
{
# (Adapted from bash_completion by Ian Macdonald <ian@caliban.org>)
# This removes any options from the list of completions that have
# already been specified on the command line.
COMPREPLY=($(echo "${COMP_WORDS[@]}" | \
(while read -d ' ' i; do
[ "${i}" == "" ] && continue
# flatten array with spaces on either side,
# otherwise we cannot grep on word boundaries of
# first and last word
COMPREPLY=" ${COMPREPLY[@]} "
# remove word from list of completions
COMPREPLY=(${COMPREPLY/ ${i%% *} / })
done
echo ${COMPREPLY[@]})))
return 0
}
_available_repos ()
{
COMPREPLY=( $( compgen -W "$(grep '\[' /etc/clyde.conf | grep -v -e 'options' -e '^#' | tr -d '[]' )" -- $cur ) )
}
_installed_pkgs ()
{
local installed_pkgs
installed_pkgs=$( ls /var/lib/pacman/local/ )
COMPREPLY=( $( compgen -W "$( for i in $installed_pkgs; do echo ${i%-*-*}; done )" -- $cur ) )
}
_available_pkgs ()
{
#find balks easilly on a find /foo/*/* type dir, especially one like
# /var/lib/pacman/*/*
# This little change-up removes the find *and* only uses enabled repos
local available_pkgs
local enabled_repos
enabled_repos=$( grep '\[' /etc/pacman.conf | grep -v -e 'options' -e '^#' | tr -d '[]' )
available_pkgs=$( for r in $enabled_repos; do echo /var/lib/pacman/sync/$r/*; done )
COMPREPLY=( $( compgen -W "$( for i in $available_pkgs; do j=${i##*/}; echo ${j%-*-*}; done )" -- $cur ) )
}
_installed_groups ()
{
local installed_groups
installed_groups=$( find /var/lib/pacman/local -name desc -exec sed -ne '/%GROUPS%/,/^$/{//d; p}' {} \; | sort -u )
COMPREPLY=( $( compgen -W "$( for i in $installed_groups; do echo ${i%-*-*}; done )" -- $cur ) )
}
_available_groups ()
{
#find balks easilly on a find /foo/*/* type dir, especially one like
# /var/lib/pacman/*/*
# This little change-up removes the find *and* only uses enabled repos
local available_groups
local enabled_repos
enabled_repos=$( grep '\[' /etc/clyde.conf | grep -v -e 'options' -e '^#' | tr -d '[]' )
available_groups=$( for r in $enabled_repos; do sed '/%GROUPS%/,/^$/{//d; p}' /var/lib/pacman/sync/$r/*/desc | sort -u; done )
COMPREPLY=( $( compgen -W "$( for i in $available_groups; do echo ${i%-*-*}; done )" -- $cur ) )
}
## makepkg completion
_makepkg ()
{
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
-p)
_filedir
return 0
;;
--help|--cleancache)
COMPREPLY=''
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '\
-A --ignorearch \
-b --builddeps \
-c --clean \
-C --cleancache \
-d --nodeps \
-e --noextract \
-f --force \
-g --geninteg \
-h --help \
-i --install \
-L --log \
-m --nocolor \
-o --nobuild \
-p \
-r --rmdeps \
-s --syncdeps \
--asroot \
--source \
--noconfirm \
--noprogressbar' -- $cur ) )
fi
rem_selected
}
complete -o default -F _makepkg makepkg
## pacman completion
_instring ()
{
str="${1}"
shift 1
for c in "${@}"; do
if [ $(expr index "${str}" "${c}") -gt 0 ]; then
return 0
fi
done
return 1
}
_clyde ()
{
local a arg toparse op mod cur
COMPREPLY=()
# This argument parsing is done so we can check for flag existance later
# right now it's a tad crappy, but does the job
for (( i=1; i < ${#COMP_WORDS[@]}-1; i++ )); do
a=${COMP_WORDS[i]}
arg="${a:0:2}"
toparse="${a:2}"
case "${arg}" in
-@(U|R|S|Q|h|V))
op="${arg/-}"
mod="${mod}${a:2}"
;;
--)
arg="${a:2}"
case "${arg}" in
remove) op="R" ;;
upgrade) op="U" ;;
query) op="Q" ;;
sync) op="S" ;;
help) op="h" ;;
version) op="V" ;;
verbose) mod="${mod}v" ;;
root) mod="${mod}r" ;;
dbpath) mod="${mod}b" ;;
nodeps) mod="${mod}d" ;;
force) mod="${mod}f" ;;
groups) mod="${mod}g" ;;
info) mod="${mod}i" ;;
list) mod="${mod}l" ;;
print-uris) mod="${mod}p" ;;
search) mod="${mod}s" ;;
sysupgrade) mod="${mod}u" ;;
upgrades) mod="${mod}u" ;;
downloadonly) mod="${mod}w" ;;
refresh) mod="${mod}y" ;;
changelog) mod="${mod}c" ;;
deps) mod="${mod}d" ;;
explicit) mod="${mod}e" ;;
unrequired) mod="${mod}t" ;;
foreign) mod="${mod}m" ;;
owns) mod="${mod}o" ;;
file) mod="${mod}p" ;;
search) mod="${mod}s" ;;
upgrades) mod="${mod}u" ;;
cascade) mod="${mod}c" ;;
check) mod="${mod}k" ;;
dbonly) mod="${mod}k" ;;
nosave) mod="${mod}n" ;;
recursive) mod="${mod}s" ;;
unneeded) mod="${mod}u" ;;
esac ;;
*) toparse="${a}" ;;
esac
arglen=$(( ${#toparse}-1 ))
for c in $(seq 0 "${arglen}"); do
arg=${toparse:$c:1}
[ "${arg}" != "-" ] && mod="${mod}${arg}"
done
done
cur=${COMP_WORDS[COMP_CWORD]}
if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '\
-h --help \
-Q --query \
-R --remove \
-S --sync \
-U --upgrade \
-V --version \
' -- $cur ) )
rem_selected
return 0
fi
if [[ "$cur" == -* ]]; then
case "${op}" in
U)
COMPREPLY=( $( compgen -W '\
--asdeps \
--asexplicit \
-d --nodeps \
-f --force \
-h --help \
--config \
--logfile \
--noconfirm \
--noprogressbar \
--noscriptlet \
-v --verbose \
-r --root \
-b --dbpath \
--cachedir \
' -- $cur ) )
return 0
;;
R)
COMPREPLY=( $( compgen -W '\
-c --cascade \
-d --nodeps \
-h --help \
-k --dbonly \
-n --nosave \
-s --recursive \
-u --unneeded \
--config \
--logfile \
--noconfirm \
--noprogressbar \
--noscriptlet \
-v --verbose \
-r --root \
-b --dbpath \
--cachedir \
' -- $cur ) )
return 0
;;
S)
COMPREPLY=( $( compgen -W '\
--asdeps \
--asexplicit \
-c --clean \
-d --nodeps \
-f --force \
-g --groups \
-h --help \
-i --info \
-l --list \
-p --print-uris \
-s --search \
-u --sysupgrade \
-w --downloadonly \
-y --refresh \
--needed \
--ignore \
--ignoregroup \
--config \
--logfile \
--noconfirm \
--noprogressbar \
--noscriptlet \
-v --verbose \
-r --root \
-b --dbpath \
--cachedir \
' -- $cur ) )
return 0
;;
Q)
COMPREPLY=( $( compgen -W '\
-c --changelog \
-d --deps \
-e --explicit \
-g --groups \
-h --help \
-i --info \
-k --check \
-l --list \
-m --foreign \
-o --owns \
-p --file \
-s --search \
-t --unrequired \
-u --upgrades \
--config \
--logfile \
--noconfirm \
--noprogressbar \
--noscriptlet \
-v --verbose \
-r --root \
-b --dbpath \
--cachedir \
' -- $cur ) )
return 0
;;
esac
rem_selected
else
case "${op}" in
U)
COMPREPLY=( $( compgen -d -- "$cur" ) \
$( compgen -f -X '!*.pkg.tar.gz' -- "$cur" ) )
return 0
;;
h|V)
COMPREPLY=''
return 0
;;
Q)
if _instring $mod g; then
_installed_groups
elif _instring $mod o; then
COMPREPLY=( $( compgen -d -- "$cur" ) \
$( compgen -f -- "$cur" ) )
elif _instring $mod p; then
COMPREPLY=( $( compgen -d -- "$cur" ) \
$( compgen -f -X '!*.pkg.tar.gz' -- "$cur" ) )
elif _instring $mod u; then
COMPREPLY=''
return 0
else
_installed_pkgs
fi
return 0
;;
R)
_installed_pkgs
return 0
;;
S)
if _instring $mod l; then
_available_repos
else
_available_pkgs
fi
return 0
;;
esac
fi
rem_selected
}
complete -o filenames -F _clyde clyde
Last edited by Andrwe (2010-03-16 11:23:21)
Website: andrwe.org
Offline
how can i update my aur packages with clyde from git? i tried with --aur but that doesnt do anything
Offline
how can i update my aur packages with clyde from git? i tried with --aur but that doesnt do anything
it is not implemented yet.
Offline
In the mean time, you can just do -S on them to reinstall them.
Offline
there is another "bug"
why do it checks for /var/lib/pacman/db.lck when all I want is an AUR package ??
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
I have a small feature request: Whenever I used yaourt, I didn't have to type sudo, just
yaourt -Syu
or whatever else I had to do, and it would automatically prompt sudo like this:
schen@arch> yaourt -Syu ~
Password:
Just adding a little suggestion!
Offline
It helps to read the thread. That feature has already been discussed and will be implemented later.
[git] | [AURpkgs] | [arch-games]
Offline
I would like to see feature like "always build from source".
So if I ran -Syu and there is an update for packageXY, it would build it from source and install it.
Those packages will be defined in conf file, ofcourse.
Last edited by ammon (2010-03-18 00:29:30)
Offline
check:
having the [arch-games] repository "clyde -S true-combat" is installing from AUR, it should use the "true-combat" binary unless explicited to build from abs/aur/source
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
check:
having the [arch-games] repository "clyde -S true-combat" is installing from AUR, it should use the "true-combat" binary unless explicited to build from abs/aur/source
[git] | [AURpkgs] | [arch-games]
Offline
Sorry Daenyth. I did read the thread but I guess I didn't read it well enough.
Offline
I would like to see feature like "always build from source".
So if I ran -Syu and there is an update for packageXY, it would build it from source and install it.
Those packages will be defined in conf file, ofcourse.
I would like this too. Or if you could add a -b flag to build a package from abs.
clyde -Syb kernel26
Offline
Wouldn't -Syb be more as an "abs", and then -Syub would be to update from that?
[git] | [AURpkgs] | [arch-games]
Offline
Is this a tilda problem?
http://omploader.org/tM3ZyYw
you are not the only one, this has been mentioned - it happens also with yakuake (i posted a pic before on this thread).
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
I enjoy using Clyde a lot.
But I think I've found a trivial bug:
When using clyde -Si of AUR packages the optional dependencies are not seperated correctly like:
Optional Deps : aurvote:
vote
for
favorite
packages
from
AUR
,,,
Libertarian Arch Linux User
Offline
I have fixed that problem with opt depends in aur pkgs.
Ugh, I am beginning to hate tmux and tilde (whatever that is). IMO they are buggy...if something works in 90% of terminals, and especially since I don't do anything screwy or out of the norm or even stupid, then they are not doing something right. Nonetheless, I will try and figure out a way of making Clyde work with them, though I still blame those programs. Clyde may have some bugs, but I do not think this can be considered entirely a problem with Clyde.
quarkup, second issue, I am not sure how that is possible. Did you remember to run clyde -Sy after adding arch-games to /etc/clyde.conf? It should check repos first, and only move to aur if it did not find it in repos.
First issue, even though you "just want an AUR package", presuming you want to install and aren't just using -G, then it still has to do stuff that requires you do not have a db.lck.
ammon, check out pacbuilder and srcpac, they currently are more in the realm of building packages outside of aur from source than Clyde is.
ABS support will eventually be in Clyde just do not expect it any time incredibly soon.
schen, see here
Okay, so... in regards to -Syu --aur and color profiles. Still not done as you may have noticed. For that I would like to apologize. I have not been feeling incredibly well and kind of lazy and a bit burnt out, so even though I have been on Spring break, I have not done too much work on Clyde like I intended. As some of you know I work on several projects already, (curlpaste, ompluad, clyde, all excellent programs I might add!), in addition to trying to learn Ruby. My most recent endeavor is to write Pkgfile in Lua (Lpkgfile is about 5-6 times faster than Pkgfile), which has been...interesting. (Eventually I want to rewrite all of Pkgtools in Lua, btw). The whole thing is kind of hilarious and annoying at the same time.
Continue on if you want to hear a story:
Basically because of Cpufrequtils having a 95% threshold for ondemand governor even a simple Pkgfile search took a minute, (I did not know that was the reason it was so slow at the time) so I was like "screw this I'll do it in Lua." Later I found out that for most people Pkgfile took only like 7-10 seconds, but I was already getting faster results with Lpkgfile so I was semi-happy. It was still slower than I liked though, and knew it should/could be faster, so I experimented with various ways of making it better. Overall I spent about 15-20 hours on that task, only to always end up with something that took 3 seconds when I was getting 1.3 with the regular way. The regular way being to iterate over the pkgtools/lists directory opening and reading every 'files' file and doing pattern matches. My, theoretically better, but in practice slower, way of making serialized files that could be loaded into Lua as tables was the majority of that time. The data structures are massive so loading them into ram was problematic. Mostly it was slow to do so, it also used a lot of ram and cpu. Anyway, I learned a few cool tricks that I may be able to use in future projects but for this one are pretty pointless at the moment. So I decided to stick with the way I had, 1.3 seconds is pretty darn swift . Then it went back to being slow, that was when I started monitoring my cpu speed when I ran the tests and found that it was not scaling properly and found out about Cpufrequtils being mean to me, and fixed it. This also greatly improved flash performance! See here for info on that
tl;dr
I will try to get to color profiles and -Syu --aur this weekend...and fix a few bugs.
Offline
Ugh, I am beginning to hate tmux and tilde (whatever that is). IMO they are buggy...if something works in 90% of terminals, and especially since I don't do anything screwy or out of the norm or even stupid, then they are not doing something right. Nonetheless, I will try and figure out a way of making Clyde work with them, though I still blame those programs. Clyde may have some bugs, but I do not think this can be considered entirely a problem with Clyde.
Yeah terminal capabilities are mess. I dont want to disappoint you, but tilda is a standard vte terminal (gnome terminal, sakura, xfceterminal uses this same widget), i got the same issue in urxvt (tmux is just a multiplexer like screen) and some else got in in the standard kde terminal widget (i guess that is what yakauke using). Imho more than 90% of arch users use one from this three. What terminal program do you use?
Offline