Changeset 13540

Show
Ignore:
Timestamp:
06/22/11 01:53:45 (11 months ago)
Author:
build
Message:

Correct our wrong way of trying to fix the protobuf spec file

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • packaging/centuryegg/find-srpms

    r13520 r13540  
    236236        # In RedHat 4, strip off the first 8 lines - boolean logic old rpmtools can't handle 
    237237        lines = [lines[1]] + lines[8:] 
    238     if p == "protobuf" and version <= 5: 
    239         lines = [lines[8]] + lines[10:] 
    240         lines = lines[:18] + lines[21:] 
    241238    for line in lines: 
    242239        if line.startswith("%define"): 
     
    246243            if "-n" not in line: 
    247244                line = line.rstrip("\n") + " -n %{name}-%{version}\n" 
    248         if replace_python and "python " in line: 
     245        if replace_python and "python " in line and "with_python" not in line: 
    249246            line = line.replace("/usr/bin/python ","%{__python} ").replace("python ", "%{__python} ") 
    250247            line_parts = line.split() 
     
    336333        if package_name == "python-sqlite2" and line.startswith("%dir %{python_sitearch}"): 
    337334            specfile.write("%%{python_sitearch}/pysqlite-*-py%s.egg-info\n" % python_version) 
    338         if package_name == "protobuf" and "py2.6" in line: 
    339             line = line.replace("py2.6", "py%s" % python_version) 
     335        if package_name == "protobuf" and "py2.5" in line: 
     336            line = line.replace("py2.5", "py%s" % python_version) 
    340337        if version <= 4 and package_name == "python-sqlalchemy" and "filter_setup" in line or "filter_provides" in line: 
    341338            continue 
     
    382379            rpmdefines.extend(["--define", '"_without_java 1"']) 
    383380            rpmdefines.extend(["--define", '"_without_gtest 1"']) 
     381            rpmdefines.extend(["--define", '"_without_python 0"']) 
    384382        else: 
    385383            rpmdefines.extend(["--define", "_without_java 1"]) 
    386384            rpmdefines.extend(["--define", "_without_gtest 1"]) 
     385            rpmdefines.extend(["--define", '_without_python 0']) 
    387386    print "Build arguments: ",["rpmbuild"]+rpmdefines+["-ba",new_specfile_name] 
    388387    retcode = subprocess.call(["rpmbuild"] + rpmdefines + ["-ba", new_specfile_name], stdout=logfile, stderr=logfile)