diff options
author | makefu <github@syntax-fehler.de> | 2011-10-11 15:15:00 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-10-11 15:43:07 +0200 |
commit | 1c1d0d95b3c64d045146a61f12d59183f4cf1cba (patch) | |
tree | 7f80e8fd8c4d8405f8257f8d543f962851a913e1 | |
parent | 12567464be1c4ef6722da354592daf1db9662c2b (diff) |
punani: fix multi-match for packages like python
using the full path now in retiolum
using fallback for different ose
-rwxr-xr-x | punani/bin/punani | 12 | ||||
-rw-r--r-- | retiolum/Makefile | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/punani/bin/punani b/punani/bin/punani index 954eca43..2f4ce42c 100755 --- a/punani/bin/punani +++ b/punani/bin/punani @@ -29,6 +29,7 @@ guess_system() fi } + arch_aur_helper() { # pacman is the last fallback helper @@ -43,6 +44,7 @@ arch_aur_helper() echo "!! no helper found, this should never happen(tm)." return 1 } + handle_system () { case "$system" in (*arch-like*) @@ -57,7 +59,7 @@ handle_system () { # get dependencies : # we need pkgfile if ! [ `which pkgfile` ] ; then - pacman -S --noconfirm pkgtools + pacman -S --needed --noconfirm pkgtools pkgfile -u fi punani_Scientist_update() { @@ -65,7 +67,7 @@ handle_system () { pkgtool -u } punani_Scientist_search() { - pkgfile $1 + pkgfile -s -b $1 if [ "${hard-}" ] ; then mgr=`arch_aur_helper` $mgr -Ss $1 @@ -79,7 +81,7 @@ handle_system () { # # when trying harder it tries to load the package with the given name directly via yaourt echo "** trying to find package with given file" - if pacman -S `pkgfile $1` ; then + if pacman -S --needed $(pkgfile -s -b -r $1); then echo "++ finished" exit 0 else @@ -127,14 +129,14 @@ handle_system () { } punani_Scientist_search() { - apt-file search -l -x /$1\$ && exit 0 + apt-file search -l -x $1\$ && exit 0 if [ "${hard-}" ] ; then apt-cache search $1 fi } punani_Engineer_insert() { echo "trying to install $1" - if apt-get install `apt-file search -l -x /$1\$`;then + if apt-get install `apt-file search -l -x $1\$`;then echo "++ finished" else if [ "${hard-}" ] ; then diff --git a/retiolum/Makefile b/retiolum/Makefile index c80a6faa..dd6d8409 100644 --- a/retiolum/Makefile +++ b/retiolum/Makefile @@ -11,7 +11,7 @@ hosts: bin/update-retiolum-hosts || true install: update - @#punani -Ei tinc python + punani -Eih tinc /usr/bin/python /usr/bin/python2 @# will not run automatically scripts/tinc_setup/install.sh scripts/autostart/create-startup.sh |