clib icon indicating copy to clipboard operation
clib copied to clipboard

clib-uninstall should remove the folder from deps if there's no rule to make uninstall

Open catb0t opened this issue 8 years ago • 2 comments

$ ls deps 
.  ..  fnv-hash  yacbnl

$ DEBUG=clib clib uninstall catb0t/yacbnl
 clib : args: catb0t/yacbnl
 clib : command 'uninstall'
 clib : exec: /usr/local/bin/clib-uninstall catb0t/yacbnl
       fetch : https://github.com/catb0t/yacbnl/archive/master.tar.gz
       untar : /tmp/yacbnl-master.tar.gz
     warning : No uninstall target specified.  Defaulting to 'make uninstall'.
make: *** No rule to make target 'uninstall'.  Stop.
 clib : returned 0

in my opinion, clib-uninstall should work to remove deps from the current directory, if make uninstall didn't work because the package wasn't installed like make install.

what do you think about this addition? or should there be a separate plugin, clib-remove?

catb0t avatar Dec 16 '17 14:12 catb0t

I like this idea!

I don't think we need to separate it into another program. I'm on board with having clib uninstall work for bins and libraries.

stephenmathieson avatar Jan 27 '21 18:01 stephenmathieson

Doing clib uninstall user/repo where user/repo is a library (not a binary) should:

  • error if there is no manifest ({clib,package}.json) in $PWD
  • remove the user/foo reference in the manifest
    • this should work for development and dependencies
    • not error if missing
  • remove the deps/foo directory
    • not error if missing
  • error if neither deps/foo nor an entry in the manifest exist
    • could just be a warning (logger.warn("Nothing to do"))

stephenmathieson avatar Jan 27 '21 19:01 stephenmathieson