aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-08-09 13:25:00 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-08-09 13:25:00 -0400
commitff639628515f63af8ca3fc70e519556722f34478 (patch)
treecf20702ecf9c3a2c632d4778624619a8525859f8
parentTODO: update (diff)
downloadgrss-ff639628515f63af8ca3fc70e519556722f34478.tar.gz
grss-ff639628515f63af8ca3fc70e519556722f34478.tar.bz2
grss-ff639628515f63af8ca3fc70e519556722f34478.zip
bin/grsup: copy in the make.conf from remote git repo.
-rwxr-xr-xbin/grsup18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/grsup b/bin/grsup
index 0e05dbf..30e43bf 100755
--- a/bin/grsup
+++ b/bin/grsup
@@ -205,6 +205,24 @@ def main():
newconf = '%s/core%s' % (libdir, CONST.WORLD_CONFIG)
shutil.copy(newconf, CONST.WORLD_CONFIG)
+ # Copy the new make.conf to CONST.PORTAGE_CONFIGDIR
+ # If a raw new make.conf exists, pick it, else pick the highest cycle no.
+ newmakeconf = os.path.join(libdir, 'core/etc/portage/make.conf')
+ if os.path.isfile(newmakeconf):
+ shutil.copy(newmakeconf, CONST.PORTAGE_CONFIGDIR)
+ else:
+ cycled_files = {}
+ for f in glob.glob('%s.*' % newmakeconf):
+ m = re.search('^(.+)\.CYCLE\.(\d+)', f)
+ if m:
+ cycle_no = int(m.group(2))
+ cycled_files[cycle_no] = m.group(0)
+ try:
+ max_cycle_no = max(cycled_files)
+ shutil.copy(cycled_files[max_cycle_no], CONST.PORTAGE_CONFIGDIR)
+ except ValueError:
+ pass
+
if os.path.isfile(CONST.PORTAGE_DIRTYFILE):
WorldConf.clean()
open(CONST.PORTAGE_DIRTYFILE, 'a').close()