author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Mon, 23 Oct 2023 10:40:39 +0200 | |
changeset 126 | a7809f76f626 |
parent 120 | 02e37d9e96a9 |
permissions | -rw-r--r-- |
37
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
1 |
diff -ruN pacman-6.0.0.orig/lib/libalpm/util.c pacman-6.0.0/lib/libalpm/util.c |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
2 |
--- pacman-6.0.0.orig/lib/libalpm/util.c 2021-05-20 03:38:45.948119900 +0000 |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
3 |
+++ pacman-6.0.0/lib/libalpm/util.c 2021-08-26 17:26:09.719703392 +0000 |
115
b027d8e5b14e
keep pacman happy, even if it can't chroot to run scripts
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
113
diff
changeset
|
4 |
@@ -652,6 +652,12 @@ |
37
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
5 |
/* use fprintf instead of _alpm_log to send output through the parent */ |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
6 |
if(chroot(handle->root) != 0) { |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
7 |
fprintf(stderr, _("could not change the root directory (%s)\n"), strerror(errno)); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
8 |
+ fprintf(stderr, "cmd : %s", cmd); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
9 |
+ for(int i=0; argv[i]; i++){ |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
10 |
+ fprintf(stderr, " %s", argv[i]); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
11 |
+ } |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
12 |
+ fprintf(stderr, "\n"); |
115
b027d8e5b14e
keep pacman happy, even if it can't chroot to run scripts
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
113
diff
changeset
|
13 |
+ return 0; //be happy |
37
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
14 |
exit(1); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
15 |
} |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
16 |
if(chdir("/") != 0) { |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
17 |
diff -ruN pacman-6.0.0.orig/src/pacman/conf.c pacman-6.0.0/src/pacman/conf.c |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
18 |
--- pacman-6.0.0.orig/src/pacman/conf.c 2021-05-20 03:38:45.964786500 +0000 |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
19 |
+++ pacman-6.0.0/src/pacman/conf.c 2021-08-26 17:27:32.228666450 +0000 |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
20 |
@@ -477,7 +477,7 @@ |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
21 |
} |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
22 |
|
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
23 |
/* now parse out and store actual flag if it is valid */ |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
24 |
- if(strcmp(value, "Never") == 0) { |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
25 |
+ if(1 || strcmp(value, "Never") == 0) { |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
26 |
if(package) { |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
27 |
SLUNSET(ALPM_SIG_PACKAGE); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
28 |
} |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
29 |
@@ -1071,9 +1071,11 @@ |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
30 |
break; |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
31 |
default: |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
32 |
for(gindex = 0; gindex < globbuf.gl_pathc; gindex++) { |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
33 |
+ char buf[1024]; |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
34 |
+ snprintf(buf, 1023, "%s%s",ROOTDIR, globbuf.gl_pathv[gindex]); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
35 |
pm_printf(ALPM_LOG_DEBUG, "config file %s, line %d: including %s\n", |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
36 |
- file, linenum, globbuf.gl_pathv[gindex]); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
37 |
- ret = parse_ini(globbuf.gl_pathv[gindex], _parse_directive, data); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
38 |
+ file, linenum, buf); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
39 |
+ ret = parse_ini(buf, _parse_directive, data); |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
40 |
if(ret) { |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
41 |
goto cleanup; |
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
42 |
} |
120
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
43 |
diff -ruN pacman-6.0.0.orig/lib/libalpm/be_local.c pacman-6.0.0/lib/libalpm/be_local.c |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
44 |
--- pacman-6.0.0.orig/lib/libalpm/be_local.c 2023-09-05 15:52:38.385979363 +0200 |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
45 |
+++ pacman-6.0.0/lib/libalpm/be_local.c 2023-09-05 16:04:41.553345845 +0200 |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
46 |
@@ -423,7 +423,7 @@ |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
47 |
|
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
48 |
static int local_db_create(alpm_db_t *db, const char *dbpath) |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
49 |
{ |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
50 |
- if(mkdir(dbpath, 0755) != 0) { |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
51 |
+ if(mkdir(dbpath, 0755) != 0 && errno != EEXIST) { |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
52 |
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not create directory %s: %s\n"), |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
53 |
dbpath, strerror(errno)); |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
54 |
RET_ERR(db->handle, ALPM_ERR_DB_CREATE, -1); |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
55 |
@@ -905,10 +905,12 @@ |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
56 |
oldmask = umask(0000); |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
57 |
pkgpath = _alpm_local_db_pkgpath(db, info, NULL); |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
58 |
|
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
59 |
- if((retval = mkdir(pkgpath, 0755)) != 0) { |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
60 |
+ if((retval = mkdir(pkgpath, 0755)) != 0 && errno != EEXIST) { |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
61 |
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not create directory %s: %s\n"), |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
62 |
pkgpath, strerror(errno)); |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
63 |
- } |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
64 |
+ } else { |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
65 |
+ retval = 0; |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
66 |
+ } |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
67 |
|
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
68 |
free(pkgpath); |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
115
diff
changeset
|
69 |
umask(oldmask); |