aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-08-09 13:44:38 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-08-09 13:44:38 -0400
commit65d1ee9d179df47c8a978d6feb986d3242dfafc2 (patch)
treeae7fc4197139239376c0bb995a809fa5317deee3
parentbin/grsup: copy in the make.conf from remote git repo. (diff)
downloadgrss-65d1ee9d179df47c8a978d6feb986d3242dfafc2.tar.gz
grss-65d1ee9d179df47c8a978d6feb986d3242dfafc2.tar.bz2
grss-65d1ee9d179df47c8a978d6feb986d3242dfafc2.zip
bin/grsup: fix bugs.
-rwxr-xr-xbin/grsup7
1 files 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