NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/54730 CVS commit: src/usr.sbin/postinstall



Yes, and I have not had time to understand and test it. I have not committed
anything because I don't want to make it worse. For example your latest
patch does something special for the "etc" set, and I don't understand how "etc"
is special. Also obsolete_dir is only used in one part of the if statement and
should not be always set.

christos

> On Dec 21, 2019, at 9:20 PM, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> wrote:
> 
> The following reply was made to PR bin/54730; it has been noted by GNATS.
> 
> From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
> To: christos%netbsd.org@localhost
> Cc: gnats-bugs%netbsd.org@localhost, tsutsui%ceres.dti.ne.jp@localhost
> Subject: Re: PR/54730 CVS commit: src/usr.sbin/postinstall
> Date: Sun, 22 Dec 2019 11:15:46 +0900
> 
> I wrote:
> 
>> /var/db/obsolete/etc is not extracted into ${DESTDIR}
>> as other sets but prepared in ${ETCTGZDIR}:
>> 
>> --- postinstall.in.orig	2019-12-04 20:36:27.562323424 +0900
>> +++ postinstall.in	2019-12-04 20:37:31.591546076 +0900
>> @@ -1465,11 +1465,18 @@
>> # $3: setname
>> select_obsolete_files()
>> {
>> +	local obsolete_dir
>> +	if [ $3 = "etc" ] ;then
>> +		obsolete_dir=${SRC_DIR}/var/db/obsolete
>> +	else
>> +		obsolete_dir=${DEST_DIR}/var/db/obsolete
>> +	fi
>> +
>> 	if $SOURCEMODE; then
>> 		${SED} -n -e "/obsolete/s@\.$1$2[[:space:]].*@\1@p" \
>> 		    ${SRC_DIR}/distrib/sets/lists/$3/mi
>> 	else
>> -		${SED} -n -e "s@\.$1$2\$@\1@p" "${DEST_DIR}/var/db/obsolete/$3"
>> +		${SED} -n -e "s@\.$1$2\$@\1@p" "${obsolete_dir}/$3"
>> 	fi
>> }
>> 
>> 
> 
> You have a concern (in PR/54741):
> 
>  https://mail-index.netbsd.org/netbsd-bugs/2019/12/07/msg064879.html
>>> I am worried that SRC_DIR does not work if not $SOURCEMODE, this is why
>>> I have not committed it...
> 
> My answer is:
> 
>  https://mail-index.netbsd.org/netbsd-bugs/2019/12/07/msg064883.html
>>> I guess !$SOURCEMODE means $TGZMODE.
>>> In that case SRC_DIR for the etc set is already handled,
>>> at least it should work in select_obsolete_files():
> 
> Do you have some idea about specific test cases?
> These postinstall problems should be fixed before 9.0 release.
> 
> Thanks,
> 
> ---
> Izumi Tsutsui
> 

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index