From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-703922-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id E1A6513877A
	for <garchives@archives.gentoo.org>; Mon, 16 Jun 2014 03:40:20 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 57BF9E0B1D;
	Mon, 16 Jun 2014 03:40:20 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 98E4AE0B20
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Jun 2014 03:40:19 +0000 (UTC)
Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C3B6733F908
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Jun 2014 03:40:18 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by spoonbill.gentoo.org (Postfix) with ESMTP id 8DF9A187EC
	for <gentoo-commits@lists.gentoo.org>; Mon, 16 Jun 2014 03:40:17 +0000 (UTC)
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" <brian.dolbec@gmail.com>
Message-ID: <1402607509.ccad04bd179ea25be90283bbcee74628ecce47a5.dol-sen@gentoo>
Subject: [gentoo-commits] proj/layman:master commit in: layman/
X-VCS-Repository: proj/layman
X-VCS-Files: layman/db.py
X-VCS-Directories: layman/
X-VCS-Committer: dol-sen
X-VCS-Committer-Name: Brian Dolbec
X-VCS-Revision: ccad04bd179ea25be90283bbcee74628ecce47a5
X-VCS-Branch: master
Date: Mon, 16 Jun 2014 03:40:17 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 93333167-3317-4690-a775-a040e11127aa
X-Archives-Hash: 6e9b73f60b80a4b7999a7a2817b4b730
Message-ID: <20140616034017.K5MJd4hP88nBgnd_wyXvO-GQFGB37mfP_QL0niCdO2w@z>

commit:     ccad04bd179ea25be90283bbcee74628ecce47a5
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Fri May 23 21:59:10 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Jun 12 21:11:49 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=ccad04bd

db.py: adds update() function

---
 layman/db.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/layman/db.py b/layman/db.py
index c4e322e..fa28e06 100644
--- a/layman/db.py
+++ b/layman/db.py
@@ -222,6 +222,23 @@ class DB(DbBase):
             return False
         return True
 
+
+    def update(self, overlay, available_srcs):
+        '''
+        Updates the overlay source via the available source(s).
+        
+        @params overlay: layman.overlay.Overlay object.
+        @params available_srcs: set of available source URLs.
+        '''
+
+        source, result = self.overlays[overlay.name].update(self.config['storage'],
+                                                    available_srcs)
+        self.overlays[overlay.name].sources = source
+        self.repo_conf.update(self.overlays[overlay.name])
+        self.write(self.path)
+
+        return result
+
     def sync(self, overlay_name):
         '''Synchronize the given overlay.'''