aboutsummaryrefslogtreecommitdiff
path: root/pomu/repo
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-07-29 05:00:02 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-07-29 05:00:02 +0300
commit9fe8451959d14d19b1436d840cc4df12774a7835 (patch)
treee1389cf17fee7ba220f7e717fdceea3542d78ded /pomu/repo
parentMultiple cli improvements (diff)
downloadpomu-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.py6
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