Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
catb0t opened this issue Dec 16, 2017 · 2 comments

Comments

@catb0t
Copy link

catb0t commented Dec 16, 2017

$ 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?

@Isty001 Isty001 transferred this issue from clibs/clib-uninstall Jan 26, 2021
@stephenmathieson
Copy link
Member

stephenmathieson commented Jan 27, 2021

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
Copy link
Member

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"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants