diff options
| author | James Meyer <james.meyer@operamail.com> | 2010-11-11 23:36:24 (GMT) | 
|---|---|---|
| committer | James Meyer <james.meyer@operamail.com> | 2010-11-11 23:36:24 (GMT) | 
| commit | aa1353347767b50ff844c862fd5d00aed012a3d2 (patch) | |
| tree | 00e8ed854bd775991f289f35a778e07e2a91ee63 /build_tools/bin | |
| parent | bbe9f180abd551b6ebee978cbbab9adbc5eb70a4 (diff) | |
| download | linhes_dev-aa1353347767b50ff844c862fd5d00aed012a3d2.zip | |
mass_update: added version numbers to output
Diffstat (limited to 'build_tools/bin')
| -rw-r--r-- | build_tools/bin/massupdate_linhes.py | 25 | 
1 files changed, 17 insertions, 8 deletions
| diff --git a/build_tools/bin/massupdate_linhes.py b/build_tools/bin/massupdate_linhes.py index 3202964..2063f7b 100644 --- a/build_tools/bin/massupdate_linhes.py +++ b/build_tools/bin/massupdate_linhes.py @@ -55,7 +55,7 @@ def create_pkglist(repodir):                              #temptuple=(pkgname,topdir)                              #group_list.append(temptuple) -                            group_list[pkgname] = topdir +                            group_list[pkgname] = (topdir,pkgversion)                          #print repodir                          #print root                          #print dirs @@ -106,15 +106,16 @@ def updatepkg(abslocation,linheslocation):  skip_changelist="/tmp/update_list/changelist"  updatedlist="/tmp/update_list/updatedlist"  not_in_abs="/tmp/update_list/not_in_abs" +matchlist="/tmp/update_list/matched"  skipfile = open(skip_changelist,"w")  updatefile = open(updatedlist,"w") +matchfile = open(matchlist,"w")  not_absfile = open(not_in_abs,"w")  abslist = create_pkglist("/var/abs")  linheslist = create_pkglist("/data/linhes_pkgbuild/abs") -  global updated  global failed  global no_update @@ -122,8 +123,10 @@ updated=0  failed=0  no_update=0 -for pkgname, pkglocation in linheslist.iteritems(): +for pkgname, pkglocation_t in linheslist.iteritems(): +    pkglocation=pkglocation_t[0] +    pkgversion=pkglocation_t[1].strip().rstrip('\n')      #print pkgname, pkglocation      if "mv-core" in pkglocation :          continue @@ -137,7 +140,8 @@ for pkgname, pkglocation in linheslist.iteritems():      abslocation = ''      try: -      abslocation = abslist[pkgname] +      abslocation = abslist[pkgname][0] +      absversion = abslist[pkgname][1].strip().rstrip('\n')      except:        #  print "pkg is not found in abs %s" %pkgname          outline = "%s :  %s  \n" %(pkgname, pkglocation) @@ -153,10 +157,15 @@ for pkgname, pkglocation in linheslist.iteritems():          outline = "%s :  %s \n" %(pkgname, pkglocation)          skipfile.write(outline)      else: -        #print "%s: updating from ABS" %pkgname -        outline = "%s : %s  | %s \n" %(pkgname, pkglocation,  abslocation) -        updatefile.write(outline) -#        updatepkg(abslocation,pkglocation) +	if absversion == pkgversion: +		outline = "%s: matched %s \n" %(pkgname,pkgversion) +		matchfile.write(outline) +	else: +            #print "%s: updating from ABS" %pkgname +            outline = '%s:\n %s,%s | %s,%s \n' %(pkgname, pkglocation, pkgversion,  abslocation, absversion) +            print outline +            updatefile.write(outline) +#            updatepkg(abslocation,pkglocation) | 
