commit:     65d1ee9d179df47c8a978d6feb986d3242dfafc2
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  9 17:44:38 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Aug  9 17:44:38 2015 +0000
URL:        https://gitweb.gentoo.org/proj/grss.git/commit/?id=65d1ee9d

bin/grsup: fix bugs.

 bin/grsup | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/grsup b/bin/grsup
index 30e43bf..5e0a70c 100755
--- a/bin/grsup
+++ b/bin/grsup
@@ -17,6 +17,8 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import copy
+import glob
+import filecmp
 import os
 import re
 import shutil
@@ -208,8 +210,9 @@ def main():
     # 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')
+    oldmakeconf = os.path.join(CONST.PORTAGE_CONFIGDIR, 'make.conf')
     if os.path.isfile(newmakeconf):
-        shutil.copy(newmakeconf, CONST.PORTAGE_CONFIGDIR)
+        shutil.copy(newmakeconf, oldmakeconf)
     else:
         cycled_files = {}
         for f in glob.glob('%s.*' % newmakeconf):
@@ -219,7 +222,7 @@ def main():
                 cycled_files[cycle_no] = m.group(0)
         try:
             max_cycle_no = max(cycled_files)
-            shutil.copy(cycled_files[max_cycle_no], CONST.PORTAGE_CONFIGDIR)
+            shutil.copy(cycled_files[max_cycle_no], oldmakeconf)
         except ValueError:
             pass
 

Reply via email to