This is for active development.
New funtionalities are to be added actively.
Revision | ca16d3a9fb3521d40a4457fce5f6305939c33a49 (tree) |
---|---|
Time | 2022-11-13 01:56:28 |
Author | ![]() |
Commiter | Mamoru Sakaue |
[BUG FIX] As of OS version 13, the specification change of grep(1) caused "empty (sub)expression" errors resulting in wrong processing at many points.
modified: HISTORY
modified: lib/libmain.sh
modified: lib/libpkgsys.sh
modified: man/portsreinstall.8
@@ -1,5 +1,6 @@ | ||
1 | -4.1.2 (?? May 2022) | |
1 | +4.1.2 (?? Nov 2022) | |
2 | 2 | [BUG FIX] Packages for which the flavor mechanism is newly introduced sometimes had their old packages remain as conflict. |
3 | +[BUG FIX] As of OS version 13, the specification change of grep(1) caused "empty (sub)expression" errors resulting in wrong processing at many points. | |
3 | 4 | 4.1.1 (20 April 2022) |
4 | 5 | [IMPROVED] Adapt to the specification change of pkg-create(8) that the default extension of the package files become "pkg". |
5 | 6 | [IMPROVED] Adapt to the behavior change grep(1) as of 12.0-RELEASE that the case distinction is ineffective in some locale, which as a result prevented the execution by users in such locales. |
@@ -12,8 +12,8 @@ main_set_version () | ||
12 | 12 | MYVERSION=4.1.2 |
13 | 13 | COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$' |
14 | 14 | # Template for development versions |
15 | - MYVERSION=4.1.1+toward_4.1.2_20220508155922 | |
16 | - COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0-1]\.[0-1]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$' | |
15 | + MYVERSION=4.1.1+toward_4.1.2_20221112165132 | |
16 | + COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0-1]\.[0-1]+\+toward_4\.[0-1]\.[0-9]+_[0-9]+)$' | |
17 | 17 | } |
18 | 18 | |
19 | 19 | # ============= Parse options, arguments and control parameters ============= |
@@ -125,7 +125,7 @@ pkgsys_is_necessary_pkgtool () | ||
125 | 125 | # ============= Get the extended regular expression pattern of ports for pkg(8) ============= |
126 | 126 | pkgsys_pkgtools_ports_filter_regexp () |
127 | 127 | { |
128 | - echo '^ports-mgmt/(pkg|pkg-devel)(|@.*)$' | |
128 | + echo '^ports-mgmt/(pkg|pkg-devel|pkg@.*|pkg-devel@.*)$' | |
129 | 129 | } |
130 | 130 | |
131 | 131 | # ============= Get the extended regular expression pattern of package names for pkg(8) ============= |
@@ -761,7 +761,7 @@ pkgsys_def_pkgtools () | ||
761 | 761 | | env LANG=C grep -m 1 '^pkg-[0-9]'` || : |
762 | 762 | [ -n "$pkgname" ] && pkg_inst_remote_wild "$pkgname" && return |
763 | 763 | message_echo "INFO: Failed by package, so installing pkgng by port." |
764 | - env LANG=C grep -Ev '^[[:space:]]*WITH_PKG(|NG)=' /etc/make.conf > ${TMPDIR}/make.conf 2> /dev/null || : | |
764 | + env LANG=C grep -Ev '^[[:space:]]*(WITH_PKG|WITH_PKGNG)=' /etc/make.conf > ${TMPDIR}/make.conf 2> /dev/null || : | |
765 | 765 | echo WITHOUT_PKG=yes >> ${TMPDIR}/make.conf |
766 | 766 | echo WITHOUT_PKGNG=yes >> ${TMPDIR}/make.conf |
767 | 767 | dev_out=/dev/stdout |
@@ -1349,11 +1349,11 @@ pkgsys_eval_ports_glob () | ||
1349 | 1349 | fi |
1350 | 1350 | done |
1351 | 1351 | fi |
1352 | - glob_regexp_allflavors=`echo "$glob_regexp" | sed 's/$$/(|@.*)$/'` | |
1352 | + glob_regexp_allflavors=`echo "$glob_regexp" | sed 's/$$/@.*$/'` | |
1353 | 1353 | { |
1354 | 1354 | pkg_info_all_flavored_origins |
1355 | 1355 | cut -f 2 "${DBDIR}/installed_ports:pkg_vs_origin.tbl" 2> /dev/null |
1356 | - } | env LANG=C grep -E "$glob_regexp_allflavors" 2>&1 || : | |
1356 | + } | env LANG=C grep -E -e "$glob_regexp" -e "$glob_regexp_allflavors" 2>&1 || : | |
1357 | 1357 | else |
1358 | 1358 | if expr "$glob" : '[a-z][a-zA-Z0-9_.+-]*[a-zA-Z0-9_.+]$' > /dev/null 2>&1 && \ |
1359 | 1359 | [ `expr "$glob" : '.*-[0-9]' 2>&1` -eq 0 ] |
@@ -1541,7 +1541,7 @@ pkgsys_eval_ports_glob_even_if_nonexistent () | ||
1541 | 1541 | glob_pattern=$1 |
1542 | 1542 | { |
1543 | 1543 | pkgsys_eval_ports_glob "$glob_pattern" 2> /dev/null || : |
1544 | - echo "$glob_pattern" | env LANG=C grep -E '^[a-z]+/[a-zA-Z0-9_.+-]+(|@[a-zA-Z0-9_.+-]+)$' || : | |
1544 | + echo "$glob_pattern" | env LANG=C grep -E '^[a-z]+/([a-zA-Z0-9_.+-]+|[a-zA-Z0-9_.+-]+@[a-zA-Z0-9_.+-]+)$' || : | |
1545 | 1545 | } | env LANG=C grep -v -e '^$' | sort -u |
1546 | 1546 | } |
1547 | 1547 |
@@ -47,7 +47,7 @@ A shell\-type glob is evaluated by matching an asterisk "*" to an arbitrary stri | ||
47 | 47 | Here, the evaluation of the bracket is actually done by passing it to an extended regular expression by simply converting the prefix "[!" to "[^". |
48 | 48 | A glob is recognized as a unique name (package name without the version part) if no slash "/" or any special character for an extended regular expression or a shell\-type glob is included in the pattern. |
49 | 49 | For example, all of "zip" "zip\-3.?", "zip\-*", "zip\-[0\-9]*" and ":^zip\-[[:digit:]]+\.*" can match "zip\-3.0"; "archivers/unzip*" can match both of "archivers/unzip" and "archivers/unzip\-iconv". |
50 | -When the \fIglob\fR should match the all flavors of a port, a regular expression can be used such as ":devel/py-setuptools(|@.*)". | |
50 | +When the \fIglob\fR should match the all flavors of a port, a regular expression can be used such as ":devel/(py-setuptools|py-setuptools@.*)". | |
51 | 51 | .SH ARGUMENTS |
52 | 52 | One of the following \fIcommands\fR can be given for optional operations or confirmation. |
53 | 53 | .TP |