comparison tests/ports.t @ 791:1ffb4e15151d

ports.subr: Determine the existence of a local index file (from INDEXDIR or PORTSDIR). The algorithm follows the behaviour of pkg-version(8) with regard to SOURCE_VERSION.
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 29 Oct 2024 22:44:49 +0100
parents 56ab5c012d5f
children 954d3607e87d
comparison
equal deleted inserted replaced
790:34fe2260251d 791:1ffb4e15151d
57 57
58 $ get_package_mapping PMAPPING install-package-v3 58 $ get_package_mapping PMAPPING install-package-v3
59 [1] 59 [1]
60 60
61 61
62 Local Index File
63 ================
64
65 Assumes fag's standard: PORTSDIR=/home/fag/ports
66
67 $ is_local_index_file_available
68 $ PORTSDIR=/nonexisting is_local_index_file_available
69 [1]
70 $ export VERSION_SOURCE=I
71 $ is_local_index_file_available
72 [1]
73 $ export VERSION_SOURCE=P
74 $ is_local_index_file_available
75 $ unset VERSION_SOURCE
76
77 $ get_local_index_file
78 /home/fag/ports/INDEX-[0-9]+ \(no-eol\) (re)
79 $ PORTSDIR=/nonexisting get_local_index_file
80 [1]
81 $ export VERSION_SOURCE=I
82 $ get_local_index_file
83 [1]
84 $ export VERSION_SOURCE=P
85 $ get_local_index_file
86 /home/fag/ports/INDEX-[0-9]+ \(no-eol\) (re)
87 $ unset VERSION_SOURCE
88
89
62 Repositories 90 Repositories
63 ============ 91 ============
64 92
65 Assume that FreeBSD is always configured and enabled 93 Assume that FreeBSD is always configured and enabled
66 94