This just happened to me again -- I really think it should be fixed by now. Portupgrade of any port where some of the ports files have been modified deletes these files even though these changes are detected first. The only thing you get is a message like this scrolling by: | pkg_delete: '/usr/local/etc/munin/templates/munin-comparison-day.tmpl' | fails original MD5 checksum - deleted anyway. This message makes me angry every time this happens. If it knows there is something wrong, ask me how to proceed, or at least back up the modified file. Yes, I know that the underlying problem lies with pkg_delete and the "-f" option. I think it is simply wrong for portupgrade to call pkg_delete with "-f" and blindly assume everything is ok. Fix: Several options come to my mind. a) Make pkg_delete return via exit code wether changed files were detected and keep the backup in this case. b) Create an option for pkg_delete to only skip dependencies, and let portupgrade fail/ask the user in case this doesn't work. c) Let portupgrade check the output from pkg_delete for these messages and handle the cases itself.
Responsible Changed From-To: freebsd-bugs->sem Fix synopsis and assign.
man pkg_delete says: -f, --force Force removal of the package, even if a dependency is recorded or the deinstall or require script fails. Nothing about changed files. Even if pkg_delete will leave the file, the port overwrite it when will install. So, badly formed port should be fixed. Ports I've made tell users when deinstall something like that: "please note, the files will not be removed:... if you will not use the application anymore, remove them yourself". -- Dixi. Sem.
State Changed From-To: open->suspended I think it's relate to badly formed ports, not portupgrade
On Wed, May 20, 2009 at 12:54 +0400, Sergey Matveychuk wrote: > man pkg_delete says: > -f, --force > Force removal of the package, even if a dependency is > recorded or > the deinstall or require script fails. > > Nothing about changed files. Yet it deletes these files. > Even if pkg_delete will leave the file, the port overwrite it when will > install. So, badly formed port should be fixed. Ports I've made tell > users when deinstall something like that: "please note, the files will > not be removed:... if you will not use the application anymore, remove > them yourself". The port might be wrong in that it should have installed the templates as *.sample files I give you that. Still having FreeBSD tell you blatantly: "You changed this file, I don't care about your work, I'll djust delete it" makes me angry. I argue that this should be fixed. Even considering that we never will know what files a user will change from a port in his specific configuration. Why are we even keeping checksums if we don't use them where they could help? Please don't close my PRs just because you didn't have that problem yet. CU, Sec -- When in doubt, invent a chinese proverb.
Responsible Changed From-To: sem->ruby sem@ has turned over maintainership of portupgrade to the ruby mailing list.
Responsible Changed From-To: ruby->pgollucci I will take it
State Changed From-To: suspended->open
Responsible Changed From-To: pgollucci->freebsd-ports-bugs going to have enotime for the next 2 weeks, sorry
Responsible Changed From-To: freebsd-ports-bugs->ruby Over to maintainer(s).
State Changed From-To: open->suspended Correct state is suspended. This is not only a bug in portupgrade but a general problem of the ports collection
Responsible Changed From-To: ruby->freebsd-ports-bugs Over to maintainer.
State Changed From-To: suspended->closed You're absolutely right that it's a problem, but it's with the referenced port. The files should be installed as samples and copied over if missing. This is not a portupgrade bug.