Date: Tue, 19 May 2009 17:41:22 +0200 (CEST) From: Stefan `Sec` Zehl <sec@42.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: misc/134714: portupgrade deletes user data without question or backup. Message-ID: <20090519154253.8975122AC4@ice.42.org> Resent-Message-ID: <200905191550.n4JFo1xe059610@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 134714 >Category: misc >Synopsis: portupgrade deletes user data without question or backup. >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 19 15:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Stefan `Sec` Zehl >Release: FreeBSD 7.2-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD ice 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #2: Mon Mar 23 23:42:21 CET 2009 root@ice:/usr/obj/usr/src/sys/ICE amd64 >Description: 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. >How-To-Repeat: >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. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090519154253.8975122AC4>