pacman-debian 7.2.0 → 7.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +22 -2
  2. package/README_zh-CN.md +89 -19
  3. package/dist/cli/paclink.d.ts.map +1 -0
  4. package/dist/cli/paclink.js +261 -0
  5. package/dist/cli/paclink.js.map +1 -0
  6. package/dist/cli/pacman.d.ts.map +1 -1
  7. package/dist/cli/pacman.js +64 -38
  8. package/dist/cli/pacman.js.map +1 -1
  9. package/dist/core/compress.d.ts.map +1 -1
  10. package/dist/core/compress.js +29 -0
  11. package/dist/core/compress.js.map +1 -1
  12. package/dist/core/deps.d.ts.map +1 -1
  13. package/dist/core/deps.js +133 -68
  14. package/dist/core/deps.js.map +1 -1
  15. package/dist/core/types.d.ts.map +1 -1
  16. package/dist/db/database.d.ts.map +1 -1
  17. package/dist/db/database.js +3 -1
  18. package/dist/db/database.js.map +1 -1
  19. package/dist/db/localdb.d.ts.map +1 -1
  20. package/dist/db/localdb.js +73 -4
  21. package/dist/db/localdb.js.map +1 -1
  22. package/dist/i18n/en.json +6 -0
  23. package/dist/i18n/index.d.ts.map +1 -1
  24. package/dist/i18n/index.js +52 -6
  25. package/dist/i18n/index.js.map +1 -1
  26. package/dist/i18n/paclink/en.d.ts.map +1 -0
  27. package/dist/i18n/paclink/en.js +62 -0
  28. package/dist/i18n/paclink/en.js.map +1 -0
  29. package/dist/i18n/paclink/zh-CN.d.ts.map +1 -0
  30. package/dist/i18n/paclink/zh-CN.js +62 -0
  31. package/dist/i18n/paclink/zh-CN.js.map +1 -0
  32. package/dist/i18n/setup/en.d.ts.map +1 -0
  33. package/dist/i18n/setup/en.js +49 -0
  34. package/dist/i18n/setup/en.js.map +1 -0
  35. package/dist/i18n/setup/zh-CN.d.ts.map +1 -0
  36. package/dist/i18n/setup/zh-CN.js +49 -0
  37. package/dist/i18n/setup/zh-CN.js.map +1 -0
  38. package/dist/i18n/zh-CN.json +6 -0
  39. package/dist/ops/install.d.ts.map +1 -1
  40. package/dist/ops/install.js +238 -45
  41. package/dist/ops/install.js.map +1 -1
  42. package/dist/ops/query.d.ts.map +1 -1
  43. package/dist/ops/query.js +25 -9
  44. package/dist/ops/query.js.map +1 -1
  45. package/dist/ops/remove.d.ts.map +1 -1
  46. package/dist/ops/remove.js +213 -42
  47. package/dist/ops/remove.js.map +1 -1
  48. package/dist/ops/upgrade.d.ts.map +1 -1
  49. package/dist/ops/upgrade.js +13 -15
  50. package/dist/ops/upgrade.js.map +1 -1
  51. package/dist/repo/repository.d.ts.map +1 -1
  52. package/dist/repo/repository.js +246 -90
  53. package/dist/repo/repository.js.map +1 -1
  54. package/dist/scripts/setup.js +119 -116
  55. package/dist/scripts/setup.js.map +1 -1
  56. package/package.json +18 -7
  57. package/README.zh.md +0 -388
  58. package/dist/ar.d.ts +0 -8
  59. package/dist/cli/pacman.d.ts +0 -2
  60. package/dist/compress.d.ts +0 -2
  61. package/dist/config.d.ts +0 -3
  62. package/dist/control.d.ts +0 -2
  63. package/dist/core/ar.d.ts +0 -7
  64. package/dist/core/compress.d.ts +0 -2
  65. package/dist/core/control.d.ts +0 -2
  66. package/dist/core/deb.d.ts +0 -4
  67. package/dist/core/deps.d.ts +0 -25
  68. package/dist/core/options.d.ts +0 -19
  69. package/dist/core/pkgfile.d.ts +0 -35
  70. package/dist/core/tar.d.ts +0 -13
  71. package/dist/core/types.d.ts +0 -83
  72. package/dist/database.d.ts +0 -20
  73. package/dist/db/database.d.ts +0 -17
  74. package/dist/db/dpkg-compat.d.ts +0 -19
  75. package/dist/db/localdb.d.ts +0 -9
  76. package/dist/db/sqlite.d.ts +0 -20
  77. package/dist/deb.d.ts +0 -5
  78. package/dist/dpkg-compat.d.ts +0 -18
  79. package/dist/i18n/index.d.ts +0 -3
  80. package/dist/index.d.ts +0 -3
  81. package/dist/install.d.ts +0 -2
  82. package/dist/makepkg/build.d.ts +0 -19
  83. package/dist/makepkg/index.d.ts +0 -3
  84. package/dist/makepkg/pkgbuild.d.ts +0 -36
  85. package/dist/ops/install.d.ts +0 -5
  86. package/dist/ops/query.d.ts +0 -9
  87. package/dist/ops/remove.d.ts +0 -3
  88. package/dist/ops/upgrade.d.ts +0 -4
  89. package/dist/pacman.d.ts +0 -2
  90. package/dist/query.d.ts +0 -5
  91. package/dist/remove.d.ts +0 -2
  92. package/dist/repo/config.d.ts +0 -3
  93. package/dist/repo/repository.d.ts +0 -10
  94. package/dist/repository.d.ts +0 -10
  95. package/dist/scripts/pacman-conf.d.ts +0 -3
  96. package/dist/scripts/setup.d.ts +0 -3
  97. package/dist/tar.d.ts +0 -17
  98. package/dist/types.d.ts +0 -80
  99. package/dist/ui/colors.d.ts +0 -13
  100. package/dist/ui/format.d.ts +0 -3
  101. package/dist/ui/progress.d.ts +0 -8
  102. package/dist/ui/prompt.d.ts +0 -4
  103. package/lib/pac4deb/Makefile +0 -26
  104. package/lib/pac4deb/README.md +0 -47
  105. package/lib/pac4deb/include/alpm.h +0 -166
  106. package/lib/pac4deb/include/alpm_list.h +0 -42
  107. package/lib/pac4deb/libalpm.so +0 -0
  108. package/lib/pac4deb/src/alpm_list.c +0 -102
  109. package/lib/pac4deb/src/genstubs.sh +0 -51
  110. package/lib/pac4deb/src/genstubs2.sh +0 -72
  111. package/lib/pac4deb/src/genstubs3.sh +0 -43
  112. package/lib/pac4deb/src/libalpm.c +0 -537
  113. package/lib/pac4deb/src/stubs_manual.c +0 -198
  114. package/lib/pac4deb/stubs.c +0 -6
  115. package/lib/pac4deb/update_header.sh +0 -15
  116. package/src/cli/pacman.ts +0 -308
  117. package/src/core/ar.ts +0 -54
  118. package/src/core/compress.ts +0 -27
  119. package/src/core/control.ts +0 -22
  120. package/src/core/deb.ts +0 -47
  121. package/src/core/deps.ts +0 -260
  122. package/src/core/options.ts +0 -20
  123. package/src/core/pkgfile.ts +0 -146
  124. package/src/core/tar.ts +0 -101
  125. package/src/core/types.ts +0 -89
  126. package/src/db/database.ts +0 -102
  127. package/src/db/dpkg-compat.ts +0 -129
  128. package/src/db/localdb.ts +0 -181
  129. package/src/i18n/en.json +0 -114
  130. package/src/i18n/index.ts +0 -32
  131. package/src/i18n/zh-CN.json +0 -114
  132. package/src/index.ts +0 -7
  133. package/src/makepkg/build.ts +0 -351
  134. package/src/makepkg/index.ts +0 -87
  135. package/src/makepkg/pkgbuild.ts +0 -146
  136. package/src/ops/install.ts +0 -260
  137. package/src/ops/query.ts +0 -117
  138. package/src/ops/remove.ts +0 -77
  139. package/src/ops/upgrade.ts +0 -87
  140. package/src/repo/config.ts +0 -96
  141. package/src/repo/repository.ts +0 -520
  142. package/src/scripts/pacman-conf.ts +0 -68
  143. package/src/scripts/setup.ts +0 -261
  144. package/src/ui/colors.ts +0 -40
  145. package/src/ui/format.ts +0 -9
  146. package/src/ui/progress.ts +0 -26
  147. package/src/ui/prompt.ts +0 -21
  148. package/tsconfig.json +0 -19
