Closed JesusMtnez closed 8 years ago
Wow, that's an awesome addition, thanks! The code looks good too.
I thought about adding it some time ago but didn't for some reason I can't recall.
I will test the feature to see if everything is Ok and merge the pr right after.
Thank you once again :heart:
Everything seems fine, I will merge the PR.
Thanks for the through description :+1:
I have implemented a new feature: delete old version directories when updating. To acomplish this feature I have made the following changes:
I fix a little issue : the list contaning the packages to update had duplicates. To solve this I made this little change (5dc840ea6bf44ce433ed5995b399c79b3a93a496):
I define a variable
auto-package-update-delete-old-versions
that controls the feature's behaviour: when it isnil
, the feature is ignored, other cases, the feature is applied.I define a variable
apu--old-versions-dirs-list
that will save old version directory of every package that it is updated.To add the old version directory of
package
to this list, I implementapu--add-to-old-versions-dirs-list
:This function is invocated everytime that a package is installed:
To delete old version directories of the list when all package are updated, I implement
apu--delete-old-versions-dirs-list
:This function is invocated after all packages have been updated:
Finally, I update the documentation including this new feature (ec2c83ec7eaf2d3b169ea7ae1c8b341707b085b5), along with some code indentation fix (fd8a1c1dff4438cfb52405984a47ce3f67487a29) and a minor documentation fix (ec2c83ec7eaf2d3b169ea7ae1c8b341707b085b5).
Any questions and suggestions are welcome.