-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
xbstrap: add discard
command for nuking packages
#66
base: master
Are you sure you want to change the base?
Conversation
Why change the meaning of Also, what scenario is this necessary in that isn't better addressed otherwise? |
Addressed the issues raised above. |
Bump. |
my question remains unadressed |
I use this to clean up sources I don't need (e.g. before pulling from CI), e.g. after upstreaming them. Also, testing patches is really convenient. Manually removing risks leaving parts of the package behind, which this would avoid. Finally, providing a way to delete packages is, to me, the natural counterpart to being able to build/pull them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still unconvinced theres a scenario in which this helps and which isn't an xbstrap bug. to address the ones you mentioned:
- testing patches should work the same as with any git checkout? otherwise, rming just the source tree ought to work
- manually removing the source directory should cause all the other package related data to go stale
- this isn't a way to delete packages, as they remain in the repository if this command is done
i think it'd be better if this just became an uninstall command. one is needed, and this does that after mucking with some (but not all) package related information
if cfg.use_xbps: | ||
output = subprocess.DEVNULL | ||
if verbosity: | ||
output = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
xbstrap/base.py
Outdated
else: | ||
raise GenericError("Package management configuration does not support discard") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it does - you already delete stuff when this happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
personally I feel a command like this is useful - I have ran into cases where I want to purge a package locally, and having to go in with a separate tool (even if just |
again, an uninstall command would be very useful. |
_util.log_info("Running {}".format(args)) | ||
subprocess.call(args, env=environ, stdout=output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't there a helper for this?
(edit: that might be xbbs, please make one if there isn't one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to resurrect this, but I would really like this to land in xbstrap at some point
Other than the package management bit, this looks OK to me, but i would also like a seperate uninstall command that just does xbps-remove
and nothing else
xbstrap/base.py
Outdated
else: | ||
raise GenericError("Package management configuration does not support discard") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
No description provided.