Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2021 17:34:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 255670] Mk/Keywords/sample.ucl: Deleting any configuration files automatically is a bug
Message-ID:  <bug-255670-7788-TSESFTVzOE@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-255670-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-255670-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255670

--- Comment #13 from dave@jetcafe.org ---
(In reply to Baptiste Daroussin from comment #12)
> When I remove a package I don't want any leftovers left behind by default=
.=20=20
Ah! This implied policy speaks directly to my issue. :)=20

I think I understand the intent of this code, thank you for that. However, =
the
condition where the package sample file is the same as it's installed
configuration file is (at least for the nginx package) created by the person
who installed the package. In the case of nginx, for example, the
"mime.types-dist" file might be copied to "mime.types".  That is a local po=
licy
decision, right? Maybe the user has written some other tool that expects th=
at
file to be there.=20

Note well that even if the files are the same, the original nginx pkg insta=
ll
does not create a "mime.types" file by default:

 > pkg info -l nginx | grep mime.types
    /usr/local/etc/nginx/mime.types-dist
 >

So to create "mime.types", the -dist version of the file might be manually
copied by the pkg user, which I believe is a valid use case.=20

Are there packages that actually -do- copy dist files to target files? If s=
o,
those would be counter examples.

> if we want to do what you want to do we should move this to post-deinstal=
l, then pkg needs to be modified to allow this (which is doable, takes more=
 time and is probably desirable).

I'm not very familiar with the distinction between pre-deinstall and
post-deinstall, so I'm not immediately understanding why moving the same co=
de
to post-deinstall would somehow prevent the case where (using my example ab=
ove)
the mime.types file would not be removed on a pkg upgrade.=20=20

Are you talking about using my patch in post-deinstall instead of
pre-deinstall?

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255670-7788-TSESFTVzOE>