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

No way to remove package from a repo? #40

Open
pagodajosh opened this issue Sep 5, 2013 · 10 comments
Open

No way to remove package from a repo? #40

pagodajosh opened this issue Sep 5, 2013 · 10 comments

Comments

@pagodajosh
Copy link

Is there any way to remove a package from a repo?

I realize that I could just put in a package with a higher version and use that one, but sometimes it would be simpler to replace a buggy package than to alter multiple references to it.

Also, I'm working on a project to serve multiple package types, and it would be really annoying to have .deb packages be the only ones that don't delete.

@stuart-warren
Copy link

Personally I just add all my packages in a directory called incoming.
If I add a new package or want to remove a package I run the same script which:

  • Blows away the entire existing repo files
  • Iterates through all the files adding them to the repository

Not perfect but does the job

@rcrowley
Copy link
Owner

@pagodajosh There is no freight remove command because it's just rm. So rm $VARLIB/apt/$DIST/$FILENAME should do the trick.

Should there be a freight-remove(1) for completeness?

@pagodajosh
Copy link
Author

I did figure that out once I sat down and investigated. I even implemented the file delete in my project.

I think that the cache has to be rebuilt after the file is deleted. Is that correct?

If I have to run freight-cache after I delete the file, I think you should add the remove command so the life cycle is:
freight-init
freight-add
freight-cache
...
freight-remove
freight-cache

Instead of freight, freight, freight, rm, freight.

Thanks for the reply

On Sep 16, 2013, at 5:32 PM, Richard Crowley [email protected] wrote:

@pagodajosh There is no freight remove command because it's just rm. So rm $VARLIB/apt/$DIST/$FILENAME should do the trick.

Should there be a freight-remove(1) for completeness?


Reply to this email directly or view it on GitHub.

@igalic
Copy link

igalic commented Oct 11, 2013

I think it would be nice to have fright remove for completeness. Right now I've managed a couple of times to corrupt a package..

@eiginn
Copy link

eiginn commented Oct 14, 2013

I have only barely started something like this at eiginn/freight@106a126
I'm sure its not a fit with the freight style and/or a completely wrong to go about it as it iterates of all files in a distribution.
But in the long run I had thought the ability to keep only a certain number of old packages per package might share some of the same functions.

@rcrowley
Copy link
Owner

@eiginn's WIP shows a couple of the challenges to the design of freight-remove:

If the interface is to mirror freight-add then I'd expect to give a pathname as the first argument but that requires either special autocomplete trickery or that the invocation actually specify a pathname inside $VARLIB. If the latter's the case then there's no reason for any of the $MANAGER/$DISTRO arguments afterward and the command reduces to rm "$@".

Otherwise, if the interface mirrors freight-add and requires that its first non-option argument be a package name then the $MANAGER/$DISTRO arguments do make sense and the invocation is easier but it leaves us to specify the version number to remove manually.

I have never wanted to remove a package from an archive so I am open to the best interface as determined by the people who actually feel the pain. Do either of these directions sound good? Am I missing something better?

@mcallaway
Copy link

I also would like a freight-remove. In response to your comment:

"If the interface is to mirror freight-add then I'd expect to give a pathname as the first argument but that requires either special autocomplete trickery or that the invocation actually specify a pathname inside $VARLIB. If the latter's the case then there's no reason for any of the $MANAGER/$DISTRO arguments afterward and the command reduces to rm "$@"."

I don't understand the "special autocomplete trickery" part. I would like to be able to:

freight list $MANAGER # Show me my repos
freight list $MANAGER $REPO or perhaps freight list $MANAGER/$REPO # Show me packages

freight remove $MANAGER/$REPO $PACKAGE
freight remove $MANAGER/$REPO $PACKAGE-$VERSION

@igalic
Copy link

igalic commented Mar 17, 2014

+1 for that feature!

@deviantony
Copy link

+1 for that feature ! Would be much more easier to manage a repo with a tool using CRUD capabilities.

@shaikhfaisal
Copy link

+1

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

No branches or pull requests

8 participants