Disallow removing modified ${PREFIX}/etc/wgetrc file on deinstall
Responsible Changed From-To: freebsd-ports-bugs->vd Over to maintainer
State Changed From-To: open->feedback etc/wgetrc is not removed on deinstall if modified. Can you please, describe the steps to reproduce this.
Hello! Wednesday, March 28, 2007, 6:17:09 AM, you wrote: > etc/wgetrc is not removed on deinstall if modified. > Can you please, describe the steps to reproduce this. But how about "etc/wgetrc" line in pkg-plist file? # cd /usr/ports/ftp/wget # make install clean # ls -l /usr/local/etc/wgetrc -r--r--r-- 1 root wheel 4224 Mar 28 07:00 /usr/local/etc/wgetrc # echo "test" >> /usr/local/etc/wgetrc # make deinstall ===> Deinstalling for ftp/wget ===> Deinstalling wget-1.10.2 pkg_delete: '/usr/local/etc/wgetrc' fails original MD5 checksum - deleted anyway. # ls -l /usr/local/etc/wgetrc ls: /usr/local/etc/wgetrc: No such file or directory -- WBR
On Wed, Mar 28, 2007 at 07:04:42 +1000, Alexander Logvinov wrote: > Hello! > > Wednesday, March 28, 2007, 6:17:09 AM, you wrote: > > > etc/wgetrc is not removed on deinstall if modified. > > Can you please, describe the steps to reproduce this. > But how about "etc/wgetrc" line in pkg-plist file? Alexander, I am very sorry for being so late with my responses. The thing I am concerned about is that usually in this case the solution would be to install etc/wgetrc.sample, so the user can copy this file to etc/wgetrc if he needs to make any changes. Upon installation/deinstallation etc/wgetrc.sample is overwritten/removed. Can you create a patch that makes wget install its config file to etc/wgetrc.sample and change the corresponding plist line? -- Vasil Dimov moc.elcaro@vomid.lisav Software Developer @ Oracle/Innobase Oy gro.DSBeerF@dv Committer @ FreeBSD.org gro.d5v@dv Home @ Sofia, Bulgaria
Hello! Sunday, April 1, 2007, 6:34:33 AM, you wrote: >> > etc/wgetrc is not removed on deinstall if modified. >> > Can you please, describe the steps to reproduce this. >> But how about "etc/wgetrc" line in pkg-plist file? > I am very sorry for being so late with my responses. No problem! > The thing I am concerned about is that usually in this case the > solution would be to install etc/wgetrc.sample, so the user can copy > this file to etc/wgetrc if he needs to make any changes. Upon > installation/deinstallation etc/wgetrc.sample is overwritten/removed. > Can you create a patch that makes wget install its config file to > etc/wgetrc.sample and change the corresponding plist line? But why original patch doesn't suit you? :) I think it makes everything that you want. :) There is a check for modification of etc/wgetrc file in wget's gmake Makefile: 1) If etc/wgetrc doesn't exist Makefile of wget creates etc/wgetrc from doc/sample.wgetrc and then Makefile of ports copies it to etc/wgetrc.dist (or .sample). 2) doc/sample.wgetrc is copied to wgetrc.new and don't overwrite etc/wgetrc if etc/wgetrc exists and modified. We only move etc/wgetrc.new to etc/wgetrc.dist (or .sample) and don't touch etc/wgetrc. -- WBR
State Changed From-To: feedback->closed A fix that installs wgetrc as wgetrc.sample has been committed. The proposed solution is a way too complex. Thanks for the inspiration!