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.
- package/README.md +22 -2
- package/README_zh-CN.md +89 -19
- package/dist/cli/paclink.d.ts.map +1 -0
- package/dist/cli/paclink.js +261 -0
- package/dist/cli/paclink.js.map +1 -0
- package/dist/cli/pacman.d.ts.map +1 -1
- package/dist/cli/pacman.js +64 -38
- package/dist/cli/pacman.js.map +1 -1
- package/dist/core/compress.d.ts.map +1 -1
- package/dist/core/compress.js +29 -0
- package/dist/core/compress.js.map +1 -1
- package/dist/core/deps.d.ts.map +1 -1
- package/dist/core/deps.js +133 -68
- package/dist/core/deps.js.map +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/database.js +3 -1
- package/dist/db/database.js.map +1 -1
- package/dist/db/localdb.d.ts.map +1 -1
- package/dist/db/localdb.js +73 -4
- package/dist/db/localdb.js.map +1 -1
- package/dist/i18n/en.json +6 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +52 -6
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/paclink/en.d.ts.map +1 -0
- package/dist/i18n/paclink/en.js +62 -0
- package/dist/i18n/paclink/en.js.map +1 -0
- package/dist/i18n/paclink/zh-CN.d.ts.map +1 -0
- package/dist/i18n/paclink/zh-CN.js +62 -0
- package/dist/i18n/paclink/zh-CN.js.map +1 -0
- package/dist/i18n/setup/en.d.ts.map +1 -0
- package/dist/i18n/setup/en.js +49 -0
- package/dist/i18n/setup/en.js.map +1 -0
- package/dist/i18n/setup/zh-CN.d.ts.map +1 -0
- package/dist/i18n/setup/zh-CN.js +49 -0
- package/dist/i18n/setup/zh-CN.js.map +1 -0
- package/dist/i18n/zh-CN.json +6 -0
- package/dist/ops/install.d.ts.map +1 -1
- package/dist/ops/install.js +238 -45
- package/dist/ops/install.js.map +1 -1
- package/dist/ops/query.d.ts.map +1 -1
- package/dist/ops/query.js +25 -9
- package/dist/ops/query.js.map +1 -1
- package/dist/ops/remove.d.ts.map +1 -1
- package/dist/ops/remove.js +213 -42
- package/dist/ops/remove.js.map +1 -1
- package/dist/ops/upgrade.d.ts.map +1 -1
- package/dist/ops/upgrade.js +13 -15
- package/dist/ops/upgrade.js.map +1 -1
- package/dist/repo/repository.d.ts.map +1 -1
- package/dist/repo/repository.js +246 -90
- package/dist/repo/repository.js.map +1 -1
- package/dist/scripts/setup.js +119 -116
- package/dist/scripts/setup.js.map +1 -1
- package/package.json +18 -7
- package/README.zh.md +0 -388
- package/dist/ar.d.ts +0 -8
- package/dist/cli/pacman.d.ts +0 -2
- package/dist/compress.d.ts +0 -2
- package/dist/config.d.ts +0 -3
- package/dist/control.d.ts +0 -2
- package/dist/core/ar.d.ts +0 -7
- package/dist/core/compress.d.ts +0 -2
- package/dist/core/control.d.ts +0 -2
- package/dist/core/deb.d.ts +0 -4
- package/dist/core/deps.d.ts +0 -25
- package/dist/core/options.d.ts +0 -19
- package/dist/core/pkgfile.d.ts +0 -35
- package/dist/core/tar.d.ts +0 -13
- package/dist/core/types.d.ts +0 -83
- package/dist/database.d.ts +0 -20
- package/dist/db/database.d.ts +0 -17
- package/dist/db/dpkg-compat.d.ts +0 -19
- package/dist/db/localdb.d.ts +0 -9
- package/dist/db/sqlite.d.ts +0 -20
- package/dist/deb.d.ts +0 -5
- package/dist/dpkg-compat.d.ts +0 -18
- package/dist/i18n/index.d.ts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/install.d.ts +0 -2
- package/dist/makepkg/build.d.ts +0 -19
- package/dist/makepkg/index.d.ts +0 -3
- package/dist/makepkg/pkgbuild.d.ts +0 -36
- package/dist/ops/install.d.ts +0 -5
- package/dist/ops/query.d.ts +0 -9
- package/dist/ops/remove.d.ts +0 -3
- package/dist/ops/upgrade.d.ts +0 -4
- package/dist/pacman.d.ts +0 -2
- package/dist/query.d.ts +0 -5
- package/dist/remove.d.ts +0 -2
- package/dist/repo/config.d.ts +0 -3
- package/dist/repo/repository.d.ts +0 -10
- package/dist/repository.d.ts +0 -10
- package/dist/scripts/pacman-conf.d.ts +0 -3
- package/dist/scripts/setup.d.ts +0 -3
- package/dist/tar.d.ts +0 -17
- package/dist/types.d.ts +0 -80
- package/dist/ui/colors.d.ts +0 -13
- package/dist/ui/format.d.ts +0 -3
- package/dist/ui/progress.d.ts +0 -8
- package/dist/ui/prompt.d.ts +0 -4
- package/lib/pac4deb/Makefile +0 -26
- package/lib/pac4deb/README.md +0 -47
- package/lib/pac4deb/include/alpm.h +0 -166
- package/lib/pac4deb/include/alpm_list.h +0 -42
- package/lib/pac4deb/libalpm.so +0 -0
- package/lib/pac4deb/src/alpm_list.c +0 -102
- package/lib/pac4deb/src/genstubs.sh +0 -51
- package/lib/pac4deb/src/genstubs2.sh +0 -72
- package/lib/pac4deb/src/genstubs3.sh +0 -43
- package/lib/pac4deb/src/libalpm.c +0 -537
- package/lib/pac4deb/src/stubs_manual.c +0 -198
- package/lib/pac4deb/stubs.c +0 -6
- package/lib/pac4deb/update_header.sh +0 -15
- package/src/cli/pacman.ts +0 -308
- package/src/core/ar.ts +0 -54
- package/src/core/compress.ts +0 -27
- package/src/core/control.ts +0 -22
- package/src/core/deb.ts +0 -47
- package/src/core/deps.ts +0 -260
- package/src/core/options.ts +0 -20
- package/src/core/pkgfile.ts +0 -146
- package/src/core/tar.ts +0 -101
- package/src/core/types.ts +0 -89
- package/src/db/database.ts +0 -102
- package/src/db/dpkg-compat.ts +0 -129
- package/src/db/localdb.ts +0 -181
- package/src/i18n/en.json +0 -114
- package/src/i18n/index.ts +0 -32
- package/src/i18n/zh-CN.json +0 -114
- package/src/index.ts +0 -7
- package/src/makepkg/build.ts +0 -351
- package/src/makepkg/index.ts +0 -87
- package/src/makepkg/pkgbuild.ts +0 -146
- package/src/ops/install.ts +0 -260
- package/src/ops/query.ts +0 -117
- package/src/ops/remove.ts +0 -77
- package/src/ops/upgrade.ts +0 -87
- package/src/repo/config.ts +0 -96
- package/src/repo/repository.ts +0 -520
- package/src/scripts/pacman-conf.ts +0 -68
- package/src/scripts/setup.ts +0 -261
- package/src/ui/colors.ts +0 -40
- package/src/ui/format.ts +0 -9
- package/src/ui/progress.ts +0 -26
- package/src/ui/prompt.ts +0 -21
- package/tsconfig.json +0 -19
package/src/db/database.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import * as localdb from './localdb';
|
|
4
|
-
import type { InstalledPackage, Database, Transaction } from '../core/types';
|
|
5
|
-
|
|
6
|
-
const DATA_DIR = '/var/lib/pacman-debian';
|
|
7
|
-
const TRANSACTIONS_DIR = path.join(DATA_DIR, 'transactions');
|
|
8
|
-
const INFO_DIR = path.join(DATA_DIR, 'info');
|
|
9
|
-
|
|
10
|
-
function ensureDir(dir: string) { if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true }); }
|
|
11
|
-
|
|
12
|
-
export function initDb(): void {
|
|
13
|
-
ensureDir(TRANSACTIONS_DIR); ensureDir(INFO_DIR);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function loadDatabase(): Database {
|
|
17
|
-
const db: Database = { packages: new Map(), fileIndex: new Map() };
|
|
18
|
-
for (const pkg of localdb.getAllPackages()) {
|
|
19
|
-
db.packages.set(pkg.name, pkg);
|
|
20
|
-
db.fileIndex.set(pkg.name, pkg.name);
|
|
21
|
-
}
|
|
22
|
-
return db;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function saveDatabase(_db: Database): void {
|
|
26
|
-
// localdb persists writes immediately
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function isInstalled(db: Database, name: string): boolean {
|
|
30
|
-
return db.packages.has(name) || !!localdb.getPackage(name);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function getPackage(db: Database, name: string): InstalledPackage | undefined {
|
|
34
|
-
return db.packages.get(name) || localdb.getPackage(name);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function addPackage(db: Database, pkg: InstalledPackage): void {
|
|
38
|
-
db.packages.set(pkg.name, pkg);
|
|
39
|
-
localdb.addPackage(pkg);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function removePkg(db: Database, name: string): InstalledPackage | undefined {
|
|
43
|
-
const pkg = db.packages.get(name) || localdb.getPackage(name);
|
|
44
|
-
if (!pkg) return undefined;
|
|
45
|
-
for (const f of pkg.files) db.fileIndex.delete(f);
|
|
46
|
-
db.packages.delete(name);
|
|
47
|
-
localdb.removePackage(name, pkg.version);
|
|
48
|
-
const base = path.join(INFO_DIR, name);
|
|
49
|
-
for (const s of ['preinst', 'postinst', 'prerm', 'postrm']) {
|
|
50
|
-
const fp = path.join(base, s);
|
|
51
|
-
if (fs.existsSync(fp)) fs.unlinkSync(fp);
|
|
52
|
-
}
|
|
53
|
-
try { fs.rmdirSync(base); } catch {}
|
|
54
|
-
return pkg;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function saveScript(pkgName: string, name: string, content: string): void {
|
|
58
|
-
const dir = path.join(INFO_DIR, pkgName);
|
|
59
|
-
ensureDir(dir);
|
|
60
|
-
fs.writeFileSync(path.join(dir, name), content, { mode: 0o755 });
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function runScript(pkgName: string, name: string, args: string[]): boolean {
|
|
64
|
-
const fp = path.join(INFO_DIR, pkgName, name);
|
|
65
|
-
if (!fs.existsSync(fp)) return true;
|
|
66
|
-
try {
|
|
67
|
-
const { execSync } = require('node:child_process');
|
|
68
|
-
execSync(`/bin/sh "${fp}" ${args.join(' ')}`, {
|
|
69
|
-
stdio: 'inherit', env: { ...process.env, DEBIAN_FRONTEND: 'noninteractive' },
|
|
70
|
-
});
|
|
71
|
-
return true;
|
|
72
|
-
} catch {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function createTransaction(a: 'install' | 'remove', p: string, v: string): Transaction {
|
|
78
|
-
ensureDir(TRANSACTIONS_DIR);
|
|
79
|
-
const tx: Transaction = {
|
|
80
|
-
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
81
|
-
timestamp: Date.now(), action: a, package: p, version: v, completed: false,
|
|
82
|
-
};
|
|
83
|
-
fs.writeFileSync(path.join(TRANSACTIONS_DIR, `${tx.id}.json`), JSON.stringify(tx));
|
|
84
|
-
return tx;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export function completeTransaction(id: string): void {
|
|
88
|
-
const fp = path.join(TRANSACTIONS_DIR, `${id}.json`);
|
|
89
|
-
if (fs.existsSync(fp)) {
|
|
90
|
-
const tx = JSON.parse(fs.readFileSync(fp, 'utf8'));
|
|
91
|
-
tx.completed = true;
|
|
92
|
-
fs.writeFileSync(fp, JSON.stringify(tx));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface DepEntry { name: string }
|
|
97
|
-
export function parseDepends(s?: string): DepEntry[] {
|
|
98
|
-
if (!s) return [];
|
|
99
|
-
return s.split(',').map(x => x.trim()).filter(Boolean).map(d => ({
|
|
100
|
-
name: (d.match(/^\s*([\w.+-]+)/) || [])[1] || d.split(/\s/)[0],
|
|
101
|
-
}));
|
|
102
|
-
}
|
package/src/db/dpkg-compat.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import { execSync } from 'node:child_process';
|
|
3
|
-
import { parseControlFile } from '../core/control';
|
|
4
|
-
import type { InstalledPackage } from '../core/types';
|
|
5
|
-
|
|
6
|
-
const DPKG_STATUS = '/var/lib/dpkg/status';
|
|
7
|
-
const DPKG_INFO = '/var/lib/dpkg/info';
|
|
8
|
-
|
|
9
|
-
export interface DpkgEntry {
|
|
10
|
-
package: string;
|
|
11
|
-
version: string;
|
|
12
|
-
architecture: string;
|
|
13
|
-
status: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
maintainer?: string;
|
|
16
|
-
depends?: string;
|
|
17
|
-
installedSize?: number;
|
|
18
|
-
section?: string;
|
|
19
|
-
priority?: string;
|
|
20
|
-
homepage?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* ---- In-memory cache with mtime check ---- */
|
|
24
|
-
let _dpkgCache: { mtime: number; data: Map<string, DpkgEntry> } | null = null;
|
|
25
|
-
|
|
26
|
-
export function readDpkgStatus(): Map<string, DpkgEntry> {
|
|
27
|
-
if (!fs.existsSync(DPKG_STATUS)) return new Map();
|
|
28
|
-
try {
|
|
29
|
-
const st = fs.statSync(DPKG_STATUS);
|
|
30
|
-
if (_dpkgCache && _dpkgCache.mtime === st.mtimeMs) return _dpkgCache.data;
|
|
31
|
-
} catch {}
|
|
32
|
-
|
|
33
|
-
const content = fs.readFileSync(DPKG_STATUS, 'utf8');
|
|
34
|
-
const result = new Map<string, DpkgEntry>();
|
|
35
|
-
for (const entry of content.split('\n\n').filter(Boolean)) {
|
|
36
|
-
const fields = parseControlFile(entry);
|
|
37
|
-
const name = fields['package'];
|
|
38
|
-
if (!name) continue;
|
|
39
|
-
const status = (fields['status'] || '').trim();
|
|
40
|
-
if (!status.startsWith('install ok installed')) continue;
|
|
41
|
-
result.set(name, {
|
|
42
|
-
package: name, version: fields['version'] || '',
|
|
43
|
-
architecture: fields['architecture'] || '', status,
|
|
44
|
-
description: fields['description']?.split('\n')[0],
|
|
45
|
-
maintainer: fields['maintainer'], depends: fields['depends'],
|
|
46
|
-
installedSize: fields['installed-size'] ? parseInt(fields['installed-size'], 10) : undefined,
|
|
47
|
-
section: fields['section'], priority: fields['priority'], homepage: fields['homepage'],
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
_dpkgCache = { mtime: fs.statSync(DPKG_STATUS).mtimeMs, data: result };
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function dpkgHasPackage(name: string): boolean {
|
|
55
|
-
return readDpkgStatus().has(name);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const ARCH_MAP: Record<string, string> = {
|
|
59
|
-
aarch64: 'arm64', x86_64: 'amd64', i686: 'i386',
|
|
60
|
-
armv7h: 'armhf', armv6h: 'armhf', riscv64: 'riscv64',
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
function toDpkgArch(arch: string): string {
|
|
64
|
-
return ARCH_MAP[arch] || arch;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function formatDescription(desc?: string): string {
|
|
68
|
-
if (!desc || desc.trim() === '') return 'Description: ';
|
|
69
|
-
const lines = desc.split('\n');
|
|
70
|
-
if (lines.length <= 1) return `Description: ${desc}`;
|
|
71
|
-
const first = lines[0];
|
|
72
|
-
const rest = lines.slice(1).map(l => ' ' + l).join('\n');
|
|
73
|
-
return `Description: ${first}\n${rest}`;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function writeDpkgEntry(pkg: InstalledPackage): void {
|
|
77
|
-
if (!fs.existsSync(DPKG_STATUS)) return;
|
|
78
|
-
|
|
79
|
-
const content = fs.readFileSync(DPKG_STATUS, 'utf8');
|
|
80
|
-
const entries = content.split('\n\n').filter((e: string) => e.trim() !== '');
|
|
81
|
-
let kept = entries.filter((e: string) => {
|
|
82
|
-
const m = e.match(/^Package: (.+)$/m);
|
|
83
|
-
return !(m && m[1] === pkg.name);
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
const entry = [
|
|
87
|
-
`Package: ${pkg.name}`,
|
|
88
|
-
`Status: install ok installed`,
|
|
89
|
-
`Priority: ${pkg.controlPriority || 'optional'}`,
|
|
90
|
-
`Section: ${pkg.controlSection || 'misc'}`,
|
|
91
|
-
`Installed-Size: ${pkg.installedSize || 0}`,
|
|
92
|
-
`Maintainer: ${pkg.maintainer || 'Unknown'}`,
|
|
93
|
-
`Architecture: ${toDpkgArch(pkg.architecture)}`,
|
|
94
|
-
`Version: ${pkg.version}`,
|
|
95
|
-
];
|
|
96
|
-
|
|
97
|
-
if (pkg.depends) entry.push(`Depends: ${pkg.depends}`);
|
|
98
|
-
entry.push(formatDescription(pkg.description));
|
|
99
|
-
if (pkg.homepage) entry.push(`Homepage: ${pkg.homepage}`);
|
|
100
|
-
|
|
101
|
-
kept = kept.filter((e: string) => e.trim() !== '');
|
|
102
|
-
kept.push(entry.join('\n'));
|
|
103
|
-
fs.writeFileSync(DPKG_STATUS, kept.join('\n\n') + '\n');
|
|
104
|
-
_dpkgCache = null; // invalidate cache
|
|
105
|
-
|
|
106
|
-
if (fs.existsSync(DPKG_INFO)) {
|
|
107
|
-
const lp = `${DPKG_INFO}/${pkg.name}.list`;
|
|
108
|
-
const existing = fs.existsSync(lp)
|
|
109
|
-
? fs.readFileSync(lp, 'utf8').split('\n').filter(Boolean)
|
|
110
|
-
: [];
|
|
111
|
-
fs.writeFileSync(lp, [...new Set([...existing, ...pkg.files])].sort().join('\n') + '\n');
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function removeDpkgEntry(name: string): void {
|
|
116
|
-
if (!fs.existsSync(DPKG_STATUS)) return;
|
|
117
|
-
const content = fs.readFileSync(DPKG_STATUS, 'utf8');
|
|
118
|
-
const entries = content.split('\n\n').filter((e: string) => e.trim() !== '');
|
|
119
|
-
const kept = entries.filter((e: string) => {
|
|
120
|
-
const m = e.match(/^Package: (.+)$/m);
|
|
121
|
-
if (m && m[1] === name) return false;
|
|
122
|
-
return true;
|
|
123
|
-
});
|
|
124
|
-
fs.writeFileSync(DPKG_STATUS, kept.join('\n\n') + '\n');
|
|
125
|
-
_dpkgCache = null;
|
|
126
|
-
|
|
127
|
-
const lp = `${DPKG_INFO}/${name}.list`;
|
|
128
|
-
if (fs.existsSync(lp)) fs.unlinkSync(lp);
|
|
129
|
-
}
|
package/src/db/localdb.ts
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import type { InstalledPackage } from '../core/types';
|
|
4
|
-
|
|
5
|
-
const LOCAL_DIR = '/var/lib/pacman-debian/local';
|
|
6
|
-
const BYNAME_DIR = path.join(LOCAL_DIR, 'by-name');
|
|
7
|
-
const FILE_INDEX = '/var/lib/pacman-debian/file-index.json';
|
|
8
|
-
|
|
9
|
-
function ensure(): void {
|
|
10
|
-
if (!fs.existsSync(LOCAL_DIR)) fs.mkdirSync(LOCAL_DIR, { recursive: true });
|
|
11
|
-
if (!fs.existsSync(BYNAME_DIR)) fs.mkdirSync(BYNAME_DIR, { recursive: true });
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function pkgDir(pkg: InstalledPackage): string {
|
|
15
|
-
return path.join(LOCAL_DIR, `${pkg.name}-${pkg.version}`);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function pkgDirFromName(name: string, version: string): string {
|
|
19
|
-
return path.join(LOCAL_DIR, `${name}-${version}`);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function descPath(dir: string): string { return path.join(dir, 'desc'); }
|
|
23
|
-
function filesPath(dir: string): string { return path.join(dir, 'files'); }
|
|
24
|
-
|
|
25
|
-
/* ---- read / write ---- */
|
|
26
|
-
|
|
27
|
-
function writeDesc(pkg: InstalledPackage): void {
|
|
28
|
-
fs.writeFileSync(descPath(pkgDir(pkg)), JSON.stringify({
|
|
29
|
-
name: pkg.name, version: pkg.version, architecture: pkg.architecture,
|
|
30
|
-
description: pkg.description, depends: pkg.depends,
|
|
31
|
-
'pre-depends': pkg['pre-depends'], conflicts: pkg.conflicts,
|
|
32
|
-
provides: pkg.provides, maintainer: pkg.maintainer, homepage: pkg.homepage,
|
|
33
|
-
section: pkg.controlSection, priority: pkg.controlPriority,
|
|
34
|
-
installedSize: pkg.installedSize, installTime: pkg.installTime,
|
|
35
|
-
reason: pkg.reason, repoType: pkg.repoType,
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function readDesc(dir: string): InstalledPackage | null {
|
|
40
|
-
const fp = descPath(dir);
|
|
41
|
-
if (!fs.existsSync(fp)) return null;
|
|
42
|
-
try {
|
|
43
|
-
const d = JSON.parse(fs.readFileSync(fp, 'utf8'));
|
|
44
|
-
const files = readFiles(dir);
|
|
45
|
-
return {
|
|
46
|
-
name: d.name, version: d.version, architecture: d.architecture || 'amd64',
|
|
47
|
-
description: d.description || '', depends: d.depends,
|
|
48
|
-
'pre-depends': d['pre-depends'], conflicts: d.conflicts,
|
|
49
|
-
provides: d.provides, maintainer: d.maintainer, homepage: d.homepage,
|
|
50
|
-
controlSection: d.section, controlPriority: d.priority,
|
|
51
|
-
installedSize: d.installedSize || 0, installTime: d.installTime || 0,
|
|
52
|
-
reason: d.reason || 'explicit', files, repoType: d.repoType || 'debian',
|
|
53
|
-
};
|
|
54
|
-
} catch { return null; }
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function writeFiles(pkg: InstalledPackage): void {
|
|
58
|
-
fs.writeFileSync(filesPath(pkgDir(pkg)), JSON.stringify(pkg.files));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function readFiles(dir: string): string[] {
|
|
62
|
-
const fp = filesPath(dir);
|
|
63
|
-
if (!fs.existsSync(fp)) return [];
|
|
64
|
-
try { return JSON.parse(fs.readFileSync(fp, 'utf8')); } catch { return []; }
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* ---- public API ---- */
|
|
68
|
-
|
|
69
|
-
export function addPackage(pkg: InstalledPackage): void {
|
|
70
|
-
ensure();
|
|
71
|
-
const dir = pkgDir(pkg);
|
|
72
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
73
|
-
writeDesc(pkg);
|
|
74
|
-
writeFiles(pkg);
|
|
75
|
-
// Symlink by-name/<name> → ../<name>-<version>
|
|
76
|
-
const link = path.join(BYNAME_DIR, pkg.name);
|
|
77
|
-
try { fs.unlinkSync(link); } catch {}
|
|
78
|
-
fs.symlinkSync(path.relative(BYNAME_DIR, dir), link);
|
|
79
|
-
updateFileIndex(pkg.name, pkg.files);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function removePackage(name: string, version?: string): void {
|
|
83
|
-
ensure();
|
|
84
|
-
// Find the dir
|
|
85
|
-
const link = path.join(BYNAME_DIR, name);
|
|
86
|
-
let dir: string | null = null;
|
|
87
|
-
if (fs.existsSync(link)) try { dir = fs.readlinkSync(link); } catch {}
|
|
88
|
-
if (!dir && version) {
|
|
89
|
-
dir = pkgDirFromName(name, version);
|
|
90
|
-
if (!fs.existsSync(dir)) dir = null;
|
|
91
|
-
}
|
|
92
|
-
if (!dir) {
|
|
93
|
-
// Search local dir
|
|
94
|
-
for (const entry of fs.readdirSync(LOCAL_DIR)) {
|
|
95
|
-
if (entry.startsWith(name + '-')) { dir = path.join(LOCAL_DIR, entry); break; }
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (dir && fs.existsSync(dir)) {
|
|
99
|
-
const files = readFiles(dir);
|
|
100
|
-
removeFileIndex(name, files);
|
|
101
|
-
fs.rmSync(dir, { recursive: true });
|
|
102
|
-
}
|
|
103
|
-
try { fs.unlinkSync(link); } catch {}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export function listPackageNames(): string[] {
|
|
107
|
-
ensure();
|
|
108
|
-
const result: string[] = [];
|
|
109
|
-
for (const entry of fs.readdirSync(LOCAL_DIR)) {
|
|
110
|
-
if (entry === 'by-name') continue;
|
|
111
|
-
if (entry.startsWith('.')) continue;
|
|
112
|
-
const fp = path.join(LOCAL_DIR, entry, 'desc');
|
|
113
|
-
if (fs.existsSync(fp)) result.push(entry);
|
|
114
|
-
}
|
|
115
|
-
return result;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export function getPackage(name: string): InstalledPackage | undefined {
|
|
119
|
-
ensure();
|
|
120
|
-
// Try by-name symlink first
|
|
121
|
-
const link = path.join(BYNAME_DIR, name);
|
|
122
|
-
if (fs.existsSync(link)) {
|
|
123
|
-
try {
|
|
124
|
-
const target = fs.readlinkSync(link);
|
|
125
|
-
const dir = path.resolve(BYNAME_DIR, target);
|
|
126
|
-
const pkg = readDesc(dir);
|
|
127
|
-
if (pkg) return pkg;
|
|
128
|
-
} catch {}
|
|
129
|
-
}
|
|
130
|
-
// Fallback: scan local dir
|
|
131
|
-
for (const entry of fs.readdirSync(LOCAL_DIR)) {
|
|
132
|
-
if (entry.startsWith(name + '-')) {
|
|
133
|
-
const pkg = readDesc(path.join(LOCAL_DIR, entry));
|
|
134
|
-
if (pkg) return pkg;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return undefined;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export function getAllPackages(): InstalledPackage[] {
|
|
141
|
-
ensure();
|
|
142
|
-
const result: InstalledPackage[] = [];
|
|
143
|
-
for (const entry of fs.readdirSync(LOCAL_DIR)) {
|
|
144
|
-
if (entry === 'by-name' || entry.startsWith('.')) continue;
|
|
145
|
-
const pkg = readDesc(path.join(LOCAL_DIR, entry));
|
|
146
|
-
if (pkg) result.push(pkg);
|
|
147
|
-
}
|
|
148
|
-
return result;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/* ---- file index (for -Qo) ---- */
|
|
152
|
-
let _fileIndex: Record<string, string> | null = null;
|
|
153
|
-
|
|
154
|
-
function loadFileIndex(): Record<string, string> {
|
|
155
|
-
if (_fileIndex) return _fileIndex;
|
|
156
|
-
if (!fs.existsSync(FILE_INDEX)) { _fileIndex = {}; return _fileIndex; }
|
|
157
|
-
try { _fileIndex = JSON.parse(fs.readFileSync(FILE_INDEX, 'utf8')); } catch { _fileIndex = {}; }
|
|
158
|
-
return _fileIndex!;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function saveFileIndex(idx: Record<string, string>): void {
|
|
162
|
-
fs.writeFileSync(FILE_INDEX, JSON.stringify(idx));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function updateFileIndex(pkgName: string, files: string[]): void {
|
|
166
|
-
const idx = loadFileIndex();
|
|
167
|
-
for (const f of files) idx[f] = pkgName;
|
|
168
|
-
saveFileIndex(idx);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function removeFileIndex(pkgName: string, files: string[]): void {
|
|
172
|
-
const idx = loadFileIndex();
|
|
173
|
-
for (const f of files) delete idx[f];
|
|
174
|
-
saveFileIndex(idx);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export function getFileOwner(filePath: string): string | undefined {
|
|
178
|
-
return loadFileIndex()[filePath];
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export function invalidateFileIndex(): void { _fileIndex = null; }
|
package/src/i18n/en.json
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"syncing_databases": ":: Synchronizing package databases...",
|
|
3
|
-
"starting_upgrade": ":: Starting full system upgrade...",
|
|
4
|
-
"nothing_to_do": " there is nothing to do",
|
|
5
|
-
"repo_already_uptodate": "is up to date",
|
|
6
|
-
"repo_synced_count": "{0} packages synced",
|
|
7
|
-
"repo_sync_failed": "sync failed",
|
|
8
|
-
"warn_repo_zero_packages": "WARNING: {0} returned 0 packages (check pacman.conf architecture setting)",
|
|
9
|
-
"error_no_operation": "error: no operation specified (use -h for help)",
|
|
10
|
-
"error_need_root": "error: you must be root to perform this operation",
|
|
11
|
-
"error_db_not_synced": "error: database not synced (run pacman -Sy)",
|
|
12
|
-
"error_not_found": "error: '{0}' not found",
|
|
13
|
-
"error_not_installed": "error: '{0}' is not installed",
|
|
14
|
-
"error_no_targets": "error: no targets",
|
|
15
|
-
"error_no_search_term": "error: no search term",
|
|
16
|
-
"error_no_pkg_name": "error: no package name",
|
|
17
|
-
"error_no_file": "error: no file",
|
|
18
|
-
"error_unknown_operation": "error: unknown operation '{0}'",
|
|
19
|
-
"error_unknown_option": "error: unknown option '-Q{0}'",
|
|
20
|
-
"error_unknown_operation_short": "error: unknown operation '-{0}'",
|
|
21
|
-
"search_result_line": "{0}/{1} {2}",
|
|
22
|
-
"search_result_desc": " {0}",
|
|
23
|
-
"search_more_results": "... and {0} more",
|
|
24
|
-
"no_pkg_found_matching": "no packages found matching '{0}'",
|
|
25
|
-
"pkg_up_to_date": "{0} is up to date",
|
|
26
|
-
"pkg_downloaded": "'{0}' downloaded",
|
|
27
|
-
"would_install": " would install: {0}",
|
|
28
|
-
"would_remove": " would remove: {0}",
|
|
29
|
-
"packages_single": " Packages (1): {0}",
|
|
30
|
-
"packages_multi": " Packages ({0}): {1}",
|
|
31
|
-
"total_download_size": " Total Download Size: {0}",
|
|
32
|
-
"total_installed_size": " Total Installed Size: {0}",
|
|
33
|
-
"resolving_deps": "resolving dependencies...",
|
|
34
|
-
"checking_conflicts": "looking for conflicting packages...",
|
|
35
|
-
"checking_deps_remove": "checking dependencies...",
|
|
36
|
-
"error_unresolvable_conflicts": "error: unresolvable package conflicts detected",
|
|
37
|
-
"progress_downloading": "({0}/{1}) downloading {2}",
|
|
38
|
-
"progress_checking_integrity": "({0}/{1}) checking package integrity {2} 100%",
|
|
39
|
-
"progress_loading_files": "({0}/{1}) loading package files {2} 100%",
|
|
40
|
-
"progress_installing": "({0}/{1}) installing {2}{3} 100%",
|
|
41
|
-
"progress_removing": "({0}/{1}) removing {2}{3} 100%",
|
|
42
|
-
"pkg_removed": "{0} removed",
|
|
43
|
-
"marked_as_dependency": " {0} marked as dependency",
|
|
44
|
-
"marked_as_explicit": " {0} marked as explicitly installed",
|
|
45
|
-
"cache_cleaned_all": ":: cache cleaned",
|
|
46
|
-
"cache_cleaned_pkg": ":: package cache cleaned",
|
|
47
|
-
"file_db_not_maintained": ":: file database not maintained",
|
|
48
|
-
"version_string": "pacman-debian {0}",
|
|
49
|
-
"help_text": "usage: pacman <operation>[...]\noperations:\n pacman {-S --sync} [options] [package(s)]\n pacman {-R --remove} [options] <package(s)>\n pacman {-Q --query} [options] [package(s)]\n pacman {-D --database} <options> <package(s)>\n pacman {-T --deptest} [package(s)]\n pacman {-F --files} [options] [file(s)]\n pacman {-U --upgrade} <file(s)>\n pacman {-V --version}\n pacman {-h --help}",
|
|
50
|
-
|
|
51
|
-
"warn_failed_dpkg_status": "WARNING: failed to write dpkg status: {0}",
|
|
52
|
-
"warn_not_found_in_repo": "WARNING: {0} not found in repo",
|
|
53
|
-
"warn_arch_mismatch": "warning: system arch {0} not in PKGBUILD arch list, using {1}",
|
|
54
|
-
|
|
55
|
-
"info_name": "Name : {0}",
|
|
56
|
-
"info_version": "Version : {0}",
|
|
57
|
-
"info_description": "Description : {0}",
|
|
58
|
-
"info_repo": "Repository : {0}",
|
|
59
|
-
"info_architecture": "Architecture : {0}",
|
|
60
|
-
"info_url": "URL : {0}",
|
|
61
|
-
"info_depends": "Depends On : {0}",
|
|
62
|
-
"info_download_size": "Download Size : {0}",
|
|
63
|
-
"info_installed_size": "Installed Size : {0}",
|
|
64
|
-
"info_packager": "Packager : {0}",
|
|
65
|
-
"info_files": "Files : {0}",
|
|
66
|
-
"info_install_date": "Install Date : {0}",
|
|
67
|
-
"info_install_reason_explicit": "Install Reason : Explicitly installed (pacman-debian)",
|
|
68
|
-
"info_install_reason_dep": "Install Reason : Installed as a dependency (pacman-debian)",
|
|
69
|
-
"info_install_reason_dpkg": "Install Reason : Installed via dpkg",
|
|
70
|
-
"file_owned_by": "{0} is owned by {1}",
|
|
71
|
-
"error_no_pkg_owns_file": "error: no package owns {0}",
|
|
72
|
-
"error_was_not_found": "error: '{0}' was not found",
|
|
73
|
-
"integrity_ok": "{0}: {1} files, 0 missing",
|
|
74
|
-
"integrity_warning": "{0}: WARNING: {1} files missing",
|
|
75
|
-
"integrity_warning_global": "{0}: WARNING: {1} files missing",
|
|
76
|
-
|
|
77
|
-
"no_pkgs_installed": "no packages installed",
|
|
78
|
-
"prompt_yes": "Y",
|
|
79
|
-
"prompt_no": "n",
|
|
80
|
-
"prompt_yes_default": "[Y/n]",
|
|
81
|
-
"prompt_no_default": "[y/N]",
|
|
82
|
-
|
|
83
|
-
"setup_title": ":: pacman-debian setup",
|
|
84
|
-
"setup_need_root": " This script needs root to create symlinks and config files.",
|
|
85
|
-
"setup_complete": ":: Setup complete",
|
|
86
|
-
"setup_step_1": " 1. Edit /etc/pacman-debian/pacman.conf to add your repositories",
|
|
87
|
-
"setup_step_2": " 2. Run sudo pacman -Sy to sync",
|
|
88
|
-
"setup_step_3": " 3. Run sudo pacman -S <package> to install",
|
|
89
|
-
"setup_step_4": " 4. Run makepkg in a directory with PKGBUILD to build packages",
|
|
90
|
-
"setup_step_5": " 5. For AUR helper support, build and install libalpm (re-run this script)",
|
|
91
|
-
|
|
92
|
-
"makepkg_building": ":: Building package...",
|
|
93
|
-
"makepkg_install_hint": " To install the package, run:",
|
|
94
|
-
"makepkg_install_command": " sudo pacman -U *.pkg.tar.zst",
|
|
95
|
-
"makepkg_downloading_sources": " :: Downloading sources...",
|
|
96
|
-
"makepkg_verifying_checksums": " :: Verifying source file checksums...",
|
|
97
|
-
"makepkg_extracting_sources": " :: Extracting sources...",
|
|
98
|
-
"makepkg_preparing": " :: Preparing...",
|
|
99
|
-
"makepkg_building_step": " :: Building...",
|
|
100
|
-
"makepkg_checking": " :: Checking...",
|
|
101
|
-
"makepkg_packaging": " :: Packaging...",
|
|
102
|
-
"makepkg_created_package": " ==> Created package: {0} ({1})",
|
|
103
|
-
"makepkg_installing_deps": " :: Installing missing dependencies...",
|
|
104
|
-
"error_pkgbuild_not_found": "PKGBUILD not found: {0}",
|
|
105
|
-
"error_pkgbuild_missing_pkgname": "PKGBUILD missing pkgname",
|
|
106
|
-
"error_pkgbuild_missing_pkgver": "PKGBUILD missing pkgver",
|
|
107
|
-
"error_pkgbuild_wrong_arch": "PKGBUILD does not support architecture: {0} ({1})",
|
|
108
|
-
"error_build_failed": "build failed: {0}",
|
|
109
|
-
"error_pkg_already_exists": "{0} already exists (use -f to overwrite)",
|
|
110
|
-
"error_no_files_in_pkgdir": "package() produced no files in $pkgdir",
|
|
111
|
-
"error_sha256_mismatch": "sha256sum mismatch for {0}",
|
|
112
|
-
"error_md5_mismatch": "md5sum mismatch for {0}",
|
|
113
|
-
"error_no_build_function": "PKGBUILD has no build(), prepare(), check(), or package() function"
|
|
114
|
-
}
|
package/src/i18n/index.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import en from './en.json';
|
|
2
|
-
import zh from './zh-CN.json';
|
|
3
|
-
|
|
4
|
-
const locales: Record<string, Record<string, string>> = { en, 'zh-CN': zh };
|
|
5
|
-
|
|
6
|
-
function detectLocale(): string {
|
|
7
|
-
const lang = process.env.LANG || 'en_US.UTF-8';
|
|
8
|
-
const tag = lang.split('.')[0].replace('_', '-');
|
|
9
|
-
if (tag.startsWith('zh')) return 'zh-CN';
|
|
10
|
-
return 'en';
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const _locale = detectLocale();
|
|
14
|
-
const _messages = locales[_locale] || locales.en;
|
|
15
|
-
|
|
16
|
-
export function t(key: string, ...args: (string | number)[]): string {
|
|
17
|
-
let msg = _messages[key];
|
|
18
|
-
if (msg === undefined) {
|
|
19
|
-
msg = locales.en[key] ?? key;
|
|
20
|
-
}
|
|
21
|
-
if (args.length > 0) {
|
|
22
|
-
msg = msg.replace(/\{(\d+)\}/g, (_, idx: string) => {
|
|
23
|
-
const i = parseInt(idx, 10);
|
|
24
|
-
return i < args.length ? String(args[i]) : `{${idx}}`;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return msg;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function getLocale(): string {
|
|
31
|
-
return _locale;
|
|
32
|
-
}
|
package/src/i18n/zh-CN.json
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"syncing_databases": ":: 正在同步软件包数据库...",
|
|
3
|
-
"starting_upgrade": ":: 开始全面系统升级...",
|
|
4
|
-
"nothing_to_do": " 没有可更新的软件包",
|
|
5
|
-
"repo_already_uptodate": "已经是最新版本",
|
|
6
|
-
"repo_synced_count": "{0} 个软件包已同步",
|
|
7
|
-
"repo_sync_failed": "同步失败",
|
|
8
|
-
"warn_repo_zero_packages": "WARNING: {0} 返回 0 个软件包(请检查 pacman.conf 中的架构设置)",
|
|
9
|
-
"error_no_operation": "错误:没有指定操作 (使用 -h 获取帮助)",
|
|
10
|
-
"error_need_root": "错误:需要 root 权限才能执行此操作",
|
|
11
|
-
"error_db_not_synced": "错误:数据库未同步(请运行 sudo pacman -Sy)",
|
|
12
|
-
"error_not_found": "错误:未找到 '{0}'",
|
|
13
|
-
"error_not_installed": "错误:'{0}' 未安装",
|
|
14
|
-
"error_no_targets": "错误:未指定目标",
|
|
15
|
-
"error_no_search_term": "错误:未指定搜索词",
|
|
16
|
-
"error_no_pkg_name": "错误:未指定软件包名称",
|
|
17
|
-
"error_no_file": "错误:未指定文件",
|
|
18
|
-
"error_unknown_operation": "错误:未知操作 '{0}'",
|
|
19
|
-
"error_unknown_option": "错误:未知选项 '-Q{0}'",
|
|
20
|
-
"error_unknown_operation_short": "错误:未知操作 '-{0}'",
|
|
21
|
-
"search_result_line": "{0}/{1} {2}",
|
|
22
|
-
"search_result_desc": " {0}",
|
|
23
|
-
"search_more_results": "... 还有 {0} 个",
|
|
24
|
-
"no_pkg_found_matching": "未找到与 '{0}' 匹配的软件包",
|
|
25
|
-
"pkg_up_to_date": "{0} 已是最新版",
|
|
26
|
-
"pkg_downloaded": "'{0}' 已下载",
|
|
27
|
-
"would_install": " 将要安装:{0}",
|
|
28
|
-
"would_remove": " 将要删除:{0}",
|
|
29
|
-
"packages_single": " 软件包 (1):{0}",
|
|
30
|
-
"packages_multi": " 软件包 ({0}):{1}",
|
|
31
|
-
"total_download_size": " 总下载大小: {0}",
|
|
32
|
-
"total_installed_size": " 总安装大小: {0}",
|
|
33
|
-
"resolving_deps": "正在解析依赖关系...",
|
|
34
|
-
"checking_conflicts": "正在检查软件包冲突...",
|
|
35
|
-
"checking_deps_remove": "正在检查依赖关系...",
|
|
36
|
-
"error_unresolvable_conflicts": "错误:存在无法解决的软件包冲突",
|
|
37
|
-
"progress_downloading": "({0}/{1}) 正在下载 {2}",
|
|
38
|
-
"progress_checking_integrity": "({0}/{1}) 正在检查软件包完整性 {2} 100%",
|
|
39
|
-
"progress_loading_files": "({0}/{1}) 正在加载软件包文件 {2} 100%",
|
|
40
|
-
"progress_installing": "({0}/{1}) 正在安装 {2}{3} 100%",
|
|
41
|
-
"progress_removing": "({0}/{1}) 正在删除 {2}{3} 100%",
|
|
42
|
-
"pkg_removed": "{0} 已删除",
|
|
43
|
-
"marked_as_dependency": " 已将 {0} 标记为依赖",
|
|
44
|
-
"marked_as_explicit": " 已将 {0} 标记为显式安装",
|
|
45
|
-
"cache_cleaned_all": ":: 缓存已清理",
|
|
46
|
-
"cache_cleaned_pkg": ":: 软件包缓存已清理",
|
|
47
|
-
"file_db_not_maintained": ":: 文件数据库未维护",
|
|
48
|
-
"version_string": "pacman-debian {0}",
|
|
49
|
-
"help_text": "用法: pacman <操作>[...]\n操作:\n pacman {-S --sync} [选项] [软件包]\n pacman {-R --remove} [选项] <软件包>\n pacman {-Q --query} [选项] [软件包]\n pacman {-D --database} <选项> <软件包>\n pacman {-T --deptest} [软件包]\n pacman {-F --files} [选项] [文件]\n pacman {-U --upgrade} <文件>\n pacman {-V --version}\n pacman {-h --help}",
|
|
50
|
-
|
|
51
|
-
"warn_failed_dpkg_status": "警告:写入 dpkg 状态失败:{0}",
|
|
52
|
-
"warn_not_found_in_repo": "警告:{0} 在仓库中未找到",
|
|
53
|
-
"warn_arch_mismatch": "警告:系统架构 {0} 不在 PKGBUILD 架构列表中,正在使用 {1}",
|
|
54
|
-
|
|
55
|
-
"info_name": "名称 : {0}",
|
|
56
|
-
"info_version": "版本 : {0}",
|
|
57
|
-
"info_description": "描述 : {0}",
|
|
58
|
-
"info_repo": "仓库 : {0}",
|
|
59
|
-
"info_architecture": "架构 : {0}",
|
|
60
|
-
"info_url": "URL : {0}",
|
|
61
|
-
"info_depends": "依赖 : {0}",
|
|
62
|
-
"info_download_size": "下载大小 : {0}",
|
|
63
|
-
"info_installed_size": "安装大小 : {0}",
|
|
64
|
-
"info_packager": "打包者 : {0}",
|
|
65
|
-
"info_files": "文件 : {0}",
|
|
66
|
-
"info_install_date": "安装日期 : {0}",
|
|
67
|
-
"info_install_reason_explicit": "安装原因 :显式安装(pacman-debian)",
|
|
68
|
-
"info_install_reason_dep": "安装原因 :作为依赖安装(pacman-debian)",
|
|
69
|
-
"info_install_reason_dpkg": "安装原因 :通过 dpkg 安装",
|
|
70
|
-
"file_owned_by": "{0} 属于 {1}",
|
|
71
|
-
"error_no_pkg_owns_file": "错误:没有软件包拥有 {0}",
|
|
72
|
-
"error_was_not_found": "错误:未找到 '{0}'",
|
|
73
|
-
"integrity_ok": "{0}:{1} 个文件,0 个缺失",
|
|
74
|
-
"integrity_warning": "{0}:警告:{1} 个文件缺失",
|
|
75
|
-
"integrity_warning_global": "{0}:警告:{1} 个文件缺失",
|
|
76
|
-
|
|
77
|
-
"no_pkgs_installed": "没有已安装的软件包",
|
|
78
|
-
"prompt_yes": "是",
|
|
79
|
-
"prompt_no": "否",
|
|
80
|
-
"prompt_yes_default": "[Y/n]",
|
|
81
|
-
"prompt_no_default": "[y/N]",
|
|
82
|
-
|
|
83
|
-
"setup_title": ":: pacman-debian 安装",
|
|
84
|
-
"setup_need_root": " 此脚本需要 root 权限来创建符号链接和配置文件。",
|
|
85
|
-
"setup_complete": ":: 安装完成",
|
|
86
|
-
"setup_step_1": " 1. 编辑 /etc/pacman-debian/pacman.conf 添加你的仓库",
|
|
87
|
-
"setup_step_2": " 2. 运行 sudo pacman -Sy 同步",
|
|
88
|
-
"setup_step_3": " 3. 运行 sudo pacman -S <软件包> 安装",
|
|
89
|
-
"setup_step_4": " 4. 在包含 PKGBUILD 的目录中运行 makepkg 构建软件包",
|
|
90
|
-
"setup_step_5": " 5. 如需 AUR 助手支持,构建并安装 libalpm(重新运行此脚本)",
|
|
91
|
-
|
|
92
|
-
"makepkg_building": ":: 正在构建软件包...",
|
|
93
|
-
"makepkg_install_hint": " 要安装软件包,请运行:",
|
|
94
|
-
"makepkg_install_command": " sudo pacman -U *.pkg.tar.zst",
|
|
95
|
-
"makepkg_downloading_sources": " :: 正在下载源码...",
|
|
96
|
-
"makepkg_verifying_checksums": " :: 正在验证源文件校验和...",
|
|
97
|
-
"makepkg_extracting_sources": " :: 正在解压源码...",
|
|
98
|
-
"makepkg_preparing": " :: 正在准备...",
|
|
99
|
-
"makepkg_building_step": " :: 正在构建...",
|
|
100
|
-
"makepkg_checking": " :: 正在检查...",
|
|
101
|
-
"makepkg_packaging": " :: 正在打包...",
|
|
102
|
-
"makepkg_created_package": " ==> 创建软件包:{0}({1})",
|
|
103
|
-
"makepkg_installing_deps": " :: 正在安装缺失的依赖...",
|
|
104
|
-
"error_pkgbuild_not_found": "找不到 PKGBUILD:{0}",
|
|
105
|
-
"error_pkgbuild_missing_pkgname": "PKGBUILD 缺少 pkgname",
|
|
106
|
-
"error_pkgbuild_missing_pkgver": "PKGBUILD 缺少 pkgver",
|
|
107
|
-
"error_pkgbuild_wrong_arch": "PKGBUILD 不支持当前架构:{0}({1})",
|
|
108
|
-
"error_build_failed": "构建失败:{0}",
|
|
109
|
-
"error_pkg_already_exists": "{0} 已存在(使用 -f 覆盖)",
|
|
110
|
-
"error_no_files_in_pkgdir": "package() 未在 $pkgdir 中产生任何文件",
|
|
111
|
-
"error_sha256_mismatch": "{0} 的 sha256sum 校验和不匹配",
|
|
112
|
-
"error_md5_mismatch": "{0} 的 md5sum 校验和不匹配",
|
|
113
|
-
"error_no_build_function": "PKGBUILD 中没有 build()、prepare()、check() 或 package() 函数"
|
|
114
|
-
}
|