When upgrading packages with webapp-config, it leaves behind empty "install" files under /var/db/webapps/programname/version app-admin/webapp-config-1.50.16-r1 on stable-x86 Example (I only have 2.11.5 installed): store20 phpmyadmin # find /var/db/webapps/phpmyadmin/ /var/db/webapps/phpmyadmin/ /var/db/webapps/phpmyadmin/2.10.0.2 /var/db/webapps/phpmyadmin/2.10.0.2/installs /var/db/webapps/phpmyadmin/2.11.2.2 /var/db/webapps/phpmyadmin/2.11.2.2/installs /var/db/webapps/phpmyadmin/2.10.1 /var/db/webapps/phpmyadmin/2.10.1/installs /var/db/webapps/phpmyadmin/2.11.5 /var/db/webapps/phpmyadmin/2.11.5/.keep_dev-db_phpmyadmin-2.11.5 /var/db/webapps/phpmyadmin/2.11.5/installs
(In reply to comment #0) > When upgrading packages with webapp-config, it leaves behind empty "install" > files under /var/db/webapps/programname/version I am no python guru but: --- db_orig.py 2008-03-12 16:38:05.000000000 +0000 +++ db.py 2008-03-12 16:44:52.000000000 +0000 @@ -318,6 +318,8 @@ if not self.__p: installs = open(dbpath, 'w') installs.write('\n'.join(newentries) + '\n') + if not self.has_installs(): + os.unlink(dbpath) else: OUT.info('Pretended to remove installation ' + installdir) OUT.info('Final DB content:\n' + '\n'.join(newentries) + '\n') works for me (slightly tested).
*** Bug 344909 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > (In reply to comment #0) > > When upgrading packages with webapp-config, it leaves behind empty "install" > > files under /var/db/webapps/programname/version > > I am no python guru but: > > --- db_orig.py 2008-03-12 16:38:05.000000000 +0000 > +++ db.py 2008-03-12 16:44:52.000000000 +0000 > @@ -318,6 +318,8 @@ > if not self.__p: > installs = open(dbpath, 'w') > installs.write('\n'.join(newentries) + '\n') > + if not self.has_installs(): > + os.unlink(dbpath) > else: > OUT.info('Pretended to remove installation ' + installdir) > OUT.info('Final DB content:\n' + '\n'.join(newentries) + '\n') > > works for me (slightly tested). This patch was never committed to either the git repo or as a patch against any version on the tree. I'll test this and commit if it works.
(In reply to comment #1) > (In reply to comment #0) > > When upgrading packages with webapp-config, it leaves behind empty "install" > > files under /var/db/webapps/programname/version > > I am no python guru but: > > --- db_orig.py 2008-03-12 16:38:05.000000000 +0000 > +++ db.py 2008-03-12 16:44:52.000000000 +0000 > @@ -318,6 +318,8 @@ > if not self.__p: > installs = open(dbpath, 'w') > installs.write('\n'.join(newentries) + '\n') > + if not self.has_installs(): > + os.unlink(dbpath) > else: > OUT.info('Pretended to remove installation ' + installdir) > OUT.info('Final DB content:\n' + '\n'.join(newentries) + '\n') > > works for me (slightly tested). I can confirm that this patch does resolve the issue with older versions of a particular webapp still having an installs file after a version update. Patch destination: /usr/lib/python2.7/site-packages/WebappConfig/db.py Post-update (Prepatch): Octo_Azul ~ # find /var/db/webapps/bugzilla/ /var/db/webapps/bugzilla/ /var/db/webapps/bugzilla/3.6.8 /var/db/webapps/bugzilla/3.6.8/.keep_www-apps_bugzilla-3.6.8 /var/db/webapps/bugzilla/3.6.8/installs /var/db/webapps/bugzilla/3.6.9 /var/db/webapps/bugzilla/3.6.9/.keep_www-apps_bugzilla-3.6.9 /var/db/webapps/bugzilla/3.6.9/installs Post-update (Postpatch): Octo_Azul ~ # find /var/db/webapps/bugzilla/ /var/db/webapps/bugzilla/ /var/db/webapps/bugzilla/3.6.8 /var/db/webapps/bugzilla/3.6.8/.keep_www-apps_bugzilla-3.6.8 /var/db/webapps/bugzilla/3.6.9 /var/db/webapps/bugzilla/3.6.9/.keep_www-apps_bugzilla-3.6.9 /var/db/webapps/bugzilla/3.6.9/installs
(In reply to comment #4) > (In reply to comment #1) > > (In reply to comment #0) > > > When upgrading packages with webapp-config, it leaves behind empty "install" > > > files under /var/db/webapps/programname/version > > > > I am no python guru but: > > > > --- db_orig.py 2008-03-12 16:38:05.000000000 +0000 > > +++ db.py 2008-03-12 16:44:52.000000000 +0000 > > @@ -318,6 +318,8 @@ > > if not self.__p: > > installs = open(dbpath, 'w') > > installs.write('\n'.join(newentries) + '\n') > > + if not self.has_installs(): > > + os.unlink(dbpath) > > else: > > OUT.info('Pretended to remove installation ' + installdir) > > OUT.info('Final DB content:\n' + '\n'.join(newentries) + '\n') > > > > works for me (slightly tested). > > I can confirm that this patch does resolve the issue with older versions of > a particular webapp still having an installs file after a version update. > > Patch destination: /usr/lib/python2.7/site-packages/WebappConfig/db.py > > Post-update (Prepatch): > > Octo_Azul ~ # find /var/db/webapps/bugzilla/ > /var/db/webapps/bugzilla/ > /var/db/webapps/bugzilla/3.6.8 > /var/db/webapps/bugzilla/3.6.8/.keep_www-apps_bugzilla-3.6.8 > /var/db/webapps/bugzilla/3.6.8/installs > /var/db/webapps/bugzilla/3.6.9 > /var/db/webapps/bugzilla/3.6.9/.keep_www-apps_bugzilla-3.6.9 > /var/db/webapps/bugzilla/3.6.9/installs > > Post-update (Postpatch): > > Octo_Azul ~ # find /var/db/webapps/bugzilla/ > /var/db/webapps/bugzilla/ > /var/db/webapps/bugzilla/3.6.8 > /var/db/webapps/bugzilla/3.6.8/.keep_www-apps_bugzilla-3.6.8 > /var/db/webapps/bugzilla/3.6.9 > /var/db/webapps/bugzilla/3.6.9/.keep_www-apps_bugzilla-3.6.9 > /var/db/webapps/bugzilla/3.6.9/installs Committed to the git head. We'll leave this bug open until we push out the next release.
(In reply to Anthony Basile from comment #5) > Committed to the git head. We'll leave this bug open until we push out the > next release. Ping, it's almost 6 months already since the commit. Was the fix released already?
(In reply to Michał Górny from comment #6) > (In reply to Anthony Basile from comment #5) > > Committed to the git head. We'll leave this bug open until we push out the > > next release. > > Ping, it's almost 6 months already since the commit. Was the fix released > already? please test webapp-config-1.51