cassava/repoctl

New switches for 'add'

Opened this issue · 1 comments

--update, only add files not already present. This allows me to add *.pkg.tar.xz
--symlink, symlink files instead of copying. This keeps me from having two copies around
--srcinfo, add all current version filenames found in .SRCINFO

With symlink you'll need an autoclean that removes broken symlinks from the repo and db.

Hey @severach, sorry for the long delay in responding.

  • --update -- If you can live with hardlinks, using the --link or -l argument for the add command will be just as performant.

  • --symlink -- I added the --link flag, which tries to create a hardlink before copying. I'm not quite ready yet for actually supporting symlinks, as I feel this makes repoctl a good deal more complex for handling routine tasks. See the devel branch.

  • --srcinfo -- How is this better or different to repoctl add *.pkg.tar.xz? I assume all packages in a directory will be generated from that PKGBUILD file. Or would you like to use this to get a specific version of package added? I am hesitant however to add support for this, as it would require being able to parse .SRCINFO files. I don't see this as being very useful for most users of repoctl.

If this frustrates you enough, you are welcome to try your hand at implementing this yourself. You would have to look at cmd/repoctl/add.go and actions.go, and if you want to find all packages in a certain directory, you could also take advantage of the functions defined in find.go.