- Timestamp:
- Jun 19, 2007, 1:17:22 AM (18 years ago)
- Location:
- trunk/essentials/sys-apps/prefix-portage
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/essentials/sys-apps/prefix-portage/bin/ebuild.sh
r3488 r3494 23 23 source "${T}/environment" >& /dev/null 24 24 fi 25 fi 26 27 PATH_SEP="@PATH_SEPARATOR@" 28 if [ "${PATH_SEP}" = "@"PATH_SEPARATOR$"@" ]; then 29 PATH_SEP=":" 25 30 fi 26 31 … … 65 70 unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE 66 71 67 export PATH="${DEFAULT_PATH}:${PORTAGE_BIN_PATH}:${ROOTPATH}" 68 [ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH" 72 # bird: kNIX requires ';' and the old PATH to work right. The latter is 73 # because the gcc and other toolchain programs initially are 74 # installed outside the kNIX penthouse. 75 if [ "${EPREFIX}" != "/" -o "{PPATH_SEP}" != ":" ]; then 76 export PATH="${DEFAULT_PATH}${PATH_SEP}${PORTAGE_BIN_PATH}${PATH_SEP}${ROOTPATH}${PATH_SEP}${PATH}" 77 else 78 export PATH="${DEFAULT_PATH}${PATH_SEP}${PORTAGE_BIN_PATH}${PATH_SEP}${ROOTPATH}" 79 fi 80 [ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}${PATH_SEP}$PATH" 69 81 70 82 source "@PORTAGE_BASE@"/bin/isolated-functions.sh &>/dev/null … … 1363 1375 remove_path_entry "distcc" 1364 1376 fi 1365 export PATH="${EPREFIX}/usr/lib/distcc/bin :${PATH}"1377 export PATH="${EPREFIX}/usr/lib/distcc/bin${PATH_SEP}${PATH}" 1366 1378 [ ! -z "${DISTCC_LOG}" ] && addwrite "$(dirname ${DISTCC_LOG})" 1367 1379 elif which distcc &>/dev/null; then … … 1383 1395 1384 1396 if [ -d "${EPREFIX}"/usr/lib/ccache/bin ]; then 1385 export PATH="${EPREFIX}/usr/lib/ccache/bin :${PATH}"1397 export PATH="${EPREFIX}/usr/lib/ccache/bin${PATH_SEP}${PATH}" 1386 1398 elif [ -d "${EPREFIX}"/usr/bin/ccache ]; then 1387 export PATH="${EPREFIX}/usr/bin/ccache :${PATH}"1399 export PATH="${EPREFIX}/usr/bin/ccache${PATH_SEP}${PATH}" 1388 1400 fi 1389 1401 -
trunk/essentials/sys-apps/prefix-portage/bin/prepstrip
r3488 r3494 3 3 # Distributed under the terms of the GNU General Public License v2 4 4 # $Id$ 5 6 # bird: We shouldn't get here on OS/2, but if we do make 7 # sure we quit immediately. (for now, anyway) 8 case "${BASH_VERSINFO[5]}" in 9 *-os2*) exit 0 10 ;; 11 esac 5 12 6 13 source "${PORTAGE_BIN_PATH:-${EPREFIX}/usr/lib/portage/bin}"/isolated-functions.sh -
trunk/essentials/sys-apps/prefix-portage/pym/emerge/__init__.py
r3488 r3494 216 216 file_path = EPREFIX+"/var/log/emerge.log" 217 217 mylogfile = open(file_path, "a") 218 if sys.platform == "os2knix": # bird: chmod doesn't work if the file is open. 219 mylogfile.close(); # So, close it while applying permissions. 218 220 portage.util.apply_secpass_permissions(file_path, 219 221 uid=portage.portage_uid, gid=portage.portage_gid, 220 222 mode=0660) 223 if sys.platform == "os2knix": # bird: see above 224 mylogfile = open(file_path, "a")# 221 225 mylock = None 222 226 try: -
trunk/essentials/sys-apps/prefix-portage/pym/portage/const.py
r3488 r3494 67 67 68 68 MANIFEST2_IDENTIFIERS = ["AUX","MISC","DIST","EBUILD"] 69 70 # bird: drop RMD160 and SHA1 until we get dev-python/pycrypto up and going. 71 if sys.platform == "os2knix": 72 MANIFEST1_HASH_FUNCTIONS = ["MD5"] 73 MANIFEST2_HASH_FUNCTIONS = ["SHA1"] 74 69 75 # =========================================================================== 70 76 # END OF CONSTANTS -- END OF CONSTANTS -- END OF CONSTANTS -- END OF CONSTANT -
trunk/essentials/sys-apps/prefix-portage/pym/portage/process.py
r3488 r3494 169 169 or not os.access(binary, os.X_OK)): 170 170 binary = path_lookup and find_binary(binary) or None 171 # bird: try with exe suffix appended 172 if not binary and sys.platform == "os2knix": 173 binary = mycommand[0]+".exe" 174 if (not os.path.isabs(binary) or not os.path.isfile(binary) 175 or not os.access(binary, os.X_OK)): 176 binary = None 171 177 if not binary: 172 178 raise CommandNotFound(mycommand[0]) … … 334 340 pre_exec() 335 341 342 # bird: hack. OS/2 and kLIBC dislike empty environments. (FIXME) 343 if len(env) == 0 and sys.platform == "os2knix": 344 env = os.environ.copy() 345 336 346 # And switch to the new process. 337 347 os.execve(binary, myargs, env) … … 346 356 @returns: full path to binary or None if the binary could not be located. 347 357 """ 348 349 for path in os.getenv("PATH", "").split(":"): 358 359 # bird: OS/2 uses ';' not ':'. 360 sep = "@PATH_SEPARATOR@" 361 if sep == "@"+"PATH_SEPARATOR"+"@": 362 sep = ":" 363 364 for path in os.getenv("PATH", "").split(sep): 350 365 filename = "%s/%s" % (path, binary) 351 366 if os.access(filename, os.X_OK) and os.path.isfile(filename): -
trunk/essentials/sys-apps/prefix-portage/pym/portage/util.py
r3488 r3494 38 38 We dislike this behavior so we create our own normpath func 39 39 to fix it. 40 This doesn't apply to OS/2 kNIX where "//foo/bar" differs 41 from "/foo/bar" in that the former is a UNC path while the 42 later is a local path. 40 43 """ 41 if mypath.startswith(os.path.sep) :44 if mypath.startswith(os.path.sep) and sys.platform != "os2knix":: 42 45 # posixpath.normpath collapses 3 or more leading slashes to just 1. 43 46 return os.path.normpath(2*os.path.sep + mypath) -
trunk/essentials/sys-apps/prefix-portage/src/tbz2tool.c
r3488 r3494 99 99 100 100 /* open datafile for reading */ 101 if ((datafile=fopen(argv[2],"r "))==NULL) {101 if ((datafile=fopen(argv[2],"rb"))==NULL) { 102 102 free(mybuf); 103 103 free(mystat); … … 107 107 108 108 /* open dbfile for reading */ 109 if ((dbfile=fopen(argv[3],"r "))==NULL) {109 if ((dbfile=fopen(argv[3],"rb"))==NULL) { 110 110 fclose(datafile); 111 111 free(mybuf); … … 116 116 117 117 /* open outfile for writing */ 118 if ((outfile=fopen(argv[4],"a "))==NULL) {118 if ((outfile=fopen(argv[4],"ab"))==NULL) { 119 119 fclose(dbfile); 120 120 fclose(datafile); … … 158 158 159 159 /* open infile for reading */ 160 if ((infile=fopen(argv[2],"r "))==NULL) {160 if ((infile=fopen(argv[2],"rb"))==NULL) { 161 161 free(mybuf); 162 162 free(mystat); … … 184 184 185 185 /* open datafile for writing */ 186 if ((datafile=fopen(argv[3],"a "))==NULL) {186 if ((datafile=fopen(argv[3],"ab"))==NULL) { 187 187 fclose(infile); 188 188 free(mybuf); … … 193 193 194 194 /* open dbfile for writing */ 195 if ((dbfile=fopen(argv[4],"a "))==NULL) {195 if ((dbfile=fopen(argv[4],"ab"))==NULL) { 196 196 fclose(datafile); 197 197 fclose(infile);
Note:
See TracChangeset
for help on using the changeset viewer.