Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2014 08:10:11 -0500
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        marino@freebsd.org, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, Baptiste Daroussin <bapt@freebsd.org>
Subject:   Re: svn commit: r367994 - head/Keywords
Message-ID:  <5412F0B3.9050804@FreeBSD.org>
In-Reply-To: <54128F1C.8040904@marino.st>
References:  <201409112311.s8BNBmDl017809@svn.freebsd.org> <54128F1C.8040904@marino.st>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/12/14, 1:13 AM, John Marino wrote:
> On 9/12/2014 01:11, Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Thu Sep 11 23:11:48 2014
>> New Revision: 367994
>> URL: http://svnweb.freebsd.org/changeset/ports/367994
>> QAT: https://qat.redports.org/buildarchive/r367994/
>>
>> Log:
>>    @sample: Alert user that there is a stale file to be removed.
>>
>>    Submitted by:	amdmi3
>>    With hat:	portmgr
>>
>> Modified:
>>    head/Keywords/sample.ucl
>>    head/Keywords/sample.yaml
>>
>> Modified: head/Keywords/sample.ucl
>> ==============================================================================
>> --- head/Keywords/sample.ucl	Thu Sep 11 22:30:43 2014	(r367993)
>> +++ head/Keywords/sample.ucl	Thu Sep 11 23:11:48 2014	(r367994)
>> @@ -33,5 +33,7 @@ pre-deinstall: <<EOD
>>     target_file="${sample_file%.sample}"
>>     if cmp -s "${target_file}" "${sample_file}"; then
>>       rm -f "${target_file}"
>> +  else
>> +    echo "You may need to manually remove ${target_file} if it's no longer needed."
>>     fi
>>   EOD
>>
>> Modified: head/Keywords/sample.yaml
>> ==============================================================================
>> --- head/Keywords/sample.yaml	Thu Sep 11 22:30:43 2014	(r367993)
>> +++ head/Keywords/sample.yaml	Thu Sep 11 23:11:48 2014	(r367994)
>> @@ -32,4 +32,6 @@ pre-deinstall: |
>>     target_file="${sample_file%.sample}"
>>     if cmp -s "${target_file}" "${sample_file}"; then
>>       rm -f "${target_file}"
>> +  else
>> +    echo "You may need to manually remove ${target_file} if it's no longer needed."
>>     fi
>>
>
>
> Is this message going to show when packages are upgraded too?  If an
> upgrade is a deinstall of old version followed by installation of new
> version, I would think it would.
>
> I'm just wondering if this message is going to be unnecessary more often
> than not....
>
> John
>

Yes. It's the same as the user removal message too. It would be good to 
have pkg tell the deinstall script it is really an upgrade so these sort 
of messages can be skipped. It could be as simple as pkg exporting an 
env var PKG_IS_UPGRADING or something to check for.

Bapt what do you think of that?

Having pkg only call pre/post-upgrade scripts instead of 
deinstall/install is a much larger task to ensure working properly for 
all packages I think.

-- 
Regards,
Bryan Drewery



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5412F0B3.9050804>