@@ -1,102 +0,0 @@
1
- /*
2
- * alpm_list.c - simplified from pacman source (GPL-2.0-or-later)
3
- * Copyright (C) 2006-2025 Pacman Development Team
4
- */
5
- #include <stdlib.h>
6
- #include <string.h>
7
- #include "alpm_list.h"
8
-
9
- alpm_list_t *alpm_list_add(alpm_list_t *list, void *data) {
10
- alpm_list_t *ptr, *lp = malloc(sizeof(alpm_list_t));
11
- if (!lp) return list;
12
- lp->data = data;
13
- lp->prev = NULL;
14
- lp->next = NULL;
15
- if (!list) return lp;
16
- ptr = list;
17
- while (ptr->next) ptr = ptr->next;
18
- ptr->next = lp;
19
- lp->prev = ptr;
20
- return list;
21
- }
22
-
23
- void alpm_list_free(alpm_list_t *list) {
24
- alpm_list_t *it = list;
25
- while (it) { alpm_list_t *next = it->next; free(it); it = next; }
26
- }
27
-
28
- void alpm_list_free_inner(alpm_list_t *list, void (*fn)(void*)) {
29
- alpm_list_t *it = list;
30
- while (it) { if (fn && it->data) fn(it->data); it = it->next; }
31
- }
32
-
33
- int alpm_list_count(const alpm_list_t *list) {
34
- int i = 0;
35
- while (list) { i++; list = list->next; }
36
- return i;
37
- }
38
-
39
- alpm_list_t *alpm_list_nth(const alpm_list_t *list, int n) {
40
- while (list && n--) list = list->next;
41
- return (alpm_list_t *)list;
42
- }
43
-
44
- alpm_list_t *alpm_list_next(const alpm_list_t *list) {
45
- return list ? list->next : NULL;
46
- }
47
-
48
- alpm_list_t *alpm_list_previous(const alpm_list_t *list) {
49
- return list ? list->prev : NULL;
50
- }
51
-
52
- alpm_list_t *alpm_list_last(const alpm_list_t *list) {
53
- if (!list) return NULL;
54
- while (list->next) list = list->next;
55
- return (alpm_list_t *)list;
56
- }
57
-
58
- alpm_list_t *alpm_list_reverse(alpm_list_t *list) {
59
- alpm_list_t *new = NULL, *it = list;
60
- while (it) { alpm_list_t *next = it->next; it->next = new; it->prev = next; new = it; it = next; }
61
- return new;
62
- }
63
-
64
- alpm_list_t *alpm_list_join(alpm_list_t *first, alpm_list_t *second) {
65
- if (!first) return second;
66
- alpm_list_t *last = alpm_list_last(first);
67
- last->next = second;
68
- if (second) second->prev = last;
69
- return first;
70
- }
71
-
72
- alpm_list_t *alpm_list_copy(const alpm_list_t *list) {
73
- alpm_list_t *new = NULL;
74
- while (list) { new = alpm_list_add(new, list->data); list = list->next; }
75
- return new;
76
- }
77
-
78
- void *alpm_list_find(const alpm_list_t *haystack, const void *needle,
79
- int (*fn)(const void *, const void *)) {
80
- while (haystack) {
81
- if (fn(needle, haystack->data) == 0) return haystack->data;
82
- haystack = haystack->next;
83
- }
84
- return NULL;
85
- }
86
-
87
- alpm_list_t *alpm_list_remove(alpm_list_t *list, const void *needle,
88
- int (*fn)(const void *, const void *), void **data) {
89
- alpm_list_t *it = list;
90
- while (it) {
91
- if (fn(needle, it->data) == 0) {
92
- if (data) *data = it->data;
93
- if (it->prev) it->prev->next = it->next;
94
- if (it->next) it->next->prev = it->prev;
95
- if (it == list) list = it->next;
96
- free(it);
97
- return list;
98
- }
99
- it = it->next;
100
- }
101
- return list;
102
- }
@@ -1,51 +0,0 @@
1
- #!/bin/bash
2
- HEADER="../include/alpm.h"
3
- REAL="libalpm.c"
4
- OUT="stubs.c"
5
-
6
- # Get all function names already defined in the real implementation
7
- declare -A defined
8
- while IFS= read -r line; do
9
- name=$(echo "$line" | grep -oP '\b(alpm_\w+)\b' | tail -1)
10
- [ -n "$name" ] && defined["$name"]=1
11
- done < <(grep -oP '^(static )?\w[\w\s\*]+\balpm_\w+\s*\(' "$REAL")
12
-
13
- echo '/* Auto-generated stubs for functions not in libalpm.c */' > "$OUT"
14
- echo '#include "../include/alpm.h"' >> "$OUT"
15
- echo '#include "../include/alpm_list.h"' >> "$OUT"
16
- echo '#include <stdlib.h>' >> "$OUT"
17
- echo '#include <string.h>' >> "$OUT"
18
- echo '' >> "$OUT"
19
-
20
- grep -oP '^\s*\w[\w\s\*]+\([^)]*\)\s*;' "$HEADER" | while read -r line; do
21
- func_name=$(echo "$line" | grep -oP '\b(alpm_\w+)\b' | tail -1)
22
- [ -z "$func_name" ] && continue
23
- [ -n "${defined[$func_name]}" ] && continue
24
-
25
- params=$(echo "$line" | sed 's/.*(\(.*\));/\1/')
26
- ret_type=$(echo "$line" | sed 's/\(.*\) \([a-zA-Z_][a-zA-Z_0-9]*\)(.*/\1/' | xargs)
27
-
28
- if [[ "$ret_type" == "void" ]]; then
29
- body="{ }"
30
- elif [[ "$ret_type" == *"*" ]]; then
31
- body="{ return NULL; }"
32
- elif [[ "$ret_type" == "int" ]]; then
33
- body="{ return 0; }"
34
- elif [[ "$ret_type" == "alpm_errno_t" ]]; then
35
- body="{ return ALPM_ERR_OK; }"
36
- elif [[ "$ret_type" == "off_t" ]] || [[ "$ret_type" == "alpm_time_t" ]] || [[ "$ret_type" == "size_t" ]]; then
37
- body="{ return 0; }"
38
- elif [[ "$ret_type" == "alpm_pkgreason_t" ]]; then
39
- body="{ return ALPM_PKG_REASON_EXPLICIT; }"
40
- elif [[ "$ret_type" == "alpm_pkgfrom_t" ]]; then
41
- body="{ return ALPM_PKG_FROM_LOCALDB; }"
42
- elif [[ "$ret_type" == "alpm_pkgvalidation_t" ]]; then
43
- body="{ return ALPM_PKG_VALIDATION_NONE; }"
44
- else
45
- body="{ return 0; }"
46
- fi
47
-
48
- printf "%s %s(%s) %s\n" "$ret_type" "$func_name" "$params" "$body" >> "$OUT"
49
- done
50
-
51
- echo "Generated $OUT with $(grep -c '^{' "$OUT") stubs"
@@ -1,72 +0,0 @@
1
- #!/bin/bash
2
- HEADER="../include/alpm.h"
3
- REAL="libalpm.c"
4
- OUT="stubs.c"
5
-
6
- grep -oP '^(static )?\w[\w\s\*]+\balpm_\w+\s*\(' "$REAL" | sed 's/.*\balpm_/alpm_/' | sed 's/(//' | sort > /tmp/defined_funcs.txt
7
-
8
- echo '/* Auto-generated stubs */' > "$OUT"
9
- echo '#include "../include/alpm.h"' >> "$OUT"
10
- echo '#include "../include/alpm_list.h"' >> "$OUT"
11
- echo '#include <stdlib.h>' >> "$OUT"
12
- echo '#include <string.h>' >> "$OUT"
13
- echo '' >> "$OUT"
14
-
15
- count=0; skip=0
16
- while IFS= read -r line; do
17
- decl="${line%%(*}"
18
- name_with_star="${decl##* }"
19
- func_name="${name_with_star#\*}"
20
- raw_ret="${decl% $name_with_star}"
21
- ret_type="${raw_ret%"${raw_ret##*[! ]}"}"
22
- params="${line#*(}"; params="${params%);}"
23
-
24
- grep -qx "$func_name" /tmp/defined_funcs.txt 2>/dev/null && { ((skip++)); continue; }
25
-
26
- [[ "$ret_type" == "void" ]] && { body="{ }"; echo_ok; continue; }
27
- [[ "$ret_type" == "int" ]] && { body="{ return 0; }"; echo_ok; continue; }
28
- [[ "$ret_type" == "alpm_errno_t" ]] && { body="{ return ALPM_ERR_OK; }"; echo_ok; continue; }
29
- [[ "$ret_type" == "off_t" || "$ret_type" == "alpm_time_t" || "$ret_type" == "size_t" ]] && { body="{ return 0; }"; echo_ok; continue; }
30
- [[ "$ret_type" == "const char *" ]] && { body="{ return NULL; }"; echo_ok; continue; }
31
- [[ "$ret_type" == *"*"* || "$name_with_star" == \** ]] && { body="{ return NULL; }"; echo_ok; continue; }
32
-
33
- # Unknown return type - use return 0
34
- body="{ return 0; }"
35
- echo_ok
36
-
37
- done < <(grep -oP '^\s*\w[\w\s\*]+\b(alpm_\w+)\s*\([^)]*\)\s*;' "../include/alpm.h")
38
-
39
- # Use a function to write to OUT
40
- {
41
- echo '/* Auto-generated stubs */'
42
- echo '#include "../include/alpm.h"'
43
- echo '#include "../include/alpm_list.h"'
44
- echo '#include <stdlib.h>'
45
- echo '#include <string.h>'
46
- echo ''
47
- } > "$OUT"
48
-
49
- while IFS= read -r line; do
50
- decl="${line%%(*}"
51
- name_with_star="${decl##* }"
52
- func_name="${name_with_star#\*}"
53
- raw_ret="${decl% $name_with_star}"
54
- ret_type="${raw_ret%"${raw_ret##*[! ]}"}"
55
- params="${line#*(}"; params="${params%);}"
56
-
57
- grep -qx "$func_name" /tmp/defined_funcs.txt 2>/dev/null && continue
58
-
59
- if [[ "$ret_type" == "void" ]]; then body="{ }"
60
- elif [[ "$ret_type" == "int" ]]; then body="{ return 0; }"
61
- elif [[ "$ret_type" == "alpm_errno_t" ]]; then body="{ return ALPM_ERR_OK; }"
62
- elif [[ "$ret_type" == "off_t" || "$ret_type" == "alpm_time_t" || "$ret_type" == "size_t" ]]; then body="{ return 0; }"
63
- elif [[ "$ret_type" == "const char *" ]] then body="{ return NULL; }"
64
- elif [[ "$ret_type" == *"*"* || "$name_with_star" == \** ]]; then body="{ return NULL; }"
65
- else body="{ return 0; }"
66
- fi
67
-
68
- echo "$ret_type $func_name($params) $body" >> "$OUT"
69
- ((count++))
70
- done < <(grep -oP '^\s*\w[\w\s\*]+\b(alpm_\w+)\s*\([^)]*\)\s*;' "../include/alpm.h")
71
-
72
- echo "Generated $count stubs (skipped $skip)" >&2
@@ -1,43 +0,0 @@
1
- #!/bin/bash
2
- # Generate stubs for functions declared in header but not implemented in libalpm.c
3
- HEADER="../include/alpm.h"
4
- REAL="libalpm.c"
5
- OUT="stubs.c"
6
-
7
- grep -oP '^(static )?\w[\w\s\*]+\balpm_\w+\s*\(' "$REAL" | sed 's/.*\balpm_/alpm_/' | sed 's/(//' | sort > /tmp/defined.txt
8
-
9
- count=0
10
- while IFS= read -r line; do
11
- decl="${line%%(*}"
12
- name_with_star="${decl##* }"
13
- func_name="${name_with_star#\*}"
14
- raw_ret="${decl% $name_with_star}"
15
- ret_type="${raw_ret%"${raw_ret##*[! ]}"}"
16
- params="${line#*(}"; params="${params%);}"
17
-
18
- grep -qx "$func_name" /tmp/defined.txt 2>/dev/null && continue
19
-
20
- if [[ "$ret_type" == "void" ]]; then body="{ }"
21
- elif [[ "$ret_type" == "int" ]]; then body="{ return 0; }"
22
- elif [[ "$ret_type" == "alpm_errno_t" ]]; then body="{ return ALPM_ERR_OK; }"
23
- elif [[ "$ret_type" == "off_t" || "$ret_type" == "alpm_time_t" || "$ret_type" == "size_t" ]]; then body="{ return 0; }"
24
- elif [[ "$ret_type" == "const char *" ]] then body="{ return NULL; }"
25
- elif [[ "$ret_type" == *"*"* || "$name_with_star" == \** ]]; then body="{ return NULL; }"
26
- else body="{ return 0; }"
27
- fi
28
-
29
- lines+=("$ret_type $func_name($params) $body")
30
- ((count++))
31
- done < <(grep -oP '^\s*\w[\w\s\*]+\b(alpm_\w+)\s*\([^)]*\)\s*;' "$HEADER")
32
-
33
- cat > "$OUT" << EOF
34
- /* Auto-generated stubs for functions not in libalpm.c */
35
- #include "../include/alpm.h"
36
- #include "../include/alpm_list.h"
37
- #include <stdlib.h>
38
- #include <string.h>
39
-
40
- EOF
41
-
42
- for l in "${lines[@]}"; do echo "$l" >> "$OUT"; done
43
- echo "Generated $count stubs" >&2