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
How to remove one .whl file from a release? #448
Comments
Unfortunately this isn't possible at the moment. There is no API endpoint in devpi-server that allows deletion of individual files. This is certainly something that should be possible though. |
Hi @fschulze , thank you for the prompt response. If this is not possible from devpi client, can you suggest a way to do it:
Alternatively, a way to cleanup the metadata after simply removing the files directly from the host? |
Make a backup of your data! Create a python file like the following, adjusted to your data. You can comment out the remove_links line while adjusting the script to only get a dry run: from devpi_server.main import get_pluginmanager, parseoptions, XOM
import sys
pm = get_pluginmanager()
config = parseoptions(pm, sys.argv)
xom = XOM(config)
with xom.keyfs.transaction(write=True):
stage = xom.model.getstage('fschulze', 'dev')
linkstore = stage.get_linkstore_perstage('devpi-server', '3.0.0b2', readonly=False)
links = linkstore.get_links()
info = [
(x.rel, x.basename)
for x in linkstore.get_links()
if x.basename.endswith('.whl')]
for rel, basename in info:
print(rel, basename)
linkstore.remove_links(rel=rel, basename=basename) Stop the server to be save, but if there are no writes to the db, it may work while the server is running. Run the above python file with the python interpreter of your devpi-server virtualenv using the same options like you run normally, most importantly |
Thanks for the answer. You may convert this issue into a feature request, or just close it if you like. Cheers. |
Workaround would be to download the one you want to keep, delete them both, then re-upload the one you wanted to keep. |
Implement #448: allow deletion of single release files.
With devpi-server 4.6.0 a single release can be deleted using a |
There's a package with multiple wheels built for different architecture. The 2.7 wheel has an issue and needs to be removed from the index.
The
devpi remove
sub-command just accepts a single positional argument:Asking to remove a version number lists all the wheels:
It just prompts to remove all or none. How to specify the 'spec' to only remove the 2.7 wheel? It's not working to just ssh into devpi server and getting rid of the file itself; this leaves the devpi metadata all screwed up and the index views still think that the wheel exists.
The devpi client version is 3.0.0 and the server version is 4.0.0.
The text was updated successfully, but these errors were encountered: