Message ID | 1469786468-3714-1-git-send-email-michalx.weglicki@intel.com |
---|---|
State | Accepted |
Headers | show |
On Fri, Jul 29, 2016 at 11:01:08AM +0100, mweglicx wrote: > Remove duplicated delete attempts and error messages during distcheck > clean procedure. > > Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> Would you mind saying a little bit more about what went wrong and how this fixes it? It's not obvious to me and I guess that I could reverse-engineer it, but if you can just tell me it's even easier ;-) Thanks a lot, Ben.
Thanks for the explanation. I applied this to master, adding the extra explanation below to the commit message. On Mon, Aug 01, 2016 at 05:56:02AM +0000, Weglicki, MichalX wrote: > Hello, > > So in general the problem is that during clean up procedure of distcheck: > > rmdir: failed to remove ‘/openvswitch-2.5.90/_inst/share/openvswitch/bugtool-plugins/’: Directory not empty > rmdir: failed to remove ‘/openvswitch-2.5.90/_inst/share/openvswitch/bugtool-plugins/ovn/network-status’: No such file or directory > > The first entry is caused by xml file which is kept flat in the directory structure (not in the subdirectory as it is for other plugins), and rmdir "tries" to remove folder which keeps all plugins files and folders. That is why additional check if directory is not empty is added, to prevent that. > > The second entry is cause by some other commit when ovs plugin has been added: > stem=`echo "$$plugin" | sed 's,ovn/,,'`; \ > > So in that sense directory path has been modified during removal of xml file, but it hasn't been updated during directory removal. > > I didn't want to really change this logic, as I'm not sure if there something else can be stored in this directory, but it was very tempting to remove everything just by: > rm -rf "$(DESTDIR)$(bugtoolpluginsdir)/*" > > Br, > Michal. > > > -----Original Message----- > > From: Ben Pfaff [mailto:blp@ovn.org] > > Sent: Friday, July 29, 2016 7:00 PM > > To: Weglicki, MichalX <michalx.weglicki@intel.com> > > Cc: dev@openvswitch.org > > Subject: Re: [ovs-dev] [PATCH] ovs-bugtool: Correct "rmdir" error messages during "make distcheck". > > > > On Fri, Jul 29, 2016 at 11:01:08AM +0100, mweglicx wrote: > > > Remove duplicated delete attempts and error messages during distcheck > > > clean procedure. > > > > > > Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> > > > > Would you mind saying a little bit more about what went wrong and how > > this fixes it? It's not obvious to me and I guess that I could > > reverse-engineer it, but if you can just tell me it's even easier ;-) > > > > Thanks a lot, > > > > Ben. > -------------------------------------------------------------- > Intel Research and Development Ireland Limited > Registered in Ireland > Registered Office: Collinstown Industrial Park, Leixlip, County Kildare > Registered Number: 308263 > > > This e-mail and any attachments may contain confidential material for the sole > use of the intended recipient(s). Any review or distribution by others is > strictly prohibited. If you are not the intended recipient, please contact the > sender and delete all copies. >
diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk index 3d9a54e..ce205a9 100644 --- a/utilities/bugtool/automake.mk +++ b/utilities/bugtool/automake.mk @@ -54,9 +54,12 @@ bugtool-uninstall-local: rm -f "$(DESTDIR)$(bugtoolpluginsdir)/$$stem"; \ done for plugin in $(bugtool_plugins); do \ - stem=`echo "$$plugin" | sed 's,utilities/bugtool/plugins/,,'`; \ + stem=`echo "$$plugin" | sed 's,ovn/,,'`; \ + stem=`echo "$$stem" | sed 's,utilities/bugtool/plugins/,,'`; \ dir=`expr "$$stem" : '\(.*\)/[^/]*$$'`; \ - rmdir "$(DESTDIR)$(bugtoolpluginsdir)/$$dir"; \ + if [ ! -z "$$dir" ]; then \ + rm -rf "$(DESTDIR)$(bugtoolpluginsdir)/$$dir"; \ + fi \ done; exit 0 endif
Remove duplicated delete attempts and error messages during distcheck clean procedure. Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> --- utilities/bugtool/automake.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)