Skip to content
This repository has been archived by the owner on May 31, 2018. It is now read-only.

allow cleaning of specific source directory #715

Closed
rmarquis opened this issue Jul 3, 2017 · 3 comments
Closed

allow cleaning of specific source directory #715

rmarquis opened this issue Jul 3, 2017 · 3 comments

Comments

@rmarquis
Copy link
Owner

rmarquis commented Jul 3, 2017

Currently, pacaur -Sc and -Scc as an AUR extension also cleans the AUR sources, provided SRCDEST is defined. This removes the non development packages source files and all source files, respectively, but removing a single package source (which is somewhat problematic) can only be done manually.

Implement -Sc <pkg> or -Scc <pkg> to remove this specific package sources without the need to do a manual intervention in ~/.cache/pacaur.

This is an extension of #559 and #461.

Also add a clean and cleanall commands as AUR only operation somehow, as part of #712.

@rmarquis rmarquis added the todo label Jul 3, 2017
@rmarquis rmarquis added this to the 5.0.x - later milestone Jul 3, 2017
@rmarquis rmarquis added feature and removed todo labels Jul 12, 2017
@rmarquis
Copy link
Owner Author

rmarquis commented Jul 15, 2017

WIP implementation proposal of the clean prompts.

There are 3 types of files to clean:

  • Built packages
  • Source packages
  • Clone files

Built packages (CacheDir)

  • only when $PKGDEST is defined in conjunction with CacheDir
  • only done through pacman built-in -Sc, -Scc

Built packages

  • only when $PKGDEST is defined but not defined in CacheDir
  • removal of all uninstalled packages with -Sca and clean
  • removal of ALL packages with -Scca and cleanall

Source packages

  • only when $SRCDEST is defined
  • removal of all non development files with -Sca and clean
  • removal of a specific development source (and related untracked files if $SRCDEST/$PKGDEST are not defined) with -Sca <pkgname> and clean <pkgname> (not possible to implement)
  • removal of ALL files with -Scca and cleanall

Clones files

  • always available
  • removal of all uninstalled clones (AND all other untracked files if $SRCDEST/$PKGDEST are not defined) with -Sca and clean
  • removal of a specific clone (and related untracked files if $SRCDEST/$PKGDEST are not defined) with -Sca <pkgname> and clean <pkgname>
  • removal of all clones with -Scca and cleanall

@rmarquis rmarquis modified the milestones: 4.8.x - new features, 5.0.x - later Jul 15, 2017
@rmarquis
Copy link
Owner Author

Source packages

removal of a specific development source (and related untracked files if $SRCDEST/$PKGDEST are not defined) with -Sca and clean

This isn't possible to implement, since the source files/directory might not be the same as the pkgbase. Some projects even use more than one directory for their source.

Removal of specfic target can be done for clone files only, where sources will be removed too if $SRCDEST isn't defined.

@rmarquis
Copy link
Owner Author

Done in c0bc632.

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

No branches or pull requests

1 participant