annotate sbin/check-ports.bak @ 315:9c5b76df4f9d

Begin manual pages for the "fjail" command
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 24 Nov 2022 09:37:57 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
315
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
1 #!/bin/sh
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
2 # -*- indent-tabs-mode: nil; -*-
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
3 # @(#)$HGid$
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
4 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
5
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
6 VERSION="@@VERSION@@"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
7
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
8 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
9 # Configuration directory
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
10 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
11 : ${CONFIGDIR:=@@ETCDIR@@}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
12
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
13 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
14 # Mapping configuration: installed package name -> original package name
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
15 # Note: This is independent of any repo
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
16 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
17 : ${PACKAGE_MAPPING:=${CONFIGDIR}/package-mapping.conf}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
18
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
19 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
20 # Local repository with non-public packages and/or ports with changed
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
21 # OPTIONS (i.e. not using the defaults) or forks of official packages with
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
22 # other package names
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
23 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
24 : ${LOCAL_REPO:=LocalRepo}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
25
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
26 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
27 # Local repository with ports with default OPTIONS (i.e. unchanged)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
28 # but newer than the packages in the "FreeBSD" repository.
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
29 # Some sort of a fast-track repository.
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
30 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
31 : ${LOCALBSDPORTS_REPO:=LocalBSDPorts}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
32
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
33 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
34 # The official FreeBSD binary repository
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
35 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
36 : ${FREEBSD_REPO:=FreeBSD}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
37
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
38 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
39 # Directly installed from ports
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
40 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
41 : ${PORTS_DIRECT_INSTALLED_REPO:=unknown-repository}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
42
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
43 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
44 # For the workaround of the bug in pkg rquery -I
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
45 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
46 : ${PORTSDIR:=/usr/ports}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
47 : ${INDEXDIR:=${PORTSDIR}}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
48 : ${INDEXFILE:=@@INDEXFILE@@}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
49
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
50
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
51 get_remote_repo_versions() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
52 local _repo _data _rv
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
53
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
54 _repo=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
55
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
56 _data=$(pkg version -U -R -r ${_repo} -v)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
57 _rv=$?
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
58 eval remote_versions_${_repo}=\"\${_data}\"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
59 return ${_rv}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
60 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
61
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
62 get_remote_repo_data() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
63 local _repo _name _rversions _rfqp _rl _rdescr
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
64
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
65 _repo=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
66 _name=$2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
67
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
68 eval _rversions=\"\${remote_versions_${_repo}}\"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
69 while read _rfqp _rl _rdescr ; do
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
70 if [ ${_rfqp%-*} = ${_name} ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
71 eval remote_label_${_repo}=\"\${_rl}\"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
72 eval remote_descr_${_repo}=\"\${_rdescr}\"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
73 return 0
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
74 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
75 done <<EOF884657
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
76 ${_rversions}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
77 EOF884657
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
78 eval remote_label_${_repo}=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
79 eval remote_descr_${_repo}=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
80 return 1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
81 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
82
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
83 get_local_index_versions() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
84 local_index_versions=$(pkg version -I -v)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
85 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
86
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
87 get_repo_for_installed_package() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
88 local _name _n _v _r
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
89
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
90 _name=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
91
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
92 while read _n _v _r ; do
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
93 if [ ${_name} = ${_n} ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
94 repository=${_r}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
95 return 0
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
96 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
97 done <<EOF223777
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
98 ${installed_data}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
99 EOF223777
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
100 return 1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
101 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
102
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
103 get_immediate_index_version() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
104 local _package _line _fqpn _n _lines
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
105
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
106 _package=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
107
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
108 # _val=$(pkg rquery -I "${_package}" | cut -f 1 -d '|')
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
109 # _rv=$?
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
110 # immediate_index_version=${_val##*-}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
111 # return ${_rv}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
112
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
113 if [ -r "${INDEXDIR}/${INDEXFILE}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
114 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
115 # Note: Direct piping does not set immediate_index_version at return correctly
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
116 # "_line" is set correctly and parsing works, but the return 0 seems to kill
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
117 # some of the previous effects.
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
118 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
119 # "grep" does a fast pre-selection, reading, parsing and comparing is done for
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
120 # exact matching.
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
121 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
122 _lines=$(egrep '^'"${_package}" "${INDEXDIR}/${INDEXFILE}")
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
123 while read _line ; do
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
124 _fqpn="${_line%%|*}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
125 _n=${_fqpn%-*}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
126 if [ "${_package}" = "${_n}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
127 immediate_index_version="${_fqpn##*-}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
128 return 0
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
129 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
130 done <<EOF1334TGH1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
131 ${_lines}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
132 EOF1334TGH1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
133 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
134
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
135 immediate_index_version=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
136 return 1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
137 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
138
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
139 get_immediate_remote_repo_version() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
140 local _repo _name _version _rv
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
141
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
142 _repo=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
143 _name=$2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
144
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
145 _version=$(pkg rquery -U -r "${_repo}" '%v' "${_name}")
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
146 _rv=$?
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
147 eval immediate_remote_repo_version_${_repo}=\"\${_version}\"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
148 return ${_rv}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
149 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
150
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
151 assert_local_version() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
152 local _name _version _n _v _r
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
153
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
154 _name=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
155 _version=$2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
156
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
157 while read _n _v _r ; do
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
158 if [ ${_name} = ${_n} ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
159 if [ ${_version} != ${_v} ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
160 return 1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
161 else
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
162 return 0
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
163 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
164 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
165 done <<EOF223
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
166 ${installed_data}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
167 EOF223
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
168 return 2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
169 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
170
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
171 get_mapping() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
172 local _package _n _mapped
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
173
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
174 _package=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
175
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
176 if [ -r "${PACKAGE_MAPPING}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
177 while read _n _mapped ; do
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
178 if [ "${_n}" = "${_package}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
179 mapped_package_name="${_mapped}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
180 return 0
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
181 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
182 done < ${PACKAGE_MAPPING}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
183 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
184 mapped_package_name=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
185 return 1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
186 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
187
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
188 print_title() {
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
189 local _package _repo
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
190
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
191 _package=$1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
192 _repo=$2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
193 if [ -z "${title_printed}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
194 echo "${_package} (${_repo})"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
195 title_printed=yes
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
196 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
197 }
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
198
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
199
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
200 alldata_flag=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
201 alldata_flag_LocalBSDPorts=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
202 alldata_flag_LocalRepo=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
203 short_flag=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
204 verbose_flag=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
205
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
206 while getopts "VAasv" _opt ; do
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
207 case ${_opt} in
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
208 V)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
209 echo "check-ports v${VERSION} (rv:@@HGREVISION@@)"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
210 exit 0
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
211 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
212 A)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
213 # print for every package the status of all repositories
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
214 alldata_flag=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
215 alldata_flag_LocalBSDPorts=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
216 alldata_flag_LocalRepo=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
217 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
218 a)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
219 # print the data of all repos that have the package
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
220 alldata_flag=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
221 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
222 s)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
223 # "short" output: if installed from FreeBSD repo: don't
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
224 # report if only the index is newer
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
225 short_flag=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
226 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
227 v)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
228 # print all titles and repo of every installed always
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
229 verbose_flag=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
230 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
231 \?)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
232 exit 2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
233 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
234 *)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
235 echo "option handling failed" >&2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
236 exit 2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
237 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
238 esac
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
239 done
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
240
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
241 if [ -n "${short_flag}" -a -n "${alldata_flag}" ]; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
242 echo "the -s option cannot be combined with -A or -a" >&2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
243 exit 2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
244 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
245
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
246 installed_packages=$(pkg query '%n')
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
247 installed_data="$(pkg query '%n %v %R' $installed_packages)"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
248
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
249 get_remote_repo_versions ${LOCAL_REPO}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
250 get_remote_repo_versions ${LOCALBSDPORTS_REPO}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
251 get_remote_repo_versions ${FREEBSD_REPO}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
252 get_local_index_versions
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
253
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
254 while read lfqp llabel ldescr ; do
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
255 _installed_name=${lfqp%-*}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
256 _installed_version=${lfqp##*-}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
257 title_printed=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
258 get_repo_for_installed_package ${_installed_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
259 get_mapping ${_installed_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
260 if [ -n "${verbose_flag}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
261 print_title "${lfqp}" "${repository}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
262 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
263 if ! assert_local_version ${_installed_name} ${_installed_version} ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
264 echo "Assertion failed: $lfqp ${_installed_name} ${_installed_version} ${llabel}" >&2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
265 exit 1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
266 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
267 get_remote_repo_data ${LOCAL_REPO} ${_installed_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
268 get_remote_repo_data ${LOCALBSDPORTS_REPO} ${_installed_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
269 get_remote_repo_data ${FREEBSD_REPO} ${_installed_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
270 _print_detail=""
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
271 if [ -n "${mapped_package_name}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
272 _print_detail=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
273 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
274 if [ \( -n "${alldata_flag}" \) ]; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
275 _print_detail=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
276 else
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
277 if [ -n "${short_flag}" ]; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
278 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
279 # NOTE: -s and -A/-a are incompatible: so "alldata_XXX" needs not
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
280 # to be checked!
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
281 #
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
282 case "${repository}" in
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
283 "${FREEBSD_REPO}")
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
284 if [ \( "${llabel}" != '<' -a "${llabel}" != '=' \) -o "${remote_label_FreeBSD}" != '=' -o "${remote_label_LocalRepo}" != '?' -o "${remote_label_LocalBSDPorts}" != '?' ]; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
285 _print_detail=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
286 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
287 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
288 "${LOCAL_REPO}")
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
289 _print_detail=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
290 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
291 "${LOCALBSDPORTS_REPO}")
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
292 if [ "${llabel}" != '=' -o "${remote_label_FreeBSD}" != '>' -o "${remote_label_LocalRepo}" != '?' -o "${remote_label_LocalBSDPorts}" = '?' -o "${remote_label_LocalBSDPorts}" = '<' ]; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
293 _print_detail=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
294 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
295 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
296 "${PORTS_DIRECT_INSTALLED_REPO}")
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
297 _print_detail=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
298 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
299 *)
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
300 echo "ERROR: unhandled repository: ${repository}" >&2
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
301 exit 1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
302 ;;
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
303 esac
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
304 else
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
305 if [ \( \( "${llabel}" != '?' -a "${llabel}" != '=' \) -o \( "${remote_label_FreeBSD}" != '?' -a "${remote_label_FreeBSD}" != '=' \) -o \( "${remote_label_LocalBSDPorts}" != '?' -a "${remote_label_LocalBSDPorts}" != '=' \) -o \( "${remote_label_LocalRepo}" != '?' -a "${remote_label_LocalRepo}" != '=' \) \) -o \( "${repository}" = "${PORTS_DIRECT_INSTALLED_REPO}" \) ]; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
306 _print_detail=1
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
307 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
308 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
309 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
310 if [ -n "${_print_detail}" ]; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
311 print_title "${lfqp}" "${repository}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
312 echo " INDEX : ${llabel} ${ldescr}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
313 echo " FreeBSD : ${remote_label_FreeBSD} ${remote_descr_FreeBSD}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
314 if [ \( -n "${alldata_flag_LocalBSDPorts}" \) -o \( "${remote_label_LocalBSDPorts}" != '?' \) ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
315 echo " LocalBSDPorts: ${remote_label_LocalBSDPorts} ${remote_descr_LocalBSDPorts}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
316 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
317 if [ \( -n "${alldata_flag_LocalRepo}" \) -o \( "${remote_label_LocalRepo}" != '?' \) ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
318 echo " LocalRepo : ${remote_label_LocalRepo} ${remote_descr_LocalRepo}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
319 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
320 if [ -n "${mapped_package_name}" ] ; then
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
321 echo " ---> ${mapped_package_name}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
322 get_immediate_index_version "${mapped_package_name}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
323 get_immediate_remote_repo_version ${LOCAL_REPO} ${mapped_package_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
324 get_immediate_remote_repo_version ${LOCALBSDPORTS_REPO} ${mapped_package_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
325 get_immediate_remote_repo_version ${FREEBSD_REPO} ${mapped_package_name}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
326 echo " INDEX : ${immediate_index_version}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
327 echo " FreeBSD : ${immediate_remote_repo_version_FreeBSD}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
328 echo " LocalBSDPorts: ${immediate_remote_repo_version_LocalBSDPorts}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
329 echo " LocalRepo : ${immediate_remote_repo_version_LocalRepo}"
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
330 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
331 fi
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
332 done <<EOF856661111299999
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
333 ${local_index_versions}
9c5b76df4f9d Begin manual pages for the "fjail" command
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
334 EOF856661111299999