diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2017-07-29 05:00:02 +0300 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2017-07-29 05:00:02 +0300 |
commit | 9fe8451959d14d19b1436d840cc4df12774a7835 (patch) | |
tree | e1389cf17fee7ba220f7e717fdceea3542d78ded /pomu/repo | |
parent | Multiple cli improvements (diff) | |
download | pomu-9fe8451959d14d19b1436d840cc4df12774a7835.tar.gz pomu-9fe8451959d14d19b1436d840cc4df12774a7835.tar.bz2 pomu-9fe8451959d14d19b1436d840cc4df12774a7835.zip |
Implemented package updates
documented the commit subcommand
Diffstat (limited to 'pomu/repo')
-rw-r--r-- | pomu/repo/repo.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pomu/repo/repo.py b/pomu/repo/repo.py index 4317e47..8dfe2d8 100644 --- a/pomu/repo/repo.py +++ b/pomu/repo/repo.py @@ -111,6 +111,12 @@ class Repository(): pkg = self.get_package(name).expect() return self.unmerge(pkg) + def update_package(self, category, name, new): + """Updates a package, replacing it by a newer version""" + pkg = self.get_package(category, name).expect() + self.unmerge(pkg).expect() + self.merge(new) + def _get_package(self, category, name, slot='0'): """Get an existing package (by category, name and slot), reading the manifest""" from pomu.source import dispatcher |