diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2015-08-09 13:25:00 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-08-09 13:25:00 -0400 |
commit | ff639628515f63af8ca3fc70e519556722f34478 (patch) | |
tree | cf20702ecf9c3a2c632d4778624619a8525859f8 /bin | |
parent | TODO: update (diff) | |
download | grss-ff639628515f63af8ca3fc70e519556722f34478.tar.gz grss-ff639628515f63af8ca3fc70e519556722f34478.tar.bz2 grss-ff639628515f63af8ca3fc70e519556722f34478.zip |
bin/grsup: copy in the make.conf from remote git repo.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/grsup | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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() |