|
⇤ ← Wersja 1 z 2014-12-11 04:37:30
Rozmiar: 4592
Komentarz: *** KREACJA ***
|
Rozmiar: 4588
Komentarz: * head 3->1
|
| Usunięcia zostały oznaczone w ten sposób. | Dodatki zostały oznaczone w ten sposób. |
| Linia 1: | Linia 1: |
| === Patchowanie bsdadminscripts dla pkgng === | = Patchowanie bsdadminscripts dla pkgng = |
Patchowanie bsdadminscripts dla pkgng
To jest ponowne uruchomienie portconfig, aby móc ustawiać ustawienia dla ports przy pkgng
--- /usr/local/sbin/portconfig.orig 2013-07-10 01:54:15.387843000 +0200
+++ /usr/local/sbin/portconfig 2014-03-11 01:08:32.009584910 +0100
@@ -154,7 +154,7 @@
if [ -n "$force" ]; then
echo "$port"
else
- if pkg_version -IO "$port" \
+ if pkg version -IO "$port" \
grep \< > /dev/null 2>&1; then
echo "$port"
fi
@@ -162,18 +162,18 @@
if [ -n "$recursive" ]; then
getPorts "$depth" $( \
- pkg_info -qR $(pkg_info -qO "$port" \
+ pkg info -qr $(pkg info -qO "$port" \
2> /dev/null))
fi
if [ -n "$upwardrecursive" ]; then
getPorts $depth $( \
- pkg_info -qr $(pkg_info -qO "$port" \
+ pkg info -qd $(pkg info -qO "$port" \
2> /dev/null) \
| sed 's/@pkgdep //1')
fi
# Handle parameters that look like package names.
else
- candidates="$(pkg_info -Ex "$port")"
+ candidates="$(pkg info -x "$port")"
# The shortest candidate ist bound to be the best match.
shortest=
for candidate in $candidates; {
@@ -184,11 +184,11 @@
shortest="$candidate"
fi
}
- shortest="$(pkg_info -qo "$shortest" 2> /dev/null)"
+ shortest="$(pkg info -qo "$shortest" 2> /dev/null)"
if [ -n "$force" ]; then
echo "$shortest"
else
- if pkg_version -IO "$shortest" \
+ if pkg version -IO "$shortest" \
grep \< > /dev/null 2>&1
then
echo "$shortest"
@@ -197,14 +197,14 @@
if [ -n "$recursive" ]; then
getPorts "$depth" $( \
- pkg_info -qR $(
- pkg_info -qO "$shortest"
+ pkg info -qr $(
+ pkg info -qO "$shortest"
))
fi
if [ -n "$upwardrecursive" ]; then
getPorts "$depth" $( \
- pkg_info -qr $(
- pkg_info -qO "$shortest"
+ pkg info -qd $(
+ pkg info -qO "$shortest"
) | sed 's/@pkgdep //1')
fi
fi
@@ -230,9 +230,9 @@
# All ports are to be processed.
if [ -n "$all" ]; then
if [ -n "$force" ]; then
- upgrade="$(pkg_info -aqo)"
+ upgrade="$(pkg info -aqo)"
else
- upgrade="$(pkg_version -Iol\< | sed -E 's/[[:space:]]*<$//1')"
+ upgrade="$(pkg version -Iol\< | sed -E 's/[[:space:]]*<$//1')"
fi
fi
# Handle explicitly requested ports.
Powyższy patch powinien zadziałać na wszystkie "hardlinks" do portconfig, ale z jakiś przyczyn na UFS tak się nie dzieje (tak, jakby patch traktował to jako oddzielne pliki). Zatem poniższy jednolinijkowiec powinien ładnie pomóc:
for f in `pkg info -l bsdadminscripts | grep 'sbin/port'`; do patch $f ~wtp/scripts/portconfig.patch ; rm $f.orig; done
# wersja dla HQ
#
for f in `pkg info -l bsdadminscripts | grep 'sbin/port'`; do patch $f ~wtp/cvs/unison/portconfig.patch ; rm $f.orig; done
