• R/O
  • HTTP
  • SSH
  • HTTPS

current: Commit

This is for active development.
New funtionalities are to be added actively.


Commit MetaInfo

Revisionca16d3a9fb3521d40a4457fce5f6305939c33a49 (tree)
Time2022-11-13 01:56:28
AuthorMamoru Sakaue <sakaue.mamoru@mwgh...>
CommiterMamoru Sakaue

Log Message

[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.

Changes to be committed:

modified: HISTORY
modified: lib/libmain.sh
modified: lib/libpkgsys.sh
modified: man/portsreinstall.8

Change Summary

Incremental Difference

--- a/HISTORY
+++ b/HISTORY
@@ -1,5 +1,6 @@
1-4.1.2 (?? May 2022)
1+4.1.2 (?? Nov 2022)
22 [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.
34 4.1.1 (20 April 2022)
45 [IMPROVED] Adapt to the specification change of pkg-create(8) that the default extension of the package files become "pkg".
56 [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.
--- a/lib/libmain.sh
+++ b/lib/libmain.sh
@@ -12,8 +12,8 @@ main_set_version ()
1212 MYVERSION=4.1.2
1313 COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
1414 # 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]+)$'
1717 }
1818
1919 # ============= Parse options, arguments and control parameters =============
--- a/lib/libpkgsys.sh
+++ b/lib/libpkgsys.sh
@@ -125,7 +125,7 @@ pkgsys_is_necessary_pkgtool ()
125125 # ============= Get the extended regular expression pattern of ports for pkg(8) =============
126126 pkgsys_pkgtools_ports_filter_regexp ()
127127 {
128- echo '^ports-mgmt/(pkg|pkg-devel)(|@.*)$'
128+ echo '^ports-mgmt/(pkg|pkg-devel|pkg@.*|pkg-devel@.*)$'
129129 }
130130
131131 # ============= Get the extended regular expression pattern of package names for pkg(8) =============
@@ -761,7 +761,7 @@ pkgsys_def_pkgtools ()
761761 | env LANG=C grep -m 1 '^pkg-[0-9]'` || :
762762 [ -n "$pkgname" ] && pkg_inst_remote_wild "$pkgname" && return
763763 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 || :
765765 echo WITHOUT_PKG=yes >> ${TMPDIR}/make.conf
766766 echo WITHOUT_PKGNG=yes >> ${TMPDIR}/make.conf
767767 dev_out=/dev/stdout
@@ -1349,11 +1349,11 @@ pkgsys_eval_ports_glob ()
13491349 fi
13501350 done
13511351 fi
1352- glob_regexp_allflavors=`echo "$glob_regexp" | sed 's/$$/(|@.*)$/'`
1352+ glob_regexp_allflavors=`echo "$glob_regexp" | sed 's/$$/@.*$/'`
13531353 {
13541354 pkg_info_all_flavored_origins
13551355 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 || :
13571357 else
13581358 if expr "$glob" : '[a-z][a-zA-Z0-9_.+-]*[a-zA-Z0-9_.+]$' > /dev/null 2>&1 && \
13591359 [ `expr "$glob" : '.*-[0-9]' 2>&1` -eq 0 ]
@@ -1541,7 +1541,7 @@ pkgsys_eval_ports_glob_even_if_nonexistent ()
15411541 glob_pattern=$1
15421542 {
15431543 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_.+-]+)$' || :
15451545 } | env LANG=C grep -v -e '^$' | sort -u
15461546 }
15471547
--- a/man/portsreinstall.8
+++ b/man/portsreinstall.8
@@ -47,7 +47,7 @@ A shell\-type glob is evaluated by matching an asterisk "*" to an arbitrary stri
4747 Here, the evaluation of the bracket is actually done by passing it to an extended regular expression by simply converting the prefix "[!" to "[^".
4848 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.
4949 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@.*)".
5151 .SH ARGUMENTS
5252 One of the following \fIcommands\fR can be given for optional operations or confirmation.
5353 .TP
Show on old repository browser