forked from mirrors/pacman
Compare commits
459 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92630c6607 | ||
|
|
656b470163 | ||
|
|
9ae6ee0f09 | ||
|
|
36c570712a | ||
|
|
36df611203 | ||
|
|
21f16fa7ab | ||
|
|
f2023176f6 | ||
|
|
0b6aa428cf | ||
|
|
79f8cfb529 | ||
|
|
d68635e7c2 | ||
|
|
b12be99c89 | ||
|
|
09ce8b446c | ||
|
|
07538b948a | ||
|
|
aafb387455 | ||
|
|
23451e7fa4 | ||
|
|
dcd234ea27 | ||
|
|
1a524fa8b8 | ||
|
|
f45369800a | ||
|
|
5ea4706f57 | ||
|
|
1eccae3d93 | ||
|
|
2d25993d2d | ||
|
|
acd9269478 | ||
|
|
e8f799ba83 | ||
|
|
3149a45bfb | ||
|
|
1fcc496756 | ||
|
|
eefe8c8364 | ||
|
|
ab49bf6fa9 | ||
|
|
2f96764058 | ||
|
|
d4d304cdb7 | ||
|
|
7c14e48776 | ||
|
|
6735807c0f | ||
|
|
cfa7602032 | ||
|
|
00c393d49f | ||
|
|
d1cc1ef6c3 | ||
|
|
62a2e45b12 | ||
|
|
30f338cce6 | ||
|
|
3afe3b6dfb | ||
|
|
1358a4a80f | ||
|
|
0eac60cd9d | ||
|
|
06cbb516c3 | ||
|
|
56721c12ce | ||
|
|
62fc966882 | ||
|
|
942bb9e64a | ||
|
|
da3b934602 | ||
|
|
be9a60a338 | ||
|
|
bb071f4eb2 | ||
|
|
3cf870eda5 | ||
|
|
3865352d23 | ||
|
|
30bb969ace | ||
|
|
e17c4fe611 | ||
|
|
15e143bdfb | ||
|
|
fafa909a2d | ||
|
|
7664a58d4e | ||
|
|
e34fc4eddf | ||
|
|
c12ccbfb2c | ||
|
|
7467fb9e76 | ||
|
|
6b0d4674bb | ||
|
|
1f145bcd1a | ||
|
|
14fd1e63a2 | ||
|
|
09e582b411 | ||
|
|
01c3c7e4f2 | ||
|
|
11e5e86151 | ||
|
|
9320786349 | ||
|
|
c9820ec97b | ||
|
|
d843c86b7b | ||
|
|
021085624e | ||
|
|
ce54715112 | ||
|
|
f8fdce6cb0 | ||
|
|
5dae577a87 | ||
|
|
e17b0446bd | ||
|
|
f892775366 | ||
|
|
35a8cf134b | ||
|
|
d8c4b12c66 | ||
|
|
332dd86912 | ||
|
|
3444146b48 | ||
|
|
87240dae6d | ||
|
|
111e07d0be | ||
|
|
b6ec9019d7 | ||
|
|
b8d01dace8 | ||
|
|
09f9f24331 | ||
|
|
986edb8bd4 | ||
|
|
d6a9436143 | ||
|
|
2d5ec02d7c | ||
|
|
ed1aef7bc5 | ||
|
|
2e1b5c96a6 | ||
|
|
e263cf7231 | ||
|
|
05f2abfba9 | ||
|
|
2dd53e50de | ||
|
|
00fec5e250 | ||
|
|
2a90dbe3a8 | ||
|
|
eed7ba92e8 | ||
|
|
4a72c0964a | ||
|
|
953e0d48d7 | ||
|
|
f2fcf7eeb1 | ||
|
|
1767a569c6 | ||
|
|
fb7e1b4b9b | ||
|
|
b8590ed634 | ||
|
|
4097c98c1e | ||
|
|
ba97a22ce1 | ||
|
|
ce089e1b97 | ||
|
|
ef86da97f5 | ||
|
|
9b876fff09 | ||
|
|
272f7cf25e | ||
|
|
f95080884c | ||
|
|
7f93f0620c | ||
|
|
fe76c353af | ||
|
|
0f24390fe8 | ||
|
|
d6a997ee38 | ||
|
|
27e8f06e03 | ||
|
|
4d291508c2 | ||
|
|
d16a5ae7dd | ||
|
|
6e71922e6c | ||
|
|
a99e7272b8 | ||
|
|
b3d71bf7d0 | ||
|
|
cda7d7847f | ||
|
|
c91bd3dda9 | ||
|
|
61864e1f6f | ||
|
|
32727efc38 | ||
|
|
5699f2c94c | ||
|
|
2a3b5e40bc | ||
|
|
8f711a7181 | ||
|
|
ff96649eeb | ||
|
|
d94346ede2 | ||
|
|
946f4af7f3 | ||
|
|
2c6be06bba | ||
|
|
505ad87e67 | ||
|
|
0de314205f | ||
|
|
36ea02cc48 | ||
|
|
c4332c8091 | ||
|
|
a97e28205a | ||
|
|
51175f31c4 | ||
|
|
e277e838d7 | ||
|
|
b947db040c | ||
|
|
859bdb5b1d | ||
|
|
01403f423a | ||
|
|
b8ab96a270 | ||
|
|
bf46e04614 | ||
|
|
5c46ba14f7 | ||
|
|
e068b58507 | ||
|
|
50f446886b | ||
|
|
76735e6519 | ||
|
|
85d0111da8 | ||
|
|
3863e48788 | ||
|
|
c86ff120c8 | ||
|
|
01c8f39ab8 | ||
|
|
aff3e63c45 | ||
|
|
b40c8e2922 | ||
|
|
c49f198042 | ||
|
|
f65edb7f29 | ||
|
|
a88cb03a58 | ||
|
|
665528d7ba | ||
|
|
5615b71688 | ||
|
|
30f53cfe8d | ||
|
|
cae2bdafec | ||
|
|
8e30a46adb | ||
|
|
9e8af82c97 | ||
|
|
dd26592155 | ||
|
|
57c5afd69c | ||
|
|
0284cf2128 | ||
|
|
33240e87b9 | ||
|
|
25fab402c7 | ||
|
|
6942bba75d | ||
|
|
55bff19b76 | ||
|
|
fe6e90c21f | ||
|
|
9a82cb92a4 | ||
|
|
d0c327df17 | ||
|
|
eda4d9ec00 | ||
|
|
b04a56dbe9 | ||
|
|
0d4dd09993 | ||
|
|
7ce90bb135 | ||
|
|
a9cbd15260 | ||
|
|
3e1bdfa93c | ||
|
|
5f140a62de | ||
|
|
842cbc9ea4 | ||
|
|
d03b57f459 | ||
|
|
281a4c0a4f | ||
|
|
62f5da3779 | ||
|
|
f966f3a834 | ||
|
|
4bc6ed56aa | ||
|
|
d288240426 | ||
|
|
04dc87e012 | ||
|
|
26652768d6 | ||
|
|
46eda12c1b | ||
|
|
e57c3efeaa | ||
|
|
c41edf49be | ||
|
|
08d885fda5 | ||
|
|
351250adb4 | ||
|
|
6ddc115c7f | ||
|
|
df360b791d | ||
|
|
58ee249c86 | ||
|
|
cb7ba4e4e5 | ||
|
|
e0d327462c | ||
|
|
619c165d36 | ||
|
|
2052f29cdb | ||
|
|
0c29eb431a | ||
|
|
d227771464 | ||
|
|
81dd9d3ebc | ||
|
|
fcc09bd7e3 | ||
|
|
c002567d96 | ||
|
|
bd98b93a6e | ||
|
|
eb93955477 | ||
|
|
a7972625e3 | ||
|
|
a58083459b | ||
|
|
735a197fc2 | ||
|
|
34a78d935a | ||
|
|
e3c19569cf | ||
|
|
fbcc427754 | ||
|
|
f2dff08600 | ||
|
|
126f50ab0b | ||
|
|
c78a808c49 | ||
|
|
a611879318 | ||
|
|
5776090055 | ||
|
|
8ac7f7e6e5 | ||
|
|
45146dccbb | ||
|
|
ab9c0814d2 | ||
|
|
6605637b53 | ||
|
|
c7d332a26a | ||
|
|
919bb6c9e0 | ||
|
|
c2a73ba989 | ||
|
|
dbf59a6b14 | ||
|
|
d1d163c5a3 | ||
|
|
ba45cb4590 | ||
|
|
c5f6995aeb | ||
|
|
a5e43b1605 | ||
|
|
580fe21065 | ||
|
|
c00e05992e | ||
|
|
94d3d665f0 | ||
|
|
5f36523af9 | ||
|
|
8f18798d10 | ||
|
|
ed367fe96d | ||
|
|
1ff8118212 | ||
|
|
13a2847aa1 | ||
|
|
d98bacd4ec | ||
|
|
8f3b485517 | ||
|
|
21833d90e2 | ||
|
|
209d0643e5 | ||
|
|
b276a76dc9 | ||
|
|
3030542d10 | ||
|
|
9f96c5433a | ||
|
|
ef977865a1 | ||
|
|
b7015af0fc | ||
|
|
ec136784d4 | ||
|
|
24684a616e | ||
|
|
e22aa23c8f | ||
|
|
3f0d98c124 | ||
|
|
e527699ddd | ||
|
|
695656d252 | ||
|
|
f4e9deb6d7 | ||
|
|
adb10c3ab2 | ||
|
|
f0051a7678 | ||
|
|
fc74ef93b6 | ||
|
|
8e9a69e8f6 | ||
|
|
a44c7b8956 | ||
|
|
889c260cbf | ||
|
|
579533d1a0 | ||
|
|
330951200c | ||
|
|
970ffbb4c7 | ||
|
|
d4bab6f8fc | ||
|
|
622e7fdd4f | ||
|
|
65a96e900d | ||
|
|
6b928fc0bf | ||
|
|
7c06e66c24 | ||
|
|
abefa23341 | ||
|
|
3a9dec1048 | ||
|
|
c78f5fb99a | ||
|
|
d0d8f605d5 | ||
|
|
d5a7dc67d9 | ||
|
|
8791ae0fda | ||
|
|
a03daad073 | ||
|
|
c2cce1f46a | ||
|
|
0e39cf9275 | ||
|
|
a35610beba | ||
|
|
5c8083baa4 | ||
|
|
eedf4f4e63 | ||
|
|
bd08581d2e | ||
|
|
4fb3cfc48f | ||
|
|
a91250b7bb | ||
|
|
a08638edc8 | ||
|
|
592211b6dc | ||
|
|
d901646f7a | ||
|
|
0f3957ab48 | ||
|
|
ce96f39ac9 | ||
|
|
8f2eaa51c2 | ||
|
|
9d0b33fd33 | ||
|
|
30734c9a4a | ||
|
|
a2d7f6f206 | ||
|
|
7237903c66 | ||
|
|
f5059038f2 | ||
|
|
de5f438aef | ||
|
|
73886504d7 | ||
|
|
93718046d7 | ||
|
|
0d5fa576b3 | ||
|
|
8aa7ed5a7e | ||
|
|
6f37ba61ed | ||
|
|
42893e7165 | ||
|
|
feb9889f22 | ||
|
|
ef32aa0219 | ||
|
|
68b50c81c7 | ||
|
|
24d77291da | ||
|
|
5b17d8f27d | ||
|
|
fbcadebcab | ||
|
|
d39248120e | ||
|
|
e464339e3b | ||
|
|
448f78c067 | ||
|
|
5717c7d508 | ||
|
|
149ab6b272 | ||
|
|
4a8e396a58 | ||
|
|
5e61f07735 | ||
|
|
fc32faaa6a | ||
|
|
5b2de3d8ec | ||
|
|
6eedf06fcc | ||
|
|
96e277cfd9 | ||
|
|
0909a72000 | ||
|
|
c56b576f6f | ||
|
|
efbae3cfcb | ||
|
|
522ef5e981 | ||
|
|
b9a531c2d7 | ||
|
|
6cebd4e602 | ||
|
|
d1126db128 | ||
|
|
49176461a6 | ||
|
|
a7dc3875f1 | ||
|
|
5fcb005ebd | ||
|
|
827258f32e | ||
|
|
0ff2a91497 | ||
|
|
05f0a28932 | ||
|
|
bce3c8efc7 | ||
|
|
7d93777231 | ||
|
|
c9179b09db | ||
|
|
3a06a9fa9f | ||
|
|
53b41afbe8 | ||
|
|
fb79d58109 | ||
|
|
46ffd342a4 | ||
|
|
fa933df65b | ||
|
|
67068b64b9 | ||
|
|
73442a7e03 | ||
|
|
1e0e5b2a02 | ||
|
|
dff73a2a69 | ||
|
|
bef19a266b | ||
|
|
283ef6519a | ||
|
|
302188b169 | ||
|
|
c0f58ea9a2 | ||
|
|
960c2cdcf7 | ||
|
|
f2296aab89 | ||
|
|
022ec3dbb7 | ||
|
|
821ff061b1 | ||
|
|
f7895cc188 | ||
|
|
dff06a8170 | ||
|
|
900605912b | ||
|
|
28c662e7a4 | ||
|
|
879fed5098 | ||
|
|
f489e969f0 | ||
|
|
413508c6fa | ||
|
|
af31fd6494 | ||
|
|
541f183cd6 | ||
|
|
d2ff8f4b96 | ||
|
|
fd38319106 | ||
|
|
d201d1f312 | ||
|
|
c2993197ea | ||
|
|
79541193f7 | ||
|
|
e29dde9157 | ||
|
|
31aed1243e | ||
|
|
e344fab3b1 | ||
|
|
fe788ee4a6 | ||
|
|
6d41da4086 | ||
|
|
df15a8c432 | ||
|
|
881bf5c90f | ||
|
|
3739e2c10c | ||
|
|
3e7b90ff69 | ||
|
|
eba521913d | ||
|
|
24d8a15308 | ||
|
|
1cbc3c5c90 | ||
|
|
4e3bd7c137 | ||
|
|
5a25f54757 | ||
|
|
9d3a8efb7b | ||
|
|
a7c4159b16 | ||
|
|
54b63de098 | ||
|
|
38a60f49bd | ||
|
|
693ebbd16b | ||
|
|
0223a028e0 | ||
|
|
d14a98db25 | ||
|
|
a8dcfeccfc | ||
|
|
90c45f7bbe | ||
|
|
9fbf5d9336 | ||
|
|
8d88f0c897 | ||
|
|
a28868eeae | ||
|
|
08e1d4764c | ||
|
|
f04530eb61 | ||
|
|
68d8bfa0b5 | ||
|
|
3de32a0812 | ||
|
|
f27fed14b1 | ||
|
|
298cbf2cb1 | ||
|
|
48589ccc64 | ||
|
|
d896527d21 | ||
|
|
71660f55b2 | ||
|
|
4a487346c5 | ||
|
|
0478dfa1a5 | ||
|
|
ce3f4e7800 | ||
|
|
281bc72534 | ||
|
|
5908992e47 | ||
|
|
c3f5375380 | ||
|
|
b02bda75f1 | ||
|
|
8155571183 | ||
|
|
e7d5803f07 | ||
|
|
ddc4130c97 | ||
|
|
0d6efb35ce | ||
|
|
52118bf0f0 | ||
|
|
ff689b6a38 | ||
|
|
fa4f25626c | ||
|
|
f8d7cd6b26 | ||
|
|
e702f56ea6 | ||
|
|
7f5c486666 | ||
|
|
a835599496 | ||
|
|
68dcabdfbe | ||
|
|
60de8ec932 | ||
|
|
686b8c1463 | ||
|
|
1a9db4cac7 | ||
|
|
9ebb596805 | ||
|
|
fcb4f0264f | ||
|
|
3d8be4291c | ||
|
|
622326bb37 | ||
|
|
68dff73463 | ||
|
|
5a3aae02fe | ||
|
|
41724cbcde | ||
|
|
96a1255ead | ||
|
|
c11bf581a3 | ||
|
|
081e6a8360 | ||
|
|
0ea52e3a4f | ||
|
|
8b23aa172f | ||
|
|
d7c98d4e45 | ||
|
|
21d5dedfdd | ||
|
|
630e7508ee | ||
|
|
71330a4310 | ||
|
|
c6a94a8d22 | ||
|
|
6f4f9c1b66 | ||
|
|
07a9effdd0 | ||
|
|
708f186f98 | ||
|
|
226c137245 | ||
|
|
2222e9f8df | ||
|
|
67d71ea932 | ||
|
|
c2cf6a14cf | ||
|
|
6c00ca8f23 | ||
|
|
59c47aaf52 | ||
|
|
d7dccd5419 | ||
|
|
3e4d2c3aa6 | ||
|
|
f5f107674b | ||
|
|
1b93a116e7 | ||
|
|
70418e48f6 | ||
|
|
c7a37d039b | ||
|
|
cd042640c6 | ||
|
|
13748ca052 | ||
|
|
34229c5625 | ||
|
|
7fc50d7950 | ||
|
|
dc817a2061 | ||
|
|
09aae4b7a5 | ||
|
|
c71fe7db42 | ||
|
|
0e96532096 | ||
|
|
f258ffab25 | ||
|
|
95145d4c52 | ||
|
|
3c8816f74b |
27
.gitignore
vendored
27
.gitignore
vendored
@@ -1,30 +1,21 @@
|
|||||||
Makefile
|
*~
|
||||||
Makefile.in
|
*.o
|
||||||
mkinstalldirs
|
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
config.guess
|
|
||||||
config.h
|
config.h
|
||||||
config.h.in
|
config.h.in
|
||||||
config.log
|
config.log
|
||||||
config.status
|
config.status
|
||||||
config.status.lineno
|
config.status.lineno
|
||||||
config.rpath
|
|
||||||
config.sub
|
|
||||||
configure
|
configure
|
||||||
configure.lineno
|
configure.lineno
|
||||||
depcomp
|
|
||||||
install-sh
|
|
||||||
libtool
|
|
||||||
ltmain.sh
|
|
||||||
missing
|
|
||||||
stamp-h1
|
|
||||||
|
|
||||||
*.o
|
|
||||||
*~
|
|
||||||
root
|
|
||||||
tags
|
|
||||||
cscope.out
|
|
||||||
cscope.in.out
|
cscope.in.out
|
||||||
|
cscope.out
|
||||||
cscope.po.out
|
cscope.po.out
|
||||||
|
libtool
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
pacman-*.tar.gz
|
pacman-*.tar.gz
|
||||||
|
root
|
||||||
|
stamp-h1
|
||||||
|
tags
|
||||||
|
|||||||
13
.tx/config
Normal file
13
.tx/config
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[main]
|
||||||
|
host = https://www.transifex.net
|
||||||
|
|
||||||
|
[archlinux-pacman.libalpm-pot]
|
||||||
|
file_filter = lib/libalpm/po/<lang>.po
|
||||||
|
source_file = lib/libalpm/po/libalpm.pot
|
||||||
|
source_lang = en
|
||||||
|
|
||||||
|
[archlinux-pacman.pacman-pot]
|
||||||
|
file_filter = po/<lang>.po
|
||||||
|
source_file = po/pacman.pot
|
||||||
|
source_lang = en
|
||||||
|
|
||||||
36
HACKING
36
HACKING
@@ -12,10 +12,10 @@ Coding style
|
|||||||
1. All code should be indented with tabs. (Ignore the use of only spaces in
|
1. All code should be indented with tabs. (Ignore the use of only spaces in
|
||||||
this file) By default, source files contain the following VIM modeline:
|
this file) By default, source files contain the following VIM modeline:
|
||||||
+
|
+
|
||||||
[code,C]
|
[source,C]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
|
|
||||||
2. When opening new blocks such as 'while', 'if', or 'for', leave the opening
|
2. When opening new blocks such as 'while', 'if', or 'for', leave the opening
|
||||||
brace on the same line as the beginning of the codeblock. The closing brace
|
brace on the same line as the beginning of the codeblock. The closing brace
|
||||||
@@ -24,8 +24,8 @@ Coding style
|
|||||||
braces, even if it's just a one-line block. This reduces future error when
|
braces, even if it's just a one-line block. This reduces future error when
|
||||||
blocks are expanded beyond one line.
|
blocks are expanded beyond one line.
|
||||||
+
|
+
|
||||||
[code,C]
|
[source,C]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
for(lp = list; lp; lp = lp->next) {
|
for(lp = list; lp; lp = lp->next) {
|
||||||
newlist = _alpm_list_add(newlist, strdup(lp->data));
|
newlist = _alpm_list_add(newlist, strdup(lp->data));
|
||||||
}
|
}
|
||||||
@@ -40,14 +40,14 @@ while(it) {
|
|||||||
free(it);
|
free(it);
|
||||||
it = ptr;
|
it = ptr;
|
||||||
}
|
}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
|
|
||||||
3. When declaring a new function, put the opening and closing braces on their
|
3. When declaring a new function, put the opening and closing braces on their
|
||||||
own line. Also, when declaring a pointer, do not put a space between the
|
own line. Also, when declaring a pointer, do not put a space between the
|
||||||
asterisk and the variable name.
|
asterisk and the variable name.
|
||||||
+
|
+
|
||||||
[code,C]
|
[source,C]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
alpm_list_t *alpm_list_add(alpm_list_t *list, void *data)
|
alpm_list_t *alpm_list_add(alpm_list_t *list, void *data)
|
||||||
{
|
{
|
||||||
alpm_list_t *ptr, *lp;
|
alpm_list_t *ptr, *lp;
|
||||||
@@ -58,7 +58,7 @@ alpm_list_t *alpm_list_add(alpm_list_t *list, void *data)
|
|||||||
}
|
}
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
|
|
||||||
4. Comments should be ANSI-C89 compliant. That means no `// Comment` style;
|
4. Comments should be ANSI-C89 compliant. That means no `// Comment` style;
|
||||||
use only `/* Comment */` style.
|
use only `/* Comment */` style.
|
||||||
@@ -101,37 +101,37 @@ Currently our #include usage is in messy shape, but this is no reason to
|
|||||||
continue down this messy path. When adding an include to a file, follow this
|
continue down this messy path. When adding an include to a file, follow this
|
||||||
general pattern, including blank lines:
|
general pattern, including blank lines:
|
||||||
|
|
||||||
[code,C]
|
[source,C]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <standardheader.h>
|
#include <standardheader.h>
|
||||||
#include <another.h>
|
#include <another.h>
|
||||||
#include <...>
|
#include <...>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
|
|
||||||
Follow this with some more headers, depending on whether the file is in libalpm
|
Follow this with some more headers, depending on whether the file is in libalpm
|
||||||
or pacman proper. For libalpm:
|
or pacman proper. For libalpm:
|
||||||
|
|
||||||
[code,C]
|
[source,C]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
/* libalpm */
|
/* libalpm */
|
||||||
#include "yourfile.h"
|
#include "yourfile.h"
|
||||||
#include "alpm_list.h"
|
#include "alpm_list.h"
|
||||||
#include "anythingelse.h"
|
#include "anythingelse.h"
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
|
|
||||||
For pacman:
|
For pacman:
|
||||||
|
|
||||||
[code,C]
|
[source,C]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
#include <alpm.h>
|
#include <alpm.h>
|
||||||
#include <alpm_list.h>
|
#include <alpm_list.h>
|
||||||
|
|
||||||
/* pacman */
|
/* pacman */
|
||||||
#include "yourfile.h"
|
#include "yourfile.h"
|
||||||
#include "anythingelse.h"
|
#include "anythingelse.h"
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------
|
||||||
|
|
||||||
GDB and Valgrind Usage
|
GDB and Valgrind Usage
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ if WANT_DOC
|
|||||||
SUBDIRS += doc
|
SUBDIRS += doc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I m4 --install
|
||||||
|
|
||||||
# Make sure we test and build manpages when doing distcheck
|
# Make sure we test and build manpages when doing distcheck
|
||||||
DISTCHECK_CONFIGURE_FLAGS = --enable-doc --disable-git-version
|
DISTCHECK_CONFIGURE_FLAGS = --enable-doc --disable-git-version
|
||||||
|
|
||||||
|
|||||||
69
NEWS
69
NEWS
@@ -1,5 +1,74 @@
|
|||||||
VERSION DESCRIPTION
|
VERSION DESCRIPTION
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
3.5.0 - sync DBs read directly from the database tarball
|
||||||
|
(FS#8586, FS#20233)
|
||||||
|
- local DB "depends" file has been merged into the "desc" file
|
||||||
|
- pacman-db-upgrade script provided to update the local
|
||||||
|
database format
|
||||||
|
- sync database extension is .db (without compression suffix)
|
||||||
|
- requires repo-add from pacman-3.4+
|
||||||
|
- package versions can have an 'epoch' value defined that will
|
||||||
|
overrule any version comparison
|
||||||
|
- this replaces the use of the "force" option in allowing for
|
||||||
|
package updates with versions that do not conform to the
|
||||||
|
default version comparison operations
|
||||||
|
- package versions have the format [epoch:]pkgver-pkgrel
|
||||||
|
- check available disk space before installing packages (FS#11639)
|
||||||
|
- enabled by the "CheckSpace" option in pacman.conf
|
||||||
|
- attempt to stop install if we hit an extraction issue
|
||||||
|
(FS#7692, FS#22034)
|
||||||
|
- improved interactive selection for groups/provides
|
||||||
|
(FS#19704, FS#19853)
|
||||||
|
- finer grained control of ignoring dependency resolution
|
||||||
|
- -Sd to ignore dependency versions only
|
||||||
|
- -Sdd to ignore all dependency information
|
||||||
|
- clean-up of --help output (FS#19526)
|
||||||
|
- CleanMethod for package cache cleaning can use both
|
||||||
|
KeepInstalled and KeepCurrent simultaneously
|
||||||
|
- various speed-ups:
|
||||||
|
- improved internal storage of the package cache
|
||||||
|
- faster pkgname/depends searches
|
||||||
|
- use OpenSSL crypto functions if available
|
||||||
|
- makepkg:
|
||||||
|
- add support for running testsuites in a check() function
|
||||||
|
(FS#15145)
|
||||||
|
- controlled by BUILDENV option 'check' in makepkg.conf
|
||||||
|
which may be overridden by --check/--nocheck on the
|
||||||
|
command-line
|
||||||
|
- extract any file bsdtar recognizes
|
||||||
|
- STRIP_DIRS has been removed in favor of stripping all
|
||||||
|
recognized files
|
||||||
|
- improve $srcdir/$pkgdir check to reduce false positives
|
||||||
|
- $pkgname can be used in split package() functions (FS#22174)
|
||||||
|
- added '!buildflags' option to allow unsetting of CFLAGS,
|
||||||
|
CXXFLAGS and LDFLAGS
|
||||||
|
- repo-add: added -f/--files to create files database (FS#11302)
|
||||||
|
- pactree: rewritten in C using libalpm
|
||||||
|
3.4.3 - fix attempted double remove of all files issue during upgrades
|
||||||
|
- respect IgnorePkg/IgnoreGroup for group members (FS#19854)
|
||||||
|
- back out epoch changes; 3.5.X will handle them differently
|
||||||
|
3.4.2 - fix progress bar display with empty packages
|
||||||
|
- make pactest testsuite Python 2.7 compatible
|
||||||
|
- write epoch values in preparation for 3.5.X releases
|
||||||
|
- fix null pointer dereference in architecture check (FS#21668)
|
||||||
|
- documentation: remove unnecessary "|| return 1"
|
||||||
|
- contrib/bacman: update package compression selection
|
||||||
|
- contrib/PKGBUILD.vim: add a few more license options
|
||||||
|
- translations: es, kk, sv, pt, ru updated
|
||||||
|
3.4.1 - fix interaction of --needed and multiple repo groups (FS#20221)
|
||||||
|
- bash completion: small fixes to prevent alias problems
|
||||||
|
- rankmirrors: fix bogus/empty variable assignment (FS#19911)
|
||||||
|
- repo-add: ensure bare DB symlinks are relative (FS#20498)
|
||||||
|
- repo-add: fallback to copy if symlink not permitted (FS#19907)
|
||||||
|
- makepkg:
|
||||||
|
- use absolute path to 'du' to exclude wrapper progs (FS#19932)
|
||||||
|
- ensure $startdir check doesn't stall indefinitely (FS#19975)
|
||||||
|
- fix repackaging with multiple passed packages (FS#20272)
|
||||||
|
- translations:
|
||||||
|
- zh_CN: fix crash when using during install (FS#20188)
|
||||||
|
- sk: new Slovak translation
|
||||||
|
- pt: new European Portuguese translation
|
||||||
|
- other small updates to various translations
|
||||||
3.4.0 - new "Architecture" option that will restrict pacman to
|
3.4.0 - new "Architecture" option that will restrict pacman to
|
||||||
installing only packages from the given architecture. Can be
|
installing only packages from the given architecture. Can be
|
||||||
set to "auto" in which case the output of "uname -m" is used
|
set to "auto" in which case the output of "uname -m" is used
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ pkgname=('pkg1' 'pkg2')
|
|||||||
pkgbase=BASE
|
pkgbase=BASE
|
||||||
pkgver=VERSION
|
pkgver=VERSION
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
|
epoch=
|
||||||
pkgdesc=""
|
pkgdesc=""
|
||||||
arch=()
|
arch=()
|
||||||
url=""
|
url=""
|
||||||
@@ -15,6 +16,7 @@ license=('GPL')
|
|||||||
groups=()
|
groups=()
|
||||||
depends=()
|
depends=()
|
||||||
makedepends=()
|
makedepends=()
|
||||||
|
checkdepends=()
|
||||||
provides=()
|
provides=()
|
||||||
conflicts=()
|
conflicts=()
|
||||||
replaces=()
|
replaces=()
|
||||||
@@ -32,6 +34,11 @@ build() {
|
|||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
make -k check
|
||||||
|
}
|
||||||
|
|
||||||
package_pkg1() {
|
package_pkg1() {
|
||||||
# options and directives that can be overridden
|
# options and directives that can be overridden
|
||||||
pkgver=
|
pkgver=
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
pkgname=NAME
|
pkgname=NAME
|
||||||
pkgver=VERSION
|
pkgver=VERSION
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
|
epoch=
|
||||||
pkgdesc=""
|
pkgdesc=""
|
||||||
arch=()
|
arch=()
|
||||||
url=""
|
url=""
|
||||||
@@ -14,6 +15,7 @@ license=('GPL')
|
|||||||
groups=()
|
groups=()
|
||||||
depends=()
|
depends=()
|
||||||
makedepends=()
|
makedepends=()
|
||||||
|
checkdepends=()
|
||||||
optdepends=()
|
optdepends=()
|
||||||
provides=()
|
provides=()
|
||||||
conflicts=()
|
conflicts=()
|
||||||
@@ -28,14 +30,17 @@ md5sums=() #generate with 'makepkg -g'
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$pkgname-$pkgver"
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
make -k check
|
||||||
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir/$pkgname-$pkgver"
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
|
||||||
make DESTDIR="$pkgdir/" install
|
make DESTDIR="$pkgdir/" install
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
37
README
37
README
@@ -328,3 +328,40 @@ API CHANGES BETWEEN 3.3 AND 3.4
|
|||||||
- alpm_pkg_unused_deltas()
|
- alpm_pkg_unused_deltas()
|
||||||
- alpm_conflict_get_reason()
|
- alpm_conflict_get_reason()
|
||||||
- error code: PM_ERR_PKG_INVALID_ARCH
|
- error code: PM_ERR_PKG_INVALID_ARCH
|
||||||
|
|
||||||
|
|
||||||
|
API CHANGES BETWEEN 3.4 AND 3.5
|
||||||
|
===============================
|
||||||
|
|
||||||
|
[REMOVED]
|
||||||
|
- alpm_db_register_local()
|
||||||
|
- alpm_pkg_has_force()
|
||||||
|
- alpm_depcmp()
|
||||||
|
|
||||||
|
[CHANGED]
|
||||||
|
- alpm_trans_cb_progress type had some types changed from int to size_t
|
||||||
|
- alpm_cb_log format string is now const char *
|
||||||
|
- the interface to add/remove targets:
|
||||||
|
- functions take pmpkg_t * rather than char *.
|
||||||
|
- alpm_sync_target() and alpm_sync_dbtarget() are replaced by alpm_add_pkg()
|
||||||
|
- alpm_add_target() is replaced by alpm_add_pkg()
|
||||||
|
- alpm_remove_target() is replaced by alpm_remove_pkg()
|
||||||
|
- packages can come from:
|
||||||
|
- alpm_db_get_pkg() for normal targets
|
||||||
|
- alpm_find_dbs_satisfier() for versioned provisions
|
||||||
|
- alpm_find_grp_pkgs() for groups
|
||||||
|
- alpm_deptest() is replaced by the more flexibile alpm_find_satisfier()
|
||||||
|
- size_t used for alpm_list_t sizes
|
||||||
|
- return type for alpm_list_count()
|
||||||
|
- parameter type in alpm_list_msort() and alpm_list_nth()
|
||||||
|
|
||||||
|
[ADDED]
|
||||||
|
- alpm_option_get_checkspace(), alpm_option_set_checkspace()
|
||||||
|
- alpm_find_grp_pkgs()
|
||||||
|
- alpm_trans_get_flags()
|
||||||
|
- error codes:
|
||||||
|
PM_ERR_DISK_SPACE, PM_ERR_WRITE
|
||||||
|
- flags
|
||||||
|
PM_TRANS_FLAG_NODEPVERSION, PM_TRANS_EVT_DISKSPACE_START,
|
||||||
|
PM_TRANS_EVT_DISKSPACE_DONE, PM_TRANS_CONV_SELECT_PROVIDER,
|
||||||
|
PM_TRANS_PROGRESS_DISKSPACE_START, PM_TRANS_PROGRESS_INTEGRITY_START
|
||||||
|
|||||||
4935
acinclude.m4
4935
acinclude.m4
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ rm -f scripts/{Makefile.in,Makefile}
|
|||||||
rm -f etc/{Makefile.in,Makefile}
|
rm -f etc/{Makefile.in,Makefile}
|
||||||
rm -f etc/pacman.d/{Makefile.in,Makefile}
|
rm -f etc/pacman.d/{Makefile.in,Makefile}
|
||||||
rm -f etc/abs/{Makefile.in,Makefile}
|
rm -f etc/abs/{Makefile.in,Makefile}
|
||||||
rm -f test/pacman{,/tests}/{Makefile.in,Makefile}
|
rm -f test/{pacman,util}{,/tests}/{Makefile.in,Makefile}
|
||||||
rm -f contrib/{Makefile.in,Makefile}
|
rm -f contrib/{Makefile.in,Makefile}
|
||||||
rm -f doc/{Makefile.in,Makefile}
|
rm -f doc/{Makefile.in,Makefile}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh -xu
|
#!/bin/sh -xu
|
||||||
|
|
||||||
aclocal
|
aclocal -I m4 --install
|
||||||
autoheader
|
autoheader
|
||||||
automake --foreign
|
automake --foreign
|
||||||
autoconf
|
autoconf
|
||||||
|
|||||||
253
config.guess
vendored
253
config.guess
vendored
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2008-01-23'
|
timestamp='2010-08-21'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@@ -27,16 +27,16 @@ timestamp='2008-01-23'
|
|||||||
# the same distribution terms that you use for the rest of that program.
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
|
||||||
# Originally written by Per Bothner <per@bothner.com>.
|
# Originally written by Per Bothner. Please send patches (context
|
||||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
||||||
# diff and a properly formatted ChangeLog entry.
|
# entry.
|
||||||
#
|
#
|
||||||
# This script attempts to guess a canonical system name similar to
|
# This script attempts to guess a canonical system name similar to
|
||||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||||
# exits with 0. Otherwise, it exits with 1.
|
# exits with 0. Otherwise, it exits with 1.
|
||||||
#
|
#
|
||||||
# The plan is that this can be called by configure scripts if you
|
# You can get the latest version of this script from:
|
||||||
# don't specify an explicit build system type.
|
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||||
|
|
||||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||||
|
|
||||||
@@ -56,8 +56,9 @@ version="\
|
|||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@@ -91,7 +92,7 @@ if test $# != 0; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap 'exit 1' 1 2 15
|
trap 'exit 1' HUP INT TERM
|
||||||
|
|
||||||
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||||
# compiler to aid in system detection is discouraged as it requires
|
# compiler to aid in system detection is discouraged as it requires
|
||||||
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
|
|||||||
|
|
||||||
set_cc_for_build='
|
set_cc_for_build='
|
||||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
|
||||||
: ${TMPDIR=/tmp} ;
|
: ${TMPDIR=/tmp} ;
|
||||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||||
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep __ELF__ >/dev/null
|
| grep -q __ELF__
|
||||||
then
|
then
|
||||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||||
# Return netbsd for either. FIX?
|
# Return netbsd for either. FIX?
|
||||||
@@ -324,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
case `/usr/bin/uname -p` in
|
case `/usr/bin/uname -p` in
|
||||||
sparc) echo sparc-icl-nx7; exit ;;
|
sparc) echo sparc-icl-nx7; exit ;;
|
||||||
esac ;;
|
esac ;;
|
||||||
|
s390x:SunOS:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||||
|
exit ;;
|
||||||
sun4H:SunOS:5.*:*)
|
sun4H:SunOS:5.*:*)
|
||||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||||
exit ;;
|
exit ;;
|
||||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||||
exit ;;
|
exit ;;
|
||||||
|
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
|
||||||
|
echo i386-pc-auroraux${UNAME_RELEASE}
|
||||||
|
exit ;;
|
||||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
eval $set_cc_for_build
|
||||||
|
SUN_ARCH="i386"
|
||||||
|
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||||
|
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||||
|
# This test works for both compilers.
|
||||||
|
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||||
|
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||||
|
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||||
|
grep IS_64BIT_ARCH >/dev/null
|
||||||
|
then
|
||||||
|
SUN_ARCH="x86_64"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||||
exit ;;
|
exit ;;
|
||||||
sun4*:SunOS:6*:*)
|
sun4*:SunOS:6*:*)
|
||||||
# According to config.sub, this is the proper way to canonicalize
|
# According to config.sub, this is the proper way to canonicalize
|
||||||
@@ -532,7 +552,7 @@ EOF
|
|||||||
echo rs6000-ibm-aix3.2
|
echo rs6000-ibm-aix3.2
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
*:AIX:*:[456])
|
*:AIX:*:[4567])
|
||||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||||
IBM_ARCH=rs6000
|
IBM_ARCH=rs6000
|
||||||
@@ -640,7 +660,7 @@ EOF
|
|||||||
# => hppa64-hp-hpux11.23
|
# => hppa64-hp-hpux11.23
|
||||||
|
|
||||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
||||||
grep __LP64__ >/dev/null
|
grep -q __LP64__
|
||||||
then
|
then
|
||||||
HP_ARCH="hppa2.0w"
|
HP_ARCH="hppa2.0w"
|
||||||
else
|
else
|
||||||
@@ -791,12 +811,12 @@ EOF
|
|||||||
i*:PW*:*)
|
i*:PW*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-pw32
|
echo ${UNAME_MACHINE}-pc-pw32
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Interix*:[3456]*)
|
*:Interix*:*)
|
||||||
case ${UNAME_MACHINE} in
|
case ${UNAME_MACHINE} in
|
||||||
x86)
|
x86)
|
||||||
echo i586-pc-interix${UNAME_RELEASE}
|
echo i586-pc-interix${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
EM64T | authenticamd)
|
authenticamd | genuineintel | EM64T)
|
||||||
echo x86_64-unknown-interix${UNAME_RELEASE}
|
echo x86_64-unknown-interix${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
IA64)
|
IA64)
|
||||||
@@ -806,6 +826,9 @@ EOF
|
|||||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||||
echo i${UNAME_MACHINE}-pc-mks
|
echo i${UNAME_MACHINE}-pc-mks
|
||||||
exit ;;
|
exit ;;
|
||||||
|
8664:Windows_NT:*)
|
||||||
|
echo x86_64-pc-mks
|
||||||
|
exit ;;
|
||||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||||
@@ -835,6 +858,20 @@ EOF
|
|||||||
i*86:Minix:*:*)
|
i*86:Minix:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-minix
|
echo ${UNAME_MACHINE}-pc-minix
|
||||||
exit ;;
|
exit ;;
|
||||||
|
alpha:Linux:*:*)
|
||||||
|
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||||
|
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||||
|
EV56) UNAME_MACHINE=alphaev56 ;;
|
||||||
|
PCA56) UNAME_MACHINE=alphapca56 ;;
|
||||||
|
PCA57) UNAME_MACHINE=alphapca56 ;;
|
||||||
|
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||||
|
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||||
|
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||||
|
esac
|
||||||
|
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||||
|
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||||
|
exit ;;
|
||||||
arm*:Linux:*:*)
|
arm*:Linux:*:*)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
@@ -857,6 +894,17 @@ EOF
|
|||||||
frv:Linux:*:*)
|
frv:Linux:*:*)
|
||||||
echo frv-unknown-linux-gnu
|
echo frv-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
|
i*86:Linux:*:*)
|
||||||
|
LIBC=gnu
|
||||||
|
eval $set_cc_for_build
|
||||||
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
|
#ifdef __dietlibc__
|
||||||
|
LIBC=dietlibc
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||||
|
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||||
|
exit ;;
|
||||||
ia64:Linux:*:*)
|
ia64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -866,74 +914,33 @@ EOF
|
|||||||
m68*:Linux:*:*)
|
m68*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:Linux:*:*)
|
mips:Linux:*:* | mips64:Linux:*:*)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
#undef CPU
|
#undef CPU
|
||||||
#undef mips
|
#undef ${UNAME_MACHINE}
|
||||||
#undef mipsel
|
#undef ${UNAME_MACHINE}el
|
||||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||||
CPU=mipsel
|
CPU=${UNAME_MACHINE}el
|
||||||
#else
|
#else
|
||||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||||
CPU=mips
|
CPU=${UNAME_MACHINE}
|
||||||
#else
|
#else
|
||||||
CPU=
|
CPU=
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||||
/^CPU/{
|
|
||||||
s: ::g
|
|
||||||
p
|
|
||||||
}'`"
|
|
||||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
|
||||||
;;
|
|
||||||
mips64:Linux:*:*)
|
|
||||||
eval $set_cc_for_build
|
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
|
||||||
#undef CPU
|
|
||||||
#undef mips64
|
|
||||||
#undef mips64el
|
|
||||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
|
||||||
CPU=mips64el
|
|
||||||
#else
|
|
||||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
|
||||||
CPU=mips64
|
|
||||||
#else
|
|
||||||
CPU=
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
|
||||||
/^CPU/{
|
|
||||||
s: ::g
|
|
||||||
p
|
|
||||||
}'`"
|
|
||||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||||
;;
|
;;
|
||||||
or32:Linux:*:*)
|
or32:Linux:*:*)
|
||||||
echo or32-unknown-linux-gnu
|
echo or32-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
ppc:Linux:*:*)
|
padre:Linux:*:*)
|
||||||
echo powerpc-unknown-linux-gnu
|
echo sparc-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
ppc64:Linux:*:*)
|
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||||
echo powerpc64-unknown-linux-gnu
|
echo hppa64-unknown-linux-gnu
|
||||||
exit ;;
|
|
||||||
alpha:Linux:*:*)
|
|
||||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
|
||||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
|
||||||
EV56) UNAME_MACHINE=alphaev56 ;;
|
|
||||||
PCA56) UNAME_MACHINE=alphapca56 ;;
|
|
||||||
PCA57) UNAME_MACHINE=alphapca56 ;;
|
|
||||||
EV6) UNAME_MACHINE=alphaev6 ;;
|
|
||||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
|
||||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
|
||||||
esac
|
|
||||||
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
|
|
||||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
|
||||||
exit ;;
|
exit ;;
|
||||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||||
# Look for CPU level
|
# Look for CPU level
|
||||||
@@ -943,8 +950,11 @@ EOF
|
|||||||
*) echo hppa-unknown-linux-gnu ;;
|
*) echo hppa-unknown-linux-gnu ;;
|
||||||
esac
|
esac
|
||||||
exit ;;
|
exit ;;
|
||||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
ppc64:Linux:*:*)
|
||||||
echo hppa64-unknown-linux-gnu
|
echo powerpc64-unknown-linux-gnu
|
||||||
|
exit ;;
|
||||||
|
ppc:Linux:*:*)
|
||||||
|
echo powerpc-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
s390:Linux:*:* | s390x:Linux:*:*)
|
s390:Linux:*:* | s390x:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-ibm-linux
|
echo ${UNAME_MACHINE}-ibm-linux
|
||||||
@@ -958,6 +968,9 @@ EOF
|
|||||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
|
tile*:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-tilera-linux-gnu
|
||||||
|
exit ;;
|
||||||
vax:Linux:*:*)
|
vax:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -967,69 +980,6 @@ EOF
|
|||||||
xtensa*:Linux:*:*)
|
xtensa*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:Linux:*:*)
|
|
||||||
# The BFD linker knows what the default object file format is, so
|
|
||||||
# first see if it will tell us. cd to the root directory to prevent
|
|
||||||
# problems with other programs or directories called `ld' in the path.
|
|
||||||
# Set LC_ALL=C to ensure ld outputs messages in English.
|
|
||||||
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
|
|
||||||
| sed -ne '/supported targets:/!d
|
|
||||||
s/[ ][ ]*/ /g
|
|
||||||
s/.*supported targets: *//
|
|
||||||
s/ .*//
|
|
||||||
p'`
|
|
||||||
case "$ld_supported_targets" in
|
|
||||||
elf32-i386)
|
|
||||||
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
|
||||||
;;
|
|
||||||
a.out-i386-linux)
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
|
||||||
exit ;;
|
|
||||||
coff-i386)
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
|
||||||
exit ;;
|
|
||||||
"")
|
|
||||||
# Either a pre-BFD a.out linker (linux-gnuoldld) or
|
|
||||||
# one that does not give us useful --help.
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
|
|
||||||
exit ;;
|
|
||||||
esac
|
|
||||||
# Determine whether the default compiler is a.out or elf
|
|
||||||
eval $set_cc_for_build
|
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
|
||||||
#include <features.h>
|
|
||||||
#ifdef __ELF__
|
|
||||||
# ifdef __GLIBC__
|
|
||||||
# if __GLIBC__ >= 2
|
|
||||||
LIBC=gnu
|
|
||||||
# else
|
|
||||||
LIBC=gnulibc1
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
LIBC=gnulibc1
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
|
||||||
LIBC=gnu
|
|
||||||
#else
|
|
||||||
LIBC=gnuaout
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifdef __dietlibc__
|
|
||||||
LIBC=dietlibc
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
|
||||||
/^LIBC/{
|
|
||||||
s: ::g
|
|
||||||
p
|
|
||||||
}'`"
|
|
||||||
test x"${LIBC}" != x && {
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
|
|
||||||
;;
|
|
||||||
i*86:DYNIX/ptx:4*:*)
|
i*86:DYNIX/ptx:4*:*)
|
||||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||||
# earlier versions are messed up and put the nodename in both
|
# earlier versions are messed up and put the nodename in both
|
||||||
@@ -1058,7 +1008,7 @@ EOF
|
|||||||
i*86:syllable:*:*)
|
i*86:syllable:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-syllable
|
echo ${UNAME_MACHINE}-pc-syllable
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
|
||||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:*DOS:*:*)
|
i*86:*DOS:*:*)
|
||||||
@@ -1102,8 +1052,11 @@ EOF
|
|||||||
pc:*:*:*)
|
pc:*:*:*)
|
||||||
# Left here for compatibility:
|
# Left here for compatibility:
|
||||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||||
# the processor, so we play safe by assuming i386.
|
# the processor, so we play safe by assuming i586.
|
||||||
echo i386-pc-msdosdjgpp
|
# Note: whatever this is, it MUST be the same as what config.sub
|
||||||
|
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||||
|
# this is a cross-build.
|
||||||
|
echo i586-pc-msdosdjgpp
|
||||||
exit ;;
|
exit ;;
|
||||||
Intel:Mach:3*:*)
|
Intel:Mach:3*:*)
|
||||||
echo i386-pc-mach3
|
echo i386-pc-mach3
|
||||||
@@ -1141,6 +1094,16 @@ EOF
|
|||||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||||
|
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
|
||||||
|
OS_REL='.3'
|
||||||
|
test -r /etc/.relid \
|
||||||
|
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||||
|
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||||
|
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
|
||||||
|
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||||
|
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
|
||||||
|
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
|
||||||
|
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
||||||
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
||||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -1153,7 +1116,7 @@ EOF
|
|||||||
rs6000:LynxOS:2.*:*)
|
rs6000:LynxOS:2.*:*)
|
||||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
|
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
|
||||||
echo powerpc-unknown-lynxos${UNAME_RELEASE}
|
echo powerpc-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
SM[BE]S:UNIX_SV:*:*)
|
SM[BE]S:UNIX_SV:*:*)
|
||||||
@@ -1216,6 +1179,9 @@ EOF
|
|||||||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||||
echo i586-pc-beos
|
echo i586-pc-beos
|
||||||
exit ;;
|
exit ;;
|
||||||
|
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||||
|
echo i586-pc-haiku
|
||||||
|
exit ;;
|
||||||
SX-4:SUPER-UX:*:*)
|
SX-4:SUPER-UX:*:*)
|
||||||
echo sx4-nec-superux${UNAME_RELEASE}
|
echo sx4-nec-superux${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -1243,6 +1209,16 @@ EOF
|
|||||||
*:Darwin:*:*)
|
*:Darwin:*:*)
|
||||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||||
case $UNAME_PROCESSOR in
|
case $UNAME_PROCESSOR in
|
||||||
|
i386)
|
||||||
|
eval $set_cc_for_build
|
||||||
|
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||||
|
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||||
|
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||||
|
grep IS_64BIT_ARCH >/dev/null
|
||||||
|
then
|
||||||
|
UNAME_PROCESSOR="x86_64"
|
||||||
|
fi
|
||||||
|
fi ;;
|
||||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||||
esac
|
esac
|
||||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||||
@@ -1324,6 +1300,9 @@ EOF
|
|||||||
i*86:rdos:*:*)
|
i*86:rdos:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-rdos
|
echo ${UNAME_MACHINE}-pc-rdos
|
||||||
exit ;;
|
exit ;;
|
||||||
|
i*86:AROS:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-pc-aros
|
||||||
|
exit ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||||
|
|||||||
159
config.sub
vendored
159
config.sub
vendored
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2008-01-16'
|
timestamp='2010-09-11'
|
||||||
|
|
||||||
# This file is (in principle) common to ALL GNU software.
|
# This file is (in principle) common to ALL GNU software.
|
||||||
# The presence of a machine in this file suggests that SOME GNU software
|
# The presence of a machine in this file suggests that SOME GNU software
|
||||||
@@ -32,13 +32,16 @@ timestamp='2008-01-16'
|
|||||||
|
|
||||||
|
|
||||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||||
# diff and a properly formatted ChangeLog entry.
|
# diff and a properly formatted GNU ChangeLog entry.
|
||||||
#
|
#
|
||||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||||
# Supply the specified configuration type as an argument.
|
# Supply the specified configuration type as an argument.
|
||||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||||
|
|
||||||
|
# You can get the latest version of this script from:
|
||||||
|
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||||
|
|
||||||
# This file is supposed to be the same for all GNU packages
|
# This file is supposed to be the same for all GNU packages
|
||||||
# and recognize all the CPU types, system types and aliases
|
# and recognize all the CPU types, system types and aliases
|
||||||
# that are meaningful with *any* GNU software.
|
# that are meaningful with *any* GNU software.
|
||||||
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@@ -120,8 +124,10 @@ esac
|
|||||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||||
case $maybe_os in
|
case $maybe_os in
|
||||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||||
|
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||||
|
kopensolaris*-gnu* | \
|
||||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||||
os=-$maybe_os
|
os=-$maybe_os
|
||||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||||
@@ -148,10 +154,13 @@ case $os in
|
|||||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||||
-apple | -axis | -knuth | -cray)
|
-apple | -axis | -knuth | -cray | -microblaze)
|
||||||
os=
|
os=
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
;;
|
;;
|
||||||
|
-bluegene*)
|
||||||
|
os=-cnk
|
||||||
|
;;
|
||||||
-sim | -cisco | -oki | -wec | -winbond)
|
-sim | -cisco | -oki | -wec | -winbond)
|
||||||
os=
|
os=
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
@@ -249,13 +258,16 @@ case $basic_machine in
|
|||||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| i370 | i860 | i960 | ia64 \
|
| i370 | i860 | i960 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
|
| lm32 \
|
||||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||||
| maxq | mb | microblaze | mcore | mep \
|
| maxq | mb | microblaze | mcore | mep | metag \
|
||||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||||
| mips16 \
|
| mips16 \
|
||||||
| mips64 | mips64el \
|
| mips64 | mips64el \
|
||||||
| mips64vr | mips64vrel \
|
| mips64octeon | mips64octeonel \
|
||||||
| mips64orion | mips64orionel \
|
| mips64orion | mips64orionel \
|
||||||
|
| mips64r5900 | mips64r5900el \
|
||||||
|
| mips64vr | mips64vrel \
|
||||||
| mips64vr4100 | mips64vr4100el \
|
| mips64vr4100 | mips64vr4100el \
|
||||||
| mips64vr4300 | mips64vr4300el \
|
| mips64vr4300 | mips64vr4300el \
|
||||||
| mips64vr5000 | mips64vr5000el \
|
| mips64vr5000 | mips64vr5000el \
|
||||||
@@ -268,28 +280,41 @@ case $basic_machine in
|
|||||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||||
| mipstx39 | mipstx39el \
|
| mipstx39 | mipstx39el \
|
||||||
| mn10200 | mn10300 \
|
| mn10200 | mn10300 \
|
||||||
|
| moxie \
|
||||||
| mt \
|
| mt \
|
||||||
| msp430 \
|
| msp430 \
|
||||||
|
| nds32 | nds32le | nds32be \
|
||||||
| nios | nios2 \
|
| nios | nios2 \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| or32 \
|
| or32 \
|
||||||
| pdp10 | pdp11 | pj | pjl \
|
| pdp10 | pdp11 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||||
| pyramid \
|
| pyramid \
|
||||||
|
| rx \
|
||||||
| score \
|
| score \
|
||||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||||
| sh64 | sh64le \
|
| sh64 | sh64le \
|
||||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||||
| spu | strongarm \
|
| spu | strongarm \
|
||||||
| tahoe | thumb | tic4x | tic80 | tron \
|
| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||||
|
| ubicom32 \
|
||||||
| v850 | v850e \
|
| v850 | v850e \
|
||||||
| we32k \
|
| we32k \
|
||||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||||
| z8k)
|
| z8k | z80)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
;;
|
;;
|
||||||
m6811 | m68hc11 | m6812 | m68hc12)
|
c54x)
|
||||||
|
basic_machine=tic54x-unknown
|
||||||
|
;;
|
||||||
|
c55x)
|
||||||
|
basic_machine=tic55x-unknown
|
||||||
|
;;
|
||||||
|
c6x)
|
||||||
|
basic_machine=tic6x-unknown
|
||||||
|
;;
|
||||||
|
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
|
||||||
# Motorola 68HC11/12.
|
# Motorola 68HC11/12.
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=-none
|
os=-none
|
||||||
@@ -320,7 +345,7 @@ case $basic_machine in
|
|||||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||||
| avr-* | avr32-* \
|
| avr-* | avr32-* \
|
||||||
| bfin-* | bs2000-* \
|
| bfin-* | bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||||
| clipper-* | craynv-* | cydra-* \
|
| clipper-* | craynv-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| elxsi-* \
|
| elxsi-* \
|
||||||
@@ -329,14 +354,17 @@ case $basic_machine in
|
|||||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||||
| i*86-* | i860-* | i960-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia64-* \
|
||||||
| ip2k-* | iq2000-* \
|
| ip2k-* | iq2000-* \
|
||||||
|
| lm32-* \
|
||||||
| m32c-* | m32r-* | m32rle-* \
|
| m32c-* | m32r-* | m32rle-* \
|
||||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||||
| mips16-* \
|
| mips16-* \
|
||||||
| mips64-* | mips64el-* \
|
| mips64-* | mips64el-* \
|
||||||
| mips64vr-* | mips64vrel-* \
|
| mips64octeon-* | mips64octeonel-* \
|
||||||
| mips64orion-* | mips64orionel-* \
|
| mips64orion-* | mips64orionel-* \
|
||||||
|
| mips64r5900-* | mips64r5900el-* \
|
||||||
|
| mips64vr-* | mips64vrel-* \
|
||||||
| mips64vr4100-* | mips64vr4100el-* \
|
| mips64vr4100-* | mips64vr4100el-* \
|
||||||
| mips64vr4300-* | mips64vr4300el-* \
|
| mips64vr4300-* | mips64vr4300el-* \
|
||||||
| mips64vr5000-* | mips64vr5000el-* \
|
| mips64vr5000-* | mips64vr5000el-* \
|
||||||
@@ -351,27 +379,30 @@ case $basic_machine in
|
|||||||
| mmix-* \
|
| mmix-* \
|
||||||
| mt-* \
|
| mt-* \
|
||||||
| msp430-* \
|
| msp430-* \
|
||||||
|
| nds32-* | nds32le-* | nds32be-* \
|
||||||
| nios-* | nios2-* \
|
| nios-* | nios2-* \
|
||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||||
| pyramid-* \
|
| pyramid-* \
|
||||||
| romp-* | rs6000-* \
|
| romp-* | rs6000-* | rx-* \
|
||||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||||
| sparclite-* \
|
| sparclite-* \
|
||||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||||
| tahoe-* | thumb-* \
|
| tahoe-* | thumb-* \
|
||||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
|
| tile-* | tilegx-* \
|
||||||
| tron-* \
|
| tron-* \
|
||||||
|
| ubicom32-* \
|
||||||
| v850-* | v850e-* | vax-* \
|
| v850-* | v850e-* | vax-* \
|
||||||
| we32k-* \
|
| we32k-* \
|
||||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||||
| xstormy16-* | xtensa*-* \
|
| xstormy16-* | xtensa*-* \
|
||||||
| ymp-* \
|
| ymp-* \
|
||||||
| z8k-*)
|
| z8k-* | z80-*)
|
||||||
;;
|
;;
|
||||||
# Recognize the basic CPU types without company name, with glob match.
|
# Recognize the basic CPU types without company name, with glob match.
|
||||||
xtensa*)
|
xtensa*)
|
||||||
@@ -439,6 +470,10 @@ case $basic_machine in
|
|||||||
basic_machine=m68k-apollo
|
basic_machine=m68k-apollo
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
|
aros)
|
||||||
|
basic_machine=i386-pc
|
||||||
|
os=-aros
|
||||||
|
;;
|
||||||
aux)
|
aux)
|
||||||
basic_machine=m68k-apple
|
basic_machine=m68k-apple
|
||||||
os=-aux
|
os=-aux
|
||||||
@@ -455,10 +490,27 @@ case $basic_machine in
|
|||||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
|
bluegene*)
|
||||||
|
basic_machine=powerpc-ibm
|
||||||
|
os=-cnk
|
||||||
|
;;
|
||||||
|
c54x-*)
|
||||||
|
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
|
c55x-*)
|
||||||
|
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
|
c6x-*)
|
||||||
|
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
c90)
|
c90)
|
||||||
basic_machine=c90-cray
|
basic_machine=c90-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
|
cegcc)
|
||||||
|
basic_machine=arm-unknown
|
||||||
|
os=-cegcc
|
||||||
|
;;
|
||||||
convex-c1)
|
convex-c1)
|
||||||
basic_machine=c1-convex
|
basic_machine=c1-convex
|
||||||
os=-bsd
|
os=-bsd
|
||||||
@@ -526,6 +578,10 @@ case $basic_machine in
|
|||||||
basic_machine=m88k-motorola
|
basic_machine=m88k-motorola
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
|
dicos)
|
||||||
|
basic_machine=i686-pc
|
||||||
|
os=-dicos
|
||||||
|
;;
|
||||||
djgpp)
|
djgpp)
|
||||||
basic_machine=i586-pc
|
basic_machine=i586-pc
|
||||||
os=-msdosdjgpp
|
os=-msdosdjgpp
|
||||||
@@ -699,6 +755,9 @@ case $basic_machine in
|
|||||||
basic_machine=ns32k-utek
|
basic_machine=ns32k-utek
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
|
microblaze)
|
||||||
|
basic_machine=microblaze-xilinx
|
||||||
|
;;
|
||||||
mingw32)
|
mingw32)
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
os=-mingw32
|
os=-mingw32
|
||||||
@@ -803,6 +862,12 @@ case $basic_machine in
|
|||||||
np1)
|
np1)
|
||||||
basic_machine=np1-gould
|
basic_machine=np1-gould
|
||||||
;;
|
;;
|
||||||
|
neo-tandem)
|
||||||
|
basic_machine=neo-tandem
|
||||||
|
;;
|
||||||
|
nse-tandem)
|
||||||
|
basic_machine=nse-tandem
|
||||||
|
;;
|
||||||
nsr-tandem)
|
nsr-tandem)
|
||||||
basic_machine=nsr-tandem
|
basic_machine=nsr-tandem
|
||||||
;;
|
;;
|
||||||
@@ -1037,17 +1102,10 @@ case $basic_machine in
|
|||||||
basic_machine=t90-cray
|
basic_machine=t90-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
tic54x | c54x*)
|
# This must be matched before tile*.
|
||||||
basic_machine=tic54x-unknown
|
tilegx*)
|
||||||
os=-coff
|
basic_machine=tilegx-unknown
|
||||||
;;
|
os=-linux-gnu
|
||||||
tic55x | c55x*)
|
|
||||||
basic_machine=tic55x-unknown
|
|
||||||
os=-coff
|
|
||||||
;;
|
|
||||||
tic6x | c6x*)
|
|
||||||
basic_machine=tic6x-unknown
|
|
||||||
os=-coff
|
|
||||||
;;
|
;;
|
||||||
tile*)
|
tile*)
|
||||||
basic_machine=tile-unknown
|
basic_machine=tile-unknown
|
||||||
@@ -1128,6 +1186,10 @@ case $basic_machine in
|
|||||||
basic_machine=z8k-unknown
|
basic_machine=z8k-unknown
|
||||||
os=-sim
|
os=-sim
|
||||||
;;
|
;;
|
||||||
|
z80-*-coff)
|
||||||
|
basic_machine=z80-unknown
|
||||||
|
os=-sim
|
||||||
|
;;
|
||||||
none)
|
none)
|
||||||
basic_machine=none-none
|
basic_machine=none-none
|
||||||
os=-none
|
os=-none
|
||||||
@@ -1166,7 +1228,7 @@ case $basic_machine in
|
|||||||
we32k)
|
we32k)
|
||||||
basic_machine=we32k-att
|
basic_machine=we32k-att
|
||||||
;;
|
;;
|
||||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||||
basic_machine=sh-unknown
|
basic_machine=sh-unknown
|
||||||
;;
|
;;
|
||||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||||
@@ -1216,6 +1278,9 @@ case $os in
|
|||||||
# First match some system type aliases
|
# First match some system type aliases
|
||||||
# that might get confused with valid system types.
|
# that might get confused with valid system types.
|
||||||
# -solaris* is a basic system type, with this one exception.
|
# -solaris* is a basic system type, with this one exception.
|
||||||
|
-auroraux)
|
||||||
|
os=-auroraux
|
||||||
|
;;
|
||||||
-solaris1 | -solaris1.*)
|
-solaris1 | -solaris1.*)
|
||||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||||
;;
|
;;
|
||||||
@@ -1236,10 +1301,11 @@ case $os in
|
|||||||
# Each alternative MUST END IN A *, to match a version number.
|
# Each alternative MUST END IN A *, to match a version number.
|
||||||
# -sysv* is not here because it comes later, after sysvr4.
|
# -sysv* is not here because it comes later, after sysvr4.
|
||||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||||
|
| -sym* | -kopensolaris* \
|
||||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||||
| -aos* \
|
| -aos* | -aros* \
|
||||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||||
@@ -1248,9 +1314,10 @@ case $os in
|
|||||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||||
| -chorusos* | -chorusrdb* \
|
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
| -mingw32* | -linux-gnu* | -linux-android* \
|
||||||
|
| -linux-newlib* | -linux-uclibc* \
|
||||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
@@ -1258,7 +1325,7 @@ case $os in
|
|||||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
|
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-qnx*)
|
-qnx*)
|
||||||
@@ -1388,6 +1455,11 @@ case $os in
|
|||||||
-zvmoe)
|
-zvmoe)
|
||||||
os=-zvmoe
|
os=-zvmoe
|
||||||
;;
|
;;
|
||||||
|
-dicos*)
|
||||||
|
os=-dicos
|
||||||
|
;;
|
||||||
|
-nacl*)
|
||||||
|
;;
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -1428,6 +1500,15 @@ case $basic_machine in
|
|||||||
c4x-* | tic4x-*)
|
c4x-* | tic4x-*)
|
||||||
os=-coff
|
os=-coff
|
||||||
;;
|
;;
|
||||||
|
tic54x-*)
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
|
tic55x-*)
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
|
tic6x-*)
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
# This must come before the *-dec entry.
|
# This must come before the *-dec entry.
|
||||||
pdp10-*)
|
pdp10-*)
|
||||||
os=-tops20
|
os=-tops20
|
||||||
@@ -1585,7 +1666,7 @@ case $basic_machine in
|
|||||||
-sunos*)
|
-sunos*)
|
||||||
vendor=sun
|
vendor=sun
|
||||||
;;
|
;;
|
||||||
-aix*)
|
-cnk*|-aix*)
|
||||||
vendor=ibm
|
vendor=ibm
|
||||||
;;
|
;;
|
||||||
-beos*)
|
-beos*)
|
||||||
|
|||||||
96
configure.ac
96
configure.ac
@@ -1,7 +1,7 @@
|
|||||||
# -*- Autoconf -*-
|
# -*- Autoconf -*-
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
# Minimum version of autoconf required
|
# Minimum version of autoconf required
|
||||||
AC_PREREQ(2.60)
|
AC_PREREQ(2.62)
|
||||||
|
|
||||||
# UPDATING VERSION NUMBERS FOR RELEASES
|
# UPDATING VERSION NUMBERS FOR RELEASES
|
||||||
#
|
#
|
||||||
@@ -41,12 +41,12 @@ AC_PREREQ(2.60)
|
|||||||
# Bugfix releases:
|
# Bugfix releases:
|
||||||
# pacman_version_micro += 1
|
# pacman_version_micro += 1
|
||||||
|
|
||||||
m4_define([lib_current], [5])
|
m4_define([lib_current], [6])
|
||||||
m4_define([lib_revision], [0])
|
m4_define([lib_revision], [0])
|
||||||
m4_define([lib_age], [0])
|
m4_define([lib_age], [0])
|
||||||
|
|
||||||
m4_define([pacman_version_major], [3])
|
m4_define([pacman_version_major], [3])
|
||||||
m4_define([pacman_version_minor], [4])
|
m4_define([pacman_version_minor], [5])
|
||||||
m4_define([pacman_version_micro], [0])
|
m4_define([pacman_version_micro], [0])
|
||||||
m4_define([pacman_version],
|
m4_define([pacman_version],
|
||||||
[pacman_version_major.pacman_version_minor.pacman_version_micro])
|
[pacman_version_major.pacman_version_minor.pacman_version_micro])
|
||||||
@@ -70,7 +70,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION], ["$LIB_VERSION"], [libalpm version number])
|
|||||||
|
|
||||||
# Help line for root directory
|
# Help line for root directory
|
||||||
AC_ARG_WITH(root-dir,
|
AC_ARG_WITH(root-dir,
|
||||||
AS_HELP_STRING([--with-root-dir=path], [set the location of pacman's root operating directory]),
|
AS_HELP_STRING([--with-root-dir=path], [set the location of the root operating directory]),
|
||||||
[ROOTDIR=$withval], [ROOTDIR=/])
|
[ROOTDIR=$withval], [ROOTDIR=/])
|
||||||
|
|
||||||
# Help line for package extension
|
# Help line for package extension
|
||||||
@@ -83,25 +83,25 @@ AC_ARG_WITH(src-ext,
|
|||||||
AS_HELP_STRING([--with-src-ext=ext], [set the file extension used by source packages]),
|
AS_HELP_STRING([--with-src-ext=ext], [set the file extension used by source packages]),
|
||||||
[SRCEXT=$withval], [SRCEXT=.src.tar.gz])
|
[SRCEXT=$withval], [SRCEXT=.src.tar.gz])
|
||||||
|
|
||||||
# Help line for database extension
|
|
||||||
AC_ARG_WITH(db-ext,
|
|
||||||
AS_HELP_STRING([--with-db-ext=ext], [set the file extension used by the database]),
|
|
||||||
[DBEXT=$withval], [DBEXT=.db.tar.gz])
|
|
||||||
|
|
||||||
# Help line for buildscript filename
|
# Help line for buildscript filename
|
||||||
AC_ARG_WITH(buildscript,
|
AC_ARG_WITH(buildscript,
|
||||||
AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]),
|
AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]),
|
||||||
[BUILDSCRIPT=$withval], [BUILDSCRIPT=PKGBUILD])
|
[BUILDSCRIPT=$withval], [BUILDSCRIPT=PKGBUILD])
|
||||||
|
|
||||||
|
# Help line for using OpenSSL
|
||||||
|
AC_ARG_WITH(openssl,
|
||||||
|
AS_HELP_STRING([--with-openssl], [use OpenSSL crypto implementations instead of internal routines]),
|
||||||
|
[], [with_openssl=check])
|
||||||
|
|
||||||
# Help line for libfetch
|
# Help line for libfetch
|
||||||
AC_ARG_ENABLE(internal-download,
|
AC_ARG_WITH(fetch,
|
||||||
AS_HELP_STRING([--disable-internal-download], [do not build with libfetch support]),
|
AS_HELP_STRING([--with-fetch], [use libfetch as an internal downloader]),
|
||||||
[internaldownload=$enableval], [internaldownload=yes])
|
[], [with_fetch=check])
|
||||||
|
|
||||||
# Help line for documentation
|
# Help line for documentation
|
||||||
AC_ARG_ENABLE(doc,
|
AC_ARG_ENABLE(doc,
|
||||||
AS_HELP_STRING([--enable-doc], [run make in doc/ dir]),
|
AS_HELP_STRING([--disable-doc], [prevent make from looking at doc/ dir]),
|
||||||
[wantdoc=$enableval], [wantdoc=no])
|
[wantdoc=$enableval], [wantdoc=yes])
|
||||||
|
|
||||||
# Help line for doxygen
|
# Help line for doxygen
|
||||||
AC_ARG_ENABLE(doxygen,
|
AC_ARG_ENABLE(doxygen,
|
||||||
@@ -126,7 +126,8 @@ AC_PROG_INSTALL
|
|||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_CHECK_PROGS([PYTHON], [python2.6 python2.5 python], [false])
|
AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false])
|
||||||
|
AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false])
|
||||||
|
|
||||||
# find installed gettext
|
# find installed gettext
|
||||||
AM_GNU_GETTEXT([external])
|
AM_GNU_GETTEXT([external])
|
||||||
@@ -136,26 +137,41 @@ AM_GNU_GETTEXT_VERSION(0.13.1)
|
|||||||
AC_CHECK_LIB([archive], [archive_read_data], ,
|
AC_CHECK_LIB([archive], [archive_read_data], ,
|
||||||
AC_MSG_ERROR([libarchive is needed to compile pacman!]))
|
AC_MSG_ERROR([libarchive is needed to compile pacman!]))
|
||||||
|
|
||||||
|
# Check for OpenSSL
|
||||||
|
AC_MSG_CHECKING(whether to link with libssl)
|
||||||
|
AS_IF([test "x$with_openssl" != "xno"],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
AC_CHECK_LIB([ssl], [MD5_Final], ,
|
||||||
|
[if test "x$with_openssl" != "xcheck"; then
|
||||||
|
AC_MSG_FAILURE([--with-openssl was given, but -lssl was not found])
|
||||||
|
fi],
|
||||||
|
[-lcrypto])],
|
||||||
|
AC_MSG_RESULT(no))
|
||||||
|
AM_CONDITIONAL([HAVE_LIBSSL], [test "x$ac_cv_lib_ssl_MD5_Final" = "xyes"])
|
||||||
|
|
||||||
# Enable or disable usage of libfetch
|
# Enable or disable usage of libfetch
|
||||||
AC_MSG_CHECKING(whether to link with libfetch)
|
AC_MSG_CHECKING(whether to link with libfetch)
|
||||||
if test "x$internaldownload" = "xyes" ; then
|
AS_IF([test "x$with_fetch" != "xno"],
|
||||||
AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE([INTERNAL_DOWNLOAD], , [Use internal download library])
|
|
||||||
# Check for a download library if it was actually requested
|
|
||||||
AC_CHECK_LIB([fetch], [fetchParseURL], ,
|
AC_CHECK_LIB([fetch], [fetchParseURL], ,
|
||||||
AC_MSG_ERROR([libfetch is needed to compile with internal download support]), [-lcrypto -ldl] )
|
[if test "x$with_fetch" != "xcheck"; then
|
||||||
# Check if libfetch supports conditional GET
|
AC_MSG_FAILURE([--with-fetch was given, but -lfetch was not found])
|
||||||
# (version >=2.21, struct url has member last_modified)
|
fi],
|
||||||
AC_CHECK_MEMBER(struct url.last_modified, ,
|
[-lcrypto -ldl])
|
||||||
AC_MSG_ERROR([libfetch must be version 2.21 or greater]),
|
# Check if libfetch supports connnection caching which we use
|
||||||
[#include <fetch.h>] )
|
AS_IF([test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"],
|
||||||
else
|
[AC_CHECK_DECL(fetchConnectionCacheInit, ,
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_ERROR([libfetch must be version 2.28 or greater]),
|
||||||
fi
|
[#include <fetch.h>])
|
||||||
AM_CONDITIONAL(INTERNAL_DOWNLOAD, test "x$internaldownload" = "xyes")
|
])
|
||||||
|
],
|
||||||
|
AC_MSG_RESULT(no))
|
||||||
|
AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"])
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([fcntl.h glob.h libintl.h limits.h locale.h string.h strings.h sys/ioctl.h sys/param.h sys/statvfs.h sys/syslimits.h sys/time.h syslog.h wchar.h])
|
AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h \
|
||||||
|
sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h \
|
||||||
|
sys/time.h sys/types.h sys/ucred.h syslog.h wchar.h])
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
@@ -165,15 +181,22 @@ AC_TYPE_PID_T
|
|||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
AC_TYPE_UID_T
|
AC_TYPE_UID_T
|
||||||
|
AC_STRUCT_DIRENT_D_TYPE
|
||||||
|
PATH_MAX_DEFINED
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_FUNC_FORK
|
AC_FUNC_FORK
|
||||||
|
AC_FUNC_GETMNTENT
|
||||||
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||||
AC_FUNC_MKTIME
|
AC_FUNC_MKTIME
|
||||||
AC_TYPE_SIGNAL
|
AC_CHECK_FUNCS([geteuid getmntinfo realpath regcomp strcasecmp \
|
||||||
AC_CHECK_FUNCS([geteuid realpath regcomp strcasecmp \
|
|
||||||
strndup strrchr strsep swprintf \
|
strndup strrchr strsep swprintf \
|
||||||
wcwidth uname])
|
wcwidth uname])
|
||||||
|
# For the diskspace code
|
||||||
|
FS_STATS_TYPE
|
||||||
|
AC_CHECK_MEMBERS([struct statvfs.f_flag],,,[[#include <sys/statvfs.h>]])
|
||||||
|
AC_CHECK_MEMBERS([struct statfs.f_flags],,,[[#include <sys/param.h>
|
||||||
|
#include <sys/mount.h>]])
|
||||||
|
|
||||||
# Enable large file support if available
|
# Enable large file support if available
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
@@ -210,6 +233,7 @@ esac
|
|||||||
|
|
||||||
AM_CONDITIONAL([CYGWIN], test "x$host_os_cygwin" = "xyes")
|
AM_CONDITIONAL([CYGWIN], test "x$host_os_cygwin" = "xyes")
|
||||||
AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes")
|
AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes")
|
||||||
|
AC_PATH_PROGS([DUPATH], [du], [du], [/usr/bin$PATH_SEPARATOR/bin] )
|
||||||
AC_SUBST(SIZECMD)
|
AC_SUBST(SIZECMD)
|
||||||
AC_SUBST(SEDINPLACE)
|
AC_SUBST(SEDINPLACE)
|
||||||
AC_SUBST(STRIP_BINARIES)
|
AC_SUBST(STRIP_BINARIES)
|
||||||
@@ -272,7 +296,7 @@ if test "x$wantdoc" = "xyes" ; then
|
|||||||
fi
|
fi
|
||||||
wantdoc=yes
|
wantdoc=yes
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no, disabled by configure])
|
||||||
wantdoc=no
|
wantdoc=no
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WANT_DOC, test "x$wantdoc" = "xyes")
|
AM_CONDITIONAL(WANT_DOC, test "x$wantdoc" = "xyes")
|
||||||
@@ -304,6 +328,7 @@ if test "x$debug" = "xyes" ; then
|
|||||||
# Check for -fstack-protector availability
|
# Check for -fstack-protector availability
|
||||||
GCC_STACK_PROTECT_LIB
|
GCC_STACK_PROTECT_LIB
|
||||||
GCC_STACK_PROTECT_CC
|
GCC_STACK_PROTECT_CC
|
||||||
|
GCC_FORTIFY_SOURCE_CC
|
||||||
CFLAGS="$CFLAGS -g -Wall -Werror"
|
CFLAGS="$CFLAGS -g -Wall -Werror"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -337,9 +362,6 @@ AC_DEFINE_UNQUOTED([PKGEXT], "$PKGEXT", [The file extension used by pacman packa
|
|||||||
# Set source package file extension
|
# Set source package file extension
|
||||||
AC_SUBST(SRCEXT)
|
AC_SUBST(SRCEXT)
|
||||||
AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman source packages])
|
AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman source packages])
|
||||||
# Set database file extension
|
|
||||||
AC_SUBST(DBEXT)
|
|
||||||
AC_DEFINE_UNQUOTED([DBEXT], "$DBEXT", [The file extension used by pacman databases])
|
|
||||||
# Set makepkg build script name
|
# Set makepkg build script name
|
||||||
AC_SUBST(BUILDSCRIPT)
|
AC_SUBST(BUILDSCRIPT)
|
||||||
AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg])
|
AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg])
|
||||||
@@ -392,12 +414,10 @@ ${PACKAGE_NAME}:
|
|||||||
root working directory : ${ROOTDIR}
|
root working directory : ${ROOTDIR}
|
||||||
package extension : ${PKGEXT}
|
package extension : ${PKGEXT}
|
||||||
source pkg extension : ${SRCEXT}
|
source pkg extension : ${SRCEXT}
|
||||||
database extension : ${DBEXT}
|
|
||||||
build script name : ${BUILDSCRIPT}
|
build script name : ${BUILDSCRIPT}
|
||||||
|
|
||||||
Compilation options:
|
Compilation options:
|
||||||
Run make in doc/ dir : ${wantdoc} ${asciidoc}
|
Run make in doc/ dir : ${wantdoc} ${asciidoc}
|
||||||
Use download library : ${internaldownload}
|
|
||||||
Doxygen support : ${usedoxygen}
|
Doxygen support : ${usedoxygen}
|
||||||
debug support : ${debug}
|
debug support : ${debug}
|
||||||
"
|
"
|
||||||
|
|||||||
8
contrib/.gitignore
vendored
Normal file
8
contrib/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
bacman
|
||||||
|
bash_completion
|
||||||
|
pacdiff
|
||||||
|
paclist
|
||||||
|
pacscripts
|
||||||
|
pacsearch
|
||||||
|
wget-xdelta.sh
|
||||||
|
zsh_completion
|
||||||
@@ -1,15 +1,61 @@
|
|||||||
EXTRA_DIST = \
|
OURSCRIPTS = \
|
||||||
PKGBUILD.vim \
|
|
||||||
bacman \
|
bacman \
|
||||||
bash_completion \
|
|
||||||
pacdiff \
|
pacdiff \
|
||||||
paclist \
|
paclist \
|
||||||
pacscripts \
|
pacscripts \
|
||||||
pacsearch \
|
pacsearch \
|
||||||
pactree \
|
wget-xdelta.sh
|
||||||
|
|
||||||
|
OURFILES = \
|
||||||
|
bash_completion \
|
||||||
|
zsh_completion
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
PKGBUILD.vim \
|
||||||
|
bacman.in \
|
||||||
|
bash_completion.in \
|
||||||
|
pacdiff.in \
|
||||||
|
paclist.in \
|
||||||
|
pacscripts.in \
|
||||||
|
pacsearch.in \
|
||||||
vimprojects \
|
vimprojects \
|
||||||
wget-xdelta.sh \
|
wget-xdelta.sh.in \
|
||||||
zsh_completion \
|
zsh_completion.in \
|
||||||
README
|
README
|
||||||
|
|
||||||
|
# Files that should be removed, but which Automake does not know.
|
||||||
|
MOSTLYCLEANFILES = $(OURSCRIPTS) $(OURFILES) *.tmp
|
||||||
|
|
||||||
|
edit = sed \
|
||||||
|
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
|
||||||
|
-e 's|@localstatedir[@]|$(localstatedir)|g' \
|
||||||
|
-e 's|@BASH_SHELL[@]|$(BASH_SHELL)|g'
|
||||||
|
|
||||||
|
$(OURSCRIPTS): Makefile
|
||||||
|
@echo ' ' GEN $@;
|
||||||
|
@rm -f $@ $@.tmp
|
||||||
|
@$(edit) $(srcdir)/$@.in >$@.tmp
|
||||||
|
@chmod +x $@.tmp
|
||||||
|
@chmod a-w $@.tmp
|
||||||
|
@mv $@.tmp $@
|
||||||
|
|
||||||
|
$(OURFILES): Makefile
|
||||||
|
@echo ' ' GEN $@;
|
||||||
|
@rm -f $@ $@.tmp
|
||||||
|
@$(edit) $(srcdir)/$@.in >$@.tmp
|
||||||
|
@chmod a-w $@.tmp
|
||||||
|
@mv $@.tmp $@
|
||||||
|
|
||||||
|
all-am: $(OURSCRIPTS) $(OURFILES)
|
||||||
|
|
||||||
|
bacman: $(srcdir)/bacman.in
|
||||||
|
bash_completion: $(srcdir)/bash_completion.in
|
||||||
|
pacdiff: $(srcdir)/pacdiff.in
|
||||||
|
paclist: $(srcdir)/paclist.in
|
||||||
|
pacscripts: $(srcdir)/pacscripts.in
|
||||||
|
pacsearch: $(srcdir)/pacsearch.in
|
||||||
|
pactree: $(srcdir)/pactree.in
|
||||||
|
wget-xdelta.sh: $(srcdir)/wget-xdelta.sh.in
|
||||||
|
zsh_completion: $(srcdir)/zsh_completion.in
|
||||||
|
|
||||||
# vim:set ts=2 sw=2 noet:
|
# vim:set ts=2 sw=2 noet:
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ syn match pbPkgverGroup /^pkgver=.*/ contains=pbIllegalPkgver,pbValidPkgver,pb_k
|
|||||||
|
|
||||||
" pkgrel
|
" pkgrel
|
||||||
syn keyword pb_k_pkgrel pkgrel contained
|
syn keyword pb_k_pkgrel pkgrel contained
|
||||||
syn match pbValidPkgrel /[[:digit:]]*/ contained contains=pbIllegalPkgver
|
syn match pbValidPkgrel /[[:digit:]]*/ contained contains=pbIllegalPkgrel
|
||||||
syn match pbIllegalPkgrel /[^[:digit:]=]\|=.*=/ contained
|
syn match pbIllegalPkgrel /[^[:digit:]=]\|=.*=/ contained
|
||||||
syn match pbPkgrelGroup /^pkgrel=.*/ contains=pbIllegalPkgrel,pbValidPkgrel,pb_k_pkgrel,shDoubleQuote,shSingleQuote
|
syn match pbPkgrelGroup /^pkgrel=.*/ contains=pbIllegalPkgrel,pbValidPkgrel,pb_k_pkgrel,shDoubleQuote,shSingleQuote
|
||||||
|
|
||||||
@@ -52,6 +52,12 @@ syn match pbValidPkgdesc /[^='"]\.\{,80}/ contained contains=pbIllegalPkgdesc
|
|||||||
syn match pbPkgdescGroup /^pkgdesc=.*/ contains=pbIllegalPkgdesc,pb_k_desc,pbValidPkgdesc,shDoubleQuote,shSingleQuote
|
syn match pbPkgdescGroup /^pkgdesc=.*/ contains=pbIllegalPkgdesc,pb_k_desc,pbValidPkgdesc,shDoubleQuote,shSingleQuote
|
||||||
syn match pbPkgdescSign /[='"]/ contained
|
syn match pbPkgdescSign /[='"]/ contained
|
||||||
|
|
||||||
|
" epoch
|
||||||
|
syn keyword pb_k_epoch epoch contained
|
||||||
|
syn match pbValidEpoch /[[:digit:]]*/ contained contains=pbIllegalEpoch
|
||||||
|
syn match pbIllegalEpoch /[^[:digit:]=]\|=.*=/ contained
|
||||||
|
syn match pbEpochGroup /^epoch=.*/ contains=pbIllegalEpoch,pbValidEpoch,pb_k_epoch,shDoubleQuote,shSingleQuote
|
||||||
|
|
||||||
" url
|
" url
|
||||||
syn keyword pb_k_url url contained
|
syn keyword pb_k_url url contained
|
||||||
syn match pbValidUrl /['"]*\(https\|http\|ftp\)\:\/.*\.\+.*/ contained
|
syn match pbValidUrl /['"]*\(https\|http\|ftp\)\:\/.*\.\+.*/ contained
|
||||||
@@ -61,10 +67,13 @@ syn match pbUrlGroup /^url=.*/ contains=pbValidUrl,pb_k_url,pbIllegalUrl,shDoubl
|
|||||||
|
|
||||||
" license
|
" license
|
||||||
syn keyword pb_k_license license contained
|
syn keyword pb_k_license license contained
|
||||||
syn keyword pbLicense APACHE CCPL CDDL CPL EPL FDL FDL1.2 FDL1.3 GPL GPL2 GPL3 LGPL LGPL2.1 LGPL3 LPPL MPL PHP PSF PerlArtistic RALINK RUBY ZPL contained
|
" echo $(pacman -Ql licenses | grep '/usr/share/licenses/common/' | cut -d'/' -f6 | sort -u)
|
||||||
|
syn keyword pbLicense APACHE CCPL CDDL CPL EPL FDL FDL1.2 FDL1.3 GPL GPL2 GPL3 LGPL LGPL2.1 LGPL3 LPPL MPL PerlArtistic PHP PSF RALINK RUBY ZPL contained
|
||||||
|
" special cases from http://wiki.archlinux.org/index.php/Arch_Packaging_Standards
|
||||||
|
syn keyword pbLicenseSpecial BSD MIT ZLIB Python contained
|
||||||
syn match pbLicenseCustom /custom\(:[[:alnum:]]*\)*/ contained
|
syn match pbLicenseCustom /custom\(:[[:alnum:]]*\)*/ contained
|
||||||
syn match pbIllegalLicense /[^='"() ]/ contained contains=pbLicenseCustom,pbLicense
|
syn match pbIllegalLicense /[^='"() ]/ contained contains=pbLicenseCustom,pbLicenseSpecial,pbLicense
|
||||||
syn region pbLicenseGroup start=/^license=(/ end=/)/ contains=pb_k_license,pbLicenseCustom,pbLicense,pbIllegalLicense
|
syn region pbLicenseGroup start=/^license=(/ end=/)/ contains=pb_k_license,pbLicenseCustom,pbLicenseSpecial,pbLicense,pbIllegalLicense
|
||||||
|
|
||||||
" backup
|
" backup
|
||||||
syn keyword pb_k_backup backup contained
|
syn keyword pb_k_backup backup contained
|
||||||
@@ -163,7 +172,7 @@ hi def link pbValidSha1sums Number
|
|||||||
|
|
||||||
" options
|
" options
|
||||||
syn keyword pb_k_options options contained
|
syn keyword pb_k_options options contained
|
||||||
syn match pbOptions /\(no\)\?\(strip\|docs\|libtool\|emptydirs\|zipman\|ccache\|distcc\|makeflags\|force\)/ contained
|
syn match pbOptions /\(no\)\?\(strip\|docs\|libtool\|emptydirs\|zipman\|ccache\|distcc\|makeflags\|buildflags\)/ contained
|
||||||
syn match pbOptionsNeg /\!/ contained
|
syn match pbOptionsNeg /\!/ contained
|
||||||
syn match pbOptionsDeprec /no/ contained
|
syn match pbOptionsDeprec /no/ contained
|
||||||
syn region pbOptionsGroup start=/^options=(/ end=/)/ contains=pb_k_options,pbOptions,pbOptionsNeg,pbOptionsDeprec,pbIllegalOption,shDoubleQuote,shSingleQuote
|
syn region pbOptionsGroup start=/^options=(/ end=/)/ contains=pb_k_options,pbOptions,pbOptionsNeg,pbOptionsDeprec,pbIllegalOption,shDoubleQuote,shSingleQuote
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ pacsearch - a colorized search combining both -Ss and -Qs output. Installed
|
|||||||
packages are easily identified with a *** and local-only packages are also
|
packages are easily identified with a *** and local-only packages are also
|
||||||
listed.
|
listed.
|
||||||
|
|
||||||
pactree - generate a dependency tree of an installed package in textual or
|
|
||||||
graphical form (using graphviz).
|
|
||||||
|
|
||||||
bacman - regenerate a pacman package based on installed files and the pacman
|
bacman - regenerate a pacman package based on installed files and the pacman
|
||||||
database entries. Useful for reuse, or possible config file extension.
|
database entries. Useful for reuse, or possible config file extension.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!@BASH_SHELL@
|
||||||
#
|
#
|
||||||
# bacman: recreate a package from a running system
|
# bacman: recreate a package from a running system
|
||||||
# This script rebuilds an already installed package using metadata
|
# This script rebuilds an already installed package using metadata
|
||||||
@@ -67,27 +67,26 @@ fi
|
|||||||
#
|
#
|
||||||
# Setting environmental variables
|
# Setting environmental variables
|
||||||
#
|
#
|
||||||
if [ ! -r /etc/pacman.conf ]; then
|
if [ ! -r @sysconfdir@/pacman.conf ]; then
|
||||||
echo "ERROR: unable to read /etc/pacman.conf"
|
echo "ERROR: unable to read @sysconfdir@/pacman.conf"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval $(awk '/DBPath/ {print $1$2$3}' /etc/pacman.conf)
|
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
|
||||||
pac_db="${DBPath:-/var/lib/pacman/}/local"
|
pac_db="${DBPath:-@localstatedir@/lib/pacman/}/local"
|
||||||
|
|
||||||
if [ ! -r /etc/makepkg.conf ]; then
|
if [ ! -r @sysconfdir@/makepkg.conf ]; then
|
||||||
echo "ERROR: unable to read /etc/makepkg.conf"
|
echo "ERROR: unable to read @sysconfdir@/makepkg.conf"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "/etc/makepkg.conf"
|
source "@sysconfdir@/makepkg.conf"
|
||||||
if [ -r ~/.makepkg.conf ]; then
|
if [ -r ~/.makepkg.conf ]; then
|
||||||
source ~/.makepkg.conf
|
source ~/.makepkg.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkg_arch=${CARCH:-'unknown'}
|
pkg_arch=${CARCH:-'unknown'}
|
||||||
pkg_dest="${PKGDEST:-$PWD}"
|
pkg_dest="${PKGDEST:-$PWD}"
|
||||||
pkg_ext=${PKGEXT:-'.pkg.tar.gz'}
|
|
||||||
pkg_pkger=${PACKAGER:-'Unknown Packager'}
|
pkg_pkger=${PACKAGER:-'Unknown Packager'}
|
||||||
|
|
||||||
pkg_name="$1"
|
pkg_name="$1"
|
||||||
@@ -164,13 +163,6 @@ fi
|
|||||||
|
|
||||||
pkg_size=$(du -sk | awk '{print $1 * 1024}')
|
pkg_size=$(du -sk | awk '{print $1 * 1024}')
|
||||||
|
|
||||||
if [ -f "$pkg_dir/install" ] ; then
|
|
||||||
cp "$pkg_dir/install" "$work_dir/.INSTALL"
|
|
||||||
fi
|
|
||||||
if [ -f $pkg_dir/changelog ] ; then
|
|
||||||
cp "$pkg_dir/changelog" "$work_dir/.CHANGELOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# .PKGINFO stuff
|
# .PKGINFO stuff
|
||||||
#
|
#
|
||||||
@@ -228,9 +220,6 @@ while read i; do
|
|||||||
%REPLACES%)
|
%REPLACES%)
|
||||||
echo "replaces = $i" >> .PKGINFO
|
echo "replaces = $i" >> .PKGINFO
|
||||||
;;
|
;;
|
||||||
%FORCE%)
|
|
||||||
echo "force = true" >> .PKGINFO
|
|
||||||
;;
|
|
||||||
|
|
||||||
# files
|
# files
|
||||||
%BACKUP%)
|
%BACKUP%)
|
||||||
@@ -254,6 +243,17 @@ while read i; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
comp_files=".PKGINFO"
|
||||||
|
|
||||||
|
if [ -f "$pkg_dir/install" ] ; then
|
||||||
|
cp "$pkg_dir/install" "$work_dir/.INSTALL"
|
||||||
|
comp_files+=" .INSTALL"
|
||||||
|
fi
|
||||||
|
if [ -f $pkg_dir/changelog ] ; then
|
||||||
|
cp "$pkg_dir/changelog" "$work_dir/.CHANGELOG"
|
||||||
|
comp_files+=" .CHANGELOG"
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Fixes owner:group and permissions for .PKGINFO, .CHANGELOG, .INSTALL
|
# Fixes owner:group and permissions for .PKGINFO, .CHANGELOG, .INSTALL
|
||||||
#
|
#
|
||||||
@@ -265,8 +265,31 @@ chmod 644 "$work_dir"/{.PKGINFO,.CHANGELOG,.INSTALL} 2> /dev/null
|
|||||||
#
|
#
|
||||||
echo "Generating the package..."
|
echo "Generating the package..."
|
||||||
|
|
||||||
|
case "$PKGEXT" in
|
||||||
|
*tar.gz) EXT=${PKGEXT%.gz} ;;
|
||||||
|
*tar.bz2) EXT=${PKGEXT%.bz2} ;;
|
||||||
|
*tar.xz) EXT=${PKGEXT%.xz} ;;
|
||||||
|
*tar) EXT=${PKGEXT} ;;
|
||||||
|
*) echo "WARNING: '%s' is not a valid archive extension." \
|
||||||
|
"$PKGEXT" ; EXT=$PKGEXT ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
pkg_file="$pkg_dest/$pkg_namver-$pkg_arch${PKGEXT}"
|
||||||
ret=0
|
ret=0
|
||||||
bsdtar -czf "$pkg_dest/$pkg_namver-$pkg_arch$pkg_ext" $(ls -A) || ret=$?
|
|
||||||
|
# when fileglobbing, we want * in an empty directory to expand to
|
||||||
|
# the null string rather than itself
|
||||||
|
shopt -s nullglob
|
||||||
|
# TODO: Maybe this can be set globally for robustness
|
||||||
|
shopt -s -o pipefail
|
||||||
|
bsdtar -cf - $comp_files * |
|
||||||
|
case "$PKGEXT" in
|
||||||
|
*tar.gz) gzip -c -f -n ;;
|
||||||
|
*tar.bz2) bzip2 -c -f ;;
|
||||||
|
*tar.xz) xz -c -z - ;;
|
||||||
|
*tar) cat ;;
|
||||||
|
esac > ${pkg_file} || ret=$?
|
||||||
|
|
||||||
if [ $ret -ne 0 ]; then
|
if [ $ret -ne 0 ]; then
|
||||||
echo "ERROR: unable to write package to $pkg_dest"
|
echo "ERROR: unable to write package to $pkg_dest"
|
||||||
echo " Maybe the disk is full or you do not have write access"
|
echo " Maybe the disk is full or you do not have write access"
|
||||||
@@ -30,8 +30,7 @@ _arch_incomp() {
|
|||||||
_makepkg() {
|
_makepkg() {
|
||||||
local cur opts prev
|
local cur opts prev
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=$(_get_cword)
|
_get_comp_words_by_ref cur prev
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
if [[ $cur = -* && ! $prev =~ ^-(-(cleancache|config|help)$|\w*[Chp]) ]]; then
|
if [[ $cur = -* && ! $prev =~ ^-(-(cleancache|config|help)$|\w*[Chp]) ]]; then
|
||||||
opts=('allsource asroot clean cleancache config force geninteg help holdver
|
opts=('allsource asroot clean cleancache config force geninteg help holdver
|
||||||
ignorearch install log nobuild nocolor noconfirm nodeps noextract
|
ignorearch install log nobuild nocolor noconfirm nodeps noextract
|
||||||
@@ -52,15 +51,10 @@ _pacman_pkg() {
|
|||||||
)"
|
)"
|
||||||
}
|
}
|
||||||
|
|
||||||
_pacman_file() {
|
|
||||||
compopt -o filenames; _filedir 'pkg.tar.*'
|
|
||||||
}
|
|
||||||
|
|
||||||
_pacman() {
|
_pacman() {
|
||||||
local common core cur database prev query remove sync upgrade o
|
local common core cur database prev query remove sync upgrade o
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=$(_get_cword)
|
_get_comp_words_by_ref cur prev
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
database=('asdeps asexplicit')
|
database=('asdeps asexplicit')
|
||||||
query=('changelog check deps explicit file foreign groups info list owns
|
query=('changelog check deps explicit file foreign groups info list owns
|
||||||
search unrequired upgrades' 'c e g i k l m o p s t u')
|
search unrequired upgrades' 'c e g i k l m o p s t u')
|
||||||
@@ -79,8 +73,8 @@ _pacman() {
|
|||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
_arch_ptr2comp core
|
_arch_ptr2comp core
|
||||||
elif ! [[ $prev =~ ^-\w*[Vbhr] ||
|
elif [[ ! $prev =~ ^-\w*[Vbhr] &&
|
||||||
$prev = --@(cachedir|config|dbpath|help|logfile|root|version) ]]
|
! $prev = --@(cachedir|config|dbpath|help|logfile|root|version) ]]
|
||||||
then
|
then
|
||||||
[[ $cur = -* ]] && _arch_ptr2comp ${o#* } common ||
|
[[ $cur = -* ]] && _arch_ptr2comp ${o#* } common ||
|
||||||
case ${o% *} in
|
case ${o% *} in
|
||||||
@@ -102,7 +96,18 @@ _pacman() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ $(type -t compopt) = "builtin" ]]; then
|
||||||
|
_pacman_file() {
|
||||||
|
compopt -o filenames; _filedir 'pkg.tar.*'
|
||||||
|
}
|
||||||
|
complete -F _pacman -o default pacman
|
||||||
|
else
|
||||||
|
_pacman_file() {
|
||||||
|
_filedir 'pkg.tar.*'
|
||||||
|
}
|
||||||
|
complete -F _pacman -o filenames -o default pacman
|
||||||
|
fi
|
||||||
|
|
||||||
complete -F _makepkg -o default makepkg
|
complete -F _makepkg -o default makepkg
|
||||||
complete -F _pacman -o default pacman
|
|
||||||
|
|
||||||
# ex:et ts=2 sw=2 ft=sh
|
# ex:et ts=2 sw=2 ft=sh
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!@BASH_SHELL@
|
||||||
# pacdiff : a simple pacnew/pacorig/pacsave updater
|
# pacdiff : a simple pacnew/pacorig/pacsave updater
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 Aaron Griffin <aaronmgriffin@gmail.com>
|
# Copyright (c) 2007 Aaron Griffin <aaronmgriffin@gmail.com>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!@BASH_SHELL@
|
||||||
#
|
#
|
||||||
# pacscripts : tries to print out the {pre,post}_{install,remove,upgrade}
|
# pacscripts : tries to print out the {pre,post}_{install,remove,upgrade}
|
||||||
# scripts of a given package
|
# scripts of a given package
|
||||||
@@ -27,7 +27,7 @@ set -o errexit
|
|||||||
progname=$(basename $0)
|
progname=$(basename $0)
|
||||||
progver="0.4"
|
progver="0.4"
|
||||||
|
|
||||||
conf="/etc/pacman.conf"
|
conf="@sysconfdir@/pacman.conf"
|
||||||
|
|
||||||
if [ ! -r "$conf" ]; then
|
if [ ! -r "$conf" ]; then
|
||||||
echo "ERROR: unable to read $conf"
|
echo "ERROR: unable to read $conf"
|
||||||
@@ -36,8 +36,8 @@ fi
|
|||||||
|
|
||||||
eval $(awk '/DBPath/ {print $1$2$3}' "$conf")
|
eval $(awk '/DBPath/ {print $1$2$3}' "$conf")
|
||||||
eval $(awk '/CacheDir/ {print $1$2$3}' "$conf")
|
eval $(awk '/CacheDir/ {print $1$2$3}' "$conf")
|
||||||
pac_db="${DBPath:-/var/lib/pacman}/local"
|
pac_db="${DBPath:-@localstatedir@/lib/pacman}/local"
|
||||||
pac_cache="${CacheDir:-/var/cache/pacman/pkg}"
|
pac_cache="${CacheDir:-@localstatedir@/cache/pacman/pkg}"
|
||||||
|
|
||||||
error() {
|
error() {
|
||||||
local mesg=$1; shift
|
local mesg=$1; shift
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# pacsearch - Adds color and install information to a 'pacman -Ss' search
|
# pacsearch - Adds color and install information to a 'pacman -Ss' search
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008, 2010 Dan McGee <dpmcgee@gmail.com>
|
# Copyright (C) 2008-2011 Dan McGee <dan@archlinux.org>
|
||||||
#
|
#
|
||||||
# Based off original shell script version:
|
# Based off original shell script version:
|
||||||
# Copyright (C) 2006-2007 Dan McGee <dpmcgee@gmail.com>
|
# Copyright (C) 2006-2007 Dan McGee <dan@archlinux.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -39,7 +39,7 @@ if ($#ARGV lt 0 || $ARGV[0] eq "--help" || $ARGV[0] eq "-h") {
|
|||||||
|
|
||||||
if ($ARGV[0] eq "--version" || $ARGV[0] eq "-v") {
|
if ($ARGV[0] eq "--version" || $ARGV[0] eq "-v") {
|
||||||
print "$progname version $version\n";
|
print "$progname version $version\n";
|
||||||
print "Copyright (C) 2006-2010 Dan McGee\n";
|
print "Copyright (C) 2006-2011 Dan McGee\n";
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +65,7 @@ sub to_color {
|
|||||||
$line =~ s/(^community\/.*)/$CLR3$1$BASE/;
|
$line =~ s/(^community\/.*)/$CLR3$1$BASE/;
|
||||||
$line =~ s/(^testing\/.*)/$CLR4$1$BASE/;
|
$line =~ s/(^testing\/.*)/$CLR4$1$BASE/;
|
||||||
$line =~ s/(^community-testing\/.*)/$CLR5$1$BASE/;
|
$line =~ s/(^community-testing\/.*)/$CLR5$1$BASE/;
|
||||||
|
$line =~ s/(^multilib\/.*)/$CLR6$1$BASE/;
|
||||||
$line =~ s/(^local\/.*)/$CLR7$1$BASE/;
|
$line =~ s/(^local\/.*)/$CLR7$1$BASE/;
|
||||||
# any other unknown repository
|
# any other unknown repository
|
||||||
$line =~ s/(^[\w-]*\/.*)/$CLR6$1$BASE/;
|
$line =~ s/(^[\w-]*\/.*)/$CLR6$1$BASE/;
|
||||||
@@ -86,6 +87,11 @@ my $cnt = 0;
|
|||||||
foreach $_ (@syncpkgs) {
|
foreach $_ (@syncpkgs) {
|
||||||
# we grab 4 fields here: repo, name/ver, installed, and desc
|
# we grab 4 fields here: repo, name/ver, installed, and desc
|
||||||
my @pkgfields = /^(.*?)\/(.*?) ?(\[.*\])?\n(.*)$/s;
|
my @pkgfields = /^(.*?)\/(.*?) ?(\[.*\])?\n(.*)$/s;
|
||||||
|
if(not @pkgfields) {
|
||||||
|
# skip any non-matching line and just print it for the user
|
||||||
|
print $_, "\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
# since installed is optional, we should fill it in if necessary
|
# since installed is optional, we should fill it in if necessary
|
||||||
$pkgfields[2] = "" if not defined $pkgfields[2];
|
$pkgfields[2] = "" if not defined $pkgfields[2];
|
||||||
# add a fifth field that indicates original order
|
# add a fifth field that indicates original order
|
||||||
321
contrib/pactree
321
contrib/pactree
@@ -1,321 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# pactree : a simple dependency tree viewer
|
|
||||||
#
|
|
||||||
# Copyright (C) 2008 Carlo "carlocci" Bersani <carlocci@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License
|
|
||||||
# as published by the Free Software Foundation; either version 2
|
|
||||||
# of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# Original http://carlocci.ngi.it/arch/pactree
|
|
||||||
# Credit to scj for the graphviz idea
|
|
||||||
|
|
||||||
# set the colors
|
|
||||||
branch1_color="\033[0;33m" #Brown
|
|
||||||
branch2_color="\033[0;37m" #Gray
|
|
||||||
leaf_color="\033[1;32m" #Light green
|
|
||||||
leaf2_color="\033[0;32m" #Green
|
|
||||||
|
|
||||||
# set the separators
|
|
||||||
separator=" "
|
|
||||||
branch_tip1="|--"
|
|
||||||
branch_tip2="+--"
|
|
||||||
provides="provides "
|
|
||||||
|
|
||||||
# set the graphviz options
|
|
||||||
# http://www.graphviz.org/doc/info/output.html for available output formats
|
|
||||||
# http://www.graphviz.org/doc/info/colors.html for available colors
|
|
||||||
gformat="png" #output format
|
|
||||||
start_color="red" #START color
|
|
||||||
nodes_color="green" #color of the nodes
|
|
||||||
arrow1_color="chocolate4" #color of the normal arrow
|
|
||||||
arrow2_color="grey" #color of the "provided by" headless arrow
|
|
||||||
|
|
||||||
readonly prog_name="pactree"
|
|
||||||
readonly prog_ver="0.3"
|
|
||||||
|
|
||||||
_usage(){
|
|
||||||
echo "This program generates the dependency tree of an installed package"
|
|
||||||
echo "Usage: $prog_name [OPTIONS] <installed packages>"
|
|
||||||
echo
|
|
||||||
echo " OPTIONS:"
|
|
||||||
echo " -c, --color Enable color output"
|
|
||||||
echo " -d, --depth INT Limit the shown dependencies depth"
|
|
||||||
echo " -g, --graph Use graphviz to make an image of the tree"
|
|
||||||
echo " -l, --linear Enable linear output"
|
|
||||||
echo " -r, --reversed Show reversed dependancies"
|
|
||||||
echo " -s, --silent Shh, let me hear those errors!"
|
|
||||||
echo " -u, --unique Print the dependency list with no duplicates"
|
|
||||||
echo
|
|
||||||
echo " -h, --help Print this help message"
|
|
||||||
echo " -v, --version Print the program name and version"
|
|
||||||
echo
|
|
||||||
echo "Example: $prog_name -c -d2 readline"
|
|
||||||
}
|
|
||||||
|
|
||||||
_version(){
|
|
||||||
echo "$prog_name version $prog_ver"
|
|
||||||
echo "Copyright (C) 2008 Carlo \"carlocci\" Bersani <carlocci@gmail.com>"
|
|
||||||
}
|
|
||||||
# end of the friendliness
|
|
||||||
|
|
||||||
|
|
||||||
# grab a field from the database: $1=path/to/file, $2=field to grab
|
|
||||||
_grabfield(){
|
|
||||||
for line in $(cat "$1" 2>/dev/null ); do
|
|
||||||
if [ -z "$line" ]; then
|
|
||||||
continue;
|
|
||||||
fi;
|
|
||||||
if [[ "$line" =~ %[A-Z]*% ]]; then
|
|
||||||
current="$line"
|
|
||||||
continue;
|
|
||||||
fi;
|
|
||||||
if [ "$current" = "$2" ]; then
|
|
||||||
echo "$line"
|
|
||||||
fi;
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# find a dep in the db: $1=dep, $2=field, $3=dbfile, ret=file list
|
|
||||||
_finddep(){
|
|
||||||
for line in $(awk 'BEGIN{RS=""}
|
|
||||||
{
|
|
||||||
if ($1=="'"$2"'"){
|
|
||||||
for (i=2 ; i<=NF ; ++i){
|
|
||||||
if ($i ~ /^'"$1"'([<>=]+.*|)$/ ){
|
|
||||||
print FILENAME}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}' $(find $pac_db -name $3)); do
|
|
||||||
echo "${line%/*}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Recursive function: does all of the work, pays all of the taxes #
|
|
||||||
_tree(){
|
|
||||||
pkg_name="$1"
|
|
||||||
pkg_dirs="$(echo $pac_db/$pkg_name-[0-9]*)"
|
|
||||||
|
|
||||||
# Is $pkg_name real or provided?
|
|
||||||
[ ! -d "$pkg_dirs" ] && pkg_dirs="$(_finddep $pkg_name %PROVIDES% depends)"
|
|
||||||
|
|
||||||
for pkg_dir in $pkg_dirs ; do
|
|
||||||
spaces="$2"
|
|
||||||
unset provided
|
|
||||||
branch_tip="$branch_tip1"
|
|
||||||
branch_color="$branch1_color"
|
|
||||||
pkg_name="$(_grabfield "$pkg_dir/desc" %NAME%)"
|
|
||||||
if [ ! "$pkg_name" = "$1" ]; then
|
|
||||||
provided="$leaf2_color $provides$leaf_color$1"
|
|
||||||
branch_tip="$branch_tip2"
|
|
||||||
branch_color="$branch2_color"
|
|
||||||
if [ $graphviz -eq 1 ] && [[ ! "${dep_list[@]}" =~ _$1_ ]] && [ $spaces -ne $((max_depth+1)) ]; then
|
|
||||||
echo "\"$1\" -> \"$pkg_name\" [arrowhead=none, color=$arrow2_color];"
|
|
||||||
dep_list=( "${dep_list[@]}" "_$1_" )
|
|
||||||
_tree "$pkg_name" $((spaces+1))
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generate the spacer
|
|
||||||
spacer=""
|
|
||||||
for each in $(seq 1 $spaces); do
|
|
||||||
spacer="$spacer$separator"
|
|
||||||
done
|
|
||||||
spacer="$spacer$branch_tip"
|
|
||||||
|
|
||||||
[ $silent -ne 1 ] && echo -e "$branch_color$spacer$leaf_color$pkg_name$provided"
|
|
||||||
|
|
||||||
[ ! -d "$pkg_dir" ] && echo "No $pkg_name in the database (inconsistent database?)" >&2
|
|
||||||
|
|
||||||
if [[ ! " ${dep_list[@]} " =~ " $pkg_name " ]] && [ $spaces -ne $max_depth ]; then
|
|
||||||
dep_list=( "${dep_list[@]}" "$pkg_name" )
|
|
||||||
if [ $reversed_dep -eq 0 ]; then
|
|
||||||
deps_pkg="$(_grabfield "$pkg_dir/depends" %DEPENDS%)"
|
|
||||||
else
|
|
||||||
reqs_pkg_dir="$(_finddep "$pkg_name" %DEPENDS% depends)"
|
|
||||||
unset deps_pkg
|
|
||||||
for req_pkg_dir in $reqs_pkg_dir; do
|
|
||||||
deps_pkg=$(echo "$deps_pkg" "$(_grabfield "$req_pkg_dir/desc" %NAME%)")
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
for dep_pkg in $deps_pkg; do
|
|
||||||
spaces=$2 #Bash scoping ;_;
|
|
||||||
if [ $graphviz -eq 1 ]; then
|
|
||||||
echo "\"$1\" -> \"${dep_pkg%%[<>=]*}\" [color=$arrow1_color];"
|
|
||||||
fi
|
|
||||||
_tree "${dep_pkg%%[<>=]*}" $((spaces+1))
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Main program: gets all of the money, pays none of the taxes
|
|
||||||
|
|
||||||
# Command line parameters parser
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
_usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
options=( "$@" )
|
|
||||||
len_options=${#options[@]}
|
|
||||||
for (( n=0 ; n < $len_options ; n++ )); do
|
|
||||||
if [ "${options[$n]}" = "--" ]; then
|
|
||||||
unset options[$n]
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [ "${options[$n]}" = "-h" -o "${options[$n]}" = "--help" ]; then
|
|
||||||
_usage
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${options[$n]}" = "-v" -o "${options[$n]}" = "--version" ]; then
|
|
||||||
_version
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${options[$n]}" = "-l" -o "${options[$n]}" = "--linear" ]; then
|
|
||||||
unset options[$n]
|
|
||||||
linear=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${options[$n]}" = "-s" -o "${options[$n]}" = "--silent" ]; then
|
|
||||||
unset options[$n]
|
|
||||||
silent=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${options[$n]}" = "-u" -o "${options[$n]}" = "--unique" ]; then
|
|
||||||
unset options[$n]
|
|
||||||
silent=1
|
|
||||||
nodup=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${options[$n]}" = "-g" -o "${options[$n]}" = "--graph" ]; then
|
|
||||||
unset options[$n]
|
|
||||||
graphviz=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${options[$n]}" = "-c" -o "${options[$n]}" = "--color" ]; then
|
|
||||||
unset options[$n]
|
|
||||||
colored=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${options[$n]}" = "-r" -o "${options[$n]}" = "--reversed" ]; then
|
|
||||||
unset options[$n]
|
|
||||||
reversed_dep=1
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${options[$n]}" =~ -d[[:digit:]]+ || "${options[$n]}" == "--depth" ]]; then
|
|
||||||
if [[ "${options[$n]#-d}" =~ [[:digit:]]+ ]]; then
|
|
||||||
max_depth="${options[$n]#-d}"
|
|
||||||
elif [[ ${options[$((n+1))]} =~ [[:digit:]]+ ]]; then
|
|
||||||
max_depth="${options[$((n+1))]}"
|
|
||||||
unset options[$((n+1))]
|
|
||||||
((++n))
|
|
||||||
fi
|
|
||||||
unset options[$n]
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# End of the dumb command line parser
|
|
||||||
|
|
||||||
# Env
|
|
||||||
colored=${colored:-0}
|
|
||||||
max_depth=${max_depth:--10}
|
|
||||||
linear=${linear:-0}
|
|
||||||
silent=${silent:-0}
|
|
||||||
nodup=${nodup:-0}
|
|
||||||
graphviz=${graphviz:-0}
|
|
||||||
reversed_dep=${reversed_dep:-0}
|
|
||||||
|
|
||||||
if [ $colored -ne 1 ]; then
|
|
||||||
unset branch1_color
|
|
||||||
unset leaf_color
|
|
||||||
unset leaf2_color
|
|
||||||
unset branch2_color
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $linear -eq 1 ]; then
|
|
||||||
unset separator
|
|
||||||
unset branch_tip1
|
|
||||||
unset branch_tip2
|
|
||||||
unset provides
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $graphviz -eq 1 ]; then
|
|
||||||
silent=1
|
|
||||||
nodup=0
|
|
||||||
if [ ! -f /usr/bin/dot ]; then
|
|
||||||
echo "ERROR: package graphviz is not installed"
|
|
||||||
echo " Run pacman -S graphviz to install it"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -r /etc/pacman.conf ]; then
|
|
||||||
echo "ERROR: unable to read /etc/pacman.conf"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
eval $(awk '/DBPath/ {print $1$2$3}' /etc/pacman.conf)
|
|
||||||
fi
|
|
||||||
|
|
||||||
pac_db="${DBPath:-/var/lib/pacman}/local"
|
|
||||||
|
|
||||||
if [ ! -d "$pac_db" ] ; then
|
|
||||||
echo "ERROR: pacman database directory ${pac_db} not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# Env End
|
|
||||||
|
|
||||||
|
|
||||||
# Program starts
|
|
||||||
_main(){
|
|
||||||
for pkg_name in ${options[@]} ; do
|
|
||||||
[ $graphviz -eq 1 ] && echo -e "\"START\" -> \"$pkg_name\" ;"
|
|
||||||
_tree "$pkg_name" 0
|
|
||||||
if [ $nodup -eq 1 ]; then
|
|
||||||
for pkg_tree in ${dep_list[@]} ; do
|
|
||||||
echo "$pkg_tree"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ $silent -eq 0 ]; then
|
|
||||||
echo -ne '\033[0m' # return colors to normal?
|
|
||||||
echo -ne '\033[?25h' #return cursor to normal?
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if [ $graphviz -eq 1 ]; then
|
|
||||||
root_pkgs="${options[@]}"
|
|
||||||
# Uncomment for the "generated by pactree" node in graphviz
|
|
||||||
#advert="xyz [height=0.07, fontsize=8.0, label=\"GENERATED WITH PACTREE\",shape=box,color="black",style=filled,fontcolor="white"];\n"
|
|
||||||
if [ $reversed_dep -eq 0 ]; then
|
|
||||||
file_extension="deps.$gformat"
|
|
||||||
else
|
|
||||||
file_extension="reqs.$gformat"
|
|
||||||
fi
|
|
||||||
echo -e "digraph G { START [color=$start_color, style=filled];\n node [style=filled, color=$nodes_color];\n$(_main)\n$advert}" | dot -T$gformat -o "${root_pkgs// /_}.$file_extension"
|
|
||||||
else _main
|
|
||||||
fi
|
|
||||||
|
|
||||||
# vim: set ts=2 sw=2 noet:
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!@BASH_SHELL@
|
||||||
|
|
||||||
if [ -r "/etc/makepkg.conf" ]; then
|
if [ -r "@sysconfdir@/makepkg.conf" ]; then
|
||||||
source /etc/makepkg.conf
|
source @sysconfdir@/makepkg.conf
|
||||||
else
|
else
|
||||||
echo "wget-xdelta: Unable to find makepkg.conf"
|
echo "wget-xdelta: Unable to find makepkg.conf"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -30,11 +30,11 @@ new_version=$(echo $pkg_data | cut -d ' ' -f 2)
|
|||||||
base_url=${file_url%/*}
|
base_url=${file_url%/*}
|
||||||
|
|
||||||
# Look for the last version
|
# Look for the last version
|
||||||
for file in $(ls -r /var/cache/pacman/pkg/${pkgname}-*-*{,-$CARCH}$PKGEXT 2>/dev/null); do
|
for file in $(ls -r @localstatedir@/cache/pacman/pkg/${pkgname}-*-*{,-$CARCH}$PKGEXT 2>/dev/null); do
|
||||||
[[ "$file" =~ "$CARCH" ]] && arch="-$CARCH" || arch=""
|
[[ "$file" =~ "$CARCH" ]] && arch="-$CARCH" || arch=""
|
||||||
check_version=$(echo $file | \
|
check_version=$(echo $file | \
|
||||||
sed "s|^.*/${pkgname}-\([[:alnum:]_\.]*-[[:alnum:]_\.]*\)${arch}$PKGEXT$|\1|" | \
|
sed "s|^.*/${pkgname}-\([[:alnum:]_\.]*-[[:alnum:]_\.]*\)${arch}$PKGEXT$|\1|" | \
|
||||||
grep -v "^/var/cache/pacman/pkg")
|
grep -v "^@localstatedir@/cache/pacman/pkg")
|
||||||
|
|
||||||
[ "$check_version" = "" ] && continue
|
[ "$check_version" = "" ] && continue
|
||||||
|
|
||||||
@@ -222,20 +222,20 @@ _pacman_completions_all_groups() {
|
|||||||
_pacman_completions_all_packages() {
|
_pacman_completions_all_packages() {
|
||||||
local -a cmd packages repositories packages_long
|
local -a cmd packages repositories packages_long
|
||||||
|
|
||||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||||
typeset -U repositories
|
typeset -U repositories
|
||||||
packages_long=(/var/lib/pacman/sync/${^repositories}/*(/))
|
packages_long=(@localstatedir@/lib/pacman/sync/${^repositories}/*(/))
|
||||||
packages=(${(o)${${packages_long/\/var\/lib\/pacman\/sync\//}#*/}%-*-*} )
|
packages=(${(o)${${packages_long#@localstatedir@/lib/pacman/sync/}#*/}%-*-*} )
|
||||||
typeset -U packages
|
typeset -U packages
|
||||||
_wanted packages expl "packages" compadd - "${(@)packages}"
|
_wanted packages expl "packages" compadd - "${(@)packages}"
|
||||||
if [[ $PREFIX != */* ]] ; then
|
if [[ $PREFIX != */* ]] ; then
|
||||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||||
typeset -U repositories
|
typeset -U repositories
|
||||||
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
|
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
|
||||||
else
|
else
|
||||||
compset -P '*/'
|
compset -P '*/'
|
||||||
packages_long=(/var/lib/pacman/sync/$IPREFIX*(/))
|
packages_long=(@localstatedir@/lib/pacman/sync/$IPREFIX*(/))
|
||||||
packages=(${(o)${${packages_long/\/var\/lib\/pacman\/sync\//}#*/}%-*-*} )
|
packages=(${(o)${${packages_long#@localstatedir@/lib/pacman/sync/}#*/}%-*-*} )
|
||||||
typeset -U packages
|
typeset -U packages
|
||||||
_wanted repo_packages expl "repository/package" compadd ${(@)packages}
|
_wanted repo_packages expl "repository/package" compadd ${(@)packages}
|
||||||
fi
|
fi
|
||||||
@@ -253,15 +253,15 @@ _pacman_completions_installed_groups() {
|
|||||||
# provides completions for installed packages
|
# provides completions for installed packages
|
||||||
_pacman_completions_installed_packages() {
|
_pacman_completions_installed_packages() {
|
||||||
local -a cmd packages packages_long
|
local -a cmd packages packages_long
|
||||||
packages_long=(/var/lib/pacman/local/*(/))
|
packages_long=(@localstatedir@/lib/pacman/local/*(/))
|
||||||
packages=( ${${packages_long/\/var\/lib\/pacman\/local\//}%-*-*} )
|
packages=( ${${packages_long#@localstatedir@/lib/pacman/local/}%-*-*} )
|
||||||
compadd "$@" -a packages
|
compadd "$@" -a packages
|
||||||
}
|
}
|
||||||
|
|
||||||
# provides completions for repository names
|
# provides completions for repository names
|
||||||
_pacman_completions_repositories() {
|
_pacman_completions_repositories() {
|
||||||
local -a cmd repositories
|
local -a cmd repositories
|
||||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||||
# Uniq the array
|
# Uniq the array
|
||||||
typeset -U repositories
|
typeset -U repositories
|
||||||
compadd "$@" -a repositories
|
compadd "$@" -a repositories
|
||||||
116
depcomp
116
depcomp
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
scriptversion=2006-10-15.18
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||||
# Foundation, Inc.
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,9 +17,7 @@ scriptversion=2006-10-15.18
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
@@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
|
|||||||
depmode=dashmstdout
|
depmode=dashmstdout
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cygpath_u="cygpath -u -f -"
|
||||||
|
if test "$depmode" = msvcmsys; then
|
||||||
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||||
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
case "$depmode" in
|
case "$depmode" in
|
||||||
gcc3)
|
gcc3)
|
||||||
## gcc 3 implements dependency tracking that does exactly what
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
@@ -192,14 +199,14 @@ sgi)
|
|||||||
' < "$tmpdepfile" \
|
' < "$tmpdepfile" \
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||||
tr '
|
tr '
|
||||||
' ' ' >> $depfile
|
' ' ' >> "$depfile"
|
||||||
echo >> $depfile
|
echo >> "$depfile"
|
||||||
|
|
||||||
# The second pass generates a dummy entry for each header file.
|
# The second pass generates a dummy entry for each header file.
|
||||||
tr ' ' '
|
tr ' ' '
|
||||||
' < "$tmpdepfile" \
|
' < "$tmpdepfile" \
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
>> $depfile
|
>> "$depfile"
|
||||||
else
|
else
|
||||||
# The sourcefile does not contain any dependencies, so just
|
# The sourcefile does not contain any dependencies, so just
|
||||||
# store a dummy comment line, to avoid errors with the Makefile
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
@@ -215,34 +222,39 @@ aix)
|
|||||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||||
# start of each line; $object doesn't have directory information.
|
# start of each line; $object doesn't have directory information.
|
||||||
# Version 6 uses the directory in both cases.
|
# Version 6 uses the directory in both cases.
|
||||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
tmpdepfile="$stripped.u"
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$base.u
|
||||||
|
tmpdepfile3=$dir.libs/$base.u
|
||||||
"$@" -Wc,-M
|
"$@" -Wc,-M
|
||||||
else
|
else
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$dir$base.u
|
||||||
|
tmpdepfile3=$dir$base.u
|
||||||
"$@" -M
|
"$@" -M
|
||||||
fi
|
fi
|
||||||
stat=$?
|
stat=$?
|
||||||
|
|
||||||
if test -f "$tmpdepfile"; then :
|
|
||||||
else
|
|
||||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
|
||||||
tmpdepfile="$stripped.u"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $stat -eq 0; then :
|
if test $stat -eq 0; then :
|
||||||
else
|
else
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
exit $stat
|
exit $stat
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
if test -f "$tmpdepfile"; then
|
if test -f "$tmpdepfile"; then
|
||||||
outname="$stripped.o"
|
|
||||||
# Each line is of the form `foo.o: dependent.h'.
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
# Do two passes, one to just change these to
|
# Do two passes, one to just change these to
|
||||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
# That's a tab and a space in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
else
|
else
|
||||||
# The sourcefile does not contain any dependencies, so just
|
# The sourcefile does not contain any dependencies, so just
|
||||||
# store a dummy comment line, to avoid errors with the Makefile
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
@@ -323,7 +335,12 @@ hp2)
|
|||||||
if test -f "$tmpdepfile"; then
|
if test -f "$tmpdepfile"; then
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
# Add `dependent.h:' lines.
|
# Add `dependent.h:' lines.
|
||||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
sed -ne '2,${
|
||||||
|
s/^ *//
|
||||||
|
s/ \\*$//
|
||||||
|
s/$/:/
|
||||||
|
p
|
||||||
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
else
|
else
|
||||||
echo "#dummy" > "$depfile"
|
echo "#dummy" > "$depfile"
|
||||||
fi
|
fi
|
||||||
@@ -399,7 +416,7 @@ dashmstdout)
|
|||||||
|
|
||||||
# Remove the call to Libtool.
|
# Remove the call to Libtool.
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
while test $1 != '--mode=compile'; do
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
shift
|
shift
|
||||||
@@ -450,32 +467,39 @@ makedepend)
|
|||||||
"$@" || exit $?
|
"$@" || exit $?
|
||||||
# Remove any Libtool call
|
# Remove any Libtool call
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
while test $1 != '--mode=compile'; do
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
# X makedepend
|
# X makedepend
|
||||||
shift
|
shift
|
||||||
cleared=no
|
cleared=no eat=no
|
||||||
for arg in "$@"; do
|
for arg
|
||||||
|
do
|
||||||
case $cleared in
|
case $cleared in
|
||||||
no)
|
no)
|
||||||
set ""; shift
|
set ""; shift
|
||||||
cleared=yes ;;
|
cleared=yes ;;
|
||||||
esac
|
esac
|
||||||
|
if test $eat = yes; then
|
||||||
|
eat=no
|
||||||
|
continue
|
||||||
|
fi
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
-D*|-I*)
|
-D*|-I*)
|
||||||
set fnord "$@" "$arg"; shift ;;
|
set fnord "$@" "$arg"; shift ;;
|
||||||
# Strip any option that makedepend may not understand. Remove
|
# Strip any option that makedepend may not understand. Remove
|
||||||
# the object too, otherwise makedepend will parse it as a source file.
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-arch)
|
||||||
|
eat=yes ;;
|
||||||
-*|$object)
|
-*|$object)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
set fnord "$@" "$arg"; shift ;;
|
set fnord "$@" "$arg"; shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||||
touch "$tmpdepfile"
|
touch "$tmpdepfile"
|
||||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
@@ -495,7 +519,7 @@ cpp)
|
|||||||
|
|
||||||
# Remove the call to Libtool.
|
# Remove the call to Libtool.
|
||||||
if test "$libtool" = yes; then
|
if test "$libtool" = yes; then
|
||||||
while test $1 != '--mode=compile'; do
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
shift
|
shift
|
||||||
@@ -533,13 +557,27 @@ cpp)
|
|||||||
|
|
||||||
msvisualcpp)
|
msvisualcpp)
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
# always write the preprocessed file to stdout, regardless of -o,
|
# always write the preprocessed file to stdout.
|
||||||
# because we must use -o when running libtool.
|
|
||||||
"$@" || exit $?
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
IFS=" "
|
IFS=" "
|
||||||
for arg
|
for arg
|
||||||
do
|
do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
set fnord "$@"
|
set fnord "$@"
|
||||||
shift
|
shift
|
||||||
@@ -552,16 +590,23 @@ msvisualcpp)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
"$@" -E |
|
"$@" -E 2>/dev/null |
|
||||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
echo "$object : \\" > "$depfile"
|
echo "$object : \\" > "$depfile"
|
||||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
echo " " >> "$depfile"
|
echo " " >> "$depfile"
|
||||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
msvcmsys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
none)
|
none)
|
||||||
exec "$@"
|
exec "$@"
|
||||||
;;
|
;;
|
||||||
@@ -580,5 +625,6 @@ exit 0
|
|||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-end: "$"
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|||||||
2
doc/.gitignore
vendored
2
doc/.gitignore
vendored
@@ -6,7 +6,9 @@ pacman.8
|
|||||||
pacman.conf.5
|
pacman.conf.5
|
||||||
repo-add.8
|
repo-add.8
|
||||||
repo-remove.8
|
repo-remove.8
|
||||||
|
vercmp.8
|
||||||
*.css
|
*.css
|
||||||
*.html
|
*.html
|
||||||
*.xml
|
*.xml
|
||||||
man3
|
man3
|
||||||
|
website.tar.gz
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ ASCIIDOC_MANS = \
|
|||||||
pacman.8 \
|
pacman.8 \
|
||||||
makepkg.8 \
|
makepkg.8 \
|
||||||
repo-add.8 \
|
repo-add.8 \
|
||||||
|
vercmp.8 \
|
||||||
PKGBUILD.5 \
|
PKGBUILD.5 \
|
||||||
makepkg.conf.5 \
|
makepkg.conf.5 \
|
||||||
pacman.conf.5 \
|
pacman.conf.5 \
|
||||||
@@ -18,6 +19,7 @@ HTML_MANPAGES = \
|
|||||||
pacman.8.html \
|
pacman.8.html \
|
||||||
makepkg.8.html \
|
makepkg.8.html \
|
||||||
repo-add.8.html \
|
repo-add.8.html \
|
||||||
|
vercmp.8.html \
|
||||||
PKGBUILD.5.html \
|
PKGBUILD.5.html \
|
||||||
makepkg.conf.5.html \
|
makepkg.conf.5.html \
|
||||||
pacman.conf.5.html \
|
pacman.conf.5.html \
|
||||||
@@ -38,6 +40,7 @@ EXTRA_DIST = \
|
|||||||
pacman.8.txt \
|
pacman.8.txt \
|
||||||
makepkg.8.txt \
|
makepkg.8.txt \
|
||||||
repo-add.8.txt \
|
repo-add.8.txt \
|
||||||
|
vercmp.8.txt \
|
||||||
PKGBUILD.5.txt \
|
PKGBUILD.5.txt \
|
||||||
PKGBUILD-example.txt \
|
PKGBUILD-example.txt \
|
||||||
makepkg.conf.5.txt \
|
makepkg.conf.5.txt \
|
||||||
@@ -52,7 +55,7 @@ EXTRA_DIST = \
|
|||||||
$(DOXYGEN_MANS)
|
$(DOXYGEN_MANS)
|
||||||
|
|
||||||
# Files that should be removed, but which Automake does not know.
|
# Files that should be removed, but which Automake does not know.
|
||||||
MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8
|
MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8 website.tar.gz
|
||||||
|
|
||||||
# Ensure manpages are fresh when building a dist tarball
|
# Ensure manpages are fresh when building a dist tarball
|
||||||
dist-hook:
|
dist-hook:
|
||||||
@@ -60,7 +63,7 @@ dist-hook:
|
|||||||
$(MAKE) $(AM_MAKEFLAGS) all
|
$(MAKE) $(AM_MAKEFLAGS) all
|
||||||
|
|
||||||
if USE_GIT_VERSION
|
if USE_GIT_VERSION
|
||||||
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty
|
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
|
||||||
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
||||||
else
|
else
|
||||||
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
||||||
@@ -80,6 +83,15 @@ endif
|
|||||||
|
|
||||||
html: $(HTML_DOCS)
|
html: $(HTML_DOCS)
|
||||||
|
|
||||||
|
website: html
|
||||||
|
bsdtar czf website.tar.gz $(HTML_DOCS) \
|
||||||
|
-C /etc/asciidoc/stylesheets/ \
|
||||||
|
xhtml11.css xhtml11-manpage.css xhtml11-quirks.css \
|
||||||
|
-C /etc/asciidoc/javascripts/ \
|
||||||
|
asciidoc-xhtml11.js \
|
||||||
|
-C /etc/asciidoc/ \
|
||||||
|
images
|
||||||
|
|
||||||
pkgdatadir = ${datadir}/${PACKAGE}
|
pkgdatadir = ${datadir}/${PACKAGE}
|
||||||
|
|
||||||
ASCIIDOC_OPTS = \
|
ASCIIDOC_OPTS = \
|
||||||
@@ -87,6 +99,7 @@ ASCIIDOC_OPTS = \
|
|||||||
-a pacman_version="$(REAL_PACKAGE_VERSION)" \
|
-a pacman_version="$(REAL_PACKAGE_VERSION)" \
|
||||||
-a pacman_date="`date +%Y-%m-%d`" \
|
-a pacman_date="`date +%Y-%m-%d`" \
|
||||||
-a pkgdatadir=$(pkgdatadir) \
|
-a pkgdatadir=$(pkgdatadir) \
|
||||||
|
-a localstatedir=$(localstatedir) \
|
||||||
-a sysconfdir=$(sysconfdir)
|
-a sysconfdir=$(sysconfdir)
|
||||||
|
|
||||||
A2X_OPTS = \
|
A2X_OPTS = \
|
||||||
@@ -100,16 +113,17 @@ $(ASCIIDOC_MANS): asciidoc.conf footer.txt
|
|||||||
a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt
|
a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt
|
||||||
|
|
||||||
%.html: %.txt
|
%.html: %.txt
|
||||||
asciidoc $(ASCIIDOC_OPTS) -a linkcss $*.txt
|
asciidoc $(ASCIIDOC_OPTS) $*.txt
|
||||||
dos2unix $@
|
dos2unix $@
|
||||||
|
|
||||||
HACKING.html: ../HACKING
|
HACKING.html: ../HACKING
|
||||||
asciidoc $(ASCIIDOC_OPTS) -a linkcss -o $@ ../HACKING
|
asciidoc $(ASCIIDOC_OPTS) -o $@ ../HACKING
|
||||||
dos2unix $@
|
dos2unix $@
|
||||||
|
|
||||||
# Customizations for certain HTML docs
|
# Customizations for certain HTML docs
|
||||||
$(HTML_MANPAGES): asciidoc.conf footer.txt
|
$(HTML_MANPAGES): asciidoc.conf footer.txt
|
||||||
$(HTML_OTHER): asciidoc.conf
|
$(HTML_OTHER): asciidoc.conf
|
||||||
|
%.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons
|
||||||
%.8.html: ASCIIDOC_OPTS += -d manpage
|
%.8.html: ASCIIDOC_OPTS += -d manpage
|
||||||
%.5.html: ASCIIDOC_OPTS += -d manpage
|
%.5.html: ASCIIDOC_OPTS += -d manpage
|
||||||
%.3.html: ASCIIDOC_OPTS += -d manpage
|
%.3.html: ASCIIDOC_OPTS += -d manpage
|
||||||
@@ -118,6 +132,7 @@ $(HTML_OTHER): asciidoc.conf
|
|||||||
pacman.8 pacman.8.html: pacman.8.txt
|
pacman.8 pacman.8.html: pacman.8.txt
|
||||||
makepkg.8 makepkg.8.html: makepkg.8.txt
|
makepkg.8 makepkg.8.html: makepkg.8.txt
|
||||||
repo-add.8 repo-add.8.html: repo-add.8.txt
|
repo-add.8 repo-add.8.html: repo-add.8.txt
|
||||||
|
vercmp.8 vercmp.8.html: vercmp.8.txt
|
||||||
PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.txt PKGBUILD-example.txt
|
PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.txt PKGBUILD-example.txt
|
||||||
makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.txt
|
makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.txt
|
||||||
pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
|
pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ md5sums=('ee5ae84d115f051d87fcaaef3b4ae782')
|
|||||||
build() {
|
build() {
|
||||||
cd $srcdir/$pkgname-$pkgver
|
cd $srcdir/$pkgname-$pkgver
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make || return 1
|
make
|
||||||
make prefix=$pkgdir/usr install
|
make prefix=$pkgdir/usr install
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,23 +38,35 @@ This will prevent any possible name clashes with internal makepkg variables.
|
|||||||
For example, to store the base kernel version in a variable, use something
|
For example, to store the base kernel version in a variable, use something
|
||||||
similar to `$_basekernver`.
|
similar to `$_basekernver`.
|
||||||
|
|
||||||
*pkgname*::
|
*pkgname (array)*::
|
||||||
The name of the package. This has be a unix-friendly name as it will be
|
The name of the package. This has be a unix-friendly name as it will be
|
||||||
used in the package filename.
|
used in the package filename. Members of the array are not allowed to start
|
||||||
|
with hyphens.
|
||||||
|
|
||||||
*pkgver*::
|
*pkgver*::
|
||||||
The version of the software as released from the author (e.g. '2.7.1').
|
The version of the software as released from the author (e.g. '2.7.1').
|
||||||
|
The variable is not allowed to contain colons or hyphens.
|
||||||
|
|
||||||
*pkgrel*::
|
*pkgrel*::
|
||||||
This is the release number specific to the Arch Linux release. This
|
This is the release number specific to the Arch Linux release. This
|
||||||
allows package maintainers to make updates to the package's configure
|
allows package maintainers to make updates to the package's configure
|
||||||
flags, for example. A pkgrel of 1 is typically used for each upstream
|
flags, for example. A pkgrel of '1' is typically used for each upstream
|
||||||
software release and is incremented for intermediate PKGBUILD updates.
|
software release and is incremented for intermediate PKGBUILD updates. The
|
||||||
|
variable is not allowed to contain hyphens.
|
||||||
|
|
||||||
*pkgdesc*::
|
*pkgdesc*::
|
||||||
This should be a brief description of the package and its functionality.
|
This should be a brief description of the package and its functionality.
|
||||||
Try to keep the description to one line of text.
|
Try to keep the description to one line of text.
|
||||||
|
|
||||||
|
*epoch*::
|
||||||
|
Used to force the package to be seen as newer than any previous versions
|
||||||
|
with a lower epoch, even if the version number would normally not trigger
|
||||||
|
such an upgrade. This value is required to be a positive integer; the
|
||||||
|
default value if left unspecified is '0'. This is useful when the version
|
||||||
|
numbering scheme of a package changes (or is alphanumeric), breaking normal
|
||||||
|
version comparison logic. See linkman:pacman[8] for more information on
|
||||||
|
version comparisons.
|
||||||
|
|
||||||
*url*::
|
*url*::
|
||||||
This field contains a URL that is associated with the software being
|
This field contains a URL that is associated with the software being
|
||||||
packaged. This is typically the project's website.
|
packaged. This is typically the project's website.
|
||||||
@@ -144,6 +156,12 @@ name. The syntax is: `source=('filename::url')`.
|
|||||||
needed at runtime. Packages in this list follow the same format as
|
needed at runtime. Packages in this list follow the same format as
|
||||||
depends.
|
depends.
|
||||||
|
|
||||||
|
*checkdepends (array)*::
|
||||||
|
An array of packages that this package depends on to run its test suite,
|
||||||
|
but are not needed at runtime. Packages in this list follow the same
|
||||||
|
format as depends. These dependencies are only considered when the
|
||||||
|
check() function is present and is to be run by makepkg.
|
||||||
|
|
||||||
*optdepends (array)*::
|
*optdepends (array)*::
|
||||||
An array of packages (and accompanying reasons) that are not essential for
|
An array of packages (and accompanying reasons) that are not essential for
|
||||||
base functionality, but may be necessary to make full use of the contents
|
base functionality, but may be necessary to make full use of the contents
|
||||||
@@ -183,8 +201,8 @@ name. The syntax is: `source=('filename::url')`.
|
|||||||
in the options array. To reverse the default behavior, place an ``!'' at
|
in the options array. To reverse the default behavior, place an ``!'' at
|
||||||
the front of the option. Only specify the options you specifically want
|
the front of the option. Only specify the options you specifically want
|
||||||
to override, the rest will be taken from linkman:makepkg.conf[5].
|
to override, the rest will be taken from linkman:makepkg.conf[5].
|
||||||
*NOTE:* 'force' is a special option only used in a linkman:PKGBUILD[5],
|
*NOTE:* 'force' is a now-removed option in favor of the top level 'epoch'
|
||||||
do not use it unless you know what you are doing.
|
variable.
|
||||||
|
|
||||||
*strip*;;
|
*strip*;;
|
||||||
Strip symbols from binaries and libraries. If you frequently
|
Strip symbols from binaries and libraries. If you frequently
|
||||||
@@ -215,26 +233,27 @@ name. The syntax is: `source=('filename::url')`.
|
|||||||
form `!distcc` with select packages that have problems building
|
form `!distcc` with select packages that have problems building
|
||||||
with distcc.
|
with distcc.
|
||||||
|
|
||||||
|
*buildflags*;;
|
||||||
|
Allow the use of user-specific buildflags (CFLAGS, CXXFLAGS, LDFLAGS)
|
||||||
|
during build as specified in linkman:makepkg.conf[5]. More useful in
|
||||||
|
its negative form `!buildflags` with select packages that have problems
|
||||||
|
building with custom buildflags.
|
||||||
|
|
||||||
*makeflags*;;
|
*makeflags*;;
|
||||||
Allow the use of user-specific makeflags during build as specified
|
Allow the use of user-specific makeflags during build as specified
|
||||||
in linkman:makepkg.conf[5]. More useful in its negative form
|
in linkman:makepkg.conf[5]. More useful in its negative form
|
||||||
`!makeflags` with select packages that have problems building with
|
`!makeflags` with select packages that have problems building with
|
||||||
custom makeflags such as `-j2` (or higher).
|
custom makeflags such as `-j2` (or higher).
|
||||||
|
|
||||||
*force*;;
|
|
||||||
Force the package to be upgraded by a pacman system upgrade
|
|
||||||
operation, even if the version number would normally not trigger
|
|
||||||
such an upgrade. This is useful when the version numbering scheme
|
|
||||||
of a package changes (or is alphanumeric). See linkman:pacman[8] for
|
|
||||||
more information on version comparisons.
|
|
||||||
|
|
||||||
|
|
||||||
build() Function
|
build() Function
|
||||||
----------------
|
----------------
|
||||||
In addition to the above directives, the optional build() bash function usually
|
In addition to the above directives, the optional build() bash function usually
|
||||||
comprises the remainder of the PKGBUILD. This is directly sourced and executed by
|
comprises the remainder of the PKGBUILD. This is directly sourced and executed
|
||||||
makepkg, so anything that bash or the system has available is available for use
|
by makepkg, so anything that bash or the system has available is available for
|
||||||
here. Be sure any exotic commands used are covered by `makedepends`.
|
use here. The function is run in `bash -e` mode, meaning any command that exits
|
||||||
|
with a non-zero status will cause the function to exit. Be sure any exotic
|
||||||
|
commands used are covered by `makedepends`.
|
||||||
|
|
||||||
All of the above variables such as `pkgname` and `pkgver` are available for use
|
All of the above variables such as `pkgname` and `pkgver` are available for use
|
||||||
in the build function. In addition, makepkg defines three variables for your
|
in the build function. In addition, makepkg defines three variables for your
|
||||||
@@ -256,33 +275,45 @@ If you create any variables of your own in the build function, it is
|
|||||||
recommended to use the bash `local` keyword to scope the variable to inside
|
recommended to use the bash `local` keyword to scope the variable to inside
|
||||||
the build function.
|
the build function.
|
||||||
|
|
||||||
|
check() Function
|
||||||
|
----------------
|
||||||
|
An optional check() function can be specified in which a packages test-suite
|
||||||
|
may be run. This function is run between the build() and package() functions.
|
||||||
|
The function is run in `bash -e` mode, meaning any command that exits with a
|
||||||
|
non-zero status will cause the function to exit. Be sure any exotic commands
|
||||||
|
used are covered by `checkdepends`.
|
||||||
|
|
||||||
package() Function
|
package() Function
|
||||||
------------------
|
------------------
|
||||||
An optional package() function can be specified in addition to the build() function.
|
An optional package() function can be specified in addition to the build()
|
||||||
This function is run immediately after the build() function. When specified in
|
function. This function is run after the build() and check() functions. The
|
||||||
combination with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot
|
function is run in `bash -e` mode, meaning any command that exits with a
|
||||||
usage will be limited to running the packaging stage. An existing build() function
|
non-zero status will cause the function to exit. When specified in combination
|
||||||
|
with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot usage
|
||||||
|
will be limited to running the packaging stage. An existing build() function
|
||||||
will be run as the user calling makepkg.
|
will be run as the user calling makepkg.
|
||||||
|
|
||||||
Package Splitting
|
Package Splitting
|
||||||
-----------------
|
-----------------
|
||||||
makepkg supports building multiple packages from a single PKGBUILD. This is achieved
|
makepkg supports building multiple packages from a single PKGBUILD. This is
|
||||||
by assigning an array of package names to the `pkgname` directive. Each split package
|
achieved by assigning an array of package names to the `pkgname` directive.
|
||||||
uses a corresponding packaging function with name `package_foo()`, where `foo` is the
|
Each split package uses a corresponding packaging function with name
|
||||||
name of the split package.
|
`package_foo()`, where `foo` is the name of the split package.
|
||||||
|
|
||||||
All options and directives for the split packages default to the global values given
|
All options and directives for the split packages default to the global values
|
||||||
within the PKGBUILD. However, some of these can be overridden within each split
|
given within the PKGBUILD. However, some of these can be overridden within each
|
||||||
package's packaging function. The following variables can be overridden: `pkgver`,
|
split package's packaging function. The following variables can be overridden:
|
||||||
`pkgrel`, `pkgdesc`, `arch`, `license`, `groups`, `depends`, `optdepends`,
|
`pkgver`, `pkgrel`, `pkgdesc`, `arch`, `license`, `groups`, `depends`,
|
||||||
`provides`, `conflicts`, `replaces`, `backup`, `options`, `install` and `changelog`.
|
`optdepends`, `provides`, `conflicts`, `replaces`, `backup`, `options`,
|
||||||
|
`install` and `changelog`.
|
||||||
|
|
||||||
An optional global directive is available when building a split package:
|
An optional global directive is available when building a split package:
|
||||||
|
|
||||||
*pkgbase*::
|
*pkgbase*::
|
||||||
The name used to refer to the group of packages in the output of makepkg
|
The name used to refer to the group of packages in the output of makepkg
|
||||||
and in the naming of source-only tarballs. If not specified, the first
|
and in the naming of source-only tarballs. If not specified, the first
|
||||||
element in the `pkgname` array is used.
|
element in the `pkgname` array is used. The variable is not allowed to
|
||||||
|
begin with a hyphen.
|
||||||
|
|
||||||
Install/Upgrade/Remove Scripting
|
Install/Upgrade/Remove Scripting
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|||||||
@@ -18,13 +18,14 @@ Authors
|
|||||||
|
|
||||||
Current maintainers:
|
Current maintainers:
|
||||||
|
|
||||||
|
* Allan McRae <allan@archlinux.org>
|
||||||
* Dan McGee <dan@archlinux.org>
|
* Dan McGee <dan@archlinux.org>
|
||||||
* Xavier Chantry <shiningxc@gmail.com>
|
* Xavier Chantry <shiningxc@gmail.com>
|
||||||
* Aaron Griffin <aaron@archlinux.org>
|
|
||||||
|
|
||||||
Past contributors:
|
Past contributors:
|
||||||
|
|
||||||
* Judd Vinet <jvinet@zeroflux.org>
|
* Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Aurelien Foret <aurelien@archlinux.org>
|
* Aurelien Foret <aurelien@archlinux.org>
|
||||||
|
* Aaron Griffin <aaron@archlinux.org>
|
||||||
|
|
||||||
See the 'AUTHORS' file for additional contributors.
|
See the 'AUTHORS' file for additional contributors.
|
||||||
|
|||||||
@@ -43,15 +43,16 @@ configuration files dealing with pacman.
|
|||||||
* linkman:pacman[8]
|
* linkman:pacman[8]
|
||||||
* linkman:pacman.conf[5]
|
* linkman:pacman.conf[5]
|
||||||
* linkman:repo-add[8]
|
* linkman:repo-add[8]
|
||||||
|
* linkman:vercmp[8]
|
||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
For a good idea of what is going on in pacman development, take a look at the
|
For a good idea of what is going on in pacman development, take a look at the
|
||||||
link:http://projects.archlinux.org/?p=pacman.git[Gitweb] summary
|
link:http://projects.archlinux.org/pacman.git/[Git summary page] for the
|
||||||
page for the project.
|
project.
|
||||||
|
|
||||||
See the most recent
|
See the most recent
|
||||||
link:http://projects.archlinux.org/?p=pacman.git;a=blob_plain;f=NEWS;hb=HEAD[NEWS]
|
link:http://projects.archlinux.org/pacman.git/tree/NEWS[NEWS]
|
||||||
file for a not-as-frequently-updated list of changes. However, this should
|
file for a not-as-frequently-updated list of changes. However, this should
|
||||||
contain the biggest changes in a format more concise than the commit log.
|
contain the biggest changes in a format more concise than the commit log.
|
||||||
|
|
||||||
@@ -62,6 +63,9 @@ Releases
|
|||||||
`------------`-------
|
`------------`-------
|
||||||
Date Version
|
Date Version
|
||||||
---------------------
|
---------------------
|
||||||
|
2011-01-22 v3.4.3
|
||||||
|
2010-12-29 v3.4.2
|
||||||
|
2010-09-03 v3.4.1
|
||||||
2010-06-16 v3.4.0
|
2010-06-16 v3.4.0
|
||||||
2009-11-10 v3.3.3
|
2009-11-10 v3.3.3
|
||||||
2009-10-05 v3.3.2
|
2009-10-05 v3.3.2
|
||||||
@@ -111,8 +115,8 @@ Development
|
|||||||
Mailing List
|
Mailing List
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
There is a mailing list devoted to pacman development, hosted by Arch Linux.
|
There is a mailing list devoted to pacman development, hosted by Arch Linux.
|
||||||
link:http://www.archlinux.org/mailman/listinfo/pacman-dev/[Subscribe] or
|
link:http://mailman.archlinux.org/mailman/listinfo/pacman-dev/[Subscribe] or
|
||||||
link:http://www.archlinux.org/pipermail/pacman-dev/[view the archives].
|
link:http://mailman.archlinux.org/pipermail/pacman-dev/[view the archives].
|
||||||
|
|
||||||
Source Code
|
Source Code
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@@ -127,7 +131,8 @@ The current development tree can be fetched with the following command:
|
|||||||
|
|
||||||
which will fetch the full development history into a directory named pacman.
|
which will fetch the full development history into a directory named pacman.
|
||||||
You can browse the source as well using
|
You can browse the source as well using
|
||||||
link:http://projects.archlinux.org/?p=pacman.git[Gitweb].
|
link:http://projects.archlinux.org/pacman.git/[cgit]. HTTP/HTTPS URLs are also
|
||||||
|
available for cloning purposes; these URLs are listed at the above page.
|
||||||
|
|
||||||
If you are interested in hacking on pacman, it is highly recommended you join
|
If you are interested in hacking on pacman, it is highly recommended you join
|
||||||
the mailing list mentioned above, as well as take a quick glance at our
|
the mailing list mentioned above, as well as take a quick glance at our
|
||||||
@@ -143,17 +148,17 @@ Other Utilities
|
|||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
Although the package manager itself is quite simple, many scripts have been
|
Although the package manager itself is quite simple, many scripts have been
|
||||||
developed that help automate building and installing packages. These are used
|
developed that help automate building and installing packages. These are used
|
||||||
extensively in link:http://archlinux.org[Arch Linux]. Most of these utilities
|
extensively in link:http://archlinux.org/[Arch Linux]. Most of these utilities
|
||||||
are available in the Arch Linux projects
|
are available in the Arch Linux projects
|
||||||
link:http://projects.archlinux.org/[Gitweb browser].
|
link:http://projects.archlinux.org/[code browser].
|
||||||
|
|
||||||
Utilities available:
|
Utilities available:
|
||||||
|
|
||||||
* link:http://projects.archlinux.org/?p=abs.git[abs] - ABS (Arch Build System), scripts to download & use the Arch Linux PKGBUILD tree
|
* link:http://projects.archlinux.org/abs.git/[abs] - ABS (Arch Build System), scripts to download & use the Arch Linux PKGBUILD tree
|
||||||
* link:http://projects.archlinux.org/?p=devtools.git[devtools] - tools to assist in packaging and dependency checking
|
* link:http://projects.archlinux.org/dbscripts.git/[dbscripts] - scripts used by Arch Linux to manage the main package repositories
|
||||||
* link:http://projects.archlinux.org/?p=namcap.git[namcap] - a package analysis utility written in python
|
* link:http://projects.archlinux.org/devtools.git/[devtools] - tools to assist in packaging and dependency checking
|
||||||
* link:http://projects.archlinux.org/?p=pacbuild.git[pacbuild] - a package building system utilizing a daemon
|
* link:http://projects.archlinux.org/namcap.git/[namcap] - a package analysis utility written in python
|
||||||
* link:http://projects.archlinux.org/?p=srcpac.git[srcpac] - a bash build-from-source pacman wrapper
|
* link:http://projects.archlinux.org/srcpac.git/[srcpac] - a bash build-from-source pacman wrapper
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
@@ -162,7 +167,7 @@ mailing last at mailto:pacman-dev@archlinux.org[] with specific information
|
|||||||
such as your commandline, the nature of the bug, and even the package database
|
such as your commandline, the nature of the bug, and even the package database
|
||||||
if it helps.
|
if it helps.
|
||||||
|
|
||||||
You can also post a bug to the Archlinux bug tracker
|
You can also post a bug to the Arch Linux bug tracker
|
||||||
link:http://bugs.archlinux.org/index.php?project=3[Flyspray]. Be sure to file
|
link:http://bugs.archlinux.org/index.php?project=3[Flyspray]. Be sure to file
|
||||||
bugs under the Pacman project.
|
bugs under the Pacman project.
|
||||||
|
|
||||||
@@ -190,7 +195,7 @@ Pacman/libalpm frontends:
|
|||||||
|
|
||||||
Copyright
|
Copyright
|
||||||
---------
|
---------
|
||||||
pacman is Copyright (C) 2006-2010 Pacman Development Team
|
pacman is Copyright (C) 2006-2011 Pacman Development Team
|
||||||
<pacman-dev@archlinux.org> and Copyright (C) 2002-2006 Judd Vinet
|
<pacman-dev@archlinux.org> and Copyright (C) 2002-2006 Judd Vinet
|
||||||
<jvinet@zeroflux.org> and is licensed through the GNU General Public License,
|
<jvinet@zeroflux.org> and is licensed through the GNU General Public License,
|
||||||
version 2 or later.
|
version 2 or later.
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ Options
|
|||||||
in linkman:makepkg.conf[5].
|
in linkman:makepkg.conf[5].
|
||||||
|
|
||||||
*--config* <`/path/to/config`>::
|
*--config* <`/path/to/config`>::
|
||||||
Use an alternate config file instead of the `/etc/makepkg.conf` default;
|
Use an alternate config file instead of the `{sysconfdir}/makepkg.conf` default;
|
||||||
|
|
||||||
*-d, \--nodeps*::
|
*-d, \--nodeps*::
|
||||||
Do not perform any dependency checks. This will let you override and
|
Do not perform any dependency checks. This will let you override and
|
||||||
@@ -153,6 +153,13 @@ Options
|
|||||||
Only build listed packages from a split package. The use of quotes is
|
Only build listed packages from a split package. The use of quotes is
|
||||||
necessary when specifying multiple packages. e.g. `--pkg "pkg1 pkg3"`
|
necessary when specifying multiple packages. e.g. `--pkg "pkg1 pkg3"`
|
||||||
|
|
||||||
|
*\--check*::
|
||||||
|
Run the check() function in the PKGBUILD, overriding the setting in
|
||||||
|
linkman:makepkg.conf[5].
|
||||||
|
|
||||||
|
*\--nocheck*::
|
||||||
|
Do not run the check() function in the PKGBUILD or handle the checkdepends.
|
||||||
|
|
||||||
*\--noconfirm*::
|
*\--noconfirm*::
|
||||||
(Passed to pacman) Prevent pacman from waiting for user input before
|
(Passed to pacman) Prevent pacman from waiting for user input before
|
||||||
proceeding with operations.
|
proceeding with operations.
|
||||||
|
|||||||
@@ -93,6 +93,11 @@ Options
|
|||||||
be disabled for individual packages by placing `!ccache` in the
|
be disabled for individual packages by placing `!ccache` in the
|
||||||
PKGBUILD options array.
|
PKGBUILD options array.
|
||||||
|
|
||||||
|
*check*;;
|
||||||
|
Run the check() function if present in the PKGBUILD. This can be
|
||||||
|
enabled or disabled for individual packages through the use of
|
||||||
|
makepkg's `--check` and `--nocheck` options respectively.
|
||||||
|
|
||||||
**DISTCC_HOSTS=**"host1 ..."::
|
**DISTCC_HOSTS=**"host1 ..."::
|
||||||
If using DistCC, this is used to specify a space-delimited list of hosts
|
If using DistCC, this is used to specify a space-delimited list of hosts
|
||||||
running in the DistCC cluster. In addition, you will want to modify your
|
running in the DistCC cluster. In addition, you will want to modify your
|
||||||
@@ -160,13 +165,6 @@ Options
|
|||||||
that are located in opt/, you may need to add the directory to this
|
that are located in opt/, you may need to add the directory to this
|
||||||
array. *NOTE:* Do not add the leading slash to the directory name.
|
array. *NOTE:* Do not add the leading slash to the directory name.
|
||||||
|
|
||||||
**STRIP_DIRS=(**bin lib sbin usr/{bin,lib} ...**)**::
|
|
||||||
If `strip` is specified in the OPTIONS array, this variable will
|
|
||||||
instruct makepkg where to look to for files to strip. If you build
|
|
||||||
packages that are located in opt/, you may need to add the directory
|
|
||||||
to this array. *NOTE:* Do not add the leading slash to the directory
|
|
||||||
name.
|
|
||||||
|
|
||||||
**PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
|
**PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
|
||||||
If `purge` is specified in the OPTIONS array, this variable will
|
If `purge` is specified in the OPTIONS array, this variable will
|
||||||
instruct makepkg which files to remove from the package. This is
|
instruct makepkg which files to remove from the package. This is
|
||||||
@@ -185,17 +183,18 @@ Options
|
|||||||
|
|
||||||
**SRCPKGDEST=**"/path/to/folder"::
|
**SRCPKGDEST=**"/path/to/folder"::
|
||||||
If this value is not set, source package files will be stored in
|
If this value is not set, source package files will be stored in
|
||||||
PKGDEST. Many people like to keep all source package files in
|
in the current directory. Many people like to keep all source package files
|
||||||
a central location for easy cleanup, so this path can be set here.
|
in a central location for easy cleanup, so this path can be set here.
|
||||||
|
|
||||||
**PACKAGER=**"John Doe <john@example.com>"::
|
**PACKAGER=**"John Doe <john@example.com>"::
|
||||||
This value is used when querying a package to see who was the builder.
|
This value is used when querying a package to see who was the builder.
|
||||||
It is recommended you change this to your name and email address.
|
It is recommended you change this to your name and email address.
|
||||||
|
|
||||||
*PKGEXT*, *SRCEXT*::
|
**PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
|
||||||
|
Sets the compression used when making compiled or source packages. The
|
||||||
|
current valid suffixes are `.tar`, `.tar.gz`, `.tar,bz2` and `.tar.xz`.
|
||||||
Do not touch these unless you know what you are doing.
|
Do not touch these unless you know what you are doing.
|
||||||
|
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
linkman:makepkg[8], linkman:pacman[8], linkman:PKGBUILD[5]
|
linkman:makepkg[8], linkman:pacman[8], linkman:PKGBUILD[5]
|
||||||
|
|||||||
170
doc/pacman.8.txt
170
doc/pacman.8.txt
@@ -79,6 +79,11 @@ to determine which packages need upgrading. This behavior operates as follows:
|
|||||||
1.0a < 1.0alpha < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0
|
1.0a < 1.0alpha < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0
|
||||||
Numeric:
|
Numeric:
|
||||||
1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
|
1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
|
||||||
|
+
|
||||||
|
Additionally, version strings can have an 'epoch' value defined that will
|
||||||
|
overrule any version comparison (unless the epoch values are equal). This is
|
||||||
|
specified in an `epoch:version-rel` format. For example, `2:1.0-1` is always
|
||||||
|
greater than `1:3.6-1`.
|
||||||
|
|
||||||
*-T, \--deptest*::
|
*-T, \--deptest*::
|
||||||
Check dependencies; this is useful in scripts such as makepkg to check
|
Check dependencies; this is useful in scripts such as makepkg to check
|
||||||
@@ -104,35 +109,12 @@ to determine which packages need upgrading. This behavior operates as follows:
|
|||||||
|
|
||||||
Options
|
Options
|
||||||
-------
|
-------
|
||||||
*\--asdeps*::
|
|
||||||
Install packages non-explicitly; in other words, fake their install reason
|
|
||||||
to be installed as a dependency. This is useful for makepkg and other
|
|
||||||
build from source tools that need to install dependencies before building
|
|
||||||
the package.
|
|
||||||
|
|
||||||
*\--asexplicit*::
|
|
||||||
Install packages explicitly; in other words, fake their install reason to
|
|
||||||
be explicitly installed. This is useful if you want to mark a dependency
|
|
||||||
as explicitly installed so it will not be removed by the '\--recursive'
|
|
||||||
remove operation.
|
|
||||||
|
|
||||||
*-b, \--dbpath* <'path'>::
|
*-b, \--dbpath* <'path'>::
|
||||||
Specify an alternative database location (a typical default is
|
Specify an alternative database location (a typical default is
|
||||||
``/var/lib/pacman''). This should not be used unless you know what you are
|
``{localstatedir}/lib/pacman''). This should not be used unless you know what you are
|
||||||
doing. *NOTE*: if specified, this is an absolute path and the root path is
|
doing. *NOTE*: if specified, this is an absolute path and the root path is
|
||||||
not automatically prepended.
|
not automatically prepended.
|
||||||
|
|
||||||
*-d, \--nodeps*::
|
|
||||||
Skips all dependency checks. Normally, pacman will always check a
|
|
||||||
package's dependency fields to ensure that all dependencies are
|
|
||||||
installed and there are no package conflicts in the system.
|
|
||||||
|
|
||||||
*-f, \--force*::
|
|
||||||
Bypass file conflict checks and overwrite conflicting files. If the
|
|
||||||
package that is about to be installed contains files that are already
|
|
||||||
installed, this option will cause all those files to be overwritten.
|
|
||||||
This option should be used with care, ideally not at all.
|
|
||||||
|
|
||||||
*-r, \--root* <'path'>::
|
*-r, \--root* <'path'>::
|
||||||
Specify an alternative installation root (default is ``/''). This should
|
Specify an alternative installation root (default is ``/''). This should
|
||||||
not be used as a way to install software into ``/usr/local'' instead of
|
not be used as a way to install software into ``/usr/local'' instead of
|
||||||
@@ -145,19 +127,22 @@ Options
|
|||||||
*-v, \--verbose*::
|
*-v, \--verbose*::
|
||||||
Output paths such as as the Root, Conf File, DB Path, Cache Dirs, etc.
|
Output paths such as as the Root, Conf File, DB Path, Cache Dirs, etc.
|
||||||
|
|
||||||
*\--debug*::
|
*\--arch* <'arch'>::
|
||||||
Display debug messages. When reporting bugs, this option is recommended
|
Specify an alternate architecture.
|
||||||
to be used.
|
|
||||||
|
|
||||||
*\--cachedir* <'dir'>::
|
*\--cachedir* <'dir'>::
|
||||||
Specify an alternative package cache location (a typical default is
|
Specify an alternative package cache location (a typical default is
|
||||||
``/var/cache/pacman/pkg''). Multiple cache directories can be specified,
|
``{localstatedir}/cache/pacman/pkg''). Multiple cache directories can be specified,
|
||||||
and they are tried in the order they are passed to pacman. *NOTE*: this
|
and they are tried in the order they are passed to pacman. *NOTE*: this
|
||||||
is an absolute path, the root path is not automatically prepended.
|
is an absolute path, the root path is not automatically prepended.
|
||||||
|
|
||||||
*\--config* <'file'>::
|
*\--config* <'file'>::
|
||||||
Specify an alternate configuration file.
|
Specify an alternate configuration file.
|
||||||
|
|
||||||
|
*\--debug*::
|
||||||
|
Display debug messages. When reporting bugs, this option is recommended
|
||||||
|
to be used.
|
||||||
|
|
||||||
*\--logfile* <'file'>::
|
*\--logfile* <'file'>::
|
||||||
Specify an alternate log file. This is an absolute path, regardless of
|
Specify an alternate log file. This is an absolute path, regardless of
|
||||||
the installation root setting.
|
the installation root setting.
|
||||||
@@ -166,6 +151,17 @@ Options
|
|||||||
Bypass any and all ``Are you sure?'' messages. It's not a good idea to do
|
Bypass any and all ``Are you sure?'' messages. It's not a good idea to do
|
||||||
this unless you want to run pacman from a script.
|
this unless you want to run pacman from a script.
|
||||||
|
|
||||||
|
Transaction Options (apply to '-S', '-R' and '-U')
|
||||||
|
--------------------------------------------------
|
||||||
|
*-d, \--nodeps*::
|
||||||
|
Skips dependency version checks. Package names are still checked. Normally,
|
||||||
|
pacman will always check a package's dependency fields to ensure that all
|
||||||
|
dependencies are installed and there are no package conflicts in the
|
||||||
|
system. Specify this option twice to skip all dependency checks.
|
||||||
|
|
||||||
|
*-k, \--dbonly*::
|
||||||
|
Adds/Removes the database entry only, leaves all files in place.
|
||||||
|
|
||||||
*\--noprogressbar*::
|
*\--noprogressbar*::
|
||||||
Do not show a progress bar when downloading files. This can be useful
|
Do not show a progress bar when downloading files. This can be useful
|
||||||
for scripts that call pacman and capture the output.
|
for scripts that call pacman and capture the output.
|
||||||
@@ -174,38 +170,62 @@ Options
|
|||||||
If an install scriptlet exists, do not execute it. Do not use this
|
If an install scriptlet exists, do not execute it. Do not use this
|
||||||
unless you know what you are doing.
|
unless you know what you are doing.
|
||||||
|
|
||||||
*\--arch* <'arch'>::
|
|
||||||
Specify an alternate architecture.
|
|
||||||
|
|
||||||
*-p, \--print*::
|
*-p, \--print*::
|
||||||
Only print the targets instead of performing the actual operation (sync,
|
Only print the targets instead of performing the actual operation (sync,
|
||||||
remove or upgrade). Use '\--print-format' to specify how targets are
|
remove or upgrade). Use '\--print-format' to specify how targets are
|
||||||
displayed. The default format string is "%l", which displays url with '-S',
|
displayed. The default format string is "%l", which displays URLs with
|
||||||
filename with '-U' and pkgname-pkgver with '-R'.
|
'-S', filenames with '-U' and pkgname-pkgver with '-R'.
|
||||||
|
|
||||||
*\--print-format* <'format'>::
|
*\--print-format* <'format'>::
|
||||||
Specify a printf-like format to control the output of the '\--print'
|
Specify a printf-like format to control the output of the '\--print'
|
||||||
operation. The possible are attributes are : %n for pkgname, %v for pkgver, %l
|
operation. The possible attributes are: %n for pkgname, %v for pkgver,
|
||||||
for location, %r for repo and %s for size.
|
%l for location, %r for repo and %s for size.
|
||||||
|
|
||||||
|
Upgrade Options (apply to '-S' and '-U')[[UO]]
|
||||||
|
--------------------------------------------
|
||||||
|
*-f, \--force*::
|
||||||
|
Bypass file conflict checks and overwrite conflicting files. If the
|
||||||
|
package that is about to be installed contains files that are already
|
||||||
|
installed, this option will cause all those files to be overwritten.
|
||||||
|
This option should be used with care, ideally not at all.
|
||||||
|
|
||||||
|
*\--asdeps*::
|
||||||
|
Install packages non-explicitly; in other words, fake their install reason
|
||||||
|
to be installed as a dependency. This is useful for makepkg and other
|
||||||
|
build from source tools that need to install dependencies before building
|
||||||
|
the package.
|
||||||
|
|
||||||
|
*\--asexplicit*::
|
||||||
|
Install packages explicitly; in other words, fake their install reason to
|
||||||
|
be explicitly installed. This is useful if you want to mark a dependency
|
||||||
|
as explicitly installed so it will not be removed by the '\--recursive'
|
||||||
|
remove operation.
|
||||||
|
|
||||||
|
*\--ignore* <'package'>::
|
||||||
|
Directs pacman to ignore upgrades of package even if there is one
|
||||||
|
available. Multiple packages can be specified by separating them
|
||||||
|
with a comma.
|
||||||
|
|
||||||
|
*\--ignoregroup* <'group'>::
|
||||||
|
Directs pacman to ignore upgrades of all packages in 'group' even if
|
||||||
|
there is one available. Multiple groups can be specified by
|
||||||
|
separating them with a comma.
|
||||||
|
|
||||||
Query Options[[QO]]
|
Query Options[[QO]]
|
||||||
-------------------
|
-------------------
|
||||||
*-c, \--changelog*::
|
*-c, \--changelog*::
|
||||||
View the ChangeLog of a package. Not every package will provide one but
|
View the ChangeLog of a package if it exists.
|
||||||
it will be shown if available.
|
|
||||||
|
|
||||||
*-d, \--deps*::
|
*-d, \--deps*::
|
||||||
Restrict or filter output to packages installed as dependencies. This
|
Restrict or filter output to packages installed as dependencies. This
|
||||||
option can be combined with '-t' for listing real orphans- packages that
|
option can be combined with '-t' for listing real orphans - packages that
|
||||||
were installed as dependencies but are no longer required by any
|
were installed as dependencies but are no longer required by any
|
||||||
installed package. ('-Qdt' is equivalent to the pacman 3.0.X '-Qe'
|
installed package.
|
||||||
option.)
|
|
||||||
|
|
||||||
*-e, \--explicit*::
|
*-e, \--explicit*::
|
||||||
Restrict or filter output to packages explicitly installed. This option
|
Restrict or filter output to explicitly installed packages. This option
|
||||||
can be combined with '-t' to list top-level packages- those packages
|
can be combined with '-t' to list explicitly installed packages which
|
||||||
that were explicitly installed but are not required by any other
|
are not required by any other package.
|
||||||
package. ('-Qet' is equivalent to the pacman 2.9.X '-Qe' option.)
|
|
||||||
|
|
||||||
*-g, \--groups*::
|
*-g, \--groups*::
|
||||||
Display all packages that are members of a named group. If a name is not
|
Display all packages that are members of a named group. If a name is not
|
||||||
@@ -232,8 +252,8 @@ Query Options[[QO]]
|
|||||||
and installed with '\--upgrade'.
|
and installed with '\--upgrade'.
|
||||||
|
|
||||||
*-o, \--owns* <'file'>::
|
*-o, \--owns* <'file'>::
|
||||||
Search for the package that owns file. The path can be relative or
|
Search for packages that own the specified file(s). The path can be
|
||||||
absolute.
|
relative or absolute and one or more files can be specified.
|
||||||
|
|
||||||
*-p, \--file*::
|
*-p, \--file*::
|
||||||
Signifies that the package supplied on the command line is a file and
|
Signifies that the package supplied on the command line is a file and
|
||||||
@@ -251,10 +271,9 @@ Query Options[[QO]]
|
|||||||
rather than names and versions.
|
rather than names and versions.
|
||||||
|
|
||||||
*-s, \--search* <'regexp'>::
|
*-s, \--search* <'regexp'>::
|
||||||
This will search each locally-installed package for names or
|
Search each locally-installed package for names or descriptions that
|
||||||
descriptions that match `regexp`. When you include multiple search
|
match `regexp`. When including multiple search terms, only packages
|
||||||
terms, only packages with descriptions matching ALL of those terms will
|
with descriptions matching ALL of those terms are returned.
|
||||||
be returned.
|
|
||||||
|
|
||||||
*-t, \--unrequired*::
|
*-t, \--unrequired*::
|
||||||
Restrict or filter output to packages not required by any currently
|
Restrict or filter output to packages not required by any currently
|
||||||
@@ -274,9 +293,6 @@ Remove Options[[RO]]
|
|||||||
or more target packages. This operation is recursive, and must be used
|
or more target packages. This operation is recursive, and must be used
|
||||||
with care since it can remove many potentially needed packages.
|
with care since it can remove many potentially needed packages.
|
||||||
|
|
||||||
*-k, \--dbonly*::
|
|
||||||
Removes the database entry only. Leaves all files in place.
|
|
||||||
|
|
||||||
*-n, \--nosave*::
|
*-n, \--nosave*::
|
||||||
Instructs pacman to ignore file backup designations. Normally, when a
|
Instructs pacman to ignore file backup designations. Normally, when a
|
||||||
file is removed from the system the database is checked to see if the
|
file is removed from the system the database is checked to see if the
|
||||||
@@ -290,7 +306,7 @@ Remove Options[[RO]]
|
|||||||
orphans. If you want to omit condition (B), pass this option twice.
|
orphans. If you want to omit condition (B), pass this option twice.
|
||||||
|
|
||||||
*-u, \--unneeded*::
|
*-u, \--unneeded*::
|
||||||
Removes the targets that are not required by any other packages.
|
Removes targets that are not required by any other packages.
|
||||||
This is mostly useful when removing a group without using the '-c' option,
|
This is mostly useful when removing a group without using the '-c' option,
|
||||||
to avoid breaking any dependencies.
|
to avoid breaking any dependencies.
|
||||||
|
|
||||||
@@ -352,36 +368,17 @@ linkman:pacman.conf[5].
|
|||||||
the same operation.
|
the same operation.
|
||||||
|
|
||||||
*-w, \--downloadonly*::
|
*-w, \--downloadonly*::
|
||||||
Retrieve all packages from the server, but do not install/upgrade
|
Retrieve all packages from the server, but do not install/upgrade anything.
|
||||||
anything.
|
|
||||||
|
|
||||||
*-y, \--refresh*::
|
*-y, \--refresh*::
|
||||||
Download a fresh copy of the master package list from the server(s)
|
Download a fresh copy of the master package list from the server(s)
|
||||||
defined in linkman:pacman.conf[5]. This should typically be used each time
|
defined in linkman:pacman.conf[5]. This should typically be used each time
|
||||||
you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
|
you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
|
||||||
will force a refresh of all package lists even if they are thought to be up
|
will force a refresh of all package lists even if they appear to be up
|
||||||
to date.
|
to date.
|
||||||
|
|
||||||
*\--needed*::
|
*\--needed*::
|
||||||
Don't reinstall the targets that are already up-to-date.
|
Don't reinstall the targets that are already up to date.
|
||||||
|
|
||||||
*\--ignore* <'package'>::
|
|
||||||
Directs pacman to ignore upgrades of package even if there is one
|
|
||||||
available. Multiple packages can be specified by separating them
|
|
||||||
with a comma.
|
|
||||||
|
|
||||||
*\--ignoregroup* <'group'>::
|
|
||||||
Directs pacman to ignore upgrades of all packages in 'group' even if
|
|
||||||
there is one available. Multiple groups can be specified by
|
|
||||||
separating them with a comma.
|
|
||||||
|
|
||||||
|
|
||||||
Upgrade Options[[UO]]
|
|
||||||
--------------------
|
|
||||||
*-k, \--dbonly*::
|
|
||||||
Adds the database entries for the specified packages but do not install any
|
|
||||||
of the files. On an upgrade operation, the existing package and all files
|
|
||||||
will be removed and the database entry for the new package will be added.
|
|
||||||
|
|
||||||
|
|
||||||
Handling Config Files[[HCF]]
|
Handling Config Files[[HCF]]
|
||||||
@@ -394,7 +391,7 @@ actual file existing on the filesystem. After comparing these 3 hashes, the
|
|||||||
follow scenarios can result:
|
follow scenarios can result:
|
||||||
|
|
||||||
original=X, current=X, new=X::
|
original=X, current=X, new=X::
|
||||||
All three files are the same, so overwrites are not an issue Install the
|
All three files are the same, so overwrites are not an issue. Install the
|
||||||
new file.
|
new file.
|
||||||
|
|
||||||
original=X, current=X, new=Y::
|
original=X, current=X, new=Y::
|
||||||
@@ -415,6 +412,25 @@ original=X, current=Y, new=Z::
|
|||||||
necessary changes into the original file.
|
necessary changes into the original file.
|
||||||
|
|
||||||
|
|
||||||
|
Examples
|
||||||
|
--------
|
||||||
|
|
||||||
|
pacman -Ss ne.hack::
|
||||||
|
Search for regexp "ne.hack" in package database.
|
||||||
|
|
||||||
|
pacman -S gpm::
|
||||||
|
Download and install gpm including dependencies.
|
||||||
|
|
||||||
|
pacman -U /home/user/ceofhack-0.6-1-x86_64.pkg.tar.gz::
|
||||||
|
Install ceofhack-0.6-1 package from a local file.
|
||||||
|
|
||||||
|
pacman -Syu::
|
||||||
|
Update package list and upgrade all packages afterwards.
|
||||||
|
|
||||||
|
pacman -Syu gpm::
|
||||||
|
Update package list, upgrade all packages, and then install gpm if it
|
||||||
|
wasn't already installed.
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
See linkman:pacman.conf[5] for more details on configuring pacman using the
|
See linkman:pacman.conf[5] for more details on configuring pacman using the
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ NoUpgrade = etc/passwd etc/group etc/shadow
|
|||||||
NoUpgrade = etc/fstab
|
NoUpgrade = etc/fstab
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/core
|
Include = {sysconfdir}/pacman.d/core
|
||||||
|
|
||||||
[custom]
|
[custom]
|
||||||
Server = file:///home/pkgs
|
Server = file:///home/pkgs
|
||||||
@@ -57,13 +57,13 @@ Options
|
|||||||
|
|
||||||
*DBPath =* path/to/db/dir::
|
*DBPath =* path/to/db/dir::
|
||||||
Overrides the default location of the toplevel database directory. A
|
Overrides the default location of the toplevel database directory. A
|
||||||
typical default is ``/var/lib/pacman/''. Most users will not need to set
|
typical default is ``{localstatedir}/lib/pacman/''. Most users will not need to set
|
||||||
this option. *NOTE*: if specified, this is an absolute path and the root
|
this option. *NOTE*: if specified, this is an absolute path and the root
|
||||||
path is not automatically prepended.
|
path is not automatically prepended.
|
||||||
|
|
||||||
*CacheDir =* path/to/cache/dir::
|
*CacheDir =* path/to/cache/dir::
|
||||||
Overrides the default location of the package cache directory. A typical
|
Overrides the default location of the package cache directory. A typical
|
||||||
default is ``/var/cache/pacman/pkg/''. Multiple cache directories can be
|
default is ``{localstatedir}/cache/pacman/pkg/''. Multiple cache directories can be
|
||||||
specified, and they are tried in the order they are listed in the config
|
specified, and they are tried in the order they are listed in the config
|
||||||
file. If a file is not found in any cache directory, it will be downloaded
|
file. If a file is not found in any cache directory, it will be downloaded
|
||||||
to the first cache directory with write access. *NOTE*: this is an absolute
|
to the first cache directory with write access. *NOTE*: this is an absolute
|
||||||
@@ -72,7 +72,7 @@ Options
|
|||||||
|
|
||||||
*LogFile =* '/path/to/file'::
|
*LogFile =* '/path/to/file'::
|
||||||
Overrides the default location of the pacman log file. A typical default
|
Overrides the default location of the pacman log file. A typical default
|
||||||
is ``/var/log/pacman.log''. This is an absolute path and the root directory
|
is ``{localstatedir}/log/pacman.log''. This is an absolute path and the root directory
|
||||||
is not prepended.
|
is not prepended.
|
||||||
|
|
||||||
*HoldPkg =* package ...::
|
*HoldPkg =* package ...::
|
||||||
@@ -136,18 +136,20 @@ Options
|
|||||||
These files refer to files in the package archive, so do not include the
|
These files refer to files in the package archive, so do not include the
|
||||||
leading slash (the RootDir) when specifying them.
|
leading slash (the RootDir) when specifying them.
|
||||||
|
|
||||||
*CleanMethod =* KeepInstalled | KeepCurrent::
|
*CleanMethod =* KeepInstalled &| KeepCurrent::
|
||||||
If set to `KeepInstalled` (the default), the '-Sc' operation will clean
|
If set to `KeepInstalled` (the default), the '-Sc' operation will clean
|
||||||
packages that are no longer installed (not present in the local database).
|
packages that are no longer installed (not present in the local database).
|
||||||
If set to `KeepCurrent`, '-Sc' will clean outdated packages (not present in
|
If set to `KeepCurrent`, '-Sc' will clean outdated packages (not present in
|
||||||
any sync database).
|
any sync database).
|
||||||
The second behavior is useful when the package cache is shared among
|
The second behavior is useful when the package cache is shared among
|
||||||
multiple machines, where the local databases are usually different, but the
|
multiple machines, where the local databases are usually different, but the
|
||||||
sync databases in use could be the same.
|
sync databases in use could be the same. If both values are specified,
|
||||||
|
packages are only cleaned if not installed locally and not present in any
|
||||||
|
known sync database.
|
||||||
|
|
||||||
*UseSyslog*::
|
*UseSyslog*::
|
||||||
Log action messages through syslog(). This will insert log entries into
|
Log action messages through syslog(). This will insert log entries into
|
||||||
``/var/log/messages'' or equivalent.
|
``{localstatedir}/log/messages'' or equivalent.
|
||||||
|
|
||||||
*ShowSize*::
|
*ShowSize*::
|
||||||
Display the size of individual packages for '\--sync' and '\--query' modes.
|
Display the size of individual packages for '\--sync' and '\--query' modes.
|
||||||
@@ -162,6 +164,10 @@ Options
|
|||||||
than the percent of each individual download target. The progress
|
than the percent of each individual download target. The progress
|
||||||
bar is still based solely on the current file download.
|
bar is still based solely on the current file download.
|
||||||
|
|
||||||
|
*CheckSpace*::
|
||||||
|
Performs an approximate check for adequate available disk space before
|
||||||
|
installing packages.
|
||||||
|
|
||||||
Repository Sections
|
Repository Sections
|
||||||
-------------------
|
-------------------
|
||||||
Each repository section defines a section name and at least one location where
|
Each repository section defines a section name and at least one location where
|
||||||
@@ -180,7 +186,7 @@ contain a file that lists the servers for that repository.
|
|||||||
# use this repository first
|
# use this repository first
|
||||||
Server = ftp://ftp.archlinux.org/core/os/arch
|
Server = ftp://ftp.archlinux.org/core/os/arch
|
||||||
# next use servers as defined in the mirrorlist below
|
# next use servers as defined in the mirrorlist below
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = {sysconfdir}/pacman.d/mirrorlist
|
||||||
--------
|
--------
|
||||||
|
|
||||||
During parsing, pacman will define the `$repo` variable to the name of the
|
During parsing, pacman will define the `$repo` variable to the name of the
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ repo-add - package database maintenance utility
|
|||||||
|
|
||||||
Synopsis
|
Synopsis
|
||||||
--------
|
--------
|
||||||
repo-add [-q] <path-to-db> <package1> [<package2> ...]
|
repo-add [-d] [-f] [-q] <path-to-db> <package1> [<package2> ...]
|
||||||
|
|
||||||
repo-remove [-q] <path-to-db> <packagename> [<packagename2> ...]
|
repo-remove [-q] <path-to-db> <packagename> [<packagename2> ...]
|
||||||
|
|
||||||
@@ -30,11 +30,19 @@ on the command line.
|
|||||||
|
|
||||||
Options
|
Options
|
||||||
-------
|
-------
|
||||||
|
*-d, \--delta*::
|
||||||
|
Automatically generate and add a delta file between the old entry and the
|
||||||
|
new one, if the old package file is found next to the new one.
|
||||||
|
|
||||||
|
*-f, \--files*::
|
||||||
|
Tells repo-add also to create and include a list of the files in the
|
||||||
|
specified packages. This is useful for creating databases listing all files
|
||||||
|
in a given sync repository for tools that may use this information.
|
||||||
|
|
||||||
*-q, \--quiet*::
|
*-q, \--quiet*::
|
||||||
Force this program to keep quiet and run silent except for warning and
|
Force this program to keep quiet and run silent except for warning and
|
||||||
error messages.
|
error messages.
|
||||||
|
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
linkman:makepkg[8], linkman:pacman[8]
|
linkman:makepkg[8], linkman:pacman[8]
|
||||||
|
|||||||
@@ -4,13 +4,17 @@ Pacman - Translating
|
|||||||
This document is here to guide you in helping translate pacman messages,
|
This document is here to guide you in helping translate pacman messages,
|
||||||
libalpm messages, and the manpages for the entire pacman package.
|
libalpm messages, and the manpages for the entire pacman package.
|
||||||
|
|
||||||
A quick note- the gettext website is a very useful guide to read before
|
We are currently using http://www.transifex.net/[Transifex] as the translation
|
||||||
embarking on translation work, as it describes many of the commands in more
|
platform for pacman and libalpm. You will need to sign up for an account there
|
||||||
detail than I will here:
|
and then register with a translation team on the
|
||||||
http://www.gnu.org/software/gettext/manual/html_node/gettext.html[]
|
http://www.transifex.net/projects/p/archlinux-pacman/[pacman project page].
|
||||||
|
|
||||||
In addition, this site presents a small tutorial that I found useful:
|
NOTE: This may be old information due to our switch to Transifex, but the
|
||||||
http://oriya.sarovar.org/docs/gettext/[]
|
gettext website is a very useful guide to read before embarking on translation
|
||||||
|
work, as it describes many of the commands in more detail than I will here:
|
||||||
|
http://www.gnu.org/software/gettext/manual/html_node/gettext.html[]. In
|
||||||
|
addition, this site presents a small tutorial that I found useful:
|
||||||
|
http://oriya.sarovar.org/docs/gettext/[].
|
||||||
|
|
||||||
|
|
||||||
Translating Messages
|
Translating Messages
|
||||||
@@ -28,35 +32,31 @@ original message and the corresponding translation. These po files can then
|
|||||||
either be hand edited, or modified with a tool such as poedit, gtranslator or
|
either be hand edited, or modified with a tool such as poedit, gtranslator or
|
||||||
kbabel. Using a translation tool tends to make the job easier.
|
kbabel. Using a translation tool tends to make the job easier.
|
||||||
|
|
||||||
|
Please read up on Transifex usage using the
|
||||||
|
http://help.transifex.net/[Transifex Help] if you are not familiar.
|
||||||
|
|
||||||
See the <<Notes,Notes>> section for additional hints on translating.
|
See the <<Notes,Notes>> section for additional hints on translating.
|
||||||
|
|
||||||
Pre-release Updates
|
Pre-release Updates
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
A week or two before each release, the codebase will go into a string freeze
|
A week or two before each release, the codebase will go into a string freeze
|
||||||
and an email will be sent by the 'translation lieutenant' to the
|
and an email will be sent to the mailto:pacman-dev@archlinux.org[pacman-dev]
|
||||||
mailto:pacman-dev@archlinux.org[pacman-dev] mailing list asking for
|
mailing list asking for translations. This email will have a prefix of
|
||||||
translations. This email will have a prefix of *[translation]* for anyone
|
*[translation]* for anyone looking to set up an email filter.
|
||||||
looking to set up an email filter.
|
|
||||||
|
|
||||||
At this time, the `.po` language files will be made available at a URL
|
At this time, the latest `.po` language files will be made available at the
|
||||||
specified in the email. Each language will have two files available (backend
|
Transifex project page. Each language will have two files available (backend
|
||||||
and frontend). Translators interested in helping are encouraged to send a
|
and frontend). Translators interested in helping are encouraged to use the
|
||||||
follow-up message to the mailing list stating exactly what they intend to
|
features of Transifex to let others know they are currently translating their
|
||||||
translate so efforts are not duplicated on the same language.
|
language.
|
||||||
|
|
||||||
Once a translator has completed the translation (*OR* realizes they do not have
|
Once a translator has completed the translation (*OR* realizes they do not have
|
||||||
time to finish), please email the `.po` files back to the list with a subject
|
time to finish), please upload your progress back to the Transifex site.
|
||||||
such as '[translation] Updated German translation'. At this point, the
|
|
||||||
'translation lieutenant' will gather the translations together for inclusion in
|
|
||||||
the upcoming release.
|
|
||||||
|
|
||||||
NOTE: Please email your translations back to the list as soon as possible- this
|
NOTE: Please upload your translations as soon as possible- this will give other
|
||||||
will give other speakers of your language time to review your translations and
|
speakers of your language time to review your translations and update them as
|
||||||
update them as necessary.
|
necessary.
|
||||||
|
|
||||||
For those familiar with GIT, you may wish to follow the procedure outlined
|
|
||||||
below as another alternative.
|
|
||||||
|
|
||||||
Incremental Updates
|
Incremental Updates
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
71
doc/vercmp.8.txt
Normal file
71
doc/vercmp.8.txt
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/////
|
||||||
|
vim:set ts=4 sw=4 syntax=asciidoc noet:
|
||||||
|
/////
|
||||||
|
vercmp(8)
|
||||||
|
=========
|
||||||
|
|
||||||
|
Name
|
||||||
|
----
|
||||||
|
vercmp - version comparsion utility
|
||||||
|
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
--------
|
||||||
|
'vercmp' <version1> <version2>
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
'vercmp' is used to determine the relationship between two given version
|
||||||
|
numbers. It outputs values as follows:
|
||||||
|
|
||||||
|
* < 0 : if ver1 < ver2
|
||||||
|
* = 0 : if ver1 == ver2
|
||||||
|
* > 0 : if ver1 > ver2
|
||||||
|
|
||||||
|
Version comparsion operates as follows:
|
||||||
|
|
||||||
|
Alphanumeric:
|
||||||
|
1.0a < 1.0alpha < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0
|
||||||
|
Numeric:
|
||||||
|
1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
|
||||||
|
|
||||||
|
Additionally, version strings can have an 'epoch' value defined that will
|
||||||
|
overrule any version comparison (unless the epoch values are equal). This is
|
||||||
|
specified in an `epoch:version-rel` format. For example, `2:1.0-1` is always
|
||||||
|
greater than `1:3.6-1`.
|
||||||
|
|
||||||
|
|
||||||
|
Options
|
||||||
|
-------
|
||||||
|
*-h, \--help*::
|
||||||
|
Display syntax for the given operation. If no operation was supplied
|
||||||
|
then the general syntax is shown.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
--------
|
||||||
|
|
||||||
|
$ vercmp 1 2
|
||||||
|
-1
|
||||||
|
|
||||||
|
$ vercmp 2 1
|
||||||
|
1
|
||||||
|
|
||||||
|
$ vercmp 2.0-1 1.7-6
|
||||||
|
1
|
||||||
|
|
||||||
|
$ vercmp 2.0 2.0-13
|
||||||
|
0
|
||||||
|
|
||||||
|
$ vercmp 4.34 1:001
|
||||||
|
-1
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
There is none.
|
||||||
|
|
||||||
|
See Also
|
||||||
|
--------
|
||||||
|
linkman:pacman[8], linkman:makepkg[8], linkman:libalpm[3]
|
||||||
|
|
||||||
|
include::footer.txt[]
|
||||||
@@ -39,15 +39,16 @@ CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
|
|||||||
# BUILD ENVIRONMENT
|
# BUILD ENVIRONMENT
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
# Defaults: BUILDENV=(fakeroot !distcc color !ccache)
|
# Defaults: BUILDENV=(fakeroot !distcc color !ccache check)
|
||||||
# A negated environment option will do the opposite of the comments below.
|
# A negated environment option will do the opposite of the comments below.
|
||||||
#
|
#
|
||||||
#-- fakeroot: Allow building packages as a non-root user
|
#-- fakeroot: Allow building packages as a non-root user
|
||||||
#-- distcc: Use the Distributed C/C++/ObjC compiler
|
#-- distcc: Use the Distributed C/C++/ObjC compiler
|
||||||
#-- color: Colorize output messages
|
#-- color: Colorize output messages
|
||||||
#-- ccache: Use ccache to cache compilation
|
#-- ccache: Use ccache to cache compilation
|
||||||
|
#-- check: Run the check() function if present in the PKGBUILD
|
||||||
#
|
#
|
||||||
BUILDENV=(fakeroot !distcc color !ccache)
|
BUILDENV=(fakeroot !distcc color !ccache check)
|
||||||
#
|
#
|
||||||
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
|
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
|
||||||
#-- specify a space-delimited list of hosts running in the DistCC cluster.
|
#-- specify a space-delimited list of hosts running in the DistCC cluster.
|
||||||
@@ -61,7 +62,7 @@ BUILDENV=(fakeroot !distcc color !ccache)
|
|||||||
# Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
|
# Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
|
||||||
# A negated option will do the opposite of the comments below.
|
# A negated option will do the opposite of the comments below.
|
||||||
#
|
#
|
||||||
#-- strip: Strip symbols from binaries/libraries in STRIP_DIRS
|
#-- strip: Strip symbols from binaries/libraries
|
||||||
#-- docs: Save doc directories specified by DOC_DIRS
|
#-- docs: Save doc directories specified by DOC_DIRS
|
||||||
#-- libtool: Leave libtool (.la) files in packages
|
#-- libtool: Leave libtool (.la) files in packages
|
||||||
#-- emptydirs: Leave empty directories in packages
|
#-- emptydirs: Leave empty directories in packages
|
||||||
@@ -82,8 +83,6 @@ STRIP_STATIC="@STRIP_STATIC@"
|
|||||||
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
|
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
|
||||||
#-- Doc directories to remove (if !docs is specified)
|
#-- Doc directories to remove (if !docs is specified)
|
||||||
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
|
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
|
||||||
#-- Directories to be searched for the strip option (if strip is specified)
|
|
||||||
STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
|
|
||||||
#-- Files to be removed from all packages (if purge is specified)
|
#-- Files to be removed from all packages (if purge is specified)
|
||||||
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ HoldPkg = pacman glibc
|
|||||||
# If upgrades are available for these packages they will be asked for first
|
# If upgrades are available for these packages they will be asked for first
|
||||||
SyncFirst = pacman
|
SyncFirst = pacman
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#XferCommand = /usr/bin/curl -C - %u > %o
|
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
@@ -33,6 +33,7 @@ Architecture = auto
|
|||||||
#ShowSize
|
#ShowSize
|
||||||
#UseDelta
|
#UseDelta
|
||||||
#TotalDownload
|
#TotalDownload
|
||||||
|
#CheckSpace
|
||||||
|
|
||||||
#
|
#
|
||||||
# REPOSITORIES
|
# REPOSITORIES
|
||||||
|
|||||||
203
install-sh
203
install-sh
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# install - install a program, script, or datafile
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
scriptversion=2006-10-14.15
|
scriptversion=2010-02-06.18; # UTC
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
@@ -48,7 +48,7 @@ IFS=" "" $nl"
|
|||||||
# set DOITPROG to echo to test this script
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
doit="${DOITPROG-}"
|
doit=${DOITPROG-}
|
||||||
if test -z "$doit"; then
|
if test -z "$doit"; then
|
||||||
doit_exec=exec
|
doit_exec=exec
|
||||||
else
|
else
|
||||||
@@ -58,34 +58,49 @@ fi
|
|||||||
# Put in absolute file names if you don't have them in your path;
|
# Put in absolute file names if you don't have them in your path;
|
||||||
# or use environment vars.
|
# or use environment vars.
|
||||||
|
|
||||||
mvprog="${MVPROG-mv}"
|
chgrpprog=${CHGRPPROG-chgrp}
|
||||||
cpprog="${CPPROG-cp}"
|
chmodprog=${CHMODPROG-chmod}
|
||||||
chmodprog="${CHMODPROG-chmod}"
|
chownprog=${CHOWNPROG-chown}
|
||||||
chownprog="${CHOWNPROG-chown}"
|
cmpprog=${CMPPROG-cmp}
|
||||||
chgrpprog="${CHGRPPROG-chgrp}"
|
cpprog=${CPPROG-cp}
|
||||||
stripprog="${STRIPPROG-strip}"
|
mkdirprog=${MKDIRPROG-mkdir}
|
||||||
rmprog="${RMPROG-rm}"
|
mvprog=${MVPROG-mv}
|
||||||
mkdirprog="${MKDIRPROG-mkdir}"
|
rmprog=${RMPROG-rm}
|
||||||
|
stripprog=${STRIPPROG-strip}
|
||||||
|
|
||||||
|
posix_glob='?'
|
||||||
|
initialize_posix_glob='
|
||||||
|
test "$posix_glob" != "?" || {
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=
|
||||||
|
else
|
||||||
|
posix_glob=:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
posix_glob=
|
|
||||||
posix_mkdir=
|
posix_mkdir=
|
||||||
|
|
||||||
# Desired mode of installed file.
|
# Desired mode of installed file.
|
||||||
mode=0755
|
mode=0755
|
||||||
|
|
||||||
|
chgrpcmd=
|
||||||
chmodcmd=$chmodprog
|
chmodcmd=$chmodprog
|
||||||
chowncmd=
|
chowncmd=
|
||||||
chgrpcmd=
|
mvcmd=$mvprog
|
||||||
stripcmd=
|
|
||||||
rmcmd="$rmprog -f"
|
rmcmd="$rmprog -f"
|
||||||
mvcmd="$mvprog"
|
stripcmd=
|
||||||
|
|
||||||
src=
|
src=
|
||||||
dst=
|
dst=
|
||||||
dir_arg=
|
dir_arg=
|
||||||
dstarg=
|
dst_arg=
|
||||||
|
|
||||||
|
copy_on_change=false
|
||||||
no_target_directory=
|
no_target_directory=
|
||||||
|
|
||||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
usage="\
|
||||||
|
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||||
or: $0 [OPTION]... -d DIRECTORIES...
|
or: $0 [OPTION]... -d DIRECTORIES...
|
||||||
@@ -95,65 +110,55 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
|||||||
In the 4th, create DIRECTORIES.
|
In the 4th, create DIRECTORIES.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-c (ignored)
|
--help display this help and exit.
|
||||||
-d create directories instead of installing files.
|
--version display version info and exit.
|
||||||
-g GROUP $chgrpprog installed files to GROUP.
|
|
||||||
-m MODE $chmodprog installed files to MODE.
|
-c (ignored)
|
||||||
-o USER $chownprog installed files to USER.
|
-C install only if different (preserve the last data modification time)
|
||||||
-s $stripprog installed files.
|
-d create directories instead of installing files.
|
||||||
-t DIRECTORY install into DIRECTORY.
|
-g GROUP $chgrpprog installed files to GROUP.
|
||||||
-T report an error if DSTFILE is a directory.
|
-m MODE $chmodprog installed files to MODE.
|
||||||
--help display this help and exit.
|
-o USER $chownprog installed files to USER.
|
||||||
--version display version info and exit.
|
-s $stripprog installed files.
|
||||||
|
-t DIRECTORY install into DIRECTORY.
|
||||||
|
-T report an error if DSTFILE is a directory.
|
||||||
|
|
||||||
Environment variables override the default commands:
|
Environment variables override the default commands:
|
||||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||||
|
RMPROG STRIPPROG
|
||||||
"
|
"
|
||||||
|
|
||||||
while test $# -ne 0; do
|
while test $# -ne 0; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-c) shift
|
-c) ;;
|
||||||
continue;;
|
|
||||||
|
|
||||||
-d) dir_arg=true
|
-C) copy_on_change=true;;
|
||||||
shift
|
|
||||||
continue;;
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
shift
|
shift;;
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
--help) echo "$usage"; exit $?;;
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
-m) mode=$2
|
-m) mode=$2
|
||||||
shift
|
|
||||||
shift
|
|
||||||
case $mode in
|
case $mode in
|
||||||
*' '* | *' '* | *'
|
*' '* | *' '* | *'
|
||||||
'* | *'*'* | *'?'* | *'['*)
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
echo "$0: invalid mode: $mode" >&2
|
echo "$0: invalid mode: $mode" >&2
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
continue;;
|
shift;;
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
-o) chowncmd="$chownprog $2"
|
||||||
shift
|
shift;;
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-s) stripcmd=$stripprog
|
-s) stripcmd=$stripprog;;
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-t) dstarg=$2
|
-t) dst_arg=$2
|
||||||
shift
|
shift;;
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-T) no_target_directory=true
|
-T) no_target_directory=true;;
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
--version) echo "$0 $scriptversion"; exit $?;;
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
@@ -165,21 +170,22 @@ while test $# -ne 0; do
|
|||||||
|
|
||||||
*) break;;
|
*) break;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
# When -d is used, all remaining arguments are directories to create.
|
# When -d is used, all remaining arguments are directories to create.
|
||||||
# When -t is used, the destination is already specified.
|
# When -t is used, the destination is already specified.
|
||||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
for arg
|
for arg
|
||||||
do
|
do
|
||||||
if test -n "$dstarg"; then
|
if test -n "$dst_arg"; then
|
||||||
# $@ is not empty: it contains at least $arg.
|
# $@ is not empty: it contains at least $arg.
|
||||||
set fnord "$@" "$dstarg"
|
set fnord "$@" "$dst_arg"
|
||||||
shift # fnord
|
shift # fnord
|
||||||
fi
|
fi
|
||||||
shift # arg
|
shift # arg
|
||||||
dstarg=$arg
|
dst_arg=$arg
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -194,7 +200,11 @@ if test $# -eq 0; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
if test -z "$dir_arg"; then
|
||||||
trap '(exit $?); exit' 1 2 13 15
|
do_exit='(exit $ret); exit $ret'
|
||||||
|
trap "ret=129; $do_exit" 1
|
||||||
|
trap "ret=130; $do_exit" 2
|
||||||
|
trap "ret=141; $do_exit" 13
|
||||||
|
trap "ret=143; $do_exit" 15
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
# However, 'strip' requires both read and write access to temps.
|
# However, 'strip' requires both read and write access to temps.
|
||||||
@@ -224,7 +234,7 @@ for src
|
|||||||
do
|
do
|
||||||
# Protect names starting with `-'.
|
# Protect names starting with `-'.
|
||||||
case $src in
|
case $src in
|
||||||
-*) src=./$src ;;
|
-*) src=./$src;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
if test -n "$dir_arg"; then
|
||||||
@@ -242,22 +252,22 @@ do
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$dstarg"; then
|
if test -z "$dst_arg"; then
|
||||||
echo "$0: no destination specified." >&2
|
echo "$0: no destination specified." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dst=$dstarg
|
dst=$dst_arg
|
||||||
# Protect names starting with `-'.
|
# Protect names starting with `-'.
|
||||||
case $dst in
|
case $dst in
|
||||||
-*) dst=./$dst ;;
|
-*) dst=./$dst;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; won't work
|
# If destination is a directory, append the input filename; won't work
|
||||||
# if double slashes aren't ignored.
|
# if double slashes aren't ignored.
|
||||||
if test -d "$dst"; then
|
if test -d "$dst"; then
|
||||||
if test -n "$no_target_directory"; then
|
if test -n "$no_target_directory"; then
|
||||||
echo "$0: $dstarg: Is a directory" >&2
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dstdir=$dst
|
dstdir=$dst
|
||||||
@@ -378,26 +388,19 @@ do
|
|||||||
# directory the slow way, step by step, checking for races as we go.
|
# directory the slow way, step by step, checking for races as we go.
|
||||||
|
|
||||||
case $dstdir in
|
case $dstdir in
|
||||||
/*) prefix=/ ;;
|
/*) prefix='/';;
|
||||||
-*) prefix=./ ;;
|
-*) prefix='./';;
|
||||||
*) prefix= ;;
|
*) prefix='';;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $posix_glob in
|
eval "$initialize_posix_glob"
|
||||||
'')
|
|
||||||
if (set -f) 2>/dev/null; then
|
|
||||||
posix_glob=true
|
|
||||||
else
|
|
||||||
posix_glob=false
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
oIFS=$IFS
|
oIFS=$IFS
|
||||||
IFS=/
|
IFS=/
|
||||||
$posix_glob && set -f
|
$posix_glob set -f
|
||||||
set fnord $dstdir
|
set fnord $dstdir
|
||||||
shift
|
shift
|
||||||
$posix_glob && set +f
|
$posix_glob set +f
|
||||||
IFS=$oIFS
|
IFS=$oIFS
|
||||||
|
|
||||||
prefixes=
|
prefixes=
|
||||||
@@ -459,41 +462,54 @@ do
|
|||||||
# ignore errors from any of these, just make sure not to ignore
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||||
#
|
#
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||||
&& { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
|
if $copy_on_change &&
|
||||||
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
|
$posix_glob set +f &&
|
||||||
|
|
||||||
|
test "$old" = "$new" &&
|
||||||
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
rm -f "$dsttmp"
|
||||||
|
else
|
||||||
|
# Rename the file to the real destination.
|
||||||
|
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|
|
||||||
|| {
|
|
||||||
# The rename failed, perhaps because mv can't rename something else
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
# to itself, or perhaps because mv is so ancient that it does not
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
# support -f.
|
# support -f.
|
||||||
|
{
|
||||||
# Now remove or move aside any old file at destination location.
|
# Now remove or move aside any old file at destination location.
|
||||||
# We try this two ways since rm can't unlink itself on some
|
# We try this two ways since rm can't unlink itself on some
|
||||||
# systems and the destination file might be busy for other
|
# systems and the destination file might be busy for other
|
||||||
# reasons. In this case, the final cleanup might fail but the new
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
# file should still install successfully.
|
# file should still install successfully.
|
||||||
{
|
{
|
||||||
if test -f "$dst"; then
|
test ! -f "$dst" ||
|
||||||
$doit $rmcmd -f "$dst" 2>/dev/null \
|
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||||
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||||
|| {
|
} ||
|
||||||
echo "$0: cannot unlink or rename $dst" >&2
|
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||||
(exit 1); exit 1
|
(exit 1); exit 1
|
||||||
}
|
}
|
||||||
else
|
|
||||||
:
|
|
||||||
fi
|
|
||||||
} &&
|
} &&
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
# Now rename the file to the real destination.
|
||||||
$doit $mvcmd "$dsttmp" "$dst"
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
}
|
}
|
||||||
} || exit 1
|
fi || exit 1
|
||||||
|
|
||||||
trap '' 0
|
trap '' 0
|
||||||
fi
|
fi
|
||||||
@@ -503,5 +519,6 @@ done
|
|||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-end: "$"
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|||||||
@@ -25,27 +25,33 @@ libalpm_la_SOURCES = \
|
|||||||
alpm.h alpm.c \
|
alpm.h alpm.c \
|
||||||
alpm_list.h alpm_list.c \
|
alpm_list.h alpm_list.c \
|
||||||
backup.h backup.c \
|
backup.h backup.c \
|
||||||
be_files.c \
|
be_local.c \
|
||||||
be_package.c \
|
be_package.c \
|
||||||
cache.h cache.c \
|
be_sync.c \
|
||||||
conflict.h conflict.c \
|
conflict.h conflict.c \
|
||||||
db.h db.c \
|
db.h db.c \
|
||||||
delta.h delta.c \
|
delta.h delta.c \
|
||||||
deps.h deps.c \
|
deps.h deps.c \
|
||||||
|
diskspace.h diskspace.c \
|
||||||
dload.h dload.c \
|
dload.h dload.c \
|
||||||
error.c \
|
error.c \
|
||||||
graph.h \
|
graph.h \
|
||||||
group.h group.c \
|
group.h group.c \
|
||||||
handle.h handle.c \
|
handle.h handle.c \
|
||||||
log.h log.c \
|
log.h log.c \
|
||||||
md5.h md5.c \
|
|
||||||
package.h package.c \
|
package.h package.c \
|
||||||
|
pkghash.h pkghash.c \
|
||||||
remove.h remove.c \
|
remove.h remove.c \
|
||||||
sync.h sync.c \
|
sync.h sync.c \
|
||||||
trans.h trans.c \
|
trans.h trans.c \
|
||||||
util.h util.c \
|
util.h util.c \
|
||||||
version.c
|
version.c
|
||||||
|
|
||||||
|
if !HAVE_LIBSSL
|
||||||
|
libalpm_la_SOURCES += \
|
||||||
|
md5.h md5.c
|
||||||
|
endif
|
||||||
|
|
||||||
libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO)
|
libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO)
|
||||||
libalpm_la_LIBADD = $(LTLIBINTL)
|
libalpm_la_LIBADD = $(LTLIBINTL)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* add.c
|
* add.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -40,7 +40,6 @@
|
|||||||
#include "alpm_list.h"
|
#include "alpm_list.h"
|
||||||
#include "trans.h"
|
#include "trans.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "cache.h"
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "backup.h"
|
#include "backup.h"
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
@@ -50,64 +49,92 @@
|
|||||||
#include "remove.h"
|
#include "remove.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
/** Add a file target to the transaction.
|
/** Add a package to the transaction.
|
||||||
* @param target the name of the file target to add
|
* @param pkg the package to add
|
||||||
* @return 0 on success, -1 on error (pm_errno is set accordingly)
|
* @return 0 on success, -1 on error (pm_errno is set accordingly)
|
||||||
*/
|
*/
|
||||||
int SYMEXPORT alpm_add_target(char *target)
|
int SYMEXPORT alpm_add_pkg(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
pmpkg_t *pkg = NULL;
|
|
||||||
const char *pkgname, *pkgver;
|
const char *pkgname, *pkgver;
|
||||||
alpm_list_t *i;
|
|
||||||
pmtrans_t *trans;
|
pmtrans_t *trans;
|
||||||
|
pmdb_t *db_local;
|
||||||
|
pmpkg_t *local;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
ASSERT(target != NULL && strlen(target) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
||||||
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
|
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
|
||||||
trans = handle->trans;
|
trans = handle->trans;
|
||||||
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
||||||
ASSERT(trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1));
|
ASSERT(trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1));
|
||||||
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
||||||
|
db_local = handle->db_local;
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "loading target '%s'\n", target);
|
|
||||||
|
|
||||||
if(alpm_pkg_load(target, 1, &pkg) != 0) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
pkgname = alpm_pkg_get_name(pkg);
|
pkgname = alpm_pkg_get_name(pkg);
|
||||||
pkgver = alpm_pkg_get_version(pkg);
|
pkgver = alpm_pkg_get_version(pkg);
|
||||||
|
|
||||||
/* check if an older version of said package is already in transaction
|
_alpm_log(PM_LOG_DEBUG, "adding package '%s'\n", pkgname);
|
||||||
* packages. if so, replace it in the list */
|
|
||||||
for(i = trans->add; i; i = i->next) {
|
if(_alpm_pkg_find(trans->add, pkgname)) {
|
||||||
pmpkg_t *transpkg = i->data;
|
RET_ERR(PM_ERR_TRANS_DUP_TARGET, -1);
|
||||||
if(strcmp(transpkg->name, pkgname) == 0) {
|
|
||||||
if(alpm_pkg_vercmp(transpkg->version, pkgver) < 0) {
|
|
||||||
_alpm_log(PM_LOG_WARNING,
|
|
||||||
_("replacing older version %s-%s by %s in target list\n"),
|
|
||||||
transpkg->name, transpkg->version, pkgver);
|
|
||||||
_alpm_pkg_free(i->data);
|
|
||||||
i->data = pkg;
|
|
||||||
} else {
|
|
||||||
_alpm_log(PM_LOG_WARNING,
|
|
||||||
_("skipping %s-%s because newer version %s is in target list\n"),
|
|
||||||
pkgname, pkgver, transpkg->version);
|
|
||||||
_alpm_pkg_free(pkg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local = _alpm_db_get_pkgfromcache(db_local, pkgname);
|
||||||
|
if(local) {
|
||||||
|
const char *localpkgname = alpm_pkg_get_name(local);
|
||||||
|
const char *localpkgver = alpm_pkg_get_version(local);
|
||||||
|
int cmp = _alpm_pkg_compare_versions(pkg, local);
|
||||||
|
|
||||||
|
if(cmp == 0) {
|
||||||
|
if(trans->flags & PM_TRANS_FLAG_NEEDED) {
|
||||||
|
/* with the NEEDED flag, packages up to date are not reinstalled */
|
||||||
|
_alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping\n"),
|
||||||
|
localpkgname, localpkgver);
|
||||||
return(0);
|
return(0);
|
||||||
|
} else {
|
||||||
|
_alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- reinstalling\n"),
|
||||||
|
localpkgname, localpkgver);
|
||||||
|
}
|
||||||
|
} else if(cmp < 0) {
|
||||||
|
/* local version is newer */
|
||||||
|
_alpm_log(PM_LOG_WARNING, _("downgrading package %s (%s => %s)\n"),
|
||||||
|
localpkgname, localpkgver, pkgver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add the package to the transaction */
|
/* add the package to the transaction */
|
||||||
|
pkg->reason = PM_PKG_REASON_EXPLICIT;
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "adding package %s-%s to the transaction targets\n",
|
||||||
|
pkgname, pkgver);
|
||||||
trans->add = alpm_list_add(trans->add, pkg);
|
trans->add = alpm_list_add(trans->add, pkg);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
error:
|
static int perform_extraction(struct archive *archive,
|
||||||
_alpm_pkg_free(pkg);
|
struct archive_entry *entry, const char *filename, const char *origname)
|
||||||
return(-1);
|
{
|
||||||
|
int ret;
|
||||||
|
const int archive_flags = ARCHIVE_EXTRACT_OWNER |
|
||||||
|
ARCHIVE_EXTRACT_PERM |
|
||||||
|
ARCHIVE_EXTRACT_TIME;
|
||||||
|
|
||||||
|
archive_entry_set_pathname(entry, filename);
|
||||||
|
|
||||||
|
ret = archive_read_extract(archive, entry, archive_flags);
|
||||||
|
if(ret == ARCHIVE_WARN && archive_errno(archive) != ENOSPC) {
|
||||||
|
/* operation succeeded but a "non-critical" error was encountered */
|
||||||
|
_alpm_log(PM_LOG_WARNING, _("warning given when extracting %s (%s)\n"),
|
||||||
|
origname, archive_error_string(archive));
|
||||||
|
} else if(ret != ARCHIVE_OK) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)\n"),
|
||||||
|
origname, archive_error_string(archive));
|
||||||
|
alpm_logaction("error: could not extract %s (%s)\n",
|
||||||
|
origname, archive_error_string(archive));
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int extract_single_file(struct archive *archive,
|
static int extract_single_file(struct archive *archive,
|
||||||
@@ -120,9 +147,6 @@ static int extract_single_file(struct archive *archive,
|
|||||||
int needbackup = 0, notouch = 0;
|
int needbackup = 0, notouch = 0;
|
||||||
char *hash_orig = NULL;
|
char *hash_orig = NULL;
|
||||||
char *entryname_orig = NULL;
|
char *entryname_orig = NULL;
|
||||||
const int archive_flags = ARCHIVE_EXTRACT_OWNER |
|
|
||||||
ARCHIVE_EXTRACT_PERM |
|
|
||||||
ARCHIVE_EXTRACT_TIME;
|
|
||||||
int errors = 0;
|
int errors = 0;
|
||||||
|
|
||||||
entryname = archive_entry_pathname(entry);
|
entryname = archive_entry_pathname(entry);
|
||||||
@@ -161,14 +185,6 @@ static int extract_single_file(struct archive *archive,
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if a file is in the add skiplist we never extract it */
|
|
||||||
if(alpm_list_find_str(trans->skip_add, filename)) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "%s is in trans->skip_add, skipping extraction\n",
|
|
||||||
entryname);
|
|
||||||
archive_read_data_skip(archive);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for file existence. This is one of the more crucial parts
|
/* Check for file existence. This is one of the more crucial parts
|
||||||
* to get 'right'. Here are the possibilities, with the filesystem
|
* to get 'right'. Here are the possibilities, with the filesystem
|
||||||
* on the left and the package on the top:
|
* on the left and the package on the top:
|
||||||
@@ -277,18 +293,10 @@ static int extract_single_file(struct archive *archive,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
snprintf(checkfile, PATH_MAX, "%s.paccheck", filename);
|
snprintf(checkfile, PATH_MAX, "%s.paccheck", filename);
|
||||||
archive_entry_set_pathname(entry, checkfile);
|
|
||||||
|
|
||||||
ret = archive_read_extract(archive, entry, archive_flags);
|
ret = perform_extraction(archive, entry, checkfile, entryname_orig);
|
||||||
if(ret == ARCHIVE_WARN) {
|
if(ret == 1) {
|
||||||
/* operation succeeded but a non-critical error was encountered */
|
/* error */
|
||||||
_alpm_log(PM_LOG_DEBUG, "warning extracting %s (%s)\n",
|
|
||||||
entryname_orig, archive_error_string(archive));
|
|
||||||
} else if(ret != ARCHIVE_OK) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)\n"),
|
|
||||||
entryname_orig, archive_error_string(archive));
|
|
||||||
alpm_logaction("error: could not extract %s (%s)\n",
|
|
||||||
entryname_orig, archive_error_string(archive));
|
|
||||||
FREE(hash_orig);
|
FREE(hash_orig);
|
||||||
FREE(entryname_orig);
|
FREE(entryname_orig);
|
||||||
return(1);
|
return(1);
|
||||||
@@ -430,18 +438,9 @@ static int extract_single_file(struct archive *archive,
|
|||||||
unlink(filename);
|
unlink(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
archive_entry_set_pathname(entry, filename);
|
ret = perform_extraction(archive, entry, filename, entryname_orig);
|
||||||
|
if(ret == 1) {
|
||||||
ret = archive_read_extract(archive, entry, archive_flags);
|
/* error */
|
||||||
if(ret == ARCHIVE_WARN) {
|
|
||||||
/* operation succeeded but a non-critical error was encountered */
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "warning extracting %s (%s)\n",
|
|
||||||
entryname_orig, archive_error_string(archive));
|
|
||||||
} else if(ret != ARCHIVE_OK) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)\n"),
|
|
||||||
entryname_orig, archive_error_string(archive));
|
|
||||||
alpm_logaction("error: could not extract %s (%s)\n",
|
|
||||||
entryname_orig, archive_error_string(archive));
|
|
||||||
FREE(entryname_orig);
|
FREE(entryname_orig);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
@@ -473,8 +472,8 @@ static int extract_single_file(struct archive *archive,
|
|||||||
return(errors);
|
return(errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
static int commit_single_pkg(pmpkg_t *newpkg, size_t pkg_current,
|
||||||
pmtrans_t *trans, pmdb_t *db)
|
size_t pkg_count, pmtrans_t *trans, pmdb_t *db)
|
||||||
{
|
{
|
||||||
int i, ret = 0, errors = 0;
|
int i, ret = 0, errors = 0;
|
||||||
char scriptlet[PATH_MAX+1];
|
char scriptlet[PATH_MAX+1];
|
||||||
@@ -498,7 +497,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
|||||||
oldpkg = _alpm_pkg_dup(local);
|
oldpkg = _alpm_pkg_dup(local);
|
||||||
/* make sure all infos are loaded because the database entry
|
/* make sure all infos are loaded because the database entry
|
||||||
* will be removed soon */
|
* will be removed soon */
|
||||||
_alpm_db_read(oldpkg->origin_data.db, oldpkg, INFRQ_ALL);
|
_alpm_local_db_read(oldpkg->origin_data.db, oldpkg, INFRQ_ALL);
|
||||||
|
|
||||||
EVENT(trans, PM_TRANS_EVT_UPGRADE_START, newpkg, oldpkg);
|
EVENT(trans, PM_TRANS_EVT_UPGRADE_START, newpkg, oldpkg);
|
||||||
_alpm_log(PM_LOG_DEBUG, "upgrading package %s-%s\n",
|
_alpm_log(PM_LOG_DEBUG, "upgrading package %s-%s\n",
|
||||||
@@ -544,7 +543,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
|||||||
|
|
||||||
/* prepare directory for database entries so permission are correct after
|
/* prepare directory for database entries so permission are correct after
|
||||||
changelog/install script installation (FS#12263) */
|
changelog/install script installation (FS#12263) */
|
||||||
if(_alpm_db_prepare(db, newpkg)) {
|
if(_alpm_local_db_prepare(db, newpkg)) {
|
||||||
alpm_logaction("error: could not create database entry %s-%s\n",
|
alpm_logaction("error: could not create database entry %s-%s\n",
|
||||||
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
||||||
pm_errno = PM_ERR_DB_WRITE;
|
pm_errno = PM_ERR_DB_WRITE;
|
||||||
@@ -556,6 +555,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
|||||||
struct archive *archive;
|
struct archive *archive;
|
||||||
struct archive_entry *entry;
|
struct archive_entry *entry;
|
||||||
char cwd[PATH_MAX] = "";
|
char cwd[PATH_MAX] = "";
|
||||||
|
int restore_cwd = 0;
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "extracting files\n");
|
_alpm_log(PM_LOG_DEBUG, "extracting files\n");
|
||||||
|
|
||||||
@@ -579,11 +579,16 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
|||||||
/* save the cwd so we can restore it later */
|
/* save the cwd so we can restore it later */
|
||||||
if(getcwd(cwd, PATH_MAX) == NULL) {
|
if(getcwd(cwd, PATH_MAX) == NULL) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not get current working directory\n"));
|
_alpm_log(PM_LOG_ERROR, _("could not get current working directory\n"));
|
||||||
cwd[0] = 0;
|
} else {
|
||||||
|
restore_cwd = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* libarchive requires this for extracting hard links */
|
/* libarchive requires this for extracting hard links */
|
||||||
chdir(handle->root);
|
if(chdir(handle->root) != 0) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("could not change directory to %s (%s)\n"), handle->root, strerror(errno));
|
||||||
|
ret = -1;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
|
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
|
||||||
if(is_upgrade) {
|
if(is_upgrade) {
|
||||||
@@ -595,31 +600,31 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
|
for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
|
||||||
double percent;
|
int percent;
|
||||||
|
|
||||||
if(newpkg->size != 0) {
|
if(newpkg->size != 0) {
|
||||||
/* Using compressed size for calculations here, as newpkg->isize is not
|
/* Using compressed size for calculations here, as newpkg->isize is not
|
||||||
* exact when it comes to comparing to the ACTUAL uncompressed size
|
* exact when it comes to comparing to the ACTUAL uncompressed size
|
||||||
* (missing metadata sizes) */
|
* (missing metadata sizes) */
|
||||||
int64_t pos = archive_position_compressed(archive);
|
int64_t pos = archive_position_compressed(archive);
|
||||||
percent = (double)pos / (double)newpkg->size;
|
percent = (pos * 100) / newpkg->size;
|
||||||
_alpm_log(PM_LOG_DEBUG, "decompression progress: "
|
_alpm_log(PM_LOG_DEBUG, "decompression progress: "
|
||||||
"%f%% (%"PRId64" / %jd)\n",
|
"%d%% (%"PRId64" / %jd)\n",
|
||||||
percent*100.0, pos, (intmax_t)newpkg->size);
|
percent, pos, (intmax_t)newpkg->size);
|
||||||
if(percent >= 1.0) {
|
if(percent >= 100) {
|
||||||
percent = 1.0;
|
percent = 100;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
percent = 0.0;
|
percent = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_upgrade) {
|
if(is_upgrade) {
|
||||||
PROGRESS(trans, PM_TRANS_PROGRESS_UPGRADE_START,
|
PROGRESS(trans, PM_TRANS_PROGRESS_UPGRADE_START,
|
||||||
alpm_pkg_get_name(newpkg), (int)(percent * 100), pkg_count,
|
alpm_pkg_get_name(newpkg), percent, pkg_count,
|
||||||
pkg_current);
|
pkg_current);
|
||||||
} else {
|
} else {
|
||||||
PROGRESS(trans, PM_TRANS_PROGRESS_ADD_START,
|
PROGRESS(trans, PM_TRANS_PROGRESS_ADD_START,
|
||||||
alpm_pkg_get_name(newpkg), (int)(percent * 100), pkg_count,
|
alpm_pkg_get_name(newpkg), percent, pkg_count,
|
||||||
pkg_current);
|
pkg_current);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,9 +634,9 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
|||||||
}
|
}
|
||||||
archive_read_finish(archive);
|
archive_read_finish(archive);
|
||||||
|
|
||||||
/* restore the old cwd is we have it */
|
/* restore the old cwd if we have it */
|
||||||
if(strlen(cwd)) {
|
if(restore_cwd && chdir(cwd) != 0) {
|
||||||
chdir(cwd);
|
_alpm_log(PM_LOG_ERROR, _("could not change directory to %s (%s)\n"), cwd, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(errors) {
|
if(errors) {
|
||||||
@@ -656,7 +661,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
|
|||||||
_alpm_log(PM_LOG_DEBUG, "updating database\n");
|
_alpm_log(PM_LOG_DEBUG, "updating database\n");
|
||||||
_alpm_log(PM_LOG_DEBUG, "adding database entry '%s'\n", newpkg->name);
|
_alpm_log(PM_LOG_DEBUG, "adding database entry '%s'\n", newpkg->name);
|
||||||
|
|
||||||
if(_alpm_db_write(db, newpkg, INFRQ_ALL)) {
|
if(_alpm_local_db_write(db, newpkg, INFRQ_ALL)) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s\n"),
|
_alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s\n"),
|
||||||
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
||||||
alpm_logaction("error: could not update database entry %s-%s\n",
|
alpm_logaction("error: could not update database entry %s-%s\n",
|
||||||
@@ -705,7 +710,8 @@ cleanup:
|
|||||||
|
|
||||||
int _alpm_upgrade_packages(pmtrans_t *trans, pmdb_t *db)
|
int _alpm_upgrade_packages(pmtrans_t *trans, pmdb_t *db)
|
||||||
{
|
{
|
||||||
int pkg_count, pkg_current;
|
size_t pkg_count, pkg_current;
|
||||||
|
int skip_ldconfig = 0, ret = 0;
|
||||||
alpm_list_t *targ;
|
alpm_list_t *targ;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
@@ -723,18 +729,28 @@ int _alpm_upgrade_packages(pmtrans_t *trans, pmdb_t *db)
|
|||||||
/* loop through our package list adding/upgrading one at a time */
|
/* loop through our package list adding/upgrading one at a time */
|
||||||
for(targ = trans->add; targ; targ = targ->next) {
|
for(targ = trans->add; targ; targ = targ->next) {
|
||||||
if(handle->trans->state == STATE_INTERRUPTED) {
|
if(handle->trans->state == STATE_INTERRUPTED) {
|
||||||
return(0);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
pmpkg_t *newpkg = (pmpkg_t *)targ->data;
|
pmpkg_t *newpkg = (pmpkg_t *)targ->data;
|
||||||
commit_single_pkg(newpkg, pkg_current, pkg_count, trans, db);
|
if(commit_single_pkg(newpkg, pkg_current, pkg_count, trans, db)) {
|
||||||
|
/* something screwed up on the commit, abort the trans */
|
||||||
|
trans->state = STATE_INTERRUPTED;
|
||||||
|
pm_errno = PM_ERR_TRANS_ABORT;
|
||||||
|
/* running ldconfig at this point could possibly screw system */
|
||||||
|
skip_ldconfig = 1;
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
|
||||||
pkg_current++;
|
pkg_current++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!skip_ldconfig) {
|
||||||
/* run ldconfig if it exists */
|
/* run ldconfig if it exists */
|
||||||
_alpm_ldconfig(handle->root);
|
_alpm_ldconfig(handle->root);
|
||||||
|
}
|
||||||
|
|
||||||
return(0);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* add.h
|
* add.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm.c
|
* alpm.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -23,6 +23,11 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
/* connection caching setup */
|
||||||
|
#ifdef HAVE_LIBFETCH
|
||||||
|
#include <fetch.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* libalpm */
|
/* libalpm */
|
||||||
#include "alpm.h"
|
#include "alpm.h"
|
||||||
#include "alpm_list.h"
|
#include "alpm_list.h"
|
||||||
@@ -49,11 +54,21 @@ int SYMEXPORT alpm_initialize(void)
|
|||||||
if(handle == NULL) {
|
if(handle == NULL) {
|
||||||
RET_ERR(PM_ERR_MEMORY, -1);
|
RET_ERR(PM_ERR_MEMORY, -1);
|
||||||
}
|
}
|
||||||
|
if(_alpm_db_register_local() == NULL) {
|
||||||
|
/* error code should be set */
|
||||||
|
_alpm_handle_free(handle);
|
||||||
|
handle = NULL;
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
bindtextdomain("libalpm", LOCALEDIR);
|
bindtextdomain("libalpm", LOCALEDIR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBFETCH
|
||||||
|
fetchConnectionCacheInit(5, 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +88,10 @@ int SYMEXPORT alpm_release(void)
|
|||||||
_alpm_handle_free(handle);
|
_alpm_handle_free(handle);
|
||||||
handle = NULL;
|
handle = NULL;
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBFETCH
|
||||||
|
fetchConnectionCacheClose();
|
||||||
|
#endif
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm.h
|
* alpm.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -73,8 +73,8 @@ typedef enum _pmloglevel_t {
|
|||||||
PM_LOG_FUNCTION = (1 << 3)
|
PM_LOG_FUNCTION = (1 << 3)
|
||||||
} pmloglevel_t;
|
} pmloglevel_t;
|
||||||
|
|
||||||
typedef void (*alpm_cb_log)(pmloglevel_t, char *, va_list);
|
typedef void (*alpm_cb_log)(pmloglevel_t, const char *, va_list);
|
||||||
int alpm_logaction(char *fmt, ...);
|
int alpm_logaction(const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Downloading
|
* Downloading
|
||||||
@@ -97,66 +97,69 @@ typedef int (*alpm_cb_fetch)(const char *url, const char *localpath,
|
|||||||
* Options
|
* Options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
alpm_cb_log alpm_option_get_logcb();
|
alpm_cb_log alpm_option_get_logcb(void);
|
||||||
void alpm_option_set_logcb(alpm_cb_log cb);
|
void alpm_option_set_logcb(alpm_cb_log cb);
|
||||||
|
|
||||||
alpm_cb_download alpm_option_get_dlcb();
|
alpm_cb_download alpm_option_get_dlcb(void);
|
||||||
void alpm_option_set_dlcb(alpm_cb_download cb);
|
void alpm_option_set_dlcb(alpm_cb_download cb);
|
||||||
|
|
||||||
alpm_cb_fetch alpm_option_get_fetchcb();
|
alpm_cb_fetch alpm_option_get_fetchcb(void);
|
||||||
void alpm_option_set_fetchcb(alpm_cb_fetch cb);
|
void alpm_option_set_fetchcb(alpm_cb_fetch cb);
|
||||||
|
|
||||||
alpm_cb_totaldl alpm_option_get_totaldlcb();
|
alpm_cb_totaldl alpm_option_get_totaldlcb(void);
|
||||||
void alpm_option_set_totaldlcb(alpm_cb_totaldl cb);
|
void alpm_option_set_totaldlcb(alpm_cb_totaldl cb);
|
||||||
|
|
||||||
const char *alpm_option_get_root();
|
const char *alpm_option_get_root(void);
|
||||||
int alpm_option_set_root(const char *root);
|
int alpm_option_set_root(const char *root);
|
||||||
|
|
||||||
const char *alpm_option_get_dbpath();
|
const char *alpm_option_get_dbpath(void);
|
||||||
int alpm_option_set_dbpath(const char *dbpath);
|
int alpm_option_set_dbpath(const char *dbpath);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_cachedirs();
|
alpm_list_t *alpm_option_get_cachedirs(void);
|
||||||
int alpm_option_add_cachedir(const char *cachedir);
|
int alpm_option_add_cachedir(const char *cachedir);
|
||||||
void alpm_option_set_cachedirs(alpm_list_t *cachedirs);
|
void alpm_option_set_cachedirs(alpm_list_t *cachedirs);
|
||||||
int alpm_option_remove_cachedir(const char *cachedir);
|
int alpm_option_remove_cachedir(const char *cachedir);
|
||||||
|
|
||||||
const char *alpm_option_get_logfile();
|
const char *alpm_option_get_logfile(void);
|
||||||
int alpm_option_set_logfile(const char *logfile);
|
int alpm_option_set_logfile(const char *logfile);
|
||||||
|
|
||||||
const char *alpm_option_get_lockfile();
|
const char *alpm_option_get_lockfile(void);
|
||||||
/* no set_lockfile, path is determined from dbpath */
|
/* no set_lockfile, path is determined from dbpath */
|
||||||
|
|
||||||
int alpm_option_get_usesyslog();
|
int alpm_option_get_usesyslog(void);
|
||||||
void alpm_option_set_usesyslog(int usesyslog);
|
void alpm_option_set_usesyslog(int usesyslog);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_noupgrades();
|
alpm_list_t *alpm_option_get_noupgrades(void);
|
||||||
void alpm_option_add_noupgrade(const char *pkg);
|
void alpm_option_add_noupgrade(const char *pkg);
|
||||||
void alpm_option_set_noupgrades(alpm_list_t *noupgrade);
|
void alpm_option_set_noupgrades(alpm_list_t *noupgrade);
|
||||||
int alpm_option_remove_noupgrade(const char *pkg);
|
int alpm_option_remove_noupgrade(const char *pkg);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_noextracts();
|
alpm_list_t *alpm_option_get_noextracts(void);
|
||||||
void alpm_option_add_noextract(const char *pkg);
|
void alpm_option_add_noextract(const char *pkg);
|
||||||
void alpm_option_set_noextracts(alpm_list_t *noextract);
|
void alpm_option_set_noextracts(alpm_list_t *noextract);
|
||||||
int alpm_option_remove_noextract(const char *pkg);
|
int alpm_option_remove_noextract(const char *pkg);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_ignorepkgs();
|
alpm_list_t *alpm_option_get_ignorepkgs(void);
|
||||||
void alpm_option_add_ignorepkg(const char *pkg);
|
void alpm_option_add_ignorepkg(const char *pkg);
|
||||||
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs);
|
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs);
|
||||||
int alpm_option_remove_ignorepkg(const char *pkg);
|
int alpm_option_remove_ignorepkg(const char *pkg);
|
||||||
|
|
||||||
alpm_list_t *alpm_option_get_ignoregrps();
|
alpm_list_t *alpm_option_get_ignoregrps(void);
|
||||||
void alpm_option_add_ignoregrp(const char *grp);
|
void alpm_option_add_ignoregrp(const char *grp);
|
||||||
void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps);
|
void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps);
|
||||||
int alpm_option_remove_ignoregrp(const char *grp);
|
int alpm_option_remove_ignoregrp(const char *grp);
|
||||||
|
|
||||||
const char *alpm_option_get_arch();
|
const char *alpm_option_get_arch(void);
|
||||||
void alpm_option_set_arch(const char *arch);
|
void alpm_option_set_arch(const char *arch);
|
||||||
|
|
||||||
int alpm_option_get_usedelta();
|
int alpm_option_get_usedelta(void);
|
||||||
void alpm_option_set_usedelta(int usedelta);
|
void alpm_option_set_usedelta(int usedelta);
|
||||||
|
|
||||||
pmdb_t *alpm_option_get_localdb();
|
int alpm_option_get_checkspace(void);
|
||||||
alpm_list_t *alpm_option_get_syncdbs();
|
void alpm_option_set_checkspace(int checkspace);
|
||||||
|
|
||||||
|
pmdb_t *alpm_option_get_localdb(void);
|
||||||
|
alpm_list_t *alpm_option_get_syncdbs(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Install reasons -- ie, why the package was installed
|
* Install reasons -- ie, why the package was installed
|
||||||
@@ -171,8 +174,6 @@ typedef enum _pmpkgreason_t {
|
|||||||
* Databases
|
* Databases
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Preferred interfaces db_register_local and db_register_sync */
|
|
||||||
pmdb_t *alpm_db_register_local(void);
|
|
||||||
pmdb_t *alpm_db_register_sync(const char *treename);
|
pmdb_t *alpm_db_register_sync(const char *treename);
|
||||||
int alpm_db_unregister(pmdb_t *db);
|
int alpm_db_unregister(pmdb_t *db);
|
||||||
int alpm_db_unregister_all(void);
|
int alpm_db_unregister_all(void);
|
||||||
@@ -235,7 +236,6 @@ size_t alpm_pkg_changelog_read(void *ptr, size_t size,
|
|||||||
/*int alpm_pkg_changelog_feof(const pmpkg_t *pkg, void *fp);*/
|
/*int alpm_pkg_changelog_feof(const pmpkg_t *pkg, void *fp);*/
|
||||||
int alpm_pkg_changelog_close(const pmpkg_t *pkg, void *fp);
|
int alpm_pkg_changelog_close(const pmpkg_t *pkg, void *fp);
|
||||||
int alpm_pkg_has_scriptlet(pmpkg_t *pkg);
|
int alpm_pkg_has_scriptlet(pmpkg_t *pkg);
|
||||||
int alpm_pkg_has_force(pmpkg_t *pkg);
|
|
||||||
|
|
||||||
off_t alpm_pkg_download_size(pmpkg_t *newpkg);
|
off_t alpm_pkg_download_size(pmpkg_t *newpkg);
|
||||||
alpm_list_t *alpm_pkg_unused_deltas(pmpkg_t *pkg);
|
alpm_list_t *alpm_pkg_unused_deltas(pmpkg_t *pkg);
|
||||||
@@ -255,6 +255,7 @@ off_t alpm_delta_get_size(pmdelta_t *delta);
|
|||||||
*/
|
*/
|
||||||
const char *alpm_grp_get_name(const pmgrp_t *grp);
|
const char *alpm_grp_get_name(const pmgrp_t *grp);
|
||||||
alpm_list_t *alpm_grp_get_pkgs(const pmgrp_t *grp);
|
alpm_list_t *alpm_grp_get_pkgs(const pmgrp_t *grp);
|
||||||
|
alpm_list_t *alpm_find_grp_pkgs(alpm_list_t *dbs, const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sync
|
* Sync
|
||||||
@@ -272,7 +273,7 @@ typedef enum _pmtransflag_t {
|
|||||||
PM_TRANS_FLAG_NODEPS = 1,
|
PM_TRANS_FLAG_NODEPS = 1,
|
||||||
PM_TRANS_FLAG_FORCE = (1 << 1),
|
PM_TRANS_FLAG_FORCE = (1 << 1),
|
||||||
PM_TRANS_FLAG_NOSAVE = (1 << 2),
|
PM_TRANS_FLAG_NOSAVE = (1 << 2),
|
||||||
/* (1 << 3) flag can go here */
|
PM_TRANS_FLAG_NODEPVERSION = (1 << 3),
|
||||||
PM_TRANS_FLAG_CASCADE = (1 << 4),
|
PM_TRANS_FLAG_CASCADE = (1 << 4),
|
||||||
PM_TRANS_FLAG_RECURSE = (1 << 5),
|
PM_TRANS_FLAG_RECURSE = (1 << 5),
|
||||||
PM_TRANS_FLAG_DBONLY = (1 << 6),
|
PM_TRANS_FLAG_DBONLY = (1 << 6),
|
||||||
@@ -368,6 +369,10 @@ typedef enum _pmtransevt_t {
|
|||||||
* The repository's tree name is passed to the callback.
|
* The repository's tree name is passed to the callback.
|
||||||
*/
|
*/
|
||||||
PM_TRANS_EVT_RETRIEVE_START,
|
PM_TRANS_EVT_RETRIEVE_START,
|
||||||
|
/** Disk space usage will be computed for a package */
|
||||||
|
PM_TRANS_EVT_DISKSPACE_START,
|
||||||
|
/** Disk space usage was computed for a package */
|
||||||
|
PM_TRANS_EVT_DISKSPACE_DONE,
|
||||||
} pmtransevt_t;
|
} pmtransevt_t;
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
@@ -379,6 +384,7 @@ typedef enum _pmtransconv_t {
|
|||||||
PM_TRANS_CONV_CORRUPTED_PKG = (1 << 3),
|
PM_TRANS_CONV_CORRUPTED_PKG = (1 << 3),
|
||||||
PM_TRANS_CONV_LOCAL_NEWER = (1 << 4),
|
PM_TRANS_CONV_LOCAL_NEWER = (1 << 4),
|
||||||
PM_TRANS_CONV_REMOVE_PKGS = (1 << 5),
|
PM_TRANS_CONV_REMOVE_PKGS = (1 << 5),
|
||||||
|
PM_TRANS_CONV_SELECT_PROVIDER = (1 << 6),
|
||||||
} pmtransconv_t;
|
} pmtransconv_t;
|
||||||
|
|
||||||
/* Transaction Progress */
|
/* Transaction Progress */
|
||||||
@@ -386,7 +392,9 @@ typedef enum _pmtransprog_t {
|
|||||||
PM_TRANS_PROGRESS_ADD_START,
|
PM_TRANS_PROGRESS_ADD_START,
|
||||||
PM_TRANS_PROGRESS_UPGRADE_START,
|
PM_TRANS_PROGRESS_UPGRADE_START,
|
||||||
PM_TRANS_PROGRESS_REMOVE_START,
|
PM_TRANS_PROGRESS_REMOVE_START,
|
||||||
PM_TRANS_PROGRESS_CONFLICTS_START
|
PM_TRANS_PROGRESS_CONFLICTS_START,
|
||||||
|
PM_TRANS_PROGRESS_DISKSPACE_START,
|
||||||
|
PM_TRANS_PROGRESS_INTEGRITY_START,
|
||||||
} pmtransprog_t;
|
} pmtransprog_t;
|
||||||
|
|
||||||
/* Transaction Event callback */
|
/* Transaction Event callback */
|
||||||
@@ -397,11 +405,11 @@ typedef void (*alpm_trans_cb_conv)(pmtransconv_t, void *, void *,
|
|||||||
void *, int *);
|
void *, int *);
|
||||||
|
|
||||||
/* Transaction Progress callback */
|
/* Transaction Progress callback */
|
||||||
typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, int, int);
|
typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, size_t, size_t);
|
||||||
|
|
||||||
int alpm_trans_get_flags();
|
int alpm_trans_get_flags(void);
|
||||||
alpm_list_t * alpm_trans_get_add();
|
alpm_list_t * alpm_trans_get_add(void);
|
||||||
alpm_list_t * alpm_trans_get_remove();
|
alpm_list_t * alpm_trans_get_remove(void);
|
||||||
int alpm_trans_init(pmtransflag_t flags,
|
int alpm_trans_init(pmtransflag_t flags,
|
||||||
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
|
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
|
||||||
alpm_trans_cb_progress cb_progress);
|
alpm_trans_cb_progress cb_progress);
|
||||||
@@ -411,10 +419,8 @@ int alpm_trans_interrupt(void);
|
|||||||
int alpm_trans_release(void);
|
int alpm_trans_release(void);
|
||||||
|
|
||||||
int alpm_sync_sysupgrade(int enable_downgrade);
|
int alpm_sync_sysupgrade(int enable_downgrade);
|
||||||
int alpm_sync_target(char *target);
|
int alpm_add_pkg(pmpkg_t *pkg);
|
||||||
int alpm_sync_dbtarget(char *db, char *target);
|
int alpm_remove_pkg(pmpkg_t *pkg);
|
||||||
int alpm_add_target(char *target);
|
|
||||||
int alpm_remove_target(char *target);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dependencies and conflicts
|
* Dependencies and conflicts
|
||||||
@@ -429,10 +435,10 @@ typedef enum _pmdepmod_t {
|
|||||||
PM_DEP_MOD_LT
|
PM_DEP_MOD_LT
|
||||||
} pmdepmod_t;
|
} pmdepmod_t;
|
||||||
|
|
||||||
int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep);
|
|
||||||
alpm_list_t *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
alpm_list_t *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
||||||
alpm_list_t *remove, alpm_list_t *upgrade);
|
alpm_list_t *remove, alpm_list_t *upgrade);
|
||||||
alpm_list_t *alpm_deptest(pmdb_t *db, alpm_list_t *targets);
|
pmpkg_t *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring);
|
||||||
|
pmpkg_t *alpm_find_dbs_satisfier(alpm_list_t *dbs, const char *depstring);
|
||||||
|
|
||||||
const char *alpm_miss_get_target(const pmdepmissing_t *miss);
|
const char *alpm_miss_get_target(const pmdepmissing_t *miss);
|
||||||
pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss);
|
pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss);
|
||||||
@@ -480,6 +486,7 @@ enum _pmerrno_t {
|
|||||||
PM_ERR_NOT_A_FILE,
|
PM_ERR_NOT_A_FILE,
|
||||||
PM_ERR_NOT_A_DIR,
|
PM_ERR_NOT_A_DIR,
|
||||||
PM_ERR_WRONG_ARGS,
|
PM_ERR_WRONG_ARGS,
|
||||||
|
PM_ERR_DISK_SPACE,
|
||||||
/* Interface */
|
/* Interface */
|
||||||
PM_ERR_HANDLE_NULL,
|
PM_ERR_HANDLE_NULL,
|
||||||
PM_ERR_HANDLE_NOT_NULL,
|
PM_ERR_HANDLE_NOT_NULL,
|
||||||
@@ -490,6 +497,7 @@ enum _pmerrno_t {
|
|||||||
PM_ERR_DB_NULL,
|
PM_ERR_DB_NULL,
|
||||||
PM_ERR_DB_NOT_NULL,
|
PM_ERR_DB_NOT_NULL,
|
||||||
PM_ERR_DB_NOT_FOUND,
|
PM_ERR_DB_NOT_FOUND,
|
||||||
|
PM_ERR_DB_VERSION,
|
||||||
PM_ERR_DB_WRITE,
|
PM_ERR_DB_WRITE,
|
||||||
PM_ERR_DB_REMOVE,
|
PM_ERR_DB_REMOVE,
|
||||||
/* Servers */
|
/* Servers */
|
||||||
@@ -522,6 +530,7 @@ enum _pmerrno_t {
|
|||||||
PM_ERR_FILE_CONFLICTS,
|
PM_ERR_FILE_CONFLICTS,
|
||||||
/* Misc */
|
/* Misc */
|
||||||
PM_ERR_RETRIEVE,
|
PM_ERR_RETRIEVE,
|
||||||
|
PM_ERR_WRITE,
|
||||||
PM_ERR_INVALID_REGEX,
|
PM_ERR_INVALID_REGEX,
|
||||||
/* External library errors */
|
/* External library errors */
|
||||||
PM_ERR_LIBARCHIVE,
|
PM_ERR_LIBARCHIVE,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm_list.c
|
* alpm_list.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -269,7 +269,7 @@ alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, a
|
|||||||
*
|
*
|
||||||
* @return the resultant list
|
* @return the resultant list
|
||||||
*/
|
*/
|
||||||
alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn)
|
alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, size_t n, alpm_list_fn_cmp fn)
|
||||||
{
|
{
|
||||||
if (n > 1) {
|
if (n > 1) {
|
||||||
alpm_list_t *left = list;
|
alpm_list_t *left = list;
|
||||||
@@ -285,6 +285,53 @@ alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cm
|
|||||||
return(list);
|
return(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Remove an item from the list.
|
||||||
|
* item is not freed; this is the respnsiblity of the caller.
|
||||||
|
*
|
||||||
|
* @param haystack the list to remove the item from
|
||||||
|
* @param item the item to remove from the list
|
||||||
|
*
|
||||||
|
* @return the resultant list
|
||||||
|
*/
|
||||||
|
alpm_list_t SYMEXPORT *alpm_list_remove_item(alpm_list_t *haystack,
|
||||||
|
alpm_list_t *item)
|
||||||
|
{
|
||||||
|
if(haystack == NULL || item == NULL) {
|
||||||
|
return(haystack);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item == haystack) {
|
||||||
|
/* Special case: removing the head node which has a back reference to
|
||||||
|
* the tail node */
|
||||||
|
haystack = item->next;
|
||||||
|
if(haystack) {
|
||||||
|
haystack->prev = item->prev;
|
||||||
|
}
|
||||||
|
item->prev = NULL;
|
||||||
|
} else if(item == haystack->prev) {
|
||||||
|
/* Special case: removing the tail node, so we need to fix the back
|
||||||
|
* reference on the head node. We also know tail != head. */
|
||||||
|
if(item->prev) {
|
||||||
|
/* i->next should always be null */
|
||||||
|
item->prev->next = item->next;
|
||||||
|
haystack->prev = item->prev;
|
||||||
|
item->prev = NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* Normal case, non-head and non-tail node */
|
||||||
|
if(item->next) {
|
||||||
|
item->next->prev = item->prev;
|
||||||
|
}
|
||||||
|
if(item->prev) {
|
||||||
|
item->prev->next = item->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return(haystack);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove an item from the list.
|
* @brief Remove an item from the list.
|
||||||
*
|
*
|
||||||
@@ -295,9 +342,10 @@ alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cm
|
|||||||
*
|
*
|
||||||
* @return the resultant list
|
* @return the resultant list
|
||||||
*/
|
*/
|
||||||
alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data)
|
alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack,
|
||||||
|
const void *needle, alpm_list_fn_cmp fn, void **data)
|
||||||
{
|
{
|
||||||
alpm_list_t *i = haystack, *tmp = NULL;
|
alpm_list_t *i = haystack;
|
||||||
|
|
||||||
if(data) {
|
if(data) {
|
||||||
*data = NULL;
|
*data = NULL;
|
||||||
@@ -312,44 +360,16 @@ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needl
|
|||||||
i = i->next;
|
i = i->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tmp = i->next;
|
|
||||||
if(fn(i->data, needle) == 0) {
|
if(fn(i->data, needle) == 0) {
|
||||||
/* we found a matching item */
|
haystack = alpm_list_remove_item(haystack, i);
|
||||||
if(i == haystack) {
|
|
||||||
/* Special case: removing the head node which has a back reference to
|
|
||||||
* the tail node */
|
|
||||||
haystack = i->next;
|
|
||||||
if(haystack) {
|
|
||||||
haystack->prev = i->prev;
|
|
||||||
}
|
|
||||||
i->prev = NULL;
|
|
||||||
} else if(i == haystack->prev) {
|
|
||||||
/* Special case: removing the tail node, so we need to fix the back
|
|
||||||
* reference on the head node. We also know tail != head. */
|
|
||||||
if(i->prev) {
|
|
||||||
/* i->next should always be null */
|
|
||||||
i->prev->next = i->next;
|
|
||||||
haystack->prev = i->prev;
|
|
||||||
i->prev = NULL;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* Normal case, non-head and non-tail node */
|
|
||||||
if(i->next) {
|
|
||||||
i->next->prev = i->prev;
|
|
||||||
}
|
|
||||||
if(i->prev) {
|
|
||||||
i->prev->next = i->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(data) {
|
if(data) {
|
||||||
*data = i->data;
|
*data = i->data;
|
||||||
}
|
}
|
||||||
i->data = NULL;
|
|
||||||
free(i);
|
free(i);
|
||||||
i = NULL;
|
break;
|
||||||
} else {
|
} else {
|
||||||
i = tmp;
|
i = i->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -511,7 +531,7 @@ inline alpm_list_t SYMEXPORT *alpm_list_first(const alpm_list_t *list)
|
|||||||
*
|
*
|
||||||
* @return an alpm_list_t node for index `n`
|
* @return an alpm_list_t node for index `n`
|
||||||
*/
|
*/
|
||||||
alpm_list_t SYMEXPORT *alpm_list_nth(const alpm_list_t *list, int n)
|
alpm_list_t SYMEXPORT *alpm_list_nth(const alpm_list_t *list, size_t n)
|
||||||
{
|
{
|
||||||
const alpm_list_t *i = list;
|
const alpm_list_t *i = list;
|
||||||
while(n--) {
|
while(n--) {
|
||||||
@@ -574,9 +594,9 @@ void SYMEXPORT *alpm_list_getdata(const alpm_list_t *node)
|
|||||||
*
|
*
|
||||||
* @return the number of list items
|
* @return the number of list items
|
||||||
*/
|
*/
|
||||||
int SYMEXPORT alpm_list_count(const alpm_list_t *list)
|
size_t SYMEXPORT alpm_list_count(const alpm_list_t *list)
|
||||||
{
|
{
|
||||||
unsigned int i = 0;
|
size_t i = 0;
|
||||||
const alpm_list_t *lp = list;
|
const alpm_list_t *lp = list;
|
||||||
while(lp) {
|
while(lp) {
|
||||||
++i;
|
++i;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm_list.h
|
* alpm_list.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -56,7 +56,8 @@ alpm_list_t *alpm_list_add(alpm_list_t *list, void *data);
|
|||||||
alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn);
|
alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cmp fn);
|
||||||
alpm_list_t *alpm_list_join(alpm_list_t *first, alpm_list_t *second);
|
alpm_list_t *alpm_list_join(alpm_list_t *first, alpm_list_t *second);
|
||||||
alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn);
|
alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn);
|
||||||
alpm_list_t *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn);
|
alpm_list_t *alpm_list_msort(alpm_list_t *list, size_t n, alpm_list_fn_cmp fn);
|
||||||
|
alpm_list_t *alpm_list_remove_item(alpm_list_t *haystack, alpm_list_t *item);
|
||||||
alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data);
|
alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data);
|
||||||
alpm_list_t *alpm_list_remove_str(alpm_list_t *haystack, const char *needle, char **data);
|
alpm_list_t *alpm_list_remove_str(alpm_list_t *haystack, const char *needle, char **data);
|
||||||
alpm_list_t *alpm_list_remove_dupes(const alpm_list_t *list);
|
alpm_list_t *alpm_list_remove_dupes(const alpm_list_t *list);
|
||||||
@@ -67,13 +68,13 @@ alpm_list_t *alpm_list_reverse(alpm_list_t *list);
|
|||||||
|
|
||||||
/* item accessors */
|
/* item accessors */
|
||||||
alpm_list_t *alpm_list_first(const alpm_list_t *list);
|
alpm_list_t *alpm_list_first(const alpm_list_t *list);
|
||||||
alpm_list_t *alpm_list_nth(const alpm_list_t *list, int n);
|
alpm_list_t *alpm_list_nth(const alpm_list_t *list, size_t n);
|
||||||
alpm_list_t *alpm_list_next(const alpm_list_t *list);
|
alpm_list_t *alpm_list_next(const alpm_list_t *list);
|
||||||
alpm_list_t *alpm_list_last(const alpm_list_t *list);
|
alpm_list_t *alpm_list_last(const alpm_list_t *list);
|
||||||
void *alpm_list_getdata(const alpm_list_t *entry);
|
void *alpm_list_getdata(const alpm_list_t *entry);
|
||||||
|
|
||||||
/* misc */
|
/* misc */
|
||||||
int alpm_list_count(const alpm_list_t *list);
|
size_t alpm_list_count(const alpm_list_t *list);
|
||||||
void *alpm_list_find(const alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn);
|
void *alpm_list_find(const alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn);
|
||||||
void *alpm_list_find_ptr(const alpm_list_t *haystack, const void *needle);
|
void *alpm_list_find_ptr(const alpm_list_t *haystack, const void *needle);
|
||||||
char *alpm_list_find_str(const alpm_list_t *haystack, const char *needle);
|
char *alpm_list_find_str(const alpm_list_t *haystack, const char *needle);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* backup.c
|
* backup.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* backup.h
|
* backup.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,978 +0,0 @@
|
|||||||
/*
|
|
||||||
* be_files.c
|
|
||||||
*
|
|
||||||
* Copyright (c) 2006 by Christian Hamar <krics@linuxforum.hu>
|
|
||||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdint.h> /* intmax_t */
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <limits.h> /* PATH_MAX */
|
|
||||||
#include <locale.h> /* setlocale */
|
|
||||||
|
|
||||||
/* libarchive */
|
|
||||||
#include <archive.h>
|
|
||||||
#include <archive_entry.h>
|
|
||||||
|
|
||||||
/* libalpm */
|
|
||||||
#include "db.h"
|
|
||||||
#include "alpm_list.h"
|
|
||||||
#include "cache.h"
|
|
||||||
#include "log.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "alpm.h"
|
|
||||||
#include "handle.h"
|
|
||||||
#include "package.h"
|
|
||||||
#include "delta.h"
|
|
||||||
#include "deps.h"
|
|
||||||
#include "dload.h"
|
|
||||||
|
|
||||||
|
|
||||||
static int checkdbdir(pmdb_t *db)
|
|
||||||
{
|
|
||||||
struct stat buf;
|
|
||||||
const char *path = _alpm_db_path(db);
|
|
||||||
|
|
||||||
if(stat(path, &buf) != 0) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "database dir '%s' does not exist, creating it\n",
|
|
||||||
path);
|
|
||||||
if(_alpm_makepath(path) != 0) {
|
|
||||||
RET_ERR(PM_ERR_SYSTEM, -1);
|
|
||||||
}
|
|
||||||
} else if(!S_ISDIR(buf.st_mode)) {
|
|
||||||
_alpm_log(PM_LOG_WARNING, _("removing invalid database: %s\n"), path);
|
|
||||||
if(unlink(path) != 0 || _alpm_makepath(path) != 0) {
|
|
||||||
RET_ERR(PM_ERR_SYSTEM, -1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* create list of directories in db */
|
|
||||||
static int dirlist_from_tar(const char *archive, alpm_list_t **dirlist)
|
|
||||||
{
|
|
||||||
struct archive *_archive;
|
|
||||||
struct archive_entry *entry;
|
|
||||||
|
|
||||||
if((_archive = archive_read_new()) == NULL)
|
|
||||||
RET_ERR(PM_ERR_LIBARCHIVE, -1);
|
|
||||||
|
|
||||||
archive_read_support_compression_all(_archive);
|
|
||||||
archive_read_support_format_all(_archive);
|
|
||||||
|
|
||||||
if(archive_read_open_filename(_archive, archive,
|
|
||||||
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not open %s: %s\n"), archive,
|
|
||||||
archive_error_string(_archive));
|
|
||||||
RET_ERR(PM_ERR_PKG_OPEN, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
while(archive_read_next_header(_archive, &entry) == ARCHIVE_OK) {
|
|
||||||
const struct stat *st;
|
|
||||||
const char *entryname; /* the name of the file in the archive */
|
|
||||||
|
|
||||||
st = archive_entry_stat(entry);
|
|
||||||
entryname = archive_entry_pathname(entry);
|
|
||||||
|
|
||||||
if(S_ISDIR(st->st_mode)) {
|
|
||||||
char *name = strdup(entryname);
|
|
||||||
*dirlist = alpm_list_add(*dirlist, name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
archive_read_finish(_archive);
|
|
||||||
|
|
||||||
*dirlist = alpm_list_msort(*dirlist, alpm_list_count(*dirlist), _alpm_str_cmp);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* create list of directories in db */
|
|
||||||
static int dirlist_from_fs(const char *syncdbpath, alpm_list_t **dirlist)
|
|
||||||
{
|
|
||||||
DIR *dbdir;
|
|
||||||
struct dirent *ent = NULL;
|
|
||||||
struct stat sbuf;
|
|
||||||
char path[PATH_MAX];
|
|
||||||
|
|
||||||
dbdir = opendir(syncdbpath);
|
|
||||||
if (dbdir != NULL) {
|
|
||||||
while((ent = readdir(dbdir)) != NULL) {
|
|
||||||
char *name = ent->d_name;
|
|
||||||
size_t len;
|
|
||||||
char *entry;
|
|
||||||
|
|
||||||
if(strcmp(name, ".") == 0 || strcmp(name, "..") == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* stat the entry, make sure it's a directory */
|
|
||||||
snprintf(path, PATH_MAX, "%s%s", syncdbpath, name);
|
|
||||||
if(stat(path, &sbuf) != 0 || !S_ISDIR(sbuf.st_mode)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
len = strlen(name);
|
|
||||||
MALLOC(entry, len + 2, RET_ERR(PM_ERR_MEMORY, -1));
|
|
||||||
strcpy(entry, name);
|
|
||||||
entry[len] = '/';
|
|
||||||
entry[len+1] = '\0';
|
|
||||||
*dirlist = alpm_list_add(*dirlist, entry);
|
|
||||||
}
|
|
||||||
closedir(dbdir);
|
|
||||||
}
|
|
||||||
|
|
||||||
*dirlist = alpm_list_msort(*dirlist, alpm_list_count(*dirlist), _alpm_str_cmp);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* remove old directories from dbdir */
|
|
||||||
static int remove_olddir(const char *syncdbpath, alpm_list_t *dirlist)
|
|
||||||
{
|
|
||||||
alpm_list_t *i;
|
|
||||||
for (i = dirlist; i; i = i->next) {
|
|
||||||
const char *name = i->data;
|
|
||||||
char *dbdir;
|
|
||||||
size_t len = strlen(syncdbpath) + strlen(name) + 2;
|
|
||||||
MALLOC(dbdir, len, RET_ERR(PM_ERR_MEMORY, -1));
|
|
||||||
snprintf(dbdir, len, "%s%s", syncdbpath, name);
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "removing: %s\n", dbdir);
|
|
||||||
if(_alpm_rmrf(dbdir) != 0) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not remove database directory %s\n"), dbdir);
|
|
||||||
free(dbdir);
|
|
||||||
RET_ERR(PM_ERR_DB_REMOVE, -1);
|
|
||||||
}
|
|
||||||
free(dbdir);
|
|
||||||
}
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Update a package database
|
|
||||||
*
|
|
||||||
* An update of the package database \a db will be attempted. Unless
|
|
||||||
* \a force is true, the update will only be performed if the remote
|
|
||||||
* database was modified since the last update.
|
|
||||||
*
|
|
||||||
* A transaction is necessary for this operation, in order to obtain a
|
|
||||||
* database lock. During this transaction the front-end will be informed
|
|
||||||
* of the download progress of the database via the download callback.
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
* @code
|
|
||||||
* pmdb_t *db;
|
|
||||||
* int result;
|
|
||||||
* db = alpm_list_getdata(alpm_option_get_syncdbs());
|
|
||||||
* if(alpm_trans_init(0, NULL, NULL, NULL) == 0) {
|
|
||||||
* result = alpm_db_update(0, db);
|
|
||||||
* alpm_trans_release();
|
|
||||||
*
|
|
||||||
* if(result > 0) {
|
|
||||||
* printf("Unable to update database: %s\n", alpm_strerrorlast());
|
|
||||||
* } else if(result < 0) {
|
|
||||||
* printf("Database already up to date\n");
|
|
||||||
* } else {
|
|
||||||
* printf("Database updated\n");
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* @endcode
|
|
||||||
*
|
|
||||||
* @ingroup alpm_databases
|
|
||||||
* @note After a successful update, the \link alpm_db_get_pkgcache()
|
|
||||||
* package cache \endlink will be invalidated
|
|
||||||
* @param force if true, then forces the update, otherwise update only in case
|
|
||||||
* the database isn't up to date
|
|
||||||
* @param db pointer to the package database to update
|
|
||||||
* @return 0 on success, > 0 on error (pm_errno is set accordingly), < 0 if up
|
|
||||||
* to date
|
|
||||||
*/
|
|
||||||
int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
|
|
||||||
{
|
|
||||||
char *dbfile, *dbfilepath;
|
|
||||||
const char *dbpath, *syncdbpath;
|
|
||||||
alpm_list_t *newdirlist = NULL, *olddirlist = NULL;
|
|
||||||
alpm_list_t *onlynew = NULL, *onlyold = NULL;
|
|
||||||
size_t len;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
|
|
||||||
ASSERT(db != NULL && db != handle->db_local, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
|
||||||
/* Verify we are in a transaction. This is done _mainly_ because we need a DB
|
|
||||||
* lock - if we update without a db lock, we may kludge some other pacman
|
|
||||||
* process that _has_ a lock.
|
|
||||||
*/
|
|
||||||
ASSERT(handle->trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
|
||||||
ASSERT(handle->trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1));
|
|
||||||
|
|
||||||
if(!alpm_list_find_ptr(handle->dbs_sync, db)) {
|
|
||||||
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
len = strlen(db->treename) + strlen(DBEXT) + 1;
|
|
||||||
MALLOC(dbfile, len, RET_ERR(PM_ERR_MEMORY, -1));
|
|
||||||
sprintf(dbfile, "%s" DBEXT, db->treename);
|
|
||||||
|
|
||||||
dbpath = alpm_option_get_dbpath();
|
|
||||||
|
|
||||||
ret = _alpm_download_single_file(dbfile, db->servers, dbpath, force);
|
|
||||||
free(dbfile);
|
|
||||||
|
|
||||||
if(ret == 1) {
|
|
||||||
/* files match, do nothing */
|
|
||||||
pm_errno = 0;
|
|
||||||
return(1);
|
|
||||||
} else if(ret == -1) {
|
|
||||||
/* pm_errno was set by the download code */
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "failed to sync db: %s\n", alpm_strerrorlast());
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
syncdbpath = _alpm_db_path(db);
|
|
||||||
|
|
||||||
/* form the path to the db location */
|
|
||||||
len = strlen(dbpath) + strlen(db->treename) + strlen(DBEXT) + 1;
|
|
||||||
MALLOC(dbfilepath, len, RET_ERR(PM_ERR_MEMORY, -1));
|
|
||||||
sprintf(dbfilepath, "%s%s" DBEXT, dbpath, db->treename);
|
|
||||||
|
|
||||||
if(force) {
|
|
||||||
/* if forcing update, remove the old dir and extract the db */
|
|
||||||
if(_alpm_rmrf(syncdbpath) != 0) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not remove database %s\n"), db->treename);
|
|
||||||
RET_ERR(PM_ERR_DB_REMOVE, -1);
|
|
||||||
} else {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "database dir %s removed\n", _alpm_db_path(db));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* if not forcing, only remove and extract what is necessary */
|
|
||||||
ret = dirlist_from_tar(dbfilepath, &newdirlist);
|
|
||||||
if(ret) {
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
ret = dirlist_from_fs(syncdbpath, &olddirlist);
|
|
||||||
if(ret) {
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
alpm_list_diff_sorted(olddirlist, newdirlist, _alpm_str_cmp, &onlyold, &onlynew);
|
|
||||||
|
|
||||||
ret = remove_olddir(syncdbpath, onlyold);
|
|
||||||
if(ret) {
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Cache needs to be rebuilt */
|
|
||||||
_alpm_db_free_pkgcache(db);
|
|
||||||
|
|
||||||
checkdbdir(db);
|
|
||||||
ret = _alpm_unpack(dbfilepath, syncdbpath, onlynew, 0);
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
FREELIST(newdirlist);
|
|
||||||
FREELIST(olddirlist);
|
|
||||||
alpm_list_free(onlynew);
|
|
||||||
alpm_list_free(onlyold);
|
|
||||||
|
|
||||||
free(dbfilepath);
|
|
||||||
|
|
||||||
if(ret) {
|
|
||||||
RET_ERR(PM_ERR_SYSTEM, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int splitname(const char *target, pmpkg_t *pkg)
|
|
||||||
{
|
|
||||||
/* the format of a db entry is as follows:
|
|
||||||
* package-version-rel/
|
|
||||||
* package name can contain hyphens, so parse from the back- go back
|
|
||||||
* two hyphens and we have split the version from the name.
|
|
||||||
*/
|
|
||||||
char *tmp, *p, *q;
|
|
||||||
|
|
||||||
if(target == NULL || pkg == NULL) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
STRDUP(tmp, target, RET_ERR(PM_ERR_MEMORY, -1));
|
|
||||||
p = tmp + strlen(tmp);
|
|
||||||
|
|
||||||
/* do the magic parsing- find the beginning of the version string
|
|
||||||
* by doing two iterations of same loop to lop off two hyphens */
|
|
||||||
for(q = --p; *q && *q != '-'; q--);
|
|
||||||
for(p = --q; *p && *p != '-'; p--);
|
|
||||||
if(*p != '-' || p == tmp) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* copy into fields and return */
|
|
||||||
if(pkg->version) {
|
|
||||||
FREE(pkg->version);
|
|
||||||
}
|
|
||||||
STRDUP(pkg->version, p+1, RET_ERR(PM_ERR_MEMORY, -1));
|
|
||||||
/* insert a terminator at the end of the name (on hyphen)- then copy it */
|
|
||||||
*p = '\0';
|
|
||||||
if(pkg->name) {
|
|
||||||
FREE(pkg->name);
|
|
||||||
}
|
|
||||||
STRDUP(pkg->name, tmp, RET_ERR(PM_ERR_MEMORY, -1));
|
|
||||||
|
|
||||||
free(tmp);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int _alpm_db_populate(pmdb_t *db)
|
|
||||||
{
|
|
||||||
int count = 0;
|
|
||||||
struct dirent *ent = NULL;
|
|
||||||
struct stat sbuf;
|
|
||||||
char path[PATH_MAX];
|
|
||||||
const char *dbpath;
|
|
||||||
DIR *dbdir;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
|
|
||||||
|
|
||||||
dbpath = _alpm_db_path(db);
|
|
||||||
dbdir = opendir(dbpath);
|
|
||||||
if(dbdir == NULL) {
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
while((ent = readdir(dbdir)) != NULL) {
|
|
||||||
const char *name = ent->d_name;
|
|
||||||
pmpkg_t *pkg;
|
|
||||||
|
|
||||||
if(strcmp(name, ".") == 0 || strcmp(name, "..") == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
/* stat the entry, make sure it's a directory */
|
|
||||||
snprintf(path, PATH_MAX, "%s%s", dbpath, name);
|
|
||||||
if(stat(path, &sbuf) != 0 || !S_ISDIR(sbuf.st_mode)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg = _alpm_pkg_new();
|
|
||||||
if(pkg == NULL) {
|
|
||||||
closedir(dbdir);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
/* split the db entry name */
|
|
||||||
if(splitname(name, pkg) != 0) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("invalid name for database entry '%s'\n"),
|
|
||||||
name);
|
|
||||||
_alpm_pkg_free(pkg);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* duplicated database entries are not allowed */
|
|
||||||
if(_alpm_pkg_find(db->pkgcache, pkg->name)) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("duplicated database entry '%s'\n"), pkg->name);
|
|
||||||
_alpm_pkg_free(pkg);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* explicitly read with only 'BASE' data, accessors will handle the rest */
|
|
||||||
if(_alpm_db_read(db, pkg, INFRQ_BASE) == -1) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("corrupted database entry '%s'\n"), name);
|
|
||||||
_alpm_pkg_free(pkg);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
pkg->origin = PKG_FROM_CACHE;
|
|
||||||
pkg->origin_data.db = db;
|
|
||||||
/* add to the collection */
|
|
||||||
_alpm_log(PM_LOG_FUNCTION, "adding '%s' to package cache for db '%s'\n",
|
|
||||||
pkg->name, db->treename);
|
|
||||||
db->pkgcache = alpm_list_add(db->pkgcache, pkg);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir(dbdir);
|
|
||||||
db->pkgcache = alpm_list_msort(db->pkgcache, count, _alpm_pkg_cmp);
|
|
||||||
return(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Note: the return value must be freed by the caller */
|
|
||||||
static char *get_pkgpath(pmdb_t *db, pmpkg_t *info)
|
|
||||||
{
|
|
||||||
size_t len;
|
|
||||||
char *pkgpath;
|
|
||||||
const char *dbpath;
|
|
||||||
|
|
||||||
dbpath = _alpm_db_path(db);
|
|
||||||
len = strlen(dbpath) + strlen(info->name) + strlen(info->version) + 3;
|
|
||||||
MALLOC(pkgpath, len, RET_ERR(PM_ERR_MEMORY, NULL));
|
|
||||||
sprintf(pkgpath, "%s%s-%s/", dbpath, info->name, info->version);
|
|
||||||
return(pkgpath);
|
|
||||||
}
|
|
||||||
|
|
||||||
int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
|
|
||||||
{
|
|
||||||
FILE *fp = NULL;
|
|
||||||
char path[PATH_MAX];
|
|
||||||
char line[513];
|
|
||||||
int sline = sizeof(line)-1;
|
|
||||||
char *pkgpath = NULL;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL) {
|
|
||||||
RET_ERR(PM_ERR_DB_NULL, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(info == NULL || info->name == NULL || info->version == NULL) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "invalid package entry provided to _alpm_db_read, skipping\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(info->origin == PKG_FROM_FILE) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "request to read database info for a file-based package '%s', skipping...\n", info->name);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* bitmask logic here:
|
|
||||||
* infolevel: 00001111
|
|
||||||
* inforeq: 00010100
|
|
||||||
* & result: 00000100
|
|
||||||
* == to inforeq? nope, we need to load more info. */
|
|
||||||
if((info->infolevel & inforeq) == inforeq) {
|
|
||||||
/* already loaded this info, do nothing */
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
_alpm_log(PM_LOG_FUNCTION, "loading package data for %s : level=0x%x\n",
|
|
||||||
info->name, inforeq);
|
|
||||||
|
|
||||||
/* clear out 'line', to be certain - and to make valgrind happy */
|
|
||||||
memset(line, 0, sline+1);
|
|
||||||
|
|
||||||
pkgpath = get_pkgpath(db, info);
|
|
||||||
|
|
||||||
if(access(pkgpath, F_OK)) {
|
|
||||||
/* directory doesn't exist or can't be opened */
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "cannot find '%s-%s' in db '%s'\n",
|
|
||||||
info->name, info->version, db->treename);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DESC */
|
|
||||||
if(inforeq & INFRQ_DESC) {
|
|
||||||
snprintf(path, PATH_MAX, "%sdesc", pkgpath);
|
|
||||||
if((fp = fopen(path, "r")) == NULL) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
while(!feof(fp)) {
|
|
||||||
if(fgets(line, 256, fp) == NULL) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
_alpm_strtrim(line);
|
|
||||||
if(strcmp(line, "%NAME%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
if(strcmp(_alpm_strtrim(line), info->name) != 0) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("%s database is inconsistent: name "
|
|
||||||
"mismatch on package %s\n"), db->treename, info->name);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%VERSION%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
if(strcmp(_alpm_strtrim(line), info->version) != 0) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("%s database is inconsistent: version "
|
|
||||||
"mismatch on package %s\n"), db->treename, info->name);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%FILENAME%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
STRDUP(info->filename, _alpm_strtrim(line), goto error);
|
|
||||||
} else if(strcmp(line, "%DESC%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
STRDUP(info->desc, _alpm_strtrim(line), goto error);
|
|
||||||
} else if(strcmp(line, "%GROUPS%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->groups = alpm_list_add(info->groups, linedup);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%URL%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
STRDUP(info->url, _alpm_strtrim(line), goto error);
|
|
||||||
} else if(strcmp(line, "%LICENSE%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->licenses = alpm_list_add(info->licenses, linedup);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%ARCH%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
STRDUP(info->arch, _alpm_strtrim(line), goto error);
|
|
||||||
} else if(strcmp(line, "%BUILDDATE%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
_alpm_strtrim(line);
|
|
||||||
|
|
||||||
char first = tolower((unsigned char)line[0]);
|
|
||||||
if(first > 'a' && first < 'z') {
|
|
||||||
struct tm tmp_tm = {0}; /* initialize to null in case of failure */
|
|
||||||
setlocale(LC_TIME, "C");
|
|
||||||
strptime(line, "%a %b %e %H:%M:%S %Y", &tmp_tm);
|
|
||||||
info->builddate = mktime(&tmp_tm);
|
|
||||||
setlocale(LC_TIME, "");
|
|
||||||
} else {
|
|
||||||
info->builddate = atol(line);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%INSTALLDATE%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
_alpm_strtrim(line);
|
|
||||||
|
|
||||||
char first = tolower((unsigned char)line[0]);
|
|
||||||
if(first > 'a' && first < 'z') {
|
|
||||||
struct tm tmp_tm = {0}; /* initialize to null in case of failure */
|
|
||||||
setlocale(LC_TIME, "C");
|
|
||||||
strptime(line, "%a %b %e %H:%M:%S %Y", &tmp_tm);
|
|
||||||
info->installdate = mktime(&tmp_tm);
|
|
||||||
setlocale(LC_TIME, "");
|
|
||||||
} else {
|
|
||||||
info->installdate = atol(line);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%PACKAGER%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
STRDUP(info->packager, _alpm_strtrim(line), goto error);
|
|
||||||
} else if(strcmp(line, "%REASON%") == 0) {
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
info->reason = (pmpkgreason_t)atol(_alpm_strtrim(line));
|
|
||||||
} else if(strcmp(line, "%SIZE%") == 0 || strcmp(line, "%CSIZE%") == 0) {
|
|
||||||
/* NOTE: the CSIZE and SIZE fields both share the "size" field
|
|
||||||
* in the pkginfo_t struct. This can be done b/c CSIZE
|
|
||||||
* is currently only used in sync databases, and SIZE is
|
|
||||||
* only used in local databases.
|
|
||||||
*/
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
info->size = atol(_alpm_strtrim(line));
|
|
||||||
/* also store this value to isize if isize is unset */
|
|
||||||
if(info->isize == 0) {
|
|
||||||
info->isize = info->size;
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%ISIZE%") == 0) {
|
|
||||||
/* ISIZE (installed size) tag only appears in sync repositories,
|
|
||||||
* not the local one. */
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
info->isize = atol(_alpm_strtrim(line));
|
|
||||||
} else if(strcmp(line, "%MD5SUM%") == 0) {
|
|
||||||
/* MD5SUM tag only appears in sync repositories,
|
|
||||||
* not the local one. */
|
|
||||||
if(fgets(line, sline, fp) == NULL) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
STRDUP(info->md5sum, _alpm_strtrim(line), goto error);
|
|
||||||
} else if(strcmp(line, "%REPLACES%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->replaces = alpm_list_add(info->replaces, linedup);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%FORCE%") == 0) {
|
|
||||||
info->force = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
fp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FILES */
|
|
||||||
if(inforeq & INFRQ_FILES) {
|
|
||||||
snprintf(path, PATH_MAX, "%sfiles", pkgpath);
|
|
||||||
if((fp = fopen(path, "r")) == NULL) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
while(fgets(line, 256, fp)) {
|
|
||||||
_alpm_strtrim(line);
|
|
||||||
if(strcmp(line, "%FILES%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->files = alpm_list_add(info->files, linedup);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%BACKUP%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->backup = alpm_list_add(info->backup, linedup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
fp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DEPENDS */
|
|
||||||
if(inforeq & INFRQ_DEPENDS) {
|
|
||||||
snprintf(path, PATH_MAX, "%sdepends", pkgpath);
|
|
||||||
if((fp = fopen(path, "r")) == NULL) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
while(!feof(fp)) {
|
|
||||||
fgets(line, 255, fp);
|
|
||||||
_alpm_strtrim(line);
|
|
||||||
if(strcmp(line, "%DEPENDS%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
pmdepend_t *dep = _alpm_splitdep(_alpm_strtrim(line));
|
|
||||||
info->depends = alpm_list_add(info->depends, dep);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%OPTDEPENDS%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->optdepends = alpm_list_add(info->optdepends, linedup);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%CONFLICTS%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->conflicts = alpm_list_add(info->conflicts, linedup);
|
|
||||||
}
|
|
||||||
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
char *linedup;
|
|
||||||
STRDUP(linedup, _alpm_strtrim(line), goto error);
|
|
||||||
info->provides = alpm_list_add(info->provides, linedup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
fp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DELTAS */
|
|
||||||
if(inforeq & INFRQ_DELTAS) {
|
|
||||||
snprintf(path, PATH_MAX, "%sdeltas", pkgpath);
|
|
||||||
if((fp = fopen(path, "r"))) {
|
|
||||||
while(!feof(fp)) {
|
|
||||||
fgets(line, 255, fp);
|
|
||||||
_alpm_strtrim(line);
|
|
||||||
if(strcmp(line, "%DELTAS%") == 0) {
|
|
||||||
while(fgets(line, sline, fp) && strlen(_alpm_strtrim(line))) {
|
|
||||||
pmdelta_t *delta = _alpm_delta_parse(line);
|
|
||||||
if(delta) {
|
|
||||||
info->deltas = alpm_list_add(info->deltas, delta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
fp = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* INSTALL */
|
|
||||||
if(inforeq & INFRQ_SCRIPTLET) {
|
|
||||||
snprintf(path, PATH_MAX, "%sinstall", pkgpath);
|
|
||||||
if(access(path, F_OK) == 0) {
|
|
||||||
info->scriptlet = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* internal */
|
|
||||||
info->infolevel |= inforeq;
|
|
||||||
|
|
||||||
free(pkgpath);
|
|
||||||
return(0);
|
|
||||||
|
|
||||||
error:
|
|
||||||
free(pkgpath);
|
|
||||||
if(fp) {
|
|
||||||
fclose(fp);
|
|
||||||
}
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int _alpm_db_prepare(pmdb_t *db, pmpkg_t *info)
|
|
||||||
{
|
|
||||||
mode_t oldmask;
|
|
||||||
int retval = 0;
|
|
||||||
char *pkgpath = NULL;
|
|
||||||
|
|
||||||
if(checkdbdir(db) != 0) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
oldmask = umask(0000);
|
|
||||||
pkgpath = get_pkgpath(db, info);
|
|
||||||
|
|
||||||
if((retval = mkdir(pkgpath, 0755)) != 0) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not create directory %s: %s\n"),
|
|
||||||
pkgpath, strerror(errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
free(pkgpath);
|
|
||||||
umask(oldmask);
|
|
||||||
|
|
||||||
return(retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
|
|
||||||
{
|
|
||||||
FILE *fp = NULL;
|
|
||||||
char path[PATH_MAX];
|
|
||||||
mode_t oldmask;
|
|
||||||
alpm_list_t *lp = NULL;
|
|
||||||
int retval = 0;
|
|
||||||
int local = 0;
|
|
||||||
char *pkgpath = NULL;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL || info == NULL) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgpath = get_pkgpath(db, info);
|
|
||||||
|
|
||||||
/* make sure we have a sane umask */
|
|
||||||
oldmask = umask(0022);
|
|
||||||
|
|
||||||
if(strcmp(db->treename, "local") == 0) {
|
|
||||||
local = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DESC */
|
|
||||||
if(inforeq & INFRQ_DESC) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "writing %s-%s DESC information back to db\n",
|
|
||||||
info->name, info->version);
|
|
||||||
snprintf(path, PATH_MAX, "%sdesc", pkgpath);
|
|
||||||
if((fp = fopen(path, "w")) == NULL) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
|
|
||||||
retval = -1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
fprintf(fp, "%%NAME%%\n%s\n\n"
|
|
||||||
"%%VERSION%%\n%s\n\n", info->name, info->version);
|
|
||||||
if(info->desc) {
|
|
||||||
fprintf(fp, "%%DESC%%\n"
|
|
||||||
"%s\n\n", info->desc);
|
|
||||||
}
|
|
||||||
if(info->groups) {
|
|
||||||
fputs("%GROUPS%\n", fp);
|
|
||||||
for(lp = info->groups; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
if(info->replaces) {
|
|
||||||
fputs("%REPLACES%\n", fp);
|
|
||||||
for(lp = info->replaces; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
if(info->force) {
|
|
||||||
fprintf(fp, "%%FORCE%%\n\n");
|
|
||||||
}
|
|
||||||
if(local) {
|
|
||||||
if(info->url) {
|
|
||||||
fprintf(fp, "%%URL%%\n"
|
|
||||||
"%s\n\n", info->url);
|
|
||||||
}
|
|
||||||
if(info->licenses) {
|
|
||||||
fputs("%LICENSE%\n", fp);
|
|
||||||
for(lp = info->licenses; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
if(info->arch) {
|
|
||||||
fprintf(fp, "%%ARCH%%\n"
|
|
||||||
"%s\n\n", info->arch);
|
|
||||||
}
|
|
||||||
if(info->builddate) {
|
|
||||||
fprintf(fp, "%%BUILDDATE%%\n"
|
|
||||||
"%ld\n\n", info->builddate);
|
|
||||||
}
|
|
||||||
if(info->installdate) {
|
|
||||||
fprintf(fp, "%%INSTALLDATE%%\n"
|
|
||||||
"%ld\n\n", info->installdate);
|
|
||||||
}
|
|
||||||
if(info->packager) {
|
|
||||||
fprintf(fp, "%%PACKAGER%%\n"
|
|
||||||
"%s\n\n", info->packager);
|
|
||||||
}
|
|
||||||
if(info->isize) {
|
|
||||||
/* only write installed size, csize is irrelevant once installed */
|
|
||||||
fprintf(fp, "%%SIZE%%\n"
|
|
||||||
"%jd\n\n", (intmax_t)info->isize);
|
|
||||||
}
|
|
||||||
if(info->reason) {
|
|
||||||
fprintf(fp, "%%REASON%%\n"
|
|
||||||
"%u\n\n", info->reason);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(info->size) {
|
|
||||||
fprintf(fp, "%%CSIZE%%\n"
|
|
||||||
"%jd\n\n", (intmax_t)info->size);
|
|
||||||
}
|
|
||||||
if(info->isize) {
|
|
||||||
fprintf(fp, "%%ISIZE%%\n"
|
|
||||||
"%jd\n\n", (intmax_t)info->isize);
|
|
||||||
}
|
|
||||||
if(info->md5sum) {
|
|
||||||
fprintf(fp, "%%MD5SUM%%\n"
|
|
||||||
"%s\n\n", info->md5sum);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
fp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FILES */
|
|
||||||
if(local && (inforeq & INFRQ_FILES)) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "writing %s-%s FILES information back to db\n",
|
|
||||||
info->name, info->version);
|
|
||||||
snprintf(path, PATH_MAX, "%sfiles", pkgpath);
|
|
||||||
if((fp = fopen(path, "w")) == NULL) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
|
|
||||||
retval = -1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
if(info->files) {
|
|
||||||
fprintf(fp, "%%FILES%%\n");
|
|
||||||
for(lp = info->files; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
if(info->backup) {
|
|
||||||
fprintf(fp, "%%BACKUP%%\n");
|
|
||||||
for(lp = info->backup; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
fp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DEPENDS */
|
|
||||||
if(inforeq & INFRQ_DEPENDS) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "writing %s-%s DEPENDS information back to db\n",
|
|
||||||
info->name, info->version);
|
|
||||||
snprintf(path, PATH_MAX, "%sdepends", pkgpath);
|
|
||||||
if((fp = fopen(path, "w")) == NULL) {
|
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
|
|
||||||
retval = -1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
if(info->depends) {
|
|
||||||
fputs("%DEPENDS%\n", fp);
|
|
||||||
for(lp = info->depends; lp; lp = lp->next) {
|
|
||||||
char *depstring = alpm_dep_compute_string(lp->data);
|
|
||||||
fprintf(fp, "%s\n", depstring);
|
|
||||||
free(depstring);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
if(info->optdepends) {
|
|
||||||
fputs("%OPTDEPENDS%\n", fp);
|
|
||||||
for(lp = info->optdepends; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
if(info->conflicts) {
|
|
||||||
fputs("%CONFLICTS%\n", fp);
|
|
||||||
for(lp = info->conflicts; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
if(info->provides) {
|
|
||||||
fputs("%PROVIDES%\n", fp);
|
|
||||||
for(lp = info->provides; lp; lp = lp->next) {
|
|
||||||
fprintf(fp, "%s\n", (char *)lp->data);
|
|
||||||
}
|
|
||||||
fprintf(fp, "\n");
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
fp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* INSTALL */
|
|
||||||
/* nothing needed here (script is automatically extracted) */
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
umask(oldmask);
|
|
||||||
free(pkgpath);
|
|
||||||
|
|
||||||
if(fp) {
|
|
||||||
fclose(fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
int _alpm_db_remove(pmdb_t *db, pmpkg_t *info)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
char *pkgpath = NULL;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL || info == NULL) {
|
|
||||||
RET_ERR(PM_ERR_DB_NULL, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgpath = get_pkgpath(db, info);
|
|
||||||
|
|
||||||
ret = _alpm_rmrf(pkgpath);
|
|
||||||
free(pkgpath);
|
|
||||||
if(ret != 0) {
|
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
return(ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
|
||||||
1007
lib/libalpm/be_local.c
Normal file
1007
lib/libalpm/be_local.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* be_package.c
|
* be_package.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -24,8 +24,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <ctype.h>
|
#include <errno.h>
|
||||||
#include <locale.h> /* setlocale */
|
|
||||||
|
|
||||||
/* libarchive */
|
/* libarchive */
|
||||||
#include <archive.h>
|
#include <archive.h>
|
||||||
@@ -38,6 +37,109 @@
|
|||||||
#include "package.h"
|
#include "package.h"
|
||||||
#include "deps.h" /* _alpm_splitdep */
|
#include "deps.h" /* _alpm_splitdep */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a package changelog for reading. Similar to fopen in functionality,
|
||||||
|
* except that the returned 'file stream' is from an archive.
|
||||||
|
* @param pkg the package (file) to read the changelog
|
||||||
|
* @return a 'file stream' to the package changelog
|
||||||
|
*/
|
||||||
|
static void *_package_changelog_open(pmpkg_t *pkg)
|
||||||
|
{
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
ASSERT(pkg != NULL, return(NULL));
|
||||||
|
|
||||||
|
struct archive *archive = NULL;
|
||||||
|
struct archive_entry *entry;
|
||||||
|
const char *pkgfile = pkg->origin_data.file;
|
||||||
|
|
||||||
|
if((archive = archive_read_new()) == NULL) {
|
||||||
|
RET_ERR(PM_ERR_LIBARCHIVE, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
archive_read_support_compression_all(archive);
|
||||||
|
archive_read_support_format_all(archive);
|
||||||
|
|
||||||
|
if (archive_read_open_filename(archive, pkgfile,
|
||||||
|
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
|
||||||
|
RET_ERR(PM_ERR_PKG_OPEN, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
|
||||||
|
const char *entry_name = archive_entry_pathname(entry);
|
||||||
|
|
||||||
|
if(strcmp(entry_name, ".CHANGELOG") == 0) {
|
||||||
|
return(archive);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* we didn't find a changelog */
|
||||||
|
archive_read_finish(archive);
|
||||||
|
errno = ENOENT;
|
||||||
|
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read data from an open changelog 'file stream'. Similar to fread in
|
||||||
|
* functionality, this function takes a buffer and amount of data to read.
|
||||||
|
* @param ptr a buffer to fill with raw changelog data
|
||||||
|
* @param size the size of the buffer
|
||||||
|
* @param pkg the package that the changelog is being read from
|
||||||
|
* @param fp a 'file stream' to the package changelog
|
||||||
|
* @return the number of characters read, or 0 if there is no more data
|
||||||
|
*/
|
||||||
|
static size_t _package_changelog_read(void *ptr, size_t size,
|
||||||
|
const pmpkg_t *pkg, const void *fp)
|
||||||
|
{
|
||||||
|
ssize_t sret = archive_read_data((struct archive*)fp, ptr, size);
|
||||||
|
/* Report error (negative values) */
|
||||||
|
if(sret < 0) {
|
||||||
|
pm_errno = PM_ERR_LIBARCHIVE;
|
||||||
|
return(0);
|
||||||
|
} else {
|
||||||
|
return((size_t)sret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
static int _package_changelog_feof(const pmpkg_t *pkg, void *fp)
|
||||||
|
{
|
||||||
|
// note: this doesn't quite work, no feof in libarchive
|
||||||
|
return( archive_read_data((struct archive*)fp, NULL, 0) );
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close a package changelog for reading. Similar to fclose in functionality,
|
||||||
|
* except that the 'file stream' is from an archive.
|
||||||
|
* @param pkg the package (file) that the changelog was read from
|
||||||
|
* @param fp a 'file stream' to the package changelog
|
||||||
|
* @return whether closing the package changelog stream was successful
|
||||||
|
*/
|
||||||
|
static int _package_changelog_close(const pmpkg_t *pkg, void *fp)
|
||||||
|
{
|
||||||
|
return( archive_read_finish((struct archive *)fp) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Package file operations struct accessor. We implement this as a method
|
||||||
|
* rather than a static struct as in be_files because we want to reuse the
|
||||||
|
* majority of the default_pkg_ops struct and add only a few operations of
|
||||||
|
* our own on top.
|
||||||
|
*/
|
||||||
|
static struct pkg_operations *get_file_pkg_ops(void)
|
||||||
|
{
|
||||||
|
static struct pkg_operations file_pkg_ops;
|
||||||
|
static int file_pkg_ops_initialized = 0;
|
||||||
|
if(!file_pkg_ops_initialized) {
|
||||||
|
file_pkg_ops = default_pkg_ops;
|
||||||
|
file_pkg_ops.changelog_open = _package_changelog_open;
|
||||||
|
file_pkg_ops.changelog_read = _package_changelog_read;
|
||||||
|
file_pkg_ops.changelog_close = _package_changelog_close;
|
||||||
|
file_pkg_ops_initialized = 1;
|
||||||
|
}
|
||||||
|
return(&file_pkg_ops);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the package description file for a package into a pmpkg_t struct.
|
* Parses the package description file for a package into a pmpkg_t struct.
|
||||||
* @param archive the archive to read from, pointed at the .PKGINFO entry
|
* @param archive the archive to read from, pointed at the .PKGINFO entry
|
||||||
@@ -47,17 +149,22 @@
|
|||||||
*/
|
*/
|
||||||
static int parse_descfile(struct archive *a, pmpkg_t *newpkg)
|
static int parse_descfile(struct archive *a, pmpkg_t *newpkg)
|
||||||
{
|
{
|
||||||
char line[PATH_MAX];
|
|
||||||
char *ptr = NULL;
|
char *ptr = NULL;
|
||||||
char *key = NULL;
|
char *key = NULL;
|
||||||
int linenum = 0;
|
int linenum = 0;
|
||||||
|
struct archive_read_buffer buf;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
/* loop until we reach EOF (where archive_fgets will return NULL) */
|
memset(&buf, 0, sizeof(buf));
|
||||||
while(_alpm_archive_fgets(line, PATH_MAX, a) != NULL) {
|
/* 512K for a line length seems reasonable */
|
||||||
|
buf.max_line_size = 512 * 1024;
|
||||||
|
|
||||||
|
/* loop until we reach EOF or other error */
|
||||||
|
while(_alpm_archive_fgets(a, &buf) == ARCHIVE_OK) {
|
||||||
|
char *line = _alpm_strtrim(buf.line);
|
||||||
|
|
||||||
linenum++;
|
linenum++;
|
||||||
_alpm_strtrim(line);
|
|
||||||
if(strlen(line) == 0 || line[0] == '#') {
|
if(strlen(line) == 0 || line[0] == '#') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -68,55 +175,52 @@ static int parse_descfile(struct archive *a, pmpkg_t *newpkg)
|
|||||||
newpkg->name ? newpkg->name : "error", linenum);
|
newpkg->name ? newpkg->name : "error", linenum);
|
||||||
} else {
|
} else {
|
||||||
key = _alpm_strtrim(key);
|
key = _alpm_strtrim(key);
|
||||||
|
while(*ptr == ' ') ptr++;
|
||||||
ptr = _alpm_strtrim(ptr);
|
ptr = _alpm_strtrim(ptr);
|
||||||
if(!strcmp(key, "pkgname")) {
|
if(strcmp(key, "pkgname") == 0) {
|
||||||
STRDUP(newpkg->name, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->name, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
} else if(!strcmp(key, "pkgver")) {
|
newpkg->name_hash = _alpm_hash_sdbm(newpkg->name);
|
||||||
|
} else if(strcmp(key, "pkgbase") == 0) {
|
||||||
|
/* not used atm */
|
||||||
|
} else if(strcmp(key, "pkgver") == 0) {
|
||||||
STRDUP(newpkg->version, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->version, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
} else if(!strcmp(key, "pkgdesc")) {
|
} else if(strcmp(key, "pkgdesc") == 0) {
|
||||||
STRDUP(newpkg->desc, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->desc, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
} else if(!strcmp(key, "group")) {
|
} else if(strcmp(key, "group") == 0) {
|
||||||
newpkg->groups = alpm_list_add(newpkg->groups, strdup(ptr));
|
newpkg->groups = alpm_list_add(newpkg->groups, strdup(ptr));
|
||||||
} else if(!strcmp(key, "url")) {
|
} else if(strcmp(key, "url") == 0) {
|
||||||
STRDUP(newpkg->url, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->url, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
} else if(!strcmp(key, "license")) {
|
} else if(strcmp(key, "license") == 0) {
|
||||||
newpkg->licenses = alpm_list_add(newpkg->licenses, strdup(ptr));
|
newpkg->licenses = alpm_list_add(newpkg->licenses, strdup(ptr));
|
||||||
} else if(!strcmp(key, "builddate")) {
|
} else if(strcmp(key, "builddate") == 0) {
|
||||||
char first = tolower((unsigned char)ptr[0]);
|
newpkg->builddate = _alpm_parsedate(ptr);
|
||||||
if(first > 'a' && first < 'z') {
|
} else if(strcmp(key, "packager") == 0) {
|
||||||
struct tm tmp_tm = {0}; /* initialize to null in case of failure */
|
|
||||||
setlocale(LC_TIME, "C");
|
|
||||||
strptime(ptr, "%a %b %e %H:%M:%S %Y", &tmp_tm);
|
|
||||||
newpkg->builddate = mktime(&tmp_tm);
|
|
||||||
setlocale(LC_TIME, "");
|
|
||||||
} else {
|
|
||||||
newpkg->builddate = atol(ptr);
|
|
||||||
}
|
|
||||||
} else if(!strcmp(key, "packager")) {
|
|
||||||
STRDUP(newpkg->packager, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->packager, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
} else if(!strcmp(key, "arch")) {
|
} else if(strcmp(key, "arch") == 0) {
|
||||||
STRDUP(newpkg->arch, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
STRDUP(newpkg->arch, ptr, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
} else if(!strcmp(key, "size")) {
|
} else if(strcmp(key, "size") == 0) {
|
||||||
/* size in the raw package is uncompressed (installed) size */
|
/* size in the raw package is uncompressed (installed) size */
|
||||||
newpkg->isize = atol(ptr);
|
newpkg->isize = atol(ptr);
|
||||||
} else if(!strcmp(key, "depend")) {
|
} else if(strcmp(key, "depend") == 0) {
|
||||||
pmdepend_t *dep = _alpm_splitdep(ptr);
|
pmdepend_t *dep = _alpm_splitdep(ptr);
|
||||||
newpkg->depends = alpm_list_add(newpkg->depends, dep);
|
newpkg->depends = alpm_list_add(newpkg->depends, dep);
|
||||||
} else if(!strcmp(key, "optdepend")) {
|
} else if(strcmp(key, "optdepend") == 0) {
|
||||||
newpkg->optdepends = alpm_list_add(newpkg->optdepends, strdup(ptr));
|
newpkg->optdepends = alpm_list_add(newpkg->optdepends, strdup(ptr));
|
||||||
} else if(!strcmp(key, "conflict")) {
|
} else if(strcmp(key, "conflict") == 0) {
|
||||||
newpkg->conflicts = alpm_list_add(newpkg->conflicts, strdup(ptr));
|
newpkg->conflicts = alpm_list_add(newpkg->conflicts, strdup(ptr));
|
||||||
} else if(!strcmp(key, "replaces")) {
|
} else if(strcmp(key, "replaces") == 0) {
|
||||||
newpkg->replaces = alpm_list_add(newpkg->replaces, strdup(ptr));
|
newpkg->replaces = alpm_list_add(newpkg->replaces, strdup(ptr));
|
||||||
} else if(!strcmp(key, "provides")) {
|
} else if(strcmp(key, "provides") == 0) {
|
||||||
newpkg->provides = alpm_list_add(newpkg->provides, strdup(ptr));
|
newpkg->provides = alpm_list_add(newpkg->provides, strdup(ptr));
|
||||||
} else if(!strcmp(key, "backup")) {
|
} else if(strcmp(key, "backup") == 0) {
|
||||||
newpkg->backup = alpm_list_add(newpkg->backup, strdup(ptr));
|
newpkg->backup = alpm_list_add(newpkg->backup, strdup(ptr));
|
||||||
} else if(!strcmp(key, "makepkgopt")) {
|
} else if(strcmp(key, "force") == 0) {
|
||||||
|
/* deprecated, skip it */
|
||||||
|
} else if(strcmp(key, "makepkgopt") == 0) {
|
||||||
/* not used atm */
|
/* not used atm */
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(PM_LOG_DEBUG, "%s: syntax error in description file line %d\n",
|
_alpm_log(PM_LOG_DEBUG, "%s: unknown key '%s' in description file line %d\n",
|
||||||
newpkg->name ? newpkg->name : "error", linenum);
|
newpkg->name ? newpkg->name : "error", key, linenum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
line[0] = '\0';
|
line[0] = '\0';
|
||||||
@@ -172,6 +276,8 @@ static pmpkg_t *pkg_load(const char *pkgfile, int full)
|
|||||||
newpkg->filename = strdup(pkgfile);
|
newpkg->filename = strdup(pkgfile);
|
||||||
newpkg->size = st.st_size;
|
newpkg->size = st.st_size;
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "starting package load for %s\n", pkgfile);
|
||||||
|
|
||||||
/* If full is false, only read through the archive until we find our needed
|
/* If full is false, only read through the archive until we find our needed
|
||||||
* metadata. If it is true, read through the entire archive, which serves
|
* metadata. If it is true, read through the entire archive, which serves
|
||||||
* as a verfication of integrity and allows us to create the filelist. */
|
* as a verfication of integrity and allows us to create the filelist. */
|
||||||
@@ -200,7 +306,7 @@ static pmpkg_t *pkg_load(const char *pkgfile, int full)
|
|||||||
} else if(*entry_name == '.') {
|
} else if(*entry_name == '.') {
|
||||||
/* for now, ignore all files starting with '.' that haven't
|
/* for now, ignore all files starting with '.' that haven't
|
||||||
* already been handled (for future possibilities) */
|
* already been handled (for future possibilities) */
|
||||||
} else {
|
} else if(full) {
|
||||||
/* Keep track of all files for filelist generation */
|
/* Keep track of all files for filelist generation */
|
||||||
newpkg->files = alpm_list_add(newpkg->files, strdup(entry_name));
|
newpkg->files = alpm_list_add(newpkg->files, strdup(entry_name));
|
||||||
}
|
}
|
||||||
@@ -234,7 +340,9 @@ static pmpkg_t *pkg_load(const char *pkgfile, int full)
|
|||||||
|
|
||||||
/* internal fields for package struct */
|
/* internal fields for package struct */
|
||||||
newpkg->origin = PKG_FROM_FILE;
|
newpkg->origin = PKG_FROM_FILE;
|
||||||
|
/* TODO eventually kill/move this? */
|
||||||
newpkg->origin_data.file = strdup(pkgfile);
|
newpkg->origin_data.file = strdup(pkgfile);
|
||||||
|
newpkg->ops = get_file_pkg_ops();
|
||||||
|
|
||||||
if(full) {
|
if(full) {
|
||||||
/* "checking for conflicts" requires a sorted list, ensure that here */
|
/* "checking for conflicts" requires a sorted list, ensure that here */
|
||||||
@@ -245,7 +353,7 @@ static pmpkg_t *pkg_load(const char *pkgfile, int full)
|
|||||||
} else {
|
} else {
|
||||||
/* get rid of any partial filelist we may have collected, it is invalid */
|
/* get rid of any partial filelist we may have collected, it is invalid */
|
||||||
FREELIST(newpkg->files);
|
FREELIST(newpkg->files);
|
||||||
newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_DEPENDS;
|
newpkg->infolevel = INFRQ_BASE | INFRQ_DESC;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(newpkg);
|
return(newpkg);
|
||||||
|
|||||||
487
lib/libalpm/be_sync.c
Normal file
487
lib/libalpm/be_sync.c
Normal file
@@ -0,0 +1,487 @@
|
|||||||
|
/*
|
||||||
|
* be_sync.c
|
||||||
|
*
|
||||||
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
/* libarchive */
|
||||||
|
#include <archive.h>
|
||||||
|
#include <archive_entry.h>
|
||||||
|
|
||||||
|
/* libalpm */
|
||||||
|
#include "util.h"
|
||||||
|
#include "log.h"
|
||||||
|
#include "alpm.h"
|
||||||
|
#include "alpm_list.h"
|
||||||
|
#include "package.h"
|
||||||
|
#include "handle.h"
|
||||||
|
#include "delta.h"
|
||||||
|
#include "deps.h"
|
||||||
|
#include "dload.h"
|
||||||
|
|
||||||
|
/** Update a package database
|
||||||
|
*
|
||||||
|
* An update of the package database \a db will be attempted. Unless
|
||||||
|
* \a force is true, the update will only be performed if the remote
|
||||||
|
* database was modified since the last update.
|
||||||
|
*
|
||||||
|
* A transaction is necessary for this operation, in order to obtain a
|
||||||
|
* database lock. During this transaction the front-end will be informed
|
||||||
|
* of the download progress of the database via the download callback.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* @code
|
||||||
|
* alpm_list_t *syncs = alpm_option_get_syncdbs();
|
||||||
|
* if(alpm_trans_init(0, NULL, NULL, NULL) == 0) {
|
||||||
|
* for(i = syncs; i; i = alpm_list_next(i)) {
|
||||||
|
* pmdb_t *db = alpm_list_getdata(i);
|
||||||
|
* result = alpm_db_update(0, db);
|
||||||
|
* alpm_trans_release();
|
||||||
|
*
|
||||||
|
* if(result < 0) {
|
||||||
|
* printf("Unable to update database: %s\n", alpm_strerrorlast());
|
||||||
|
* } else if(result == 1) {
|
||||||
|
* printf("Database already up to date\n");
|
||||||
|
* } else {
|
||||||
|
* printf("Database updated\n");
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* @ingroup alpm_databases
|
||||||
|
* @note After a successful update, the \link alpm_db_get_pkgcache()
|
||||||
|
* package cache \endlink will be invalidated
|
||||||
|
* @param force if true, then forces the update, otherwise update only in case
|
||||||
|
* the database isn't up to date
|
||||||
|
* @param db pointer to the package database to update
|
||||||
|
* @return 0 on success, -1 on error (pm_errno is set accordingly), 1 if up to
|
||||||
|
* to date
|
||||||
|
*/
|
||||||
|
int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
|
||||||
|
{
|
||||||
|
char *dbfile, *syncpath;
|
||||||
|
const char *dbpath;
|
||||||
|
struct stat buf;
|
||||||
|
size_t len;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
/* Sanity checks */
|
||||||
|
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
|
||||||
|
ASSERT(db != NULL && db != handle->db_local, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
||||||
|
|
||||||
|
if(!alpm_list_find_ptr(handle->dbs_sync, db)) {
|
||||||
|
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
len = strlen(db->treename) + 4;
|
||||||
|
MALLOC(dbfile, len, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
|
sprintf(dbfile, "%s.db", db->treename);
|
||||||
|
|
||||||
|
dbpath = alpm_option_get_dbpath();
|
||||||
|
len = strlen(dbpath) + 6;
|
||||||
|
MALLOC(syncpath, len, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
|
sprintf(syncpath, "%s%s", dbpath, "sync/");
|
||||||
|
|
||||||
|
if(stat(syncpath, &buf) != 0) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "database dir '%s' does not exist, creating it\n",
|
||||||
|
syncpath);
|
||||||
|
if(_alpm_makepath(syncpath) != 0) {
|
||||||
|
free(dbfile);
|
||||||
|
free(syncpath);
|
||||||
|
RET_ERR(PM_ERR_SYSTEM, -1);
|
||||||
|
}
|
||||||
|
} else if(!S_ISDIR(buf.st_mode)) {
|
||||||
|
_alpm_log(PM_LOG_WARNING, _("removing invalid file: %s\n"), syncpath);
|
||||||
|
if(unlink(syncpath) != 0 || _alpm_makepath(syncpath) != 0) {
|
||||||
|
free(dbfile);
|
||||||
|
free(syncpath);
|
||||||
|
RET_ERR(PM_ERR_SYSTEM, -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = _alpm_download_single_file(dbfile, db->servers, syncpath, force);
|
||||||
|
free(dbfile);
|
||||||
|
free(syncpath);
|
||||||
|
|
||||||
|
if(ret == 1) {
|
||||||
|
/* files match, do nothing */
|
||||||
|
pm_errno = 0;
|
||||||
|
return(1);
|
||||||
|
} else if(ret == -1) {
|
||||||
|
/* pm_errno was set by the download code */
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "failed to sync db: %s\n", alpm_strerrorlast());
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cache needs to be rebuilt */
|
||||||
|
_alpm_db_free_pkgcache(db);
|
||||||
|
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forward decl so I don't reorganize the whole file right now */
|
||||||
|
static int sync_db_read(pmdb_t *db, struct archive *archive,
|
||||||
|
struct archive_entry *entry, pmpkg_t *likely_pkg);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is the data table used to generate the estimating function below.
|
||||||
|
* "Weighted Avg" means averaging the bottom table values; thus each repo, big
|
||||||
|
* or small, will have equal influence. "Unweighted Avg" means averaging the
|
||||||
|
* sums of the top table columns, thus each package has equal influence. The
|
||||||
|
* final values are calculated by (surprise) averaging the averages, because
|
||||||
|
* why the hell not.
|
||||||
|
*
|
||||||
|
* Database Pkgs tar bz2 gz xz
|
||||||
|
* community 2096 5294080 256391 421227 301296
|
||||||
|
* core 180 460800 25257 36850 29356
|
||||||
|
* extra 2606 6635520 294647 470818 339392
|
||||||
|
* multilib 126 327680 16120 23261 18732
|
||||||
|
* testing 76 204800 10902 14348 12100
|
||||||
|
*
|
||||||
|
* Bytes Per Package
|
||||||
|
* community 2096 2525.80 122.32 200.97 143.75
|
||||||
|
* core 180 2560.00 140.32 204.72 163.09
|
||||||
|
* extra 2606 2546.25 113.06 180.67 130.23
|
||||||
|
* multilib 126 2600.63 127.94 184.61 148.67
|
||||||
|
* testing 76 2694.74 143.45 188.79 159.21
|
||||||
|
|
||||||
|
* Weighted Avg 2585.48 129.42 191.95 148.99
|
||||||
|
* Unweighted Avg 2543.39 118.74 190.16 137.93
|
||||||
|
* Average of Avgs 2564.44 124.08 191.06 143.46
|
||||||
|
*/
|
||||||
|
static size_t estimate_package_count(struct stat *st, struct archive *archive)
|
||||||
|
{
|
||||||
|
unsigned int per_package;
|
||||||
|
|
||||||
|
switch(archive_compression(archive)) {
|
||||||
|
case ARCHIVE_COMPRESSION_NONE:
|
||||||
|
per_package = 2564;
|
||||||
|
break;
|
||||||
|
case ARCHIVE_COMPRESSION_GZIP:
|
||||||
|
per_package = 191;
|
||||||
|
break;
|
||||||
|
case ARCHIVE_COMPRESSION_BZIP2:
|
||||||
|
per_package = 124;
|
||||||
|
break;
|
||||||
|
case ARCHIVE_COMPRESSION_COMPRESS:
|
||||||
|
per_package = 193;
|
||||||
|
break;
|
||||||
|
case ARCHIVE_COMPRESSION_LZMA:
|
||||||
|
case ARCHIVE_COMPRESSION_XZ:
|
||||||
|
per_package = 143;
|
||||||
|
break;
|
||||||
|
case ARCHIVE_COMPRESSION_UU:
|
||||||
|
per_package = 3543;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* assume it is at least somewhat compressed */
|
||||||
|
per_package = 200;
|
||||||
|
}
|
||||||
|
return((size_t)(st->st_size / per_package) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sync_db_populate(pmdb_t *db)
|
||||||
|
{
|
||||||
|
size_t est_count;
|
||||||
|
int count = 0;
|
||||||
|
struct stat buf;
|
||||||
|
struct archive *archive;
|
||||||
|
struct archive_entry *entry;
|
||||||
|
pmpkg_t *pkg = NULL;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
|
||||||
|
|
||||||
|
if((archive = archive_read_new()) == NULL)
|
||||||
|
RET_ERR(PM_ERR_LIBARCHIVE, 1);
|
||||||
|
|
||||||
|
archive_read_support_compression_all(archive);
|
||||||
|
archive_read_support_format_all(archive);
|
||||||
|
|
||||||
|
if(archive_read_open_filename(archive, _alpm_db_path(db),
|
||||||
|
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("could not open file %s: %s\n"), _alpm_db_path(db),
|
||||||
|
archive_error_string(archive));
|
||||||
|
archive_read_finish(archive);
|
||||||
|
RET_ERR(PM_ERR_DB_OPEN, 1);
|
||||||
|
}
|
||||||
|
if(stat(_alpm_db_path(db), &buf) != 0) {
|
||||||
|
RET_ERR(PM_ERR_DB_OPEN, 1);
|
||||||
|
}
|
||||||
|
est_count = estimate_package_count(&buf, archive);
|
||||||
|
|
||||||
|
/* initialize hash at 66% full */
|
||||||
|
db->pkgcache = _alpm_pkghash_create(est_count * 3 / 2);
|
||||||
|
if(db->pkgcache == NULL) {
|
||||||
|
RET_ERR(PM_ERR_MEMORY, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
|
||||||
|
const struct stat *st;
|
||||||
|
|
||||||
|
st = archive_entry_stat(entry);
|
||||||
|
|
||||||
|
if(S_ISDIR(st->st_mode)) {
|
||||||
|
const char *name;
|
||||||
|
|
||||||
|
pkg = _alpm_pkg_new();
|
||||||
|
if(pkg == NULL) {
|
||||||
|
archive_read_finish(archive);
|
||||||
|
RET_ERR(PM_ERR_MEMORY, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
name = archive_entry_pathname(entry);
|
||||||
|
|
||||||
|
if(_alpm_splitname(name, pkg) != 0) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("invalid name for database entry '%s'\n"),
|
||||||
|
name);
|
||||||
|
_alpm_pkg_free(pkg);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* duplicated database entries are not allowed */
|
||||||
|
if(_alpm_pkghash_find(db->pkgcache, pkg->name)) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("duplicated database entry '%s'\n"), pkg->name);
|
||||||
|
_alpm_pkg_free(pkg);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg->origin = PKG_FROM_SYNCDB;
|
||||||
|
pkg->ops = &default_pkg_ops;
|
||||||
|
pkg->origin_data.db = db;
|
||||||
|
|
||||||
|
/* add to the collection */
|
||||||
|
_alpm_log(PM_LOG_FUNCTION, "adding '%s' to package cache for db '%s'\n",
|
||||||
|
pkg->name, db->treename);
|
||||||
|
db->pkgcache = _alpm_pkghash_add(db->pkgcache, pkg);
|
||||||
|
count++;
|
||||||
|
} else {
|
||||||
|
/* we have desc, depends or deltas - parse it */
|
||||||
|
sync_db_read(db, archive, entry, pkg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count > 0) {
|
||||||
|
db->pkgcache->list = alpm_list_msort(db->pkgcache->list, (size_t)count, _alpm_pkg_cmp);
|
||||||
|
}
|
||||||
|
archive_read_finish(archive);
|
||||||
|
|
||||||
|
return(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define READ_NEXT(s) do { \
|
||||||
|
if(_alpm_archive_fgets(archive, &buf) != ARCHIVE_OK) goto error; \
|
||||||
|
s = _alpm_strtrim(buf.line); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
|
#define READ_AND_STORE(f) do { \
|
||||||
|
READ_NEXT(line); \
|
||||||
|
STRDUP(f, line, goto error); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
|
#define READ_AND_STORE_ALL(f) do { \
|
||||||
|
char *linedup; \
|
||||||
|
READ_NEXT(line); \
|
||||||
|
if(strlen(line) == 0) break; \
|
||||||
|
STRDUP(linedup, line, goto error); \
|
||||||
|
f = alpm_list_add(f, linedup); \
|
||||||
|
} while(1) /* note the while(1) and not (0) */
|
||||||
|
|
||||||
|
static int sync_db_read(pmdb_t *db, struct archive *archive,
|
||||||
|
struct archive_entry *entry, pmpkg_t *likely_pkg)
|
||||||
|
{
|
||||||
|
const char *entryname = NULL, *filename;
|
||||||
|
char *pkgname, *p, *q;
|
||||||
|
pmpkg_t *pkg;
|
||||||
|
struct archive_read_buffer buf;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL) {
|
||||||
|
RET_ERR(PM_ERR_DB_NULL, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(entry != NULL) {
|
||||||
|
entryname = archive_entry_pathname(entry);
|
||||||
|
}
|
||||||
|
if(entryname == NULL) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "invalid archive entry provided to _alpm_sync_db_read, skipping\n");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_FUNCTION, "loading package data from archive entry %s\n",
|
||||||
|
entryname);
|
||||||
|
|
||||||
|
memset(&buf, 0, sizeof(buf));
|
||||||
|
/* 512K for a line length seems reasonable */
|
||||||
|
buf.max_line_size = 512 * 1024;
|
||||||
|
|
||||||
|
/* get package and db file names */
|
||||||
|
STRDUP(pkgname, entryname, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
|
p = pkgname + strlen(pkgname);
|
||||||
|
for(q = --p; *q && *q != '/'; q--);
|
||||||
|
filename = q + 1;
|
||||||
|
for(p = --q; *p && *p != '-'; p--);
|
||||||
|
for(q = --p; *q && *q != '-'; q--);
|
||||||
|
*q = '\0';
|
||||||
|
|
||||||
|
/* package is already in db due to parsing of directory name */
|
||||||
|
if(likely_pkg && strcmp(likely_pkg->name, pkgname) == 0) {
|
||||||
|
pkg = likely_pkg;
|
||||||
|
} else {
|
||||||
|
if(db->pkgcache == NULL) {
|
||||||
|
RET_ERR(PM_ERR_MEMORY, -1);
|
||||||
|
}
|
||||||
|
pkg = _alpm_pkghash_find(db->pkgcache, pkgname);
|
||||||
|
}
|
||||||
|
if(pkg == NULL) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "package %s not found in %s sync database",
|
||||||
|
pkgname, db->treename);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0
|
||||||
|
|| strcmp(filename, "deltas") == 0) {
|
||||||
|
while(_alpm_archive_fgets(archive, &buf) == ARCHIVE_OK) {
|
||||||
|
char *line = _alpm_strtrim(buf.line);
|
||||||
|
|
||||||
|
if(strcmp(line, "%NAME%") == 0) {
|
||||||
|
READ_NEXT(line);
|
||||||
|
if(strcmp(line, pkg->name) != 0) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("%s database is inconsistent: name "
|
||||||
|
"mismatch on package %s\n"), db->treename, pkg->name);
|
||||||
|
}
|
||||||
|
} else if(strcmp(line, "%VERSION%") == 0) {
|
||||||
|
READ_NEXT(line);
|
||||||
|
if(strcmp(line, pkg->version) != 0) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("%s database is inconsistent: version "
|
||||||
|
"mismatch on package %s\n"), db->treename, pkg->name);
|
||||||
|
}
|
||||||
|
} else if(strcmp(line, "%FILENAME%") == 0) {
|
||||||
|
READ_AND_STORE(pkg->filename);
|
||||||
|
} else if(strcmp(line, "%DESC%") == 0) {
|
||||||
|
READ_AND_STORE(pkg->desc);
|
||||||
|
} else if(strcmp(line, "%GROUPS%") == 0) {
|
||||||
|
READ_AND_STORE_ALL(pkg->groups);
|
||||||
|
} else if(strcmp(line, "%URL%") == 0) {
|
||||||
|
READ_AND_STORE(pkg->url);
|
||||||
|
} else if(strcmp(line, "%LICENSE%") == 0) {
|
||||||
|
READ_AND_STORE_ALL(pkg->licenses);
|
||||||
|
} else if(strcmp(line, "%ARCH%") == 0) {
|
||||||
|
READ_AND_STORE(pkg->arch);
|
||||||
|
} else if(strcmp(line, "%BUILDDATE%") == 0) {
|
||||||
|
READ_NEXT(line);
|
||||||
|
pkg->builddate = _alpm_parsedate(line);
|
||||||
|
} else if(strcmp(line, "%PACKAGER%") == 0) {
|
||||||
|
READ_AND_STORE(pkg->packager);
|
||||||
|
} else if(strcmp(line, "%CSIZE%") == 0) {
|
||||||
|
/* Note: the CSIZE and SIZE fields both share the "size" field in the
|
||||||
|
* pkginfo_t struct. This can be done b/c CSIZE is currently only used
|
||||||
|
* in sync databases, and SIZE is only used in local databases.
|
||||||
|
*/
|
||||||
|
READ_NEXT(line);
|
||||||
|
pkg->size = atol(line);
|
||||||
|
/* also store this value to isize if isize is unset */
|
||||||
|
if(pkg->isize == 0) {
|
||||||
|
pkg->isize = pkg->size;
|
||||||
|
}
|
||||||
|
} else if(strcmp(line, "%ISIZE%") == 0) {
|
||||||
|
READ_NEXT(line);
|
||||||
|
pkg->isize = atol(line);
|
||||||
|
} else if(strcmp(line, "%MD5SUM%") == 0) {
|
||||||
|
READ_AND_STORE(pkg->md5sum);
|
||||||
|
} else if(strcmp(line, "%REPLACES%") == 0) {
|
||||||
|
READ_AND_STORE_ALL(pkg->replaces);
|
||||||
|
} else if(strcmp(line, "%DEPENDS%") == 0) {
|
||||||
|
/* Different than the rest because of the _alpm_splitdep call. */
|
||||||
|
while(1) {
|
||||||
|
READ_NEXT(line);
|
||||||
|
if(strlen(line) == 0) break;
|
||||||
|
pkg->depends = alpm_list_add(pkg->depends, _alpm_splitdep(line));
|
||||||
|
}
|
||||||
|
} else if(strcmp(line, "%OPTDEPENDS%") == 0) {
|
||||||
|
READ_AND_STORE_ALL(pkg->optdepends);
|
||||||
|
} else if(strcmp(line, "%CONFLICTS%") == 0) {
|
||||||
|
READ_AND_STORE_ALL(pkg->conflicts);
|
||||||
|
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
||||||
|
READ_AND_STORE_ALL(pkg->provides);
|
||||||
|
} else if(strcmp(line, "%DELTAS%") == 0) {
|
||||||
|
READ_AND_STORE_ALL(pkg->deltas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if(strcmp(filename, "files") == 0) {
|
||||||
|
/* currently do nothing with this file */
|
||||||
|
} else {
|
||||||
|
/* unknown database file */
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "unknown database file: %s\n", filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
error:
|
||||||
|
FREE(pkgname);
|
||||||
|
/* TODO: return 0 always? */
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sync_db_version(pmdb_t *db)
|
||||||
|
{
|
||||||
|
return(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct db_operations sync_db_ops = {
|
||||||
|
.populate = sync_db_populate,
|
||||||
|
.unregister = _alpm_db_unregister,
|
||||||
|
.version = sync_db_version,
|
||||||
|
};
|
||||||
|
|
||||||
|
pmdb_t *_alpm_db_register_sync(const char *treename)
|
||||||
|
{
|
||||||
|
pmdb_t *db;
|
||||||
|
alpm_list_t *i;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
for(i = handle->dbs_sync; i; i = i->next) {
|
||||||
|
pmdb_t *sdb = i->data;
|
||||||
|
if(strcmp(treename, sdb->treename) == 0) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "attempt to re-register the '%s' database, using existing\n", sdb->treename);
|
||||||
|
return sdb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "registering sync database '%s'\n", treename);
|
||||||
|
|
||||||
|
db = _alpm_db_new(treename, 0);
|
||||||
|
if(db == NULL) {
|
||||||
|
RET_ERR(PM_ERR_DB_CREATE, NULL);
|
||||||
|
}
|
||||||
|
db->ops = &sync_db_ops;
|
||||||
|
|
||||||
|
handle->dbs_sync = alpm_list_add(handle->dbs_sync, db);
|
||||||
|
return(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
@@ -1,291 +0,0 @@
|
|||||||
/*
|
|
||||||
* cache.c
|
|
||||||
*
|
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/* libalpm */
|
|
||||||
#include "cache.h"
|
|
||||||
#include "alpm_list.h"
|
|
||||||
#include "log.h"
|
|
||||||
#include "alpm.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "package.h"
|
|
||||||
#include "group.h"
|
|
||||||
#include "db.h"
|
|
||||||
|
|
||||||
/* Returns a new package cache from db.
|
|
||||||
* It frees the cache if it already exists.
|
|
||||||
*/
|
|
||||||
int _alpm_db_load_pkgcache(pmdb_t *db)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
_alpm_db_free_pkgcache(db);
|
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "loading package cache for repository '%s'\n",
|
|
||||||
db->treename);
|
|
||||||
if(_alpm_db_populate(db) == -1) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG,
|
|
||||||
"failed to load package cache for repository '%s'\n", db->treename);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
db->pkgcache_loaded = 1;
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _alpm_db_free_pkgcache(pmdb_t *db)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL || !db->pkgcache_loaded) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "freeing package cache for repository '%s'\n",
|
|
||||||
db->treename);
|
|
||||||
|
|
||||||
alpm_list_free_inner(db->pkgcache, (alpm_list_fn_free)_alpm_pkg_free);
|
|
||||||
alpm_list_free(db->pkgcache);
|
|
||||||
db->pkgcache = NULL;
|
|
||||||
db->pkgcache_loaded = 0;
|
|
||||||
|
|
||||||
_alpm_db_free_grpcache(db);
|
|
||||||
}
|
|
||||||
|
|
||||||
alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL) {
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!db->pkgcache_loaded) {
|
|
||||||
_alpm_db_load_pkgcache(db);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* hmmm, still NULL ?*/
|
|
||||||
if(!db->pkgcache) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "warning: pkgcache is NULL for db '%s'\n", db->treename);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(db->pkgcache);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* "duplicate" pkg with BASE info (to spare some memory) then add it to pkgcache */
|
|
||||||
int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg)
|
|
||||||
{
|
|
||||||
pmpkg_t *newpkg;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL || !db->pkgcache_loaded || pkg == NULL) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
newpkg = _alpm_pkg_new();
|
|
||||||
if(newpkg == NULL) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
newpkg->name = strdup(pkg->name);
|
|
||||||
newpkg->version = strdup(pkg->version);
|
|
||||||
if(newpkg->name == NULL || newpkg->version == NULL) {
|
|
||||||
pm_errno = PM_ERR_MEMORY;
|
|
||||||
_alpm_pkg_free(newpkg);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
newpkg->origin = PKG_FROM_CACHE;
|
|
||||||
newpkg->origin_data.db = db;
|
|
||||||
newpkg->infolevel = INFRQ_BASE;
|
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
|
|
||||||
alpm_pkg_get_name(newpkg), db->treename);
|
|
||||||
db->pkgcache = alpm_list_add_sorted(db->pkgcache, newpkg, _alpm_pkg_cmp);
|
|
||||||
|
|
||||||
_alpm_db_free_grpcache(db);
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg)
|
|
||||||
{
|
|
||||||
void *vdata;
|
|
||||||
pmpkg_t *data;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL || !db->pkgcache_loaded || pkg == NULL) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "removing entry '%s' from '%s' cache\n",
|
|
||||||
alpm_pkg_get_name(pkg), db->treename);
|
|
||||||
|
|
||||||
db->pkgcache = alpm_list_remove(db->pkgcache, pkg, _alpm_pkg_cmp, &vdata);
|
|
||||||
data = vdata;
|
|
||||||
if(data == NULL) {
|
|
||||||
/* package not found */
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "cannot remove entry '%s' from '%s' cache: not found\n",
|
|
||||||
alpm_pkg_get_name(pkg), db->treename);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
_alpm_pkg_free(data);
|
|
||||||
|
|
||||||
_alpm_db_free_grpcache(db);
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL) {
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
alpm_list_t *pkgcache = _alpm_db_get_pkgcache(db);
|
|
||||||
if(!pkgcache) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "warning: failed to get '%s' from NULL pkgcache\n",
|
|
||||||
target);
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(_alpm_pkg_find(pkgcache, target));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns a new group cache from db.
|
|
||||||
*/
|
|
||||||
int _alpm_db_load_grpcache(pmdb_t *db)
|
|
||||||
{
|
|
||||||
alpm_list_t *lp;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "loading group cache for repository '%s'\n",
|
|
||||||
db->treename);
|
|
||||||
|
|
||||||
for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
|
|
||||||
const alpm_list_t *i;
|
|
||||||
pmpkg_t *pkg = lp->data;
|
|
||||||
|
|
||||||
for(i = alpm_pkg_get_groups(pkg); i; i = i->next) {
|
|
||||||
const char *grpname = i->data;
|
|
||||||
alpm_list_t *j;
|
|
||||||
pmgrp_t *grp = NULL;
|
|
||||||
int found = 0;
|
|
||||||
|
|
||||||
/* first look through the group cache for a group with this name */
|
|
||||||
for(j = db->grpcache; j; j = j->next) {
|
|
||||||
grp = j->data;
|
|
||||||
|
|
||||||
if(strcmp(grp->name, grpname) == 0
|
|
||||||
&& !alpm_list_find_ptr(grp->packages, pkg)) {
|
|
||||||
grp->packages = alpm_list_add(grp->packages, pkg);
|
|
||||||
found = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(found) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
/* we didn't find the group, so create a new one with this name */
|
|
||||||
grp = _alpm_grp_new(grpname);
|
|
||||||
grp->packages = alpm_list_add(grp->packages, pkg);
|
|
||||||
db->grpcache = alpm_list_add(db->grpcache, grp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
db->grpcache_loaded = 1;
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _alpm_db_free_grpcache(pmdb_t *db)
|
|
||||||
{
|
|
||||||
alpm_list_t *lg;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL || !db->grpcache_loaded) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "freeing group cache for repository '%s'\n",
|
|
||||||
db->treename);
|
|
||||||
|
|
||||||
for(lg = db->grpcache; lg; lg = lg->next) {
|
|
||||||
_alpm_grp_free(lg->data);
|
|
||||||
lg->data = NULL;
|
|
||||||
}
|
|
||||||
FREELIST(db->grpcache);
|
|
||||||
db->grpcache_loaded = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
alpm_list_t *_alpm_db_get_grpcache(pmdb_t *db)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL) {
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!db->grpcache_loaded) {
|
|
||||||
_alpm_db_load_grpcache(db);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(db->grpcache);
|
|
||||||
}
|
|
||||||
|
|
||||||
pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, const char *target)
|
|
||||||
{
|
|
||||||
alpm_list_t *i;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
if(db == NULL || target == NULL || strlen(target) == 0) {
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i = _alpm_db_get_grpcache(db); i; i = i->next) {
|
|
||||||
pmgrp_t *info = i->data;
|
|
||||||
|
|
||||||
if(strcmp(info->name, target) == 0) {
|
|
||||||
return(info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
* cache.h
|
|
||||||
*
|
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
#ifndef _ALPM_CACHE_H
|
|
||||||
#define _ALPM_CACHE_H
|
|
||||||
|
|
||||||
#include "db.h"
|
|
||||||
#include "alpm_list.h"
|
|
||||||
#include "group.h"
|
|
||||||
#include "package.h"
|
|
||||||
|
|
||||||
/* packages */
|
|
||||||
int _alpm_db_load_pkgcache(pmdb_t *db);
|
|
||||||
void _alpm_db_free_pkgcache(pmdb_t *db);
|
|
||||||
int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg);
|
|
||||||
int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg);
|
|
||||||
alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db);
|
|
||||||
int _alpm_db_ensure_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel);
|
|
||||||
pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target);
|
|
||||||
/* groups */
|
|
||||||
int _alpm_db_load_grpcache(pmdb_t *db);
|
|
||||||
void _alpm_db_free_grpcache(pmdb_t *db);
|
|
||||||
alpm_list_t *_alpm_db_get_grpcache(pmdb_t *db);
|
|
||||||
pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, const char *target);
|
|
||||||
|
|
||||||
#endif /* _ALPM_CACHE_H */
|
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* conflict.c
|
* conflict.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||||
@@ -38,10 +38,10 @@
|
|||||||
#include "trans.h"
|
#include "trans.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "cache.h"
|
|
||||||
#include "deps.h"
|
#include "deps.h"
|
||||||
|
|
||||||
pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2, const char *reason)
|
pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2,
|
||||||
|
const char *reason)
|
||||||
{
|
{
|
||||||
pmconflict_t *conflict;
|
pmconflict_t *conflict;
|
||||||
|
|
||||||
@@ -76,20 +76,20 @@ pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict)
|
|||||||
return(newconflict);
|
return(newconflict);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _alpm_conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
|
static int conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
|
||||||
{
|
{
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
|
const char *npkg1 = needle->package1;
|
||||||
|
const char *npkg2 = needle->package2;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
for(i = haystack; i; i = i->next) {
|
for(i = haystack; i; i = i->next) {
|
||||||
pmconflict_t *conflict = i->data;
|
pmconflict_t *conflict = i->data;
|
||||||
char *cpkg1 = conflict->package1;
|
const char *cpkg1 = conflict->package1;
|
||||||
char *cpkg2 = conflict->package2;
|
const char *cpkg2 = conflict->package2;
|
||||||
char *npkg1 = needle->package1;
|
if((strcmp(cpkg1, npkg1) == 0 && strcmp(cpkg2, npkg2) == 0)
|
||||||
char *npkg2 = needle->package2;
|
|| (strcmp(cpkg1, npkg2) == 0 && strcmp(cpkg2, npkg1) == 0)) {
|
||||||
if((!strcmp(cpkg1, npkg1) && !strcmp(cpkg2, npkg2))
|
|
||||||
|| (!strcmp(cpkg1, npkg2) && !strcmp(cpkg2, npkg1))) {
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,28 +97,6 @@ int _alpm_conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Check if pkg1 conflicts with pkg2
|
|
||||||
* @param pkg1 package we are looking at
|
|
||||||
* @param conflict name of the possible conflict
|
|
||||||
* @param pkg2 package to check
|
|
||||||
* @return 0 for no conflict, non-zero otherwise
|
|
||||||
*/
|
|
||||||
static int does_conflict(pmpkg_t *pkg1, const char *conflict, pmpkg_t *pkg2)
|
|
||||||
{
|
|
||||||
const char *pkg1name = alpm_pkg_get_name(pkg1);
|
|
||||||
const char *pkg2name = alpm_pkg_get_name(pkg2);
|
|
||||||
pmdepend_t *conf = _alpm_splitdep(conflict);
|
|
||||||
int match = 0;
|
|
||||||
|
|
||||||
match = alpm_depcmp(pkg2, conf);
|
|
||||||
if(match) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n",
|
|
||||||
pkg1name, pkg2name, conflict);
|
|
||||||
}
|
|
||||||
_alpm_dep_free(conf);
|
|
||||||
return(match);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Adds the pkg1/pkg2 conflict to the baddeps list
|
/** Adds the pkg1/pkg2 conflict to the baddeps list
|
||||||
* @param *baddeps list to add conflict to
|
* @param *baddeps list to add conflict to
|
||||||
* @param pkg1 first package
|
* @param pkg1 first package
|
||||||
@@ -128,7 +106,9 @@ static void add_conflict(alpm_list_t **baddeps, const char *pkg1,
|
|||||||
const char *pkg2, const char *reason)
|
const char *pkg2, const char *reason)
|
||||||
{
|
{
|
||||||
pmconflict_t *conflict = _alpm_conflict_new(pkg1, pkg2, reason);
|
pmconflict_t *conflict = _alpm_conflict_new(pkg1, pkg2, reason);
|
||||||
if(conflict && !_alpm_conflict_isin(conflict, *baddeps)) {
|
_alpm_log(PM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n",
|
||||||
|
pkg1, pkg2, reason);
|
||||||
|
if(conflict && !conflict_isin(conflict, *baddeps)) {
|
||||||
*baddeps = alpm_list_add(*baddeps, conflict);
|
*baddeps = alpm_list_add(*baddeps, conflict);
|
||||||
} else {
|
} else {
|
||||||
_alpm_conflict_free(conflict);
|
_alpm_conflict_free(conflict);
|
||||||
@@ -159,6 +139,7 @@ static void check_conflict(alpm_list_t *list1, alpm_list_t *list2,
|
|||||||
|
|
||||||
for(j = alpm_pkg_get_conflicts(pkg1); j; j = j->next) {
|
for(j = alpm_pkg_get_conflicts(pkg1); j; j = j->next) {
|
||||||
const char *conflict = j->data;
|
const char *conflict = j->data;
|
||||||
|
pmdepend_t *parsed_conflict = _alpm_splitdep(conflict);
|
||||||
|
|
||||||
for(k = list2; k; k = k->next) {
|
for(k = list2; k; k = k->next) {
|
||||||
pmpkg_t *pkg2 = k->data;
|
pmpkg_t *pkg2 = k->data;
|
||||||
@@ -169,7 +150,7 @@ static void check_conflict(alpm_list_t *list1, alpm_list_t *list2,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(does_conflict(pkg1, conflict, pkg2)) {
|
if(_alpm_depcmp(pkg2, parsed_conflict)) {
|
||||||
if(order >= 0) {
|
if(order >= 0) {
|
||||||
add_conflict(baddeps, pkg1name, pkg2name, conflict);
|
add_conflict(baddeps, pkg1name, pkg2name, conflict);
|
||||||
} else {
|
} else {
|
||||||
@@ -177,6 +158,7 @@ static void check_conflict(alpm_list_t *list1, alpm_list_t *list2,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_alpm_dep_free(parsed_conflict);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,8 +190,8 @@ alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages)
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t *dblist = alpm_list_diff(_alpm_db_get_pkgcache(db), packages,
|
alpm_list_t *dblist = alpm_list_diff(_alpm_db_get_pkgcache(db),
|
||||||
_alpm_pkg_cmp);
|
packages, _alpm_pkg_cmp);
|
||||||
|
|
||||||
/* two checks to be done here for conflicts */
|
/* two checks to be done here for conflicts */
|
||||||
_alpm_log(PM_LOG_DEBUG, "check targets vs db\n");
|
_alpm_log(PM_LOG_DEBUG, "check targets vs db\n");
|
||||||
@@ -384,7 +366,7 @@ static int dir_belongsto_pkg(char *dirpath, pmpkg_t *pkg)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(alpm_list_find_str(alpm_pkg_get_files(pkg),path)) {
|
if(alpm_list_find_str(alpm_pkg_get_files(pkg), path)) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
@@ -403,8 +385,8 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
|||||||
alpm_list_t *upgrade, alpm_list_t *remove)
|
alpm_list_t *upgrade, alpm_list_t *remove)
|
||||||
{
|
{
|
||||||
alpm_list_t *i, *j, *conflicts = NULL;
|
alpm_list_t *i, *j, *conflicts = NULL;
|
||||||
int numtargs = alpm_list_count(upgrade);
|
size_t numtargs = alpm_list_count(upgrade);
|
||||||
int current;
|
size_t current;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
@@ -416,7 +398,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
|||||||
* be possible with real transactions. Right now we only do half as much
|
* be possible with real transactions. Right now we only do half as much
|
||||||
* here as we do when we actually extract files in add.c with our 12
|
* here as we do when we actually extract files in add.c with our 12
|
||||||
* different cases. */
|
* different cases. */
|
||||||
for(current = 1, i = upgrade; i; i = i->next, current++) {
|
for(current = 0, i = upgrade; i; i = i->next, current++) {
|
||||||
alpm_list_t *k, *tmpfiles = NULL;
|
alpm_list_t *k, *tmpfiles = NULL;
|
||||||
pmpkg_t *p1, *p2, *dbpkg;
|
pmpkg_t *p1, *p2, *dbpkg;
|
||||||
char path[PATH_MAX+1];
|
char path[PATH_MAX+1];
|
||||||
@@ -426,8 +408,8 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
double percent = (double)current / numtargs;
|
int percent = (current * 100) / numtargs;
|
||||||
PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", (percent * 100),
|
PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", percent,
|
||||||
numtargs, current);
|
numtargs, current);
|
||||||
/* CHECK 1: check every target against every target */
|
/* CHECK 1: check every target against every target */
|
||||||
_alpm_log(PM_LOG_DEBUG, "searching for file conflicts: %s\n",
|
_alpm_log(PM_LOG_DEBUG, "searching for file conflicts: %s\n",
|
||||||
@@ -555,6 +537,8 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
|||||||
}
|
}
|
||||||
FREELIST(tmpfiles);
|
FREELIST(tmpfiles);
|
||||||
}
|
}
|
||||||
|
PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", 100,
|
||||||
|
numtargs, current);
|
||||||
|
|
||||||
return(conflicts);
|
return(conflicts);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* conflict.h
|
* conflict.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -40,7 +40,6 @@ struct __pmfileconflict_t {
|
|||||||
pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2, const char *reason);
|
pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2, const char *reason);
|
||||||
pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict);
|
pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict);
|
||||||
void _alpm_conflict_free(pmconflict_t *conflict);
|
void _alpm_conflict_free(pmconflict_t *conflict);
|
||||||
int _alpm_conflict_isin(pmconflict_t *needle, alpm_list_t *haystack);
|
|
||||||
alpm_list_t *_alpm_innerconflicts(alpm_list_t *packages);
|
alpm_list_t *_alpm_innerconflicts(alpm_list_t *packages);
|
||||||
alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages);
|
alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages);
|
||||||
alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
||||||
|
|||||||
323
lib/libalpm/db.c
323
lib/libalpm/db.c
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* db.c
|
* db.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@@ -39,8 +38,9 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
#include "cache.h"
|
|
||||||
#include "alpm.h"
|
#include "alpm.h"
|
||||||
|
#include "package.h"
|
||||||
|
#include "group.h"
|
||||||
|
|
||||||
/** \addtogroup alpm_databases Database Functions
|
/** \addtogroup alpm_databases Database Functions
|
||||||
* @brief Functions to query and manipulate the database of libalpm
|
* @brief Functions to query and manipulate the database of libalpm
|
||||||
@@ -64,23 +64,8 @@ pmdb_t SYMEXPORT *alpm_db_register_sync(const char *treename)
|
|||||||
return(_alpm_db_register_sync(treename));
|
return(_alpm_db_register_sync(treename));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Register the local package database.
|
|
||||||
* @return a pmdb_t* representing the local database, or NULL on error
|
|
||||||
*/
|
|
||||||
pmdb_t SYMEXPORT *alpm_db_register_local(void)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, NULL));
|
|
||||||
/* Do not register a database if a transaction is on-going */
|
|
||||||
ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, NULL));
|
|
||||||
|
|
||||||
return(_alpm_db_register_local());
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Helper function for alpm_db_unregister{_all} */
|
/* Helper function for alpm_db_unregister{_all} */
|
||||||
static void _alpm_db_unregister(pmdb_t *db)
|
void _alpm_db_unregister(pmdb_t *db)
|
||||||
{
|
{
|
||||||
if(db == NULL) {
|
if(db == NULL) {
|
||||||
return;
|
return;
|
||||||
@@ -96,6 +81,7 @@ static void _alpm_db_unregister(pmdb_t *db)
|
|||||||
int SYMEXPORT alpm_db_unregister_all(void)
|
int SYMEXPORT alpm_db_unregister_all(void)
|
||||||
{
|
{
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
|
pmdb_t *db;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
@@ -105,13 +91,16 @@ int SYMEXPORT alpm_db_unregister_all(void)
|
|||||||
ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
|
ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
|
||||||
|
|
||||||
/* close local database */
|
/* close local database */
|
||||||
_alpm_db_unregister(handle->db_local);
|
db = handle->db_local;
|
||||||
|
if(db) {
|
||||||
|
db->ops->unregister(db);
|
||||||
handle->db_local = NULL;
|
handle->db_local = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* and also sync ones */
|
/* and also sync ones */
|
||||||
for(i = handle->dbs_sync; i; i = i->next) {
|
for(i = handle->dbs_sync; i; i = i->next) {
|
||||||
pmdb_t *db = i->data;
|
db = i->data;
|
||||||
_alpm_db_unregister(db);
|
db->ops->unregister(db);
|
||||||
i->data = NULL;
|
i->data = NULL;
|
||||||
}
|
}
|
||||||
FREELIST(handle->dbs_sync);
|
FREELIST(handle->dbs_sync);
|
||||||
@@ -154,7 +143,7 @@ int SYMEXPORT alpm_db_unregister(pmdb_t *db)
|
|||||||
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
|
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
_alpm_db_unregister(db);
|
db->ops->unregister(db);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,7 +157,7 @@ int SYMEXPORT alpm_db_setserver(pmdb_t *db, const char *url)
|
|||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
char *newurl;
|
char *newurl;
|
||||||
int len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
@@ -321,7 +310,7 @@ alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, const alpm_list_t* needles)
|
|||||||
return(_alpm_db_search(db, needles));
|
return(_alpm_db_search(db, needles));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set install reason for a package in db
|
/** Set install reason for a package in db
|
||||||
* @param db pointer to the package database
|
* @param db pointer to the package database
|
||||||
* @param name the name of the package
|
* @param name the name of the package
|
||||||
* @param reason the new install reason
|
* @param reason the new install reason
|
||||||
@@ -341,18 +330,14 @@ int SYMEXPORT alpm_db_set_pkgreason(pmdb_t *db, const char *name, pmpkgreason_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "setting install reason %u for %s/%s\n", reason, db->treename, name);
|
_alpm_log(PM_LOG_DEBUG, "setting install reason %u for %s/%s\n", reason, db->treename, name);
|
||||||
/* read DESC */
|
if(alpm_pkg_get_reason(pkg) == reason) {
|
||||||
if(_alpm_db_read(db, pkg, INFRQ_DESC)) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
if(pkg->reason == reason) {
|
|
||||||
/* we are done */
|
/* we are done */
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
/* set reason (in pkgcache) */
|
/* set reason (in pkgcache) */
|
||||||
pkg->reason = reason;
|
pkg->reason = reason;
|
||||||
/* write DESC */
|
/* write DESC */
|
||||||
if(_alpm_db_write(db, pkg, INFRQ_DESC)) {
|
if(_alpm_local_db_write(db, pkg, INFRQ_DESC)) {
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +346,7 @@ int SYMEXPORT alpm_db_set_pkgreason(pmdb_t *db, const char *name, pmpkgreason_t
|
|||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
static pmdb_t *_alpm_db_new(const char *treename, int is_local)
|
pmdb_t *_alpm_db_new(const char *treename, int is_local)
|
||||||
{
|
{
|
||||||
pmdb_t *db;
|
pmdb_t *db;
|
||||||
|
|
||||||
@@ -409,10 +394,10 @@ const char *_alpm_db_path(pmdb_t *db)
|
|||||||
CALLOC(db->_path, 1, pathsize, RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(db->_path, 1, pathsize, RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
sprintf(db->_path, "%s%s/", dbpath, db->treename);
|
sprintf(db->_path, "%s%s/", dbpath, db->treename);
|
||||||
} else {
|
} else {
|
||||||
pathsize = strlen(dbpath) + 5 + strlen(db->treename) + 2;
|
pathsize = strlen(dbpath) + 5 + strlen(db->treename) + 4;
|
||||||
CALLOC(db->_path, 1, pathsize, RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(db->_path, 1, pathsize, RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
/* all sync DBs now reside in the sync/ subdir of the dbpath */
|
/* all sync DBs now reside in the sync/ subdir of the dbpath */
|
||||||
sprintf(db->_path, "%ssync/%s/", dbpath, db->treename);
|
sprintf(db->_path, "%ssync/%s.db", dbpath, db->treename);
|
||||||
}
|
}
|
||||||
_alpm_log(PM_LOG_DEBUG, "database path for tree %s set to %s\n",
|
_alpm_log(PM_LOG_DEBUG, "database path for tree %s set to %s\n",
|
||||||
db->treename, db->_path);
|
db->treename, db->_path);
|
||||||
@@ -420,6 +405,14 @@ const char *_alpm_db_path(pmdb_t *db)
|
|||||||
return(db->_path);
|
return(db->_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int _alpm_db_version(pmdb_t *db)
|
||||||
|
{
|
||||||
|
if(!db) {
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
return(db->ops->version(db));
|
||||||
|
}
|
||||||
|
|
||||||
int _alpm_db_cmp(const void *d1, const void *d2)
|
int _alpm_db_cmp(const void *d1, const void *d2)
|
||||||
{
|
{
|
||||||
pmdb_t *db1 = (pmdb_t *)d1;
|
pmdb_t *db1 = (pmdb_t *)d1;
|
||||||
@@ -503,52 +496,258 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles)
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
pmdb_t *_alpm_db_register_local(void)
|
/* Returns a new package cache from db.
|
||||||
|
* It frees the cache if it already exists.
|
||||||
|
*/
|
||||||
|
int _alpm_db_load_pkgcache(pmdb_t *db)
|
||||||
{
|
{
|
||||||
pmdb_t *db;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL) {
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
_alpm_db_free_pkgcache(db);
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "loading package cache for repository '%s'\n",
|
||||||
|
db->treename);
|
||||||
|
if(db->ops->populate(db) == -1) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG,
|
||||||
|
"failed to load package cache for repository '%s'\n", db->treename);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
db->pkgcache_loaded = 1;
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _alpm_db_free_pkgcache(pmdb_t *db)
|
||||||
|
{
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL || !db->pkgcache_loaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "freeing package cache for repository '%s'\n",
|
||||||
|
db->treename);
|
||||||
|
|
||||||
|
alpm_list_free_inner(_alpm_db_get_pkgcache(db),
|
||||||
|
(alpm_list_fn_free)_alpm_pkg_free);
|
||||||
|
_alpm_pkghash_free(db->pkgcache);
|
||||||
|
db->pkgcache_loaded = 0;
|
||||||
|
|
||||||
|
_alpm_db_free_grpcache(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmpkghash_t *_alpm_db_get_pkgcache_hash(pmdb_t *db)
|
||||||
|
{
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL) {
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!db->pkgcache_loaded) {
|
||||||
|
_alpm_db_load_pkgcache(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* hmmm, still NULL ?*/
|
||||||
|
if(!db->pkgcache) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "warning: pkgcache is NULL for db '%s'\n", db->treename);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(db->pkgcache);
|
||||||
|
}
|
||||||
|
|
||||||
|
alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db)
|
||||||
|
{
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
pmpkghash_t *hash = _alpm_db_get_pkgcache_hash(db);
|
||||||
|
|
||||||
|
if(hash == NULL) {
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(hash->list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* "duplicate" pkg then add it to pkgcache */
|
||||||
|
int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg)
|
||||||
|
{
|
||||||
|
pmpkg_t *newpkg;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
if(handle->db_local != NULL) {
|
if(db == NULL || !db->pkgcache_loaded || pkg == NULL) {
|
||||||
_alpm_log(PM_LOG_WARNING, _("attempt to re-register the 'local' DB\n"));
|
return(-1);
|
||||||
RET_ERR(PM_ERR_DB_NOT_NULL, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "registering local database\n");
|
newpkg = _alpm_pkg_dup(pkg);
|
||||||
|
if(newpkg == NULL) {
|
||||||
db = _alpm_db_new("local", 1);
|
return(-1);
|
||||||
if(db == NULL) {
|
|
||||||
RET_ERR(PM_ERR_DB_CREATE, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handle->db_local = db;
|
_alpm_log(PM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
|
||||||
return(db);
|
alpm_pkg_get_name(newpkg), db->treename);
|
||||||
|
db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg);
|
||||||
|
|
||||||
|
_alpm_db_free_grpcache(db);
|
||||||
|
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pmdb_t *_alpm_db_register_sync(const char *treename)
|
int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg)
|
||||||
|
{
|
||||||
|
pmpkg_t *data = NULL;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL || !db->pkgcache_loaded || pkg == NULL) {
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "removing entry '%s' from '%s' cache\n",
|
||||||
|
alpm_pkg_get_name(pkg), db->treename);
|
||||||
|
|
||||||
|
db->pkgcache = _alpm_pkghash_remove(db->pkgcache, pkg, &data);
|
||||||
|
if(data == NULL) {
|
||||||
|
/* package not found */
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "cannot remove entry '%s' from '%s' cache: not found\n",
|
||||||
|
alpm_pkg_get_name(pkg), db->treename);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
_alpm_pkg_free(data);
|
||||||
|
|
||||||
|
_alpm_db_free_grpcache(db);
|
||||||
|
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target)
|
||||||
|
{
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL) {
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmpkghash_t *pkgcache = _alpm_db_get_pkgcache_hash(db);
|
||||||
|
if(!pkgcache) {
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "warning: failed to get '%s' from NULL pkgcache\n",
|
||||||
|
target);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(_alpm_pkghash_find(pkgcache, target));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns a new group cache from db.
|
||||||
|
*/
|
||||||
|
int _alpm_db_load_grpcache(pmdb_t *db)
|
||||||
|
{
|
||||||
|
alpm_list_t *lp;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL) {
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "loading group cache for repository '%s'\n",
|
||||||
|
db->treename);
|
||||||
|
|
||||||
|
for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
|
||||||
|
const alpm_list_t *i;
|
||||||
|
pmpkg_t *pkg = lp->data;
|
||||||
|
|
||||||
|
for(i = alpm_pkg_get_groups(pkg); i; i = i->next) {
|
||||||
|
const char *grpname = i->data;
|
||||||
|
alpm_list_t *j;
|
||||||
|
pmgrp_t *grp = NULL;
|
||||||
|
int found = 0;
|
||||||
|
|
||||||
|
/* first look through the group cache for a group with this name */
|
||||||
|
for(j = db->grpcache; j; j = j->next) {
|
||||||
|
grp = j->data;
|
||||||
|
|
||||||
|
if(strcmp(grp->name, grpname) == 0
|
||||||
|
&& !alpm_list_find_ptr(grp->packages, pkg)) {
|
||||||
|
grp->packages = alpm_list_add(grp->packages, pkg);
|
||||||
|
found = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(found) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* we didn't find the group, so create a new one with this name */
|
||||||
|
grp = _alpm_grp_new(grpname);
|
||||||
|
grp->packages = alpm_list_add(grp->packages, pkg);
|
||||||
|
db->grpcache = alpm_list_add(db->grpcache, grp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
db->grpcache_loaded = 1;
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _alpm_db_free_grpcache(pmdb_t *db)
|
||||||
|
{
|
||||||
|
alpm_list_t *lg;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL || !db->grpcache_loaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "freeing group cache for repository '%s'\n",
|
||||||
|
db->treename);
|
||||||
|
|
||||||
|
for(lg = db->grpcache; lg; lg = lg->next) {
|
||||||
|
_alpm_grp_free(lg->data);
|
||||||
|
lg->data = NULL;
|
||||||
|
}
|
||||||
|
FREELIST(db->grpcache);
|
||||||
|
db->grpcache_loaded = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
alpm_list_t *_alpm_db_get_grpcache(pmdb_t *db)
|
||||||
|
{
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(db == NULL) {
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!db->grpcache_loaded) {
|
||||||
|
_alpm_db_load_grpcache(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(db->grpcache);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, const char *target)
|
||||||
{
|
{
|
||||||
pmdb_t *db;
|
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
for(i = handle->dbs_sync; i; i = i->next) {
|
if(db == NULL || target == NULL || strlen(target) == 0) {
|
||||||
pmdb_t *sdb = i->data;
|
return(NULL);
|
||||||
if(strcmp(treename, sdb->treename) == 0) {
|
}
|
||||||
_alpm_log(PM_LOG_DEBUG, "attempt to re-register the '%s' database, using existing\n", sdb->treename);
|
|
||||||
return sdb;
|
for(i = _alpm_db_get_grpcache(db); i; i = i->next) {
|
||||||
|
pmgrp_t *info = i->data;
|
||||||
|
|
||||||
|
if(strcmp(info->name, target) == 0) {
|
||||||
|
return(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "registering sync database '%s'\n", treename);
|
return(NULL);
|
||||||
|
|
||||||
db = _alpm_db_new(treename, 0);
|
|
||||||
if(db == NULL) {
|
|
||||||
RET_ERR(PM_ERR_DB_CREATE, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
handle->dbs_sync = alpm_list_add(handle->dbs_sync, db);
|
|
||||||
return(db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* db.h
|
* db.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
@@ -23,22 +23,31 @@
|
|||||||
#define _ALPM_DB_H
|
#define _ALPM_DB_H
|
||||||
|
|
||||||
#include "alpm.h"
|
#include "alpm.h"
|
||||||
#include <limits.h>
|
#include "pkghash.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
/* libarchive */
|
||||||
|
#include <archive.h>
|
||||||
|
#include <archive_entry.h>
|
||||||
|
|
||||||
/* Database entries */
|
/* Database entries */
|
||||||
typedef enum _pmdbinfrq_t {
|
typedef enum _pmdbinfrq_t {
|
||||||
INFRQ_BASE = 1,
|
INFRQ_BASE = 1,
|
||||||
INFRQ_DESC = (1 << 1),
|
INFRQ_DESC = (1 << 1),
|
||||||
INFRQ_DEPENDS = (1 << 2),
|
INFRQ_FILES = (1 << 2),
|
||||||
INFRQ_FILES = (1 << 3),
|
INFRQ_SCRIPTLET = (1 << 3),
|
||||||
INFRQ_SCRIPTLET = (1 << 4),
|
INFRQ_DSIZE = (1 << 4),
|
||||||
INFRQ_DELTAS = (1 << 5),
|
|
||||||
INFRQ_DSIZE = (1 << 6),
|
|
||||||
/* ALL should be info stored in the package or database */
|
/* ALL should be info stored in the package or database */
|
||||||
INFRQ_ALL = 0x3F
|
INFRQ_ALL = 0x1F
|
||||||
} pmdbinfrq_t;
|
} pmdbinfrq_t;
|
||||||
|
|
||||||
|
struct db_operations {
|
||||||
|
int (*populate) (pmdb_t *);
|
||||||
|
void (*unregister) (pmdb_t *);
|
||||||
|
int (*version) (pmdb_t *);
|
||||||
|
};
|
||||||
|
|
||||||
/* Database */
|
/* Database */
|
||||||
struct __pmdb_t {
|
struct __pmdb_t {
|
||||||
char *treename;
|
char *treename;
|
||||||
@@ -46,26 +55,48 @@ struct __pmdb_t {
|
|||||||
char *_path;
|
char *_path;
|
||||||
int pkgcache_loaded;
|
int pkgcache_loaded;
|
||||||
int grpcache_loaded;
|
int grpcache_loaded;
|
||||||
|
/* also indicates whether we are RO or RW */
|
||||||
int is_local;
|
int is_local;
|
||||||
alpm_list_t *pkgcache;
|
pmpkghash_t *pkgcache;
|
||||||
alpm_list_t *grpcache;
|
alpm_list_t *grpcache;
|
||||||
alpm_list_t *servers;
|
alpm_list_t *servers;
|
||||||
|
|
||||||
|
struct db_operations *ops;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* db.c, database general calls */
|
/* db.c, database general calls */
|
||||||
|
pmdb_t *_alpm_db_new(const char *treename, int is_local);
|
||||||
void _alpm_db_free(pmdb_t *db);
|
void _alpm_db_free(pmdb_t *db);
|
||||||
const char *_alpm_db_path(pmdb_t *db);
|
const char *_alpm_db_path(pmdb_t *db);
|
||||||
|
int _alpm_db_version(pmdb_t *db);
|
||||||
int _alpm_db_cmp(const void *d1, const void *d2);
|
int _alpm_db_cmp(const void *d1, const void *d2);
|
||||||
alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
|
alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
|
||||||
pmdb_t *_alpm_db_register_local(void);
|
pmdb_t *_alpm_db_register_local(void);
|
||||||
pmdb_t *_alpm_db_register_sync(const char *treename);
|
pmdb_t *_alpm_db_register_sync(const char *treename);
|
||||||
|
void _alpm_db_unregister(pmdb_t *db);
|
||||||
|
|
||||||
/* be.c, backend specific calls */
|
/* be_*.c, backend specific calls */
|
||||||
int _alpm_db_populate(pmdb_t *db);
|
int _alpm_local_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
|
||||||
int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
|
int _alpm_local_db_prepare(pmdb_t *db, pmpkg_t *info);
|
||||||
int _alpm_db_prepare(pmdb_t *db, pmpkg_t *info);
|
int _alpm_local_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
|
||||||
int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
|
int _alpm_local_db_remove(pmdb_t *db, pmpkg_t *info);
|
||||||
int _alpm_db_remove(pmdb_t *db, pmpkg_t *info);
|
|
||||||
|
/* cache bullshit */
|
||||||
|
/* packages */
|
||||||
|
int _alpm_db_load_pkgcache(pmdb_t *db);
|
||||||
|
void _alpm_db_free_pkgcache(pmdb_t *db);
|
||||||
|
int _alpm_db_add_pkgincache(pmdb_t *db, pmpkg_t *pkg);
|
||||||
|
int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg);
|
||||||
|
pmpkghash_t *_alpm_db_get_pkgcache_hash(pmdb_t *db);
|
||||||
|
alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db);
|
||||||
|
int _alpm_db_ensure_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel);
|
||||||
|
pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target);
|
||||||
|
/* groups */
|
||||||
|
int _alpm_db_load_grpcache(pmdb_t *db);
|
||||||
|
void _alpm_db_free_grpcache(pmdb_t *db);
|
||||||
|
alpm_list_t *_alpm_db_get_grpcache(pmdb_t *db);
|
||||||
|
pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, const char *target);
|
||||||
|
|
||||||
#endif /* _ALPM_DB_H */
|
#endif /* _ALPM_DB_H */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* delta.c
|
* delta.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2007-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2007-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* delta.h
|
* delta.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2007-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2007-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -44,6 +44,9 @@ void _alpm_delta_free(pmdelta_t *delta);
|
|||||||
off_t _alpm_shortest_delta_path(alpm_list_t *deltas,
|
off_t _alpm_shortest_delta_path(alpm_list_t *deltas,
|
||||||
const char *to, alpm_list_t **path);
|
const char *to, alpm_list_t **path);
|
||||||
|
|
||||||
|
/* max percent of package size to download deltas */
|
||||||
|
#define MAX_DELTA_RATIO 0.7
|
||||||
|
|
||||||
#endif /* _ALPM_DELTA_H */
|
#endif /* _ALPM_DELTA_H */
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* deps.c
|
* deps.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
@@ -34,7 +34,6 @@
|
|||||||
#include "graph.h"
|
#include "graph.h"
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
#include "cache.h"
|
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
|
|
||||||
void _alpm_dep_free(pmdepend_t *dep)
|
void _alpm_dep_free(pmdepend_t *dep)
|
||||||
@@ -140,8 +139,8 @@ alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, int reverse)
|
|||||||
vertex->state = -1;
|
vertex->state = -1;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
while(vertex->childptr && !found) {
|
while(vertex->childptr && !found) {
|
||||||
pmgraph_t *nextchild = (vertex->childptr)->data;
|
pmgraph_t *nextchild = vertex->childptr->data;
|
||||||
vertex->childptr = (vertex->childptr)->next;
|
vertex->childptr = vertex->childptr->next;
|
||||||
if (nextchild->state == 0) {
|
if (nextchild->state == 0) {
|
||||||
found = 1;
|
found = 1;
|
||||||
nextchild->parent = vertex;
|
nextchild->parent = vertex;
|
||||||
@@ -150,12 +149,15 @@ alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, int reverse)
|
|||||||
else if(nextchild->state == -1) {
|
else if(nextchild->state == -1) {
|
||||||
pmpkg_t *vertexpkg = vertex->data;
|
pmpkg_t *vertexpkg = vertex->data;
|
||||||
pmpkg_t *childpkg = nextchild->data;
|
pmpkg_t *childpkg = nextchild->data;
|
||||||
|
const char *message;
|
||||||
|
|
||||||
_alpm_log(PM_LOG_WARNING, _("dependency cycle detected:\n"));
|
_alpm_log(PM_LOG_WARNING, _("dependency cycle detected:\n"));
|
||||||
if(reverse) {
|
if(reverse) {
|
||||||
_alpm_log(PM_LOG_WARNING, _("%s will be removed after its %s dependency\n"), vertexpkg->name, childpkg->name);
|
message =_("%s will be removed after its %s dependency\n");
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(PM_LOG_WARNING, _("%s will be installed before its %s dependency\n"), vertexpkg->name, childpkg->name);
|
message =_("%s will be installed before its %s dependency\n");
|
||||||
}
|
}
|
||||||
|
_alpm_log(PM_LOG_WARNING, message, vertexpkg->name, childpkg->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!found) {
|
if(!found) {
|
||||||
@@ -196,36 +198,25 @@ pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep)
|
|||||||
|
|
||||||
for(i = pkgs; i; i = alpm_list_next(i)) {
|
for(i = pkgs; i; i = alpm_list_next(i)) {
|
||||||
pmpkg_t *pkg = i->data;
|
pmpkg_t *pkg = i->data;
|
||||||
if(alpm_depcmp(pkg, dep)) {
|
if(_alpm_depcmp_tolerant(pkg, dep)) {
|
||||||
return(pkg);
|
return(pkg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Checks dependencies and returns missing ones in a list.
|
/** Find a package satisfying a specified dependency.
|
||||||
* Dependencies can include versions with depmod operators.
|
* The dependency can include versions with depmod operators.
|
||||||
* @param db pointer to the local package database
|
* @param pkgs an alpm_list_t* of pmpkg_t where the satisfier will be searched
|
||||||
* @param targets an alpm_list_t* of dependencies strings to satisfy
|
* @param depstring package or provision name, versioned or not
|
||||||
* @return an alpm_list_t* of missing dependencies strings
|
* @return a pmpkg_t* satisfying depstring
|
||||||
*/
|
*/
|
||||||
alpm_list_t SYMEXPORT *alpm_deptest(pmdb_t *db, alpm_list_t *targets)
|
pmpkg_t SYMEXPORT *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring)
|
||||||
{
|
{
|
||||||
alpm_list_t *i, *ret = NULL;
|
pmdepend_t *dep = _alpm_splitdep(depstring);
|
||||||
|
pmpkg_t *pkg = _alpm_find_dep_satisfier(pkgs, dep);
|
||||||
for(i = targets; i; i = alpm_list_next(i)) {
|
|
||||||
pmdepend_t *dep;
|
|
||||||
char *target;
|
|
||||||
|
|
||||||
target = alpm_list_getdata(i);
|
|
||||||
dep = _alpm_splitdep(target);
|
|
||||||
|
|
||||||
if(!_alpm_find_dep_satisfier(_alpm_db_get_pkgcache(db), dep)) {
|
|
||||||
ret = alpm_list_add(ret, target);
|
|
||||||
}
|
|
||||||
_alpm_dep_free(dep);
|
_alpm_dep_free(dep);
|
||||||
}
|
return(pkg);
|
||||||
return(ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Checks dependencies and returns missing ones in a list.
|
/** Checks dependencies and returns missing ones in a list.
|
||||||
@@ -234,7 +225,7 @@ alpm_list_t SYMEXPORT *alpm_deptest(pmdb_t *db, alpm_list_t *targets)
|
|||||||
* @param reversedeps handles the backward dependencies
|
* @param reversedeps handles the backward dependencies
|
||||||
* @param remove an alpm_list_t* of packages to be removed
|
* @param remove an alpm_list_t* of packages to be removed
|
||||||
* @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)
|
* @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)
|
||||||
* @return an alpm_list_t* of pmpkg_t* of missing_t pointers.
|
* @return an alpm_list_t* of pmpkg_t* of pmdepmissing_t pointers.
|
||||||
*/
|
*/
|
||||||
alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
||||||
alpm_list_t *remove, alpm_list_t *upgrade)
|
alpm_list_t *remove, alpm_list_t *upgrade)
|
||||||
@@ -242,14 +233,13 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
|||||||
alpm_list_t *i, *j;
|
alpm_list_t *i, *j;
|
||||||
alpm_list_t *targets, *dblist = NULL, *modified = NULL;
|
alpm_list_t *targets, *dblist = NULL, *modified = NULL;
|
||||||
alpm_list_t *baddeps = NULL;
|
alpm_list_t *baddeps = NULL;
|
||||||
pmdepmissing_t *miss = NULL;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
targets = alpm_list_join(alpm_list_copy(remove), alpm_list_copy(upgrade));
|
targets = alpm_list_join(alpm_list_copy(remove), alpm_list_copy(upgrade));
|
||||||
for(i = pkglist; i; i = i->next) {
|
for(i = pkglist; i; i = i->next) {
|
||||||
void *pkg = i->data;
|
pmpkg_t *pkg = i->data;
|
||||||
if(alpm_list_find(targets, pkg, _alpm_pkg_cmp)) {
|
if(_alpm_pkg_find(targets, pkg->name)) {
|
||||||
modified = alpm_list_add(modified, pkg);
|
modified = alpm_list_add(modified, pkg);
|
||||||
} else {
|
} else {
|
||||||
dblist = alpm_list_add(dblist, pkg);
|
dblist = alpm_list_add(dblist, pkg);
|
||||||
@@ -270,6 +260,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
|||||||
if(!_alpm_find_dep_satisfier(upgrade, depend) &&
|
if(!_alpm_find_dep_satisfier(upgrade, depend) &&
|
||||||
!_alpm_find_dep_satisfier(dblist, depend)) {
|
!_alpm_find_dep_satisfier(dblist, depend)) {
|
||||||
/* Unsatisfied dependency in the upgrade list */
|
/* Unsatisfied dependency in the upgrade list */
|
||||||
|
pmdepmissing_t *miss;
|
||||||
char *missdepstring = alpm_dep_compute_string(depend);
|
char *missdepstring = alpm_dep_compute_string(depend);
|
||||||
_alpm_log(PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n",
|
_alpm_log(PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n",
|
||||||
missdepstring, alpm_pkg_get_name(tp));
|
missdepstring, alpm_pkg_get_name(tp));
|
||||||
@@ -294,6 +285,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
|||||||
if(causingpkg &&
|
if(causingpkg &&
|
||||||
!_alpm_find_dep_satisfier(upgrade, depend) &&
|
!_alpm_find_dep_satisfier(upgrade, depend) &&
|
||||||
!_alpm_find_dep_satisfier(dblist, depend)) {
|
!_alpm_find_dep_satisfier(dblist, depend)) {
|
||||||
|
pmdepmissing_t *miss;
|
||||||
char *missdepstring = alpm_dep_compute_string(depend);
|
char *missdepstring = alpm_dep_compute_string(depend);
|
||||||
_alpm_log(PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n",
|
_alpm_log(PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n",
|
||||||
missdepstring, alpm_pkg_get_name(lp));
|
missdepstring, alpm_pkg_get_name(lp));
|
||||||
@@ -304,6 +296,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_free(modified);
|
alpm_list_free(modified);
|
||||||
alpm_list_free(dblist);
|
alpm_list_free(dblist);
|
||||||
|
|
||||||
@@ -331,89 +324,116 @@ static int dep_vercmp(const char *version1, pmdepmod_t mod,
|
|||||||
return(equal);
|
return(equal);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SYMEXPORT alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
|
/* nodepversion: skip version checking */
|
||||||
|
static int _depcmp(pmpkg_t *pkg, pmdepend_t *dep, int nodepversion)
|
||||||
{
|
{
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
const char *pkgname = alpm_pkg_get_name(pkg);
|
|
||||||
const char *pkgversion = alpm_pkg_get_version(pkg);
|
|
||||||
int satisfy = 0;
|
int satisfy = 0;
|
||||||
|
int depmod;
|
||||||
|
|
||||||
|
if(nodepversion) {
|
||||||
|
depmod = PM_DEP_MOD_ANY;
|
||||||
|
} else {
|
||||||
|
depmod = dep->mod;
|
||||||
|
}
|
||||||
|
|
||||||
/* check (pkg->name, pkg->version) */
|
/* check (pkg->name, pkg->version) */
|
||||||
satisfy = (strcmp(pkgname, dep->name) == 0
|
if(pkg->name_hash && dep->name_hash
|
||||||
&& dep_vercmp(pkgversion, dep->mod, dep->version));
|
&& pkg->name_hash != dep->name_hash) {
|
||||||
|
/* skip more expensive checks */
|
||||||
|
} else {
|
||||||
|
satisfy = (strcmp(pkg->name, dep->name) == 0
|
||||||
|
&& dep_vercmp(pkg->version, depmod, dep->version));
|
||||||
|
if(satisfy) {
|
||||||
|
return(satisfy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* check provisions, format : "name=version" */
|
/* check provisions, format : "name=version" */
|
||||||
for(i = alpm_pkg_get_provides(pkg); i && !satisfy; i = i->next) {
|
for(i = alpm_pkg_get_provides(pkg); i && !satisfy; i = i->next) {
|
||||||
char *provname = strdup(i->data);
|
const char *provision = i->data;
|
||||||
char *provver = strchr(provname, '=');
|
const char *provver = strchr(provision, '=');
|
||||||
|
|
||||||
if(provver == NULL) { /* no provision version */
|
if(provver == NULL) { /* no provision version */
|
||||||
satisfy = (dep->mod == PM_DEP_MOD_ANY
|
satisfy = (depmod == PM_DEP_MOD_ANY
|
||||||
&& strcmp(provname, dep->name) == 0);
|
&& strcmp(provision, dep->name) == 0);
|
||||||
} else {
|
} else {
|
||||||
*provver = '\0';
|
/* This is a bit tricker than the old code for performance reasons. To
|
||||||
|
* prevent the need to copy and duplicate strings, strncmp only the name
|
||||||
|
* portion if they are the same length, since there is a version and
|
||||||
|
* operator in play here. Cast is to silence sign conversion warning;
|
||||||
|
* we know provver >= provision if we are here. */
|
||||||
|
size_t namelen = (size_t)(provver - provision);
|
||||||
provver += 1;
|
provver += 1;
|
||||||
satisfy = (strcmp(provname, dep->name) == 0
|
satisfy = (strlen(dep->name) == namelen
|
||||||
&& dep_vercmp(provver, dep->mod, dep->version));
|
&& strncmp(provision, dep->name, namelen) == 0
|
||||||
|
&& dep_vercmp(provver, depmod, dep->version));
|
||||||
}
|
}
|
||||||
free(provname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return(satisfy);
|
return(satisfy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* tolerant : respects NODEPVERSION flag */
|
||||||
|
int _alpm_depcmp_tolerant(pmpkg_t *pkg, pmdepend_t *dep)
|
||||||
|
{
|
||||||
|
int nodepversion = 0;
|
||||||
|
int flags = alpm_trans_get_flags();
|
||||||
|
|
||||||
|
if (flags != -1) {
|
||||||
|
nodepversion = flags & PM_TRANS_FLAG_NODEPVERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(_depcmp(pkg, dep, nodepversion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* strict : ignores NODEPVERSION flag */
|
||||||
|
int _alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
|
||||||
|
{
|
||||||
|
return(_depcmp(pkg, dep, 0));
|
||||||
|
}
|
||||||
|
|
||||||
pmdepend_t *_alpm_splitdep(const char *depstring)
|
pmdepend_t *_alpm_splitdep(const char *depstring)
|
||||||
{
|
{
|
||||||
pmdepend_t *depend;
|
pmdepend_t *depend;
|
||||||
char *ptr = NULL;
|
const char *ptr, *version = NULL;
|
||||||
char *newstr = NULL;
|
|
||||||
|
|
||||||
if(depstring == NULL) {
|
if(depstring == NULL) {
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
STRDUP(newstr, depstring, RET_ERR(PM_ERR_MEMORY, NULL));
|
|
||||||
|
|
||||||
CALLOC(depend, 1, sizeof(pmdepend_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(depend, 1, sizeof(pmdepend_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
/* Find a version comparator if one exists. If it does, set the type and
|
/* Find a version comparator if one exists. If it does, set the type and
|
||||||
* increment the ptr accordingly so we can copy the right strings. */
|
* increment the ptr accordingly so we can copy the right strings. */
|
||||||
if((ptr = strstr(newstr, ">="))) {
|
if((ptr = strstr(depstring, ">="))) {
|
||||||
depend->mod = PM_DEP_MOD_GE;
|
depend->mod = PM_DEP_MOD_GE;
|
||||||
*ptr = '\0';
|
version = ptr + 2;
|
||||||
ptr += 2;
|
} else if((ptr = strstr(depstring, "<="))) {
|
||||||
} else if((ptr = strstr(newstr, "<="))) {
|
|
||||||
depend->mod = PM_DEP_MOD_LE;
|
depend->mod = PM_DEP_MOD_LE;
|
||||||
*ptr = '\0';
|
version = ptr + 2;
|
||||||
ptr += 2;
|
} else if((ptr = strstr(depstring, "="))) {
|
||||||
} else if((ptr = strstr(newstr, "="))) { /* Note: we must do =,<,> checks after <=, >= checks */
|
/* Note: we must do =,<,> checks after <=, >= checks */
|
||||||
depend->mod = PM_DEP_MOD_EQ;
|
depend->mod = PM_DEP_MOD_EQ;
|
||||||
*ptr = '\0';
|
version = ptr + 1;
|
||||||
ptr += 1;
|
} else if((ptr = strstr(depstring, "<"))) {
|
||||||
} else if((ptr = strstr(newstr, "<"))) {
|
|
||||||
depend->mod = PM_DEP_MOD_LT;
|
depend->mod = PM_DEP_MOD_LT;
|
||||||
*ptr = '\0';
|
version = ptr + 1;
|
||||||
ptr += 1;
|
} else if((ptr = strstr(depstring, ">"))) {
|
||||||
} else if((ptr = strstr(newstr, ">"))) {
|
|
||||||
depend->mod = PM_DEP_MOD_GT;
|
depend->mod = PM_DEP_MOD_GT;
|
||||||
*ptr = '\0';
|
version = ptr + 1;
|
||||||
ptr += 1;
|
|
||||||
} else {
|
} else {
|
||||||
/* no version specified - copy the name and return it */
|
/* no version specified, leave version and ptr NULL */
|
||||||
depend->mod = PM_DEP_MOD_ANY;
|
depend->mod = PM_DEP_MOD_ANY;
|
||||||
STRDUP(depend->name, newstr, RET_ERR(PM_ERR_MEMORY, NULL));
|
|
||||||
depend->version = NULL;
|
|
||||||
free(newstr);
|
|
||||||
return(depend);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we get here, we have a version comparator, copy the right parts
|
/* copy the right parts to the right places */
|
||||||
* to the right places */
|
STRNDUP(depend->name, depstring, ptr - depstring,
|
||||||
STRDUP(depend->name, newstr, RET_ERR(PM_ERR_MEMORY, NULL));
|
RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
STRDUP(depend->version, ptr, RET_ERR(PM_ERR_MEMORY, NULL));
|
depend->name_hash = _alpm_hash_sdbm(depend->name);
|
||||||
free(newstr);
|
if(version) {
|
||||||
|
STRDUP(depend->version, version, RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
}
|
||||||
|
|
||||||
return(depend);
|
return(depend);
|
||||||
}
|
}
|
||||||
@@ -424,6 +444,7 @@ pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep)
|
|||||||
CALLOC(newdep, 1, sizeof(pmdepend_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(newdep, 1, sizeof(pmdepend_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
STRDUP(newdep->name, dep->name, RET_ERR(PM_ERR_MEMORY, NULL));
|
STRDUP(newdep->name, dep->name, RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
newdep->name_hash = dep->name_hash;
|
||||||
STRDUP(newdep->version, dep->version, RET_ERR(PM_ERR_MEMORY, NULL));
|
STRDUP(newdep->version, dep->version, RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
newdep->mod = dep->mod;
|
newdep->mod = dep->mod;
|
||||||
|
|
||||||
@@ -505,6 +526,28 @@ void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Find a package satisfying a specified dependency.
|
||||||
|
* First look for a literal, going through each db one by one. Then look for
|
||||||
|
* providers. The first satisfier found is returned.
|
||||||
|
* The dependency can include versions with depmod operators.
|
||||||
|
* @param dbs an alpm_list_t* of pmdb_t where the satisfier will be searched
|
||||||
|
* @param depstring package or provision name, versioned or not
|
||||||
|
* @return a pmpkg_t* satisfying depstring
|
||||||
|
*/
|
||||||
|
pmpkg_t SYMEXPORT *alpm_find_dbs_satisfier(alpm_list_t *dbs, const char *depstring)
|
||||||
|
{
|
||||||
|
pmdepend_t *dep;
|
||||||
|
pmpkg_t *pkg;
|
||||||
|
|
||||||
|
ASSERT(dbs, return(NULL));
|
||||||
|
|
||||||
|
dep = _alpm_splitdep(depstring);
|
||||||
|
ASSERT(dep, return(NULL));
|
||||||
|
pkg = _alpm_resolvedep(dep, dbs, NULL, 1);
|
||||||
|
_alpm_dep_free(dep);
|
||||||
|
return(pkg);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* helper function for resolvedeps: search for dep satisfier in dbs
|
* helper function for resolvedeps: search for dep satisfier in dbs
|
||||||
*
|
*
|
||||||
@@ -522,10 +565,14 @@ pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs,
|
|||||||
{
|
{
|
||||||
alpm_list_t *i, *j;
|
alpm_list_t *i, *j;
|
||||||
int ignored = 0;
|
int ignored = 0;
|
||||||
|
|
||||||
|
alpm_list_t *providers = NULL;
|
||||||
|
int count;
|
||||||
|
|
||||||
/* 1. literals */
|
/* 1. literals */
|
||||||
for(i = dbs; i; i = i->next) {
|
for(i = dbs; i; i = i->next) {
|
||||||
pmpkg_t *pkg = _alpm_db_get_pkgfromcache(i->data, dep->name);
|
pmpkg_t *pkg = _alpm_db_get_pkgfromcache(i->data, dep->name);
|
||||||
if(pkg && alpm_depcmp(pkg, dep) && !_alpm_pkg_find(excluding, pkg->name)) {
|
if(pkg && _alpm_depcmp_tolerant(pkg, dep) && !_alpm_pkg_find(excluding, pkg->name)) {
|
||||||
if(_alpm_pkg_should_ignore(pkg)) {
|
if(_alpm_pkg_should_ignore(pkg)) {
|
||||||
int install = 0;
|
int install = 0;
|
||||||
if (prompt) {
|
if (prompt) {
|
||||||
@@ -546,7 +593,7 @@ pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs,
|
|||||||
for(i = dbs; i; i = i->next) {
|
for(i = dbs; i; i = i->next) {
|
||||||
for(j = _alpm_db_get_pkgcache(i->data); j; j = j->next) {
|
for(j = _alpm_db_get_pkgcache(i->data); j; j = j->next) {
|
||||||
pmpkg_t *pkg = j->data;
|
pmpkg_t *pkg = j->data;
|
||||||
if(alpm_depcmp(pkg, dep) && strcmp(pkg->name, dep->name) &&
|
if(_alpm_depcmp_tolerant(pkg, dep) && strcmp(pkg->name, dep->name) != 0 &&
|
||||||
!_alpm_pkg_find(excluding, pkg->name)) {
|
!_alpm_pkg_find(excluding, pkg->name)) {
|
||||||
if(_alpm_pkg_should_ignore(pkg)) {
|
if(_alpm_pkg_should_ignore(pkg)) {
|
||||||
int install = 0;
|
int install = 0;
|
||||||
@@ -561,12 +608,40 @@ pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_alpm_log(PM_LOG_WARNING, _("provider package was selected (%s provides %s)\n"),
|
_alpm_log(PM_LOG_DEBUG, "provider found (%s provides %s)\n",
|
||||||
pkg->name, dep->name);
|
pkg->name, dep->name);
|
||||||
|
providers = alpm_list_add(providers, pkg);
|
||||||
|
/* keep looking for other providers in the all dbs */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* first check if one provider is already installed locally */
|
||||||
|
for(i = providers; i; i = i->next) {
|
||||||
|
pmpkg_t *pkg = i->data;
|
||||||
|
if (_alpm_pkghash_find(_alpm_db_get_pkgcache_hash(handle->db_local), pkg->name)) {
|
||||||
|
alpm_list_free(providers);
|
||||||
return(pkg);
|
return(pkg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
count = alpm_list_count(providers);
|
||||||
|
if (count >= 1) {
|
||||||
|
/* default to first provider if there is no QUESTION callback */
|
||||||
|
int index = 0;
|
||||||
|
if(count > 1) {
|
||||||
|
/* if there is more than one provider, we ask the user */
|
||||||
|
QUESTION(handle->trans, PM_TRANS_CONV_SELECT_PROVIDER,
|
||||||
|
providers, dep, NULL, &index);
|
||||||
}
|
}
|
||||||
|
if(index >= 0 && index < count) {
|
||||||
|
pmpkg_t *pkg = alpm_list_getdata(alpm_list_nth(providers, index));
|
||||||
|
alpm_list_free(providers);
|
||||||
|
return(pkg);
|
||||||
|
}
|
||||||
|
alpm_list_free(providers);
|
||||||
|
providers = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if(ignored) { /* resolvedeps will override these */
|
if(ignored) { /* resolvedeps will override these */
|
||||||
pm_errno = PM_ERR_PKG_IGNORED;
|
pm_errno = PM_ERR_PKG_IGNORED;
|
||||||
} else {
|
} else {
|
||||||
@@ -598,6 +673,7 @@ int _alpm_resolvedeps(alpm_list_t *localpkgs, alpm_list_t *dbs_sync, pmpkg_t *pk
|
|||||||
alpm_list_t *preferred, alpm_list_t **packages,
|
alpm_list_t *preferred, alpm_list_t **packages,
|
||||||
alpm_list_t *remove, alpm_list_t **data)
|
alpm_list_t *remove, alpm_list_t **data)
|
||||||
{
|
{
|
||||||
|
int ret = 0;
|
||||||
alpm_list_t *i, *j;
|
alpm_list_t *i, *j;
|
||||||
alpm_list_t *targ;
|
alpm_list_t *targ;
|
||||||
alpm_list_t *deps = NULL;
|
alpm_list_t *deps = NULL;
|
||||||
@@ -622,14 +698,18 @@ int _alpm_resolvedeps(alpm_list_t *localpkgs, alpm_list_t *dbs_sync, pmpkg_t *pk
|
|||||||
targ = alpm_list_add(NULL, tpkg);
|
targ = alpm_list_add(NULL, tpkg);
|
||||||
deps = alpm_checkdeps(localpkgs, 0, remove, targ);
|
deps = alpm_checkdeps(localpkgs, 0, remove, targ);
|
||||||
alpm_list_free(targ);
|
alpm_list_free(targ);
|
||||||
|
|
||||||
for(j = deps; j; j = j->next) {
|
for(j = deps; j; j = j->next) {
|
||||||
pmdepmissing_t *miss = j->data;
|
pmdepmissing_t *miss = j->data;
|
||||||
pmdepend_t *missdep = alpm_miss_get_dep(miss);
|
pmdepend_t *missdep = alpm_miss_get_dep(miss);
|
||||||
/* check if one of the packages in the [*packages] list already satisfies this dependency */
|
/* check if one of the packages in the [*packages] list already satisfies
|
||||||
|
* this dependency */
|
||||||
if(_alpm_find_dep_satisfier(*packages, missdep)) {
|
if(_alpm_find_dep_satisfier(*packages, missdep)) {
|
||||||
|
_alpm_depmiss_free(miss);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* check if one of the packages in the [preferred] list already satisfies this dependency */
|
/* check if one of the packages in the [preferred] list already satisfies
|
||||||
|
* this dependency */
|
||||||
pmpkg_t *spkg = _alpm_find_dep_satisfier(preferred, missdep);
|
pmpkg_t *spkg = _alpm_find_dep_satisfier(preferred, missdep);
|
||||||
if(!spkg) {
|
if(!spkg) {
|
||||||
/* find a satisfier package in the given repositories */
|
/* find a satisfier package in the given repositories */
|
||||||
@@ -638,33 +718,32 @@ int _alpm_resolvedeps(alpm_list_t *localpkgs, alpm_list_t *dbs_sync, pmpkg_t *pk
|
|||||||
if(!spkg) {
|
if(!spkg) {
|
||||||
pm_errno = PM_ERR_UNSATISFIED_DEPS;
|
pm_errno = PM_ERR_UNSATISFIED_DEPS;
|
||||||
char *missdepstring = alpm_dep_compute_string(missdep);
|
char *missdepstring = alpm_dep_compute_string(missdep);
|
||||||
_alpm_log(PM_LOG_WARNING, _("cannot resolve \"%s\", a dependency of \"%s\"\n"),
|
_alpm_log(PM_LOG_WARNING,
|
||||||
|
_("cannot resolve \"%s\", a dependency of \"%s\"\n"),
|
||||||
missdepstring, tpkg->name);
|
missdepstring, tpkg->name);
|
||||||
free(missdepstring);
|
free(missdepstring);
|
||||||
if(data) {
|
if(data) {
|
||||||
pmdepmissing_t *missd = _alpm_depmiss_new(miss->target,
|
*data = alpm_list_add(*data, miss);
|
||||||
miss->depend, miss->causingpkg);
|
|
||||||
if(missd) {
|
|
||||||
*data = alpm_list_add(*data, missd);
|
|
||||||
}
|
}
|
||||||
}
|
ret = -1;
|
||||||
alpm_list_free(*packages);
|
|
||||||
*packages = packages_copy;
|
|
||||||
alpm_list_free_inner(deps, (alpm_list_fn_free)_alpm_depmiss_free);
|
|
||||||
alpm_list_free(deps);
|
|
||||||
return(-1);
|
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(PM_LOG_DEBUG, "pulling dependency %s (needed by %s)\n",
|
_alpm_log(PM_LOG_DEBUG, "pulling dependency %s (needed by %s)\n",
|
||||||
alpm_pkg_get_name(spkg), alpm_pkg_get_name(tpkg));
|
alpm_pkg_get_name(spkg), alpm_pkg_get_name(tpkg));
|
||||||
*packages = alpm_list_add(*packages, spkg);
|
*packages = alpm_list_add(*packages, spkg);
|
||||||
|
_alpm_depmiss_free(miss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
alpm_list_free_inner(deps, (alpm_list_fn_free)_alpm_depmiss_free);
|
|
||||||
alpm_list_free(deps);
|
alpm_list_free(deps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ret != 0) {
|
||||||
|
alpm_list_free(*packages);
|
||||||
|
*packages = packages_copy;
|
||||||
|
} else {
|
||||||
alpm_list_free(packages_copy);
|
alpm_list_free(packages_copy);
|
||||||
|
}
|
||||||
_alpm_log(PM_LOG_DEBUG, "finished resolving dependencies\n");
|
_alpm_log(PM_LOG_DEBUG, "finished resolving dependencies\n");
|
||||||
return(0);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Does pkg1 depend on pkg2, ie. does pkg2 satisfy a dependency of pkg1? */
|
/* Does pkg1 depend on pkg2, ie. does pkg2 satisfy a dependency of pkg1? */
|
||||||
@@ -672,7 +751,7 @@ int _alpm_dep_edge(pmpkg_t *pkg1, pmpkg_t *pkg2)
|
|||||||
{
|
{
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
for(i = alpm_pkg_get_depends(pkg1); i; i = i->next) {
|
for(i = alpm_pkg_get_depends(pkg1); i; i = i->next) {
|
||||||
if(alpm_depcmp(pkg2, i->data)) {
|
if(_alpm_depcmp_tolerant(pkg2, i->data)) {
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* deps.h
|
* deps.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
@@ -29,9 +29,10 @@
|
|||||||
|
|
||||||
/* Dependency */
|
/* Dependency */
|
||||||
struct __pmdepend_t {
|
struct __pmdepend_t {
|
||||||
pmdepmod_t mod;
|
|
||||||
char *name;
|
char *name;
|
||||||
char *version;
|
char *version;
|
||||||
|
unsigned long name_hash;
|
||||||
|
pmdepmod_t mod;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Missing dependency */
|
/* Missing dependency */
|
||||||
@@ -55,6 +56,8 @@ int _alpm_resolvedeps(alpm_list_t *localpkgs, alpm_list_t *dbs_sync, pmpkg_t *pk
|
|||||||
int _alpm_dep_edge(pmpkg_t *pkg1, pmpkg_t *pkg2);
|
int _alpm_dep_edge(pmpkg_t *pkg1, pmpkg_t *pkg2);
|
||||||
pmdepend_t *_alpm_splitdep(const char *depstring);
|
pmdepend_t *_alpm_splitdep(const char *depstring);
|
||||||
pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep);
|
pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep);
|
||||||
|
int _alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep);
|
||||||
|
int _alpm_depcmp_tolerant(pmpkg_t *pkg, pmdepend_t *dep);
|
||||||
|
|
||||||
#endif /* _ALPM_DEPS_H */
|
#endif /* _ALPM_DEPS_H */
|
||||||
|
|
||||||
|
|||||||
347
lib/libalpm/diskspace.c
Normal file
347
lib/libalpm/diskspace.c
Normal file
@@ -0,0 +1,347 @@
|
|||||||
|
/*
|
||||||
|
* diskspace.c
|
||||||
|
*
|
||||||
|
* Copyright (c) 2010-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#if defined(HAVE_MNTENT_H)
|
||||||
|
#include <mntent.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_SYS_STATVFS_H)
|
||||||
|
#include <sys/statvfs.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_SYS_PARAM_H)
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_SYS_MOUNT_H)
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_SYS_UCRED_H)
|
||||||
|
#include <sys/ucred.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_SYS_TYPES_H)
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* libarchive */
|
||||||
|
#include <archive.h>
|
||||||
|
#include <archive_entry.h>
|
||||||
|
|
||||||
|
/* libalpm */
|
||||||
|
#include "diskspace.h"
|
||||||
|
#include "alpm_list.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "log.h"
|
||||||
|
#include "trans.h"
|
||||||
|
#include "handle.h"
|
||||||
|
|
||||||
|
static int mount_point_cmp(const void *p1, const void *p2)
|
||||||
|
{
|
||||||
|
const alpm_mountpoint_t *mp1 = p1;
|
||||||
|
const alpm_mountpoint_t *mp2 = p2;
|
||||||
|
/* the negation will sort all mountpoints before their parent */
|
||||||
|
return(-strcmp(mp1->mount_dir, mp2->mount_dir));
|
||||||
|
}
|
||||||
|
|
||||||
|
static alpm_list_t *mount_point_list(void)
|
||||||
|
{
|
||||||
|
alpm_list_t *mount_points = NULL;
|
||||||
|
alpm_mountpoint_t *mp;
|
||||||
|
|
||||||
|
#if defined HAVE_GETMNTENT
|
||||||
|
struct mntent *mnt;
|
||||||
|
FILE *fp;
|
||||||
|
struct statvfs fsp;
|
||||||
|
|
||||||
|
fp = setmntent(MOUNTED, "r");
|
||||||
|
|
||||||
|
if (fp == NULL) {
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
while((mnt = getmntent(fp))) {
|
||||||
|
if(!mnt) {
|
||||||
|
_alpm_log(PM_LOG_WARNING, _("could not get filesystem information\n"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(statvfs(mnt->mnt_dir, &fsp) != 0) {
|
||||||
|
_alpm_log(PM_LOG_WARNING,
|
||||||
|
_("could not get filesystem information for %s: %s\n"),
|
||||||
|
mnt->mnt_dir, strerror(errno));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
mp->mount_dir = strdup(mnt->mnt_dir);
|
||||||
|
mp->mount_dir_len = strlen(mp->mount_dir);
|
||||||
|
memcpy(&(mp->fsp), &fsp, sizeof(struct statvfs));
|
||||||
|
mp->read_only = fsp.f_flag & ST_RDONLY;
|
||||||
|
|
||||||
|
mount_points = alpm_list_add(mount_points, mp);
|
||||||
|
}
|
||||||
|
|
||||||
|
endmntent(fp);
|
||||||
|
#elif defined HAVE_GETMNTINFO
|
||||||
|
int entries;
|
||||||
|
FSSTATSTYPE *fsp;
|
||||||
|
|
||||||
|
entries = getmntinfo(&fsp, MNT_NOWAIT);
|
||||||
|
|
||||||
|
if (entries < 0) {
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(; entries-- > 0; fsp++) {
|
||||||
|
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
mp->mount_dir = strdup(fsp->f_mntonname);
|
||||||
|
mp->mount_dir_len = strlen(mp->mount_dir);
|
||||||
|
memcpy(&(mp->fsp), fsp, sizeof(FSSTATSTYPE));
|
||||||
|
#if defined HAVE_STRUCT_STATVFS_F_FLAG
|
||||||
|
mp->read_only = fsp->f_flag & ST_RDONLY;
|
||||||
|
#elif defined HAVE_STRUCT_STATFS_F_FLAGS
|
||||||
|
mp->read_only = fsp->f_flags & MNT_RDONLY;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mount_points = alpm_list_add(mount_points, mp);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mount_points = alpm_list_msort(mount_points, alpm_list_count(mount_points),
|
||||||
|
mount_point_cmp);
|
||||||
|
return(mount_points);
|
||||||
|
}
|
||||||
|
|
||||||
|
static alpm_mountpoint_t *match_mount_point(const alpm_list_t *mount_points,
|
||||||
|
const char *real_path)
|
||||||
|
{
|
||||||
|
const alpm_list_t *mp;
|
||||||
|
|
||||||
|
for(mp = mount_points; mp != NULL; mp = mp->next) {
|
||||||
|
alpm_mountpoint_t *data = mp->data;
|
||||||
|
|
||||||
|
if(strncmp(data->mount_dir, real_path, data->mount_dir_len) == 0) {
|
||||||
|
return(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* should not get here... */
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int calculate_removed_size(const alpm_list_t *mount_points,
|
||||||
|
pmpkg_t *pkg)
|
||||||
|
{
|
||||||
|
alpm_list_t *file;
|
||||||
|
|
||||||
|
alpm_list_t *files = alpm_pkg_get_files(pkg);
|
||||||
|
for(file = files; file; file = file->next) {
|
||||||
|
alpm_mountpoint_t *mp;
|
||||||
|
struct stat st;
|
||||||
|
char path[PATH_MAX];
|
||||||
|
const char *filename = file->data;
|
||||||
|
|
||||||
|
snprintf(path, PATH_MAX, "%s%s", handle->root, filename);
|
||||||
|
_alpm_lstat(path, &st);
|
||||||
|
|
||||||
|
/* skip directories and symlinks to be consistent with libarchive that
|
||||||
|
* reports them to be zero size */
|
||||||
|
if(S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
mp = match_mount_point(mount_points, path);
|
||||||
|
if(mp == NULL) {
|
||||||
|
_alpm_log(PM_LOG_WARNING,
|
||||||
|
_("could not determine mount point for file %s"), filename);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the addition of (divisor - 1) performs ceil() with integer division */
|
||||||
|
mp->blocks_needed -=
|
||||||
|
(st.st_size + mp->fsp.f_bsize - 1l) / mp->fsp.f_bsize;
|
||||||
|
mp->used |= USED_REMOVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int calculate_installed_size(const alpm_list_t *mount_points,
|
||||||
|
pmpkg_t *pkg)
|
||||||
|
{
|
||||||
|
int ret=0;
|
||||||
|
struct archive *archive;
|
||||||
|
struct archive_entry *entry;
|
||||||
|
|
||||||
|
if ((archive = archive_read_new()) == NULL) {
|
||||||
|
pm_errno = PM_ERR_LIBARCHIVE;
|
||||||
|
ret = -1;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
archive_read_support_compression_all(archive);
|
||||||
|
archive_read_support_format_all(archive);
|
||||||
|
|
||||||
|
if(archive_read_open_filename(archive, pkg->origin_data.file,
|
||||||
|
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
|
||||||
|
pm_errno = PM_ERR_PKG_OPEN;
|
||||||
|
ret = -1;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
|
||||||
|
alpm_mountpoint_t *mp;
|
||||||
|
const char *filename;
|
||||||
|
mode_t mode;
|
||||||
|
char path[PATH_MAX];
|
||||||
|
|
||||||
|
filename = archive_entry_pathname(entry);
|
||||||
|
mode = archive_entry_mode(entry);
|
||||||
|
|
||||||
|
/* libarchive reports these as zero size anyways */
|
||||||
|
/* NOTE: if we do start accounting for directory size, a dir matching a
|
||||||
|
* mountpoint needs to be attributed to the parent, not the mountpoint. */
|
||||||
|
if(S_ISDIR(mode) || S_ISLNK(mode)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* approximate space requirements for db entries */
|
||||||
|
if(filename[0] == '.') {
|
||||||
|
filename = alpm_option_get_dbpath();
|
||||||
|
}
|
||||||
|
|
||||||
|
snprintf(path, PATH_MAX, "%s%s", handle->root, filename);
|
||||||
|
|
||||||
|
mp = match_mount_point(mount_points, path);
|
||||||
|
if(mp == NULL) {
|
||||||
|
_alpm_log(PM_LOG_WARNING,
|
||||||
|
_("could not determine mount point for file %s"), filename);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the addition of (divisor - 1) performs ceil() with integer division */
|
||||||
|
mp->blocks_needed +=
|
||||||
|
(archive_entry_size(entry) + mp->fsp.f_bsize - 1l) / mp->fsp.f_bsize;
|
||||||
|
mp->used |= USED_INSTALL;
|
||||||
|
|
||||||
|
if(archive_read_data_skip(archive)) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("error while reading package %s: %s\n"),
|
||||||
|
pkg->name, archive_error_string(archive));
|
||||||
|
pm_errno = PM_ERR_LIBARCHIVE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
archive_read_finish(archive);
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
int _alpm_check_diskspace(pmtrans_t *trans, pmdb_t *db_local)
|
||||||
|
{
|
||||||
|
alpm_list_t *mount_points, *i;
|
||||||
|
size_t replaces = 0, current = 0, numtargs;
|
||||||
|
int abort = 0;
|
||||||
|
alpm_list_t *targ;
|
||||||
|
|
||||||
|
numtargs = alpm_list_count(trans->add);
|
||||||
|
mount_points = mount_point_list();
|
||||||
|
if(mount_points == NULL) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("could not determine filesystem mount points"));
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
replaces = alpm_list_count(trans->remove);
|
||||||
|
if(replaces) {
|
||||||
|
numtargs += replaces;
|
||||||
|
for(targ = trans->remove; targ; targ = targ->next, current++) {
|
||||||
|
pmpkg_t *local_pkg;
|
||||||
|
int percent = (current * 100) / numtargs;
|
||||||
|
PROGRESS(trans, PM_TRANS_PROGRESS_DISKSPACE_START, "", percent,
|
||||||
|
numtargs, current);
|
||||||
|
|
||||||
|
local_pkg = targ->data;
|
||||||
|
calculate_removed_size(mount_points, local_pkg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(targ = trans->add; targ; targ = targ->next, current++) {
|
||||||
|
pmpkg_t *pkg, *local_pkg;
|
||||||
|
int percent = (current * 100) / numtargs;
|
||||||
|
PROGRESS(trans, PM_TRANS_PROGRESS_DISKSPACE_START, "", percent,
|
||||||
|
numtargs, current);
|
||||||
|
|
||||||
|
pkg = targ->data;
|
||||||
|
/* is this package already installed? */
|
||||||
|
local_pkg = _alpm_db_get_pkgfromcache(db_local, pkg->name);
|
||||||
|
if(local_pkg) {
|
||||||
|
calculate_removed_size(mount_points, local_pkg);
|
||||||
|
}
|
||||||
|
calculate_installed_size(mount_points, pkg);
|
||||||
|
|
||||||
|
for(i = mount_points; i; i = alpm_list_next(i)) {
|
||||||
|
alpm_mountpoint_t *data = i->data;
|
||||||
|
if(data->blocks_needed > data->max_blocks_needed) {
|
||||||
|
data->max_blocks_needed = data->blocks_needed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PROGRESS(trans, PM_TRANS_PROGRESS_DISKSPACE_START, "", 100,
|
||||||
|
numtargs, current);
|
||||||
|
|
||||||
|
for(i = mount_points; i; i = alpm_list_next(i)) {
|
||||||
|
alpm_mountpoint_t *data = i->data;
|
||||||
|
if(data->used && data->read_only) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("Partition %s is mounted read only\n"),
|
||||||
|
data->mount_dir);
|
||||||
|
abort = 1;
|
||||||
|
} else if(data->used & USED_INSTALL) {
|
||||||
|
/* cushion is roughly min(5% capacity, 20MiB) */
|
||||||
|
long fivepc = ((long)data->fsp.f_blocks / 20) + 1;
|
||||||
|
long twentymb = (20 * 1024 * 1024 / (long)data->fsp.f_bsize) + 1;
|
||||||
|
long cushion = fivepc < twentymb ? fivepc : twentymb;
|
||||||
|
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "partition %s, needed %ld, cushion %ld, free %ld\n",
|
||||||
|
data->mount_dir, data->max_blocks_needed, cushion,
|
||||||
|
(unsigned long)data->fsp.f_bfree);
|
||||||
|
if(data->max_blocks_needed + cushion >= 0 &&
|
||||||
|
(unsigned long)(data->max_blocks_needed + cushion) > data->fsp.f_bfree) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("Partition %s too full: %ld blocks needed, %ld blocks free\n"),
|
||||||
|
data->mount_dir, data->max_blocks_needed + cushion,
|
||||||
|
(unsigned long)data->fsp.f_bfree);
|
||||||
|
abort = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = mount_points; i; i = alpm_list_next(i)) {
|
||||||
|
alpm_mountpoint_t *data = i->data;
|
||||||
|
FREE(data->mount_dir);
|
||||||
|
}
|
||||||
|
FREELIST(mount_points);
|
||||||
|
|
||||||
|
if(abort) {
|
||||||
|
RET_ERR(PM_ERR_DISK_SPACE, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
53
lib/libalpm/diskspace.h
Normal file
53
lib/libalpm/diskspace.h
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* diskspace.h
|
||||||
|
*
|
||||||
|
* Copyright (c) 2010-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ALPM_DISKSPACE_H
|
||||||
|
#define _ALPM_DISKSPACE_H
|
||||||
|
|
||||||
|
#if defined(HAVE_SYS_MOUNT_H)
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_SYS_STATVFS_H)
|
||||||
|
#include <sys/statvfs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "alpm.h"
|
||||||
|
|
||||||
|
enum mount_used_level {
|
||||||
|
USED_REMOVE = 1,
|
||||||
|
USED_INSTALL = (1 << 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct __alpm_mountpoint_t {
|
||||||
|
/* mount point information */
|
||||||
|
char *mount_dir;
|
||||||
|
size_t mount_dir_len;
|
||||||
|
/* storage for additional disk usage calculations */
|
||||||
|
long blocks_needed;
|
||||||
|
long max_blocks_needed;
|
||||||
|
enum mount_used_level used;
|
||||||
|
int read_only;
|
||||||
|
FSSTATSTYPE fsp;
|
||||||
|
} alpm_mountpoint_t;
|
||||||
|
|
||||||
|
int _alpm_check_diskspace(pmtrans_t *trans, pmdb_t *db_local);
|
||||||
|
|
||||||
|
#endif /* _ALPM_DISKSPACE_H */
|
||||||
|
|
||||||
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* download.c
|
* download.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -29,16 +29,13 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <limits.h>
|
/* the following two are needed for FreeBSD's libfetch */
|
||||||
/* the following two are needed on BSD for libfetch */
|
#include <limits.h> /* PATH_MAX */
|
||||||
#if defined(HAVE_SYS_SYSLIMITS_H)
|
|
||||||
#include <sys/syslimits.h> /* PATH_MAX */
|
|
||||||
#endif
|
|
||||||
#if defined(HAVE_SYS_PARAM_H)
|
#if defined(HAVE_SYS_PARAM_H)
|
||||||
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(INTERNAL_DOWNLOAD)
|
#ifdef HAVE_LIBFETCH
|
||||||
#include <fetch.h>
|
#include <fetch.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -58,7 +55,7 @@ static char *get_filename(const char *url) {
|
|||||||
return(filename);
|
return(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(INTERNAL_DOWNLOAD)
|
#ifdef HAVE_LIBFETCH
|
||||||
static char *get_destfile(const char *path, const char *filename) {
|
static char *get_destfile(const char *path, const char *filename) {
|
||||||
char *destfile;
|
char *destfile;
|
||||||
/* len = localpath len + filename len + null */
|
/* len = localpath len + filename len + null */
|
||||||
@@ -89,7 +86,7 @@ static const char *gethost(struct url *fileurl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int dload_interrupted;
|
int dload_interrupted;
|
||||||
static RETSIGTYPE inthandler(int signum)
|
static void inthandler(int signum)
|
||||||
{
|
{
|
||||||
dload_interrupted = 1;
|
dload_interrupted = 1;
|
||||||
}
|
}
|
||||||
@@ -131,13 +128,13 @@ static int download_internal(const char *url, const char *localpath,
|
|||||||
destfile = get_destfile(localpath, filename);
|
destfile = get_destfile(localpath, filename);
|
||||||
tempfile = get_tempfile(localpath, filename);
|
tempfile = get_tempfile(localpath, filename);
|
||||||
|
|
||||||
if(stat(tempfile, &st) == 0 && st.st_size > 0) {
|
if(stat(tempfile, &st) == 0 && S_ISREG(st.st_mode) && st.st_size > 0) {
|
||||||
_alpm_log(PM_LOG_DEBUG, "tempfile found, attempting continuation\n");
|
_alpm_log(PM_LOG_DEBUG, "tempfile found, attempting continuation\n");
|
||||||
local_time = fileurl->last_modified = st.st_mtime;
|
local_time = fileurl->last_modified = st.st_mtime;
|
||||||
local_size = fileurl->offset = (off_t)st.st_size;
|
local_size = fileurl->offset = (off_t)st.st_size;
|
||||||
dl_thisfile = st.st_size;
|
dl_thisfile = st.st_size;
|
||||||
localf = fopen(tempfile, "ab");
|
localf = fopen(tempfile, "ab");
|
||||||
} else if(!force && stat(destfile, &st) == 0 && st.st_size > 0) {
|
} else if(!force && stat(destfile, &st) == 0 && S_ISREG(st.st_mode) && st.st_size > 0) {
|
||||||
_alpm_log(PM_LOG_DEBUG, "destfile found, using mtime only\n");
|
_alpm_log(PM_LOG_DEBUG, "destfile found, using mtime only\n");
|
||||||
local_time = fileurl->last_modified = st.st_mtime;
|
local_time = fileurl->last_modified = st.st_mtime;
|
||||||
local_size = /* no fu->off here */ (off_t)st.st_size;
|
local_size = /* no fu->off here */ (off_t)st.st_size;
|
||||||
@@ -175,6 +172,14 @@ static int download_internal(const char *url, const char *localpath,
|
|||||||
/* NOTE: libfetch does not reset the error code, be sure to do it before
|
/* NOTE: libfetch does not reset the error code, be sure to do it before
|
||||||
* calls into the library */
|
* calls into the library */
|
||||||
|
|
||||||
|
/* TODO: if we call fetchStat() and get a redirect (disabling automagic
|
||||||
|
* redirect following), we should repeat the file locator stuff and get a new
|
||||||
|
* filename rather than only base if off the first URL, and then verify
|
||||||
|
* get_filename() didn't return ''. Of course, libfetch might not even allow
|
||||||
|
* us to even get that URL...FS#22645. This would allow us to download things
|
||||||
|
* without totally puking like
|
||||||
|
* http://www.archlinux.org/packages/community/x86_64/exim/download/ */
|
||||||
|
|
||||||
/* find out the remote size *and* mtime in one go. there is a lot of
|
/* find out the remote size *and* mtime in one go. there is a lot of
|
||||||
* trouble in trying to do both size and "if-modified-since" logic in a
|
* trouble in trying to do both size and "if-modified-since" logic in a
|
||||||
* non-stat request, so avoid it. */
|
* non-stat request, so avoid it. */
|
||||||
@@ -250,8 +255,8 @@ static int download_internal(const char *url, const char *localpath,
|
|||||||
while((nread = fetchIO_read(dlf, buffer, PM_DLBUF_LEN)) > 0) {
|
while((nread = fetchIO_read(dlf, buffer, PM_DLBUF_LEN)) > 0) {
|
||||||
check_stop();
|
check_stop();
|
||||||
size_t nwritten = 0;
|
size_t nwritten = 0;
|
||||||
nwritten = fwrite(buffer, 1, nread, localf);
|
nwritten = fwrite(buffer, 1, (size_t)nread, localf);
|
||||||
if((nwritten != nread) || ferror(localf)) {
|
if((nwritten != (size_t)nread) || ferror(localf)) {
|
||||||
pm_errno = PM_ERR_RETRIEVE;
|
pm_errno = PM_ERR_RETRIEVE;
|
||||||
_alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s\n"),
|
_alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s\n"),
|
||||||
tempfile, strerror(errno));
|
tempfile, strerror(errno));
|
||||||
@@ -299,7 +304,11 @@ static int download_internal(const char *url, const char *localpath,
|
|||||||
tv[1].tv_sec = ust.mtime;
|
tv[1].tv_sec = ust.mtime;
|
||||||
utimes(tempfile, tv);
|
utimes(tempfile, tv);
|
||||||
}
|
}
|
||||||
rename(tempfile, destfile);
|
if(rename(tempfile, destfile)) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("could not rename %s to %s (%s)\n"),
|
||||||
|
tempfile, destfile, strerror(errno));
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@@ -338,7 +347,7 @@ cleanup:
|
|||||||
static int download(const char *url, const char *localpath,
|
static int download(const char *url, const char *localpath,
|
||||||
int force) {
|
int force) {
|
||||||
if(handle->fetchcb == NULL) {
|
if(handle->fetchcb == NULL) {
|
||||||
#if defined(INTERNAL_DOWNLOAD)
|
#ifdef HAVE_LIBFETCH
|
||||||
return(download_internal(url, localpath, force));
|
return(download_internal(url, localpath, force));
|
||||||
#else
|
#else
|
||||||
RET_ERR(PM_ERR_EXTERNAL_DOWNLOAD, -1);
|
RET_ERR(PM_ERR_EXTERNAL_DOWNLOAD, -1);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* dload.h
|
* dload.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* error.c
|
* error.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -22,16 +22,13 @@
|
|||||||
|
|
||||||
/* TODO: needed for the libfetch stuff, unfortunately- we should kill it */
|
/* TODO: needed for the libfetch stuff, unfortunately- we should kill it */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <limits.h>
|
/* the following two are needed for FreeBSD's libfetch */
|
||||||
/* the following two are needed on BSD for libfetch */
|
#include <limits.h> /* PATH_MAX */
|
||||||
#if defined(HAVE_SYS_SYSLIMITS_H)
|
|
||||||
#include <sys/syslimits.h> /* PATH_MAX */
|
|
||||||
#endif
|
|
||||||
#if defined(HAVE_SYS_PARAM_H)
|
#if defined(HAVE_SYS_PARAM_H)
|
||||||
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(INTERNAL_DOWNLOAD)
|
#ifdef HAVE_LIBFETCH
|
||||||
#include <fetch.h> /* fetchLastErrString */
|
#include <fetch.h> /* fetchLastErrString */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -60,6 +57,8 @@ const char SYMEXPORT *alpm_strerror(int err)
|
|||||||
return _("could not find or read directory");
|
return _("could not find or read directory");
|
||||||
case PM_ERR_WRONG_ARGS:
|
case PM_ERR_WRONG_ARGS:
|
||||||
return _("wrong or NULL argument passed");
|
return _("wrong or NULL argument passed");
|
||||||
|
case PM_ERR_DISK_SPACE:
|
||||||
|
return _("not enough free disk space");
|
||||||
/* Interface */
|
/* Interface */
|
||||||
case PM_ERR_HANDLE_NULL:
|
case PM_ERR_HANDLE_NULL:
|
||||||
return _("library not initialized");
|
return _("library not initialized");
|
||||||
@@ -78,6 +77,8 @@ const char SYMEXPORT *alpm_strerror(int err)
|
|||||||
return _("database already registered");
|
return _("database already registered");
|
||||||
case PM_ERR_DB_NOT_FOUND:
|
case PM_ERR_DB_NOT_FOUND:
|
||||||
return _("could not find database");
|
return _("could not find database");
|
||||||
|
case PM_ERR_DB_VERSION:
|
||||||
|
return _("database is incorrect version");
|
||||||
case PM_ERR_DB_WRITE:
|
case PM_ERR_DB_WRITE:
|
||||||
return _("could not update database");
|
return _("could not update database");
|
||||||
case PM_ERR_DB_REMOVE:
|
case PM_ERR_DB_REMOVE:
|
||||||
@@ -136,6 +137,8 @@ const char SYMEXPORT *alpm_strerror(int err)
|
|||||||
/* Miscellaenous */
|
/* Miscellaenous */
|
||||||
case PM_ERR_RETRIEVE:
|
case PM_ERR_RETRIEVE:
|
||||||
return _("failed to retrieve some files");
|
return _("failed to retrieve some files");
|
||||||
|
case PM_ERR_WRITE:
|
||||||
|
return _("failed to copy some file");
|
||||||
case PM_ERR_INVALID_REGEX:
|
case PM_ERR_INVALID_REGEX:
|
||||||
return _("invalid regular expression");
|
return _("invalid regular expression");
|
||||||
/* Errors from external libraries- our own wrapper error */
|
/* Errors from external libraries- our own wrapper error */
|
||||||
@@ -145,7 +148,7 @@ const char SYMEXPORT *alpm_strerror(int err)
|
|||||||
* error string instead. */
|
* error string instead. */
|
||||||
return _("libarchive error");
|
return _("libarchive error");
|
||||||
case PM_ERR_LIBFETCH:
|
case PM_ERR_LIBFETCH:
|
||||||
#if defined(INTERNAL_DOWNLOAD)
|
#ifdef HAVE_LIBFETCH
|
||||||
return fetchLastErrString;
|
return fetchLastErrString;
|
||||||
#else
|
#else
|
||||||
/* obviously shouldn't get here... */
|
/* obviously shouldn't get here... */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* graph.h - helpful graph structure and setup/teardown methods
|
* graph.h - helpful graph structure and setup/teardown methods
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -21,8 +21,7 @@
|
|||||||
#include <sys/types.h> /* off_t */
|
#include <sys/types.h> /* off_t */
|
||||||
|
|
||||||
#include "alpm_list.h"
|
#include "alpm_list.h"
|
||||||
#include "util.h" /* MALLOC() */
|
#include "util.h" /* CALLOC() */
|
||||||
#include "alpm.h"
|
|
||||||
|
|
||||||
struct __pmgraph_t {
|
struct __pmgraph_t {
|
||||||
char state; /* 0: untouched, -1: entered, other: leaving time */
|
char state; /* 0: untouched, -1: entered, other: leaving time */
|
||||||
@@ -38,15 +37,7 @@ static pmgraph_t *_alpm_graph_new(void)
|
|||||||
{
|
{
|
||||||
pmgraph_t *graph = NULL;
|
pmgraph_t *graph = NULL;
|
||||||
|
|
||||||
MALLOC(graph, sizeof(pmgraph_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(graph, 1, sizeof(pmgraph_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
if(graph) {
|
|
||||||
graph->state = 0;
|
|
||||||
graph->data = NULL;
|
|
||||||
graph->parent = NULL;
|
|
||||||
graph->children = NULL;
|
|
||||||
graph->childptr = NULL;
|
|
||||||
}
|
|
||||||
return(graph);
|
return(graph);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* group.c
|
* group.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* group.h
|
* group.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* handle.c
|
* handle.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||||
@@ -49,7 +49,6 @@ pmhandle_t *_alpm_handle_new()
|
|||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
handle->lckfd = -1;
|
|
||||||
|
|
||||||
return(handle);
|
return(handle);
|
||||||
}
|
}
|
||||||
@@ -232,6 +231,15 @@ int SYMEXPORT alpm_option_get_usedelta()
|
|||||||
return handle->usedelta;
|
return handle->usedelta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SYMEXPORT alpm_option_get_checkspace()
|
||||||
|
{
|
||||||
|
if (handle == NULL) {
|
||||||
|
pm_errno = PM_ERR_HANDLE_NULL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return handle->checkspace;
|
||||||
|
}
|
||||||
|
|
||||||
pmdb_t SYMEXPORT *alpm_option_get_localdb()
|
pmdb_t SYMEXPORT *alpm_option_get_localdb()
|
||||||
{
|
{
|
||||||
if (handle == NULL) {
|
if (handle == NULL) {
|
||||||
@@ -550,4 +558,9 @@ void SYMEXPORT alpm_option_set_usedelta(int usedelta)
|
|||||||
handle->usedelta = usedelta;
|
handle->usedelta = usedelta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SYMEXPORT alpm_option_set_checkspace(int checkspace)
|
||||||
|
{
|
||||||
|
handle->checkspace = checkspace;
|
||||||
|
}
|
||||||
|
|
||||||
/* vim: set ts=2 sw=2 noet: */
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* handle.h
|
* handle.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -34,7 +34,7 @@ typedef struct _pmhandle_t {
|
|||||||
pmdb_t *db_local; /* local db pointer */
|
pmdb_t *db_local; /* local db pointer */
|
||||||
alpm_list_t *dbs_sync; /* List of (pmdb_t *) */
|
alpm_list_t *dbs_sync; /* List of (pmdb_t *) */
|
||||||
FILE *logstream; /* log file stream pointer */
|
FILE *logstream; /* log file stream pointer */
|
||||||
int lckfd; /* lock file descriptor if one exists */
|
FILE *lckstream; /* lock file stream pointer if one exists */
|
||||||
pmtrans_t *trans;
|
pmtrans_t *trans;
|
||||||
|
|
||||||
/* callback functions */
|
/* callback functions */
|
||||||
@@ -60,12 +60,13 @@ typedef struct _pmhandle_t {
|
|||||||
int usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
|
int usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
|
||||||
char *arch; /* Architecture of packages we should allow */
|
char *arch; /* Architecture of packages we should allow */
|
||||||
int usedelta; /* Download deltas if possible */
|
int usedelta; /* Download deltas if possible */
|
||||||
|
int checkspace; /* Check disk space before installing */
|
||||||
} pmhandle_t;
|
} pmhandle_t;
|
||||||
|
|
||||||
/* global handle variable */
|
/* global handle variable */
|
||||||
extern pmhandle_t *handle;
|
extern pmhandle_t *handle;
|
||||||
|
|
||||||
pmhandle_t *_alpm_handle_new();
|
pmhandle_t *_alpm_handle_new(void);
|
||||||
void _alpm_handle_free(pmhandle_t *handle);
|
void _alpm_handle_free(pmhandle_t *handle);
|
||||||
|
|
||||||
#endif /* _ALPM_HANDLE_H */
|
#endif /* _ALPM_HANDLE_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* log.c
|
* log.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
* @param fmt output format
|
* @param fmt output format
|
||||||
* @return 0 on success, -1 on error (pm_errno is set accordingly)
|
* @return 0 on success, -1 on error (pm_errno is set accordingly)
|
||||||
*/
|
*/
|
||||||
int SYMEXPORT alpm_logaction(char *fmt, ...)
|
int SYMEXPORT alpm_logaction(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -88,7 +88,7 @@ int SYMEXPORT alpm_logaction(char *fmt, ...)
|
|||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
void _alpm_log(pmloglevel_t flag, char *fmt, ...)
|
void _alpm_log(pmloglevel_t flag, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
alpm_cb_log logcb = alpm_option_get_logcb();
|
alpm_cb_log logcb = alpm_option_get_logcb();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* log.h
|
* log.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
#define ALPM_LOG_FUNC
|
#define ALPM_LOG_FUNC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void _alpm_log(pmloglevel_t flag, char *fmt, ...) __attribute__((format(printf,2,3)));
|
void _alpm_log(pmloglevel_t flag, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||||
|
|
||||||
#endif /* _ALPM_LOG_H */
|
#endif /* _ALPM_LOG_H */
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
* int md5_file( char *path, unsigned char *output )
|
* int md5_file( char *path, unsigned char *output )
|
||||||
* to
|
* to
|
||||||
* int md5_file( const char *path, unsigned char *output )
|
* int md5_file( const char *path, unsigned char *output )
|
||||||
|
* * use a dynamically-allocated buffer in md5_file, and increase the size
|
||||||
|
* for performance reasons
|
||||||
* * various static/inline changes
|
* * various static/inline changes
|
||||||
*
|
*
|
||||||
* NOTE: XySSL has been renamed to PolarSSL, which is available at
|
* NOTE: XySSL has been renamed to PolarSSL, which is available at
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
|
||||||
@@ -309,11 +312,16 @@ int md5_file( const char *path, unsigned char output[16] )
|
|||||||
FILE *f;
|
FILE *f;
|
||||||
size_t n;
|
size_t n;
|
||||||
md5_context ctx;
|
md5_context ctx;
|
||||||
unsigned char buf[1024];
|
unsigned char *buf;
|
||||||
|
|
||||||
if( ( f = fopen( path, "rb" ) ) == NULL )
|
if( ( buf = calloc(8192, sizeof(unsigned char)) ) == NULL )
|
||||||
return( 1 );
|
return( 1 );
|
||||||
|
|
||||||
|
if( ( f = fopen( path, "rb" ) ) == NULL ) {
|
||||||
|
free( buf );
|
||||||
|
return( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
md5_starts( &ctx );
|
md5_starts( &ctx );
|
||||||
|
|
||||||
while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
|
while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
|
||||||
@@ -322,6 +330,7 @@ int md5_file( const char *path, unsigned char output[16] )
|
|||||||
md5_finish( &ctx, output );
|
md5_finish( &ctx, output );
|
||||||
|
|
||||||
memset( &ctx, 0, sizeof( md5_context ) );
|
memset( &ctx, 0, sizeof( md5_context ) );
|
||||||
|
free( buf );
|
||||||
|
|
||||||
if( ferror( f ) != 0 )
|
if( ferror( f ) != 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* package.c
|
* package.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -25,24 +25,18 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
/* libarchive */
|
|
||||||
#include <archive.h>
|
|
||||||
#include <archive_entry.h>
|
|
||||||
|
|
||||||
/* libalpm */
|
/* libalpm */
|
||||||
#include "package.h"
|
#include "package.h"
|
||||||
#include "alpm_list.h"
|
#include "alpm_list.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
#include "cache.h"
|
|
||||||
#include "delta.h"
|
#include "delta.h"
|
||||||
#include "handle.h"
|
#include "handle.h"
|
||||||
#include "deps.h"
|
#include "deps.h"
|
||||||
@@ -63,7 +57,7 @@ int SYMEXPORT alpm_pkg_free(pmpkg_t *pkg)
|
|||||||
ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
||||||
|
|
||||||
/* Only free packages loaded in user space */
|
/* Only free packages loaded in user space */
|
||||||
if(pkg->origin != PKG_FROM_CACHE) {
|
if(pkg->origin == PKG_FROM_FILE) {
|
||||||
_alpm_pkg_free(pkg);
|
_alpm_pkg_free(pkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,8 +77,7 @@ int SYMEXPORT alpm_pkg_checkmd5sum(pmpkg_t *pkg)
|
|||||||
|
|
||||||
ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
ASSERT(pkg != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
||||||
/* We only inspect packages from sync repositories */
|
/* We only inspect packages from sync repositories */
|
||||||
ASSERT(pkg->origin == PKG_FROM_CACHE, RET_ERR(PM_ERR_PKG_INVALID, -1));
|
ASSERT(pkg->origin == PKG_FROM_SYNCDB, RET_ERR(PM_ERR_PKG_INVALID, -1));
|
||||||
ASSERT(pkg->origin_data.db != handle->db_local, RET_ERR(PM_ERR_PKG_INVALID, -1));
|
|
||||||
|
|
||||||
fpath = _alpm_filecache_find(alpm_pkg_get_filename(pkg));
|
fpath = _alpm_filecache_find(alpm_pkg_get_filename(pkg));
|
||||||
|
|
||||||
@@ -100,334 +93,189 @@ int SYMEXPORT alpm_pkg_checkmd5sum(pmpkg_t *pkg)
|
|||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Default package accessor functions. These will get overridden by any
|
||||||
|
* backend logic that needs lazy access, such as the local database through
|
||||||
|
* a lazy-load cache. However, the defaults will work just fine for fully-
|
||||||
|
* populated package structures. */
|
||||||
|
static const char *_pkg_get_filename(pmpkg_t *pkg) { return pkg->filename; }
|
||||||
|
static const char *_pkg_get_name(pmpkg_t *pkg) { return pkg->name; }
|
||||||
|
static const char *_pkg_get_version(pmpkg_t *pkg) { return pkg->version; }
|
||||||
|
static const char *_pkg_get_desc(pmpkg_t *pkg) { return pkg->desc; }
|
||||||
|
static const char *_pkg_get_url(pmpkg_t *pkg) { return pkg->url; }
|
||||||
|
static time_t _pkg_get_builddate(pmpkg_t *pkg) { return pkg->builddate; }
|
||||||
|
static time_t _pkg_get_installdate(pmpkg_t *pkg) { return pkg->installdate; }
|
||||||
|
static const char *_pkg_get_packager(pmpkg_t *pkg) { return pkg->packager; }
|
||||||
|
static const char *_pkg_get_md5sum(pmpkg_t *pkg) { return pkg->md5sum; }
|
||||||
|
static const char *_pkg_get_arch(pmpkg_t *pkg) { return pkg->arch; }
|
||||||
|
static off_t _pkg_get_size(pmpkg_t *pkg) { return pkg->size; }
|
||||||
|
static off_t _pkg_get_isize(pmpkg_t *pkg) { return pkg->isize; }
|
||||||
|
static pmpkgreason_t _pkg_get_reason(pmpkg_t *pkg) { return pkg->reason; }
|
||||||
|
static int _pkg_has_scriptlet(pmpkg_t *pkg) { return pkg->scriptlet; }
|
||||||
|
|
||||||
|
static alpm_list_t *_pkg_get_licenses(pmpkg_t *pkg) { return pkg->licenses; }
|
||||||
|
static alpm_list_t *_pkg_get_groups(pmpkg_t *pkg) { return pkg->groups; }
|
||||||
|
static alpm_list_t *_pkg_get_depends(pmpkg_t *pkg) { return pkg->depends; }
|
||||||
|
static alpm_list_t *_pkg_get_optdepends(pmpkg_t *pkg) { return pkg->optdepends; }
|
||||||
|
static alpm_list_t *_pkg_get_conflicts(pmpkg_t *pkg) { return pkg->conflicts; }
|
||||||
|
static alpm_list_t *_pkg_get_provides(pmpkg_t *pkg) { return pkg->provides; }
|
||||||
|
static alpm_list_t *_pkg_get_replaces(pmpkg_t *pkg) { return pkg->replaces; }
|
||||||
|
static alpm_list_t *_pkg_get_deltas(pmpkg_t *pkg) { return pkg->deltas; }
|
||||||
|
static alpm_list_t *_pkg_get_files(pmpkg_t *pkg) { return pkg->files; }
|
||||||
|
static alpm_list_t *_pkg_get_backup(pmpkg_t *pkg) { return pkg->backup; }
|
||||||
|
|
||||||
|
/** The standard package operations struct. Get fields directly from the
|
||||||
|
* struct itself with no abstraction layer or any type of lazy loading.
|
||||||
|
*/
|
||||||
|
struct pkg_operations default_pkg_ops = {
|
||||||
|
.get_filename = _pkg_get_filename,
|
||||||
|
.get_name = _pkg_get_name,
|
||||||
|
.get_version = _pkg_get_version,
|
||||||
|
.get_desc = _pkg_get_desc,
|
||||||
|
.get_url = _pkg_get_url,
|
||||||
|
.get_builddate = _pkg_get_builddate,
|
||||||
|
.get_installdate = _pkg_get_installdate,
|
||||||
|
.get_packager = _pkg_get_packager,
|
||||||
|
.get_md5sum = _pkg_get_md5sum,
|
||||||
|
.get_arch = _pkg_get_arch,
|
||||||
|
.get_size = _pkg_get_size,
|
||||||
|
.get_isize = _pkg_get_isize,
|
||||||
|
.get_reason = _pkg_get_reason,
|
||||||
|
.has_scriptlet = _pkg_has_scriptlet,
|
||||||
|
.get_licenses = _pkg_get_licenses,
|
||||||
|
.get_groups = _pkg_get_groups,
|
||||||
|
.get_depends = _pkg_get_depends,
|
||||||
|
.get_optdepends = _pkg_get_optdepends,
|
||||||
|
.get_conflicts = _pkg_get_conflicts,
|
||||||
|
.get_provides = _pkg_get_provides,
|
||||||
|
.get_replaces = _pkg_get_replaces,
|
||||||
|
.get_deltas = _pkg_get_deltas,
|
||||||
|
.get_files = _pkg_get_files,
|
||||||
|
.get_backup = _pkg_get_backup,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Public functions for getting package information. These functions
|
||||||
|
* delegate the hard work to the function callbacks attached to each
|
||||||
|
* package, which depend on where the package was loaded from. */
|
||||||
const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_filename(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pkg->filename;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_name(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_name(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
return pkg->ops->get_name(pkg);
|
||||||
return pkg->name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_version(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_version(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
return pkg->ops->get_version(pkg);
|
||||||
return pkg->version;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_desc(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_desc(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_desc(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->desc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_url(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_url(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_url(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t SYMEXPORT alpm_pkg_get_builddate(pmpkg_t *pkg)
|
time_t SYMEXPORT alpm_pkg_get_builddate(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_builddate(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(0));
|
|
||||||
ASSERT(pkg != NULL, return(0));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->builddate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t SYMEXPORT alpm_pkg_get_installdate(pmpkg_t *pkg)
|
time_t SYMEXPORT alpm_pkg_get_installdate(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_installdate(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(0));
|
|
||||||
ASSERT(pkg != NULL, return(0));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->installdate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_packager(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_packager(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_packager(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->packager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_md5sum(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_md5sum(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_md5sum(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->md5sum;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_arch(pmpkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_arch(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_arch(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->arch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
off_t SYMEXPORT alpm_pkg_get_size(pmpkg_t *pkg)
|
off_t SYMEXPORT alpm_pkg_get_size(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_size(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(-1));
|
|
||||||
ASSERT(pkg != NULL, return(-1));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
off_t SYMEXPORT alpm_pkg_get_isize(pmpkg_t *pkg)
|
off_t SYMEXPORT alpm_pkg_get_isize(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_isize(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(-1));
|
|
||||||
ASSERT(pkg != NULL, return(-1));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->isize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pmpkgreason_t SYMEXPORT alpm_pkg_get_reason(pmpkg_t *pkg)
|
pmpkgreason_t SYMEXPORT alpm_pkg_get_reason(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_reason(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(-1));
|
|
||||||
ASSERT(pkg != NULL, return(-1));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->reason;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_licenses(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_licenses(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_licenses(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->licenses;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_groups(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_groups(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_groups(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->groups;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SYMEXPORT alpm_pkg_has_force(pmpkg_t *pkg)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(-1));
|
|
||||||
ASSERT(pkg != NULL, return(-1));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->force;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_depends(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_depends(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_depends(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
|
|
||||||
}
|
|
||||||
return pkg->depends;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_optdepends(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_optdepends(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_optdepends(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
|
|
||||||
}
|
|
||||||
return pkg->optdepends;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_conflicts(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_conflicts(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_conflicts(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
|
|
||||||
}
|
|
||||||
return pkg->conflicts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_provides(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_provides(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DEPENDS)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DEPENDS);
|
|
||||||
}
|
|
||||||
return pkg->provides;
|
|
||||||
}
|
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_deltas(pmpkg_t *pkg)
|
|
||||||
{
|
|
||||||
ALPM_LOG_FUNC;
|
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DELTAS)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DELTAS);
|
|
||||||
}
|
|
||||||
return pkg->deltas;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_replaces(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_replaces(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_replaces(pkg);
|
||||||
|
}
|
||||||
|
|
||||||
/* Sanity checks */
|
alpm_list_t SYMEXPORT *alpm_pkg_get_deltas(pmpkg_t *pkg)
|
||||||
ASSERT(handle != NULL, return(NULL));
|
{
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
return pkg->ops->get_deltas(pkg);
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
|
|
||||||
}
|
|
||||||
return pkg->replaces;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_files(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_files(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_files(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && pkg->origin_data.db == handle->db_local
|
|
||||||
&& !(pkg->infolevel & INFRQ_FILES)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_FILES);
|
|
||||||
}
|
|
||||||
return pkg->files;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t SYMEXPORT *alpm_pkg_get_backup(pmpkg_t *pkg)
|
alpm_list_t SYMEXPORT *alpm_pkg_get_backup(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->get_backup(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && pkg->origin_data.db == handle->db_local
|
|
||||||
&& !(pkg->infolevel & INFRQ_FILES)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_FILES);
|
|
||||||
}
|
|
||||||
return pkg->backup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pmdb_t SYMEXPORT *alpm_pkg_get_db(pmpkg_t *pkg)
|
pmdb_t SYMEXPORT *alpm_pkg_get_db(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
ASSERT(pkg != NULL, return(NULL));
|
||||||
ASSERT(pkg->origin == PKG_FROM_CACHE, return(NULL));
|
ASSERT(pkg->origin != PKG_FROM_FILE, return(NULL));
|
||||||
|
|
||||||
return(pkg->origin_data.db);
|
return(pkg->origin_data.db);
|
||||||
}
|
}
|
||||||
@@ -441,83 +289,31 @@ pmdb_t SYMEXPORT *alpm_pkg_get_db(pmpkg_t *pkg)
|
|||||||
*/
|
*/
|
||||||
void SYMEXPORT *alpm_pkg_changelog_open(pmpkg_t *pkg)
|
void SYMEXPORT *alpm_pkg_changelog_open(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->changelog_open(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(NULL));
|
|
||||||
ASSERT(pkg != NULL, return(NULL));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE) {
|
|
||||||
char clfile[PATH_MAX];
|
|
||||||
snprintf(clfile, PATH_MAX, "%s/%s/%s-%s/changelog",
|
|
||||||
alpm_option_get_dbpath(),
|
|
||||||
alpm_db_get_name(handle->db_local),
|
|
||||||
alpm_pkg_get_name(pkg),
|
|
||||||
alpm_pkg_get_version(pkg));
|
|
||||||
return fopen(clfile, "r");
|
|
||||||
} else if(pkg->origin == PKG_FROM_FILE) {
|
|
||||||
struct archive *archive = NULL;
|
|
||||||
struct archive_entry *entry;
|
|
||||||
const char *pkgfile = pkg->origin_data.file;
|
|
||||||
|
|
||||||
if((archive = archive_read_new()) == NULL) {
|
|
||||||
RET_ERR(PM_ERR_LIBARCHIVE, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
archive_read_support_compression_all(archive);
|
|
||||||
archive_read_support_format_all(archive);
|
|
||||||
|
|
||||||
if (archive_read_open_filename(archive, pkgfile,
|
|
||||||
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
|
|
||||||
RET_ERR(PM_ERR_PKG_OPEN, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
|
|
||||||
const char *entry_name = archive_entry_pathname(entry);
|
|
||||||
|
|
||||||
if(strcmp(entry_name, ".CHANGELOG") == 0) {
|
|
||||||
return(archive);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* we didn't find a changelog */
|
|
||||||
archive_read_finish(archive);
|
|
||||||
errno = ENOENT;
|
|
||||||
}
|
|
||||||
return(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read data from an open changelog 'file stream'. Similar to fread in
|
* Read data from an open changelog 'file stream'. Similar to fread in
|
||||||
* functionality, this function takes a buffer and amount of data to read.
|
* functionality, this function takes a buffer and amount of data to read. If an
|
||||||
|
* error occurs pm_errno will be set.
|
||||||
|
*
|
||||||
* @param ptr a buffer to fill with raw changelog data
|
* @param ptr a buffer to fill with raw changelog data
|
||||||
* @param size the size of the buffer
|
* @param size the size of the buffer
|
||||||
* @param pkg the package that the changelog is being read from
|
* @param pkg the package that the changelog is being read from
|
||||||
* @param fp a 'file stream' to the package changelog
|
* @param fp a 'file stream' to the package changelog
|
||||||
* @return the number of characters read, or 0 if there is no more data
|
* @return the number of characters read, or 0 if there is no more data or an
|
||||||
|
* error occurred.
|
||||||
*/
|
*/
|
||||||
size_t SYMEXPORT alpm_pkg_changelog_read(void *ptr, size_t size,
|
size_t SYMEXPORT alpm_pkg_changelog_read(void *ptr, size_t size,
|
||||||
const pmpkg_t *pkg, const void *fp)
|
const pmpkg_t *pkg, const void *fp)
|
||||||
{
|
{
|
||||||
size_t ret = 0;
|
return pkg->ops->changelog_read(ptr, size, pkg, fp);
|
||||||
if(pkg->origin == PKG_FROM_CACHE) {
|
|
||||||
ret = fread(ptr, 1, size, (FILE*)fp);
|
|
||||||
} else if(pkg->origin == PKG_FROM_FILE) {
|
|
||||||
ret = archive_read_data((struct archive*)fp, ptr, size);
|
|
||||||
}
|
|
||||||
return(ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
int SYMEXPORT alpm_pkg_changelog_feof(const pmpkg_t *pkg, void *fp)
|
int SYMEXPORT alpm_pkg_changelog_feof(const pmpkg_t *pkg, void *fp)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
return pkg->ops->changelog_feof(pkg, fp);
|
||||||
if(pkg->origin == PKG_FROM_CACHE) {
|
|
||||||
ret = feof((FILE*)fp);
|
|
||||||
} else if(pkg->origin == PKG_FROM_FILE) {
|
|
||||||
// note: this doesn't quite work, no feof in libarchive
|
|
||||||
ret = archive_read_data((struct archive*)fp, NULL, 0);
|
|
||||||
}
|
|
||||||
return(ret);
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -531,28 +327,12 @@ int SYMEXPORT alpm_pkg_changelog_feof(const pmpkg_t *pkg, void *fp)
|
|||||||
*/
|
*/
|
||||||
int SYMEXPORT alpm_pkg_changelog_close(const pmpkg_t *pkg, void *fp)
|
int SYMEXPORT alpm_pkg_changelog_close(const pmpkg_t *pkg, void *fp)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
return pkg->ops->changelog_close(pkg, fp);
|
||||||
if(pkg->origin == PKG_FROM_CACHE) {
|
|
||||||
ret = fclose((FILE*)fp);
|
|
||||||
} else if(pkg->origin == PKG_FROM_FILE) {
|
|
||||||
ret = archive_read_finish((struct archive *)fp);
|
|
||||||
}
|
|
||||||
return(ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg)
|
int SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
ALPM_LOG_FUNC;
|
return pkg->ops->has_scriptlet(pkg);
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(handle != NULL, return(-1));
|
|
||||||
ASSERT(pkg != NULL, return(-1));
|
|
||||||
|
|
||||||
if(pkg->origin == PKG_FROM_CACHE && pkg->origin_data.db == handle->db_local
|
|
||||||
&& !(pkg->infolevel & INFRQ_SCRIPTLET)) {
|
|
||||||
_alpm_db_read(pkg->origin_data.db, pkg, INFRQ_SCRIPTLET);
|
|
||||||
}
|
|
||||||
return pkg->scriptlet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void find_requiredby(pmpkg_t *pkg, pmdb_t *db, alpm_list_t **reqs)
|
static void find_requiredby(pmpkg_t *pkg, pmdb_t *db, alpm_list_t **reqs)
|
||||||
@@ -626,6 +406,7 @@ pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg)
|
|||||||
|
|
||||||
CALLOC(newpkg, 1, sizeof(pmpkg_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
CALLOC(newpkg, 1, sizeof(pmpkg_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
|
newpkg->name_hash = pkg->name_hash;
|
||||||
STRDUP(newpkg->filename, pkg->filename, RET_ERR(PM_ERR_MEMORY, newpkg));
|
STRDUP(newpkg->filename, pkg->filename, RET_ERR(PM_ERR_MEMORY, newpkg));
|
||||||
STRDUP(newpkg->name, pkg->name, RET_ERR(PM_ERR_MEMORY, newpkg));
|
STRDUP(newpkg->name, pkg->name, RET_ERR(PM_ERR_MEMORY, newpkg));
|
||||||
STRDUP(newpkg->version, pkg->version, RET_ERR(PM_ERR_MEMORY, newpkg));
|
STRDUP(newpkg->version, pkg->version, RET_ERR(PM_ERR_MEMORY, newpkg));
|
||||||
@@ -639,7 +420,6 @@ pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg)
|
|||||||
newpkg->size = pkg->size;
|
newpkg->size = pkg->size;
|
||||||
newpkg->isize = pkg->isize;
|
newpkg->isize = pkg->isize;
|
||||||
newpkg->scriptlet = pkg->scriptlet;
|
newpkg->scriptlet = pkg->scriptlet;
|
||||||
newpkg->force = pkg->force;
|
|
||||||
newpkg->reason = pkg->reason;
|
newpkg->reason = pkg->reason;
|
||||||
|
|
||||||
newpkg->licenses = alpm_list_strdup(pkg->licenses);
|
newpkg->licenses = alpm_list_strdup(pkg->licenses);
|
||||||
@@ -657,6 +437,7 @@ pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg)
|
|||||||
|
|
||||||
/* internal */
|
/* internal */
|
||||||
newpkg->origin = pkg->origin;
|
newpkg->origin = pkg->origin;
|
||||||
|
newpkg->ops = pkg->ops;
|
||||||
if(newpkg->origin == PKG_FROM_FILE) {
|
if(newpkg->origin == PKG_FROM_FILE) {
|
||||||
newpkg->origin_data.file = strdup(pkg->origin_data.file);
|
newpkg->origin_data.file = strdup(pkg->origin_data.file);
|
||||||
} else {
|
} else {
|
||||||
@@ -726,21 +507,13 @@ void _alpm_pkg_free_trans(pmpkg_t *pkg)
|
|||||||
pkg->removes = NULL;
|
pkg->removes = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is spkg an upgrade for locapkg? */
|
/* Is spkg an upgrade for localpkg? */
|
||||||
int _alpm_pkg_compare_versions(pmpkg_t *spkg, pmpkg_t *localpkg)
|
int _alpm_pkg_compare_versions(pmpkg_t *spkg, pmpkg_t *localpkg)
|
||||||
{
|
{
|
||||||
int cmp = 0;
|
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
cmp = alpm_pkg_vercmp(alpm_pkg_get_version(spkg),
|
return alpm_pkg_vercmp(alpm_pkg_get_version(spkg),
|
||||||
alpm_pkg_get_version(localpkg));
|
alpm_pkg_get_version(localpkg));
|
||||||
|
|
||||||
if(cmp < 0 && alpm_pkg_has_force(spkg)) {
|
|
||||||
cmp = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(cmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper function for comparing packages
|
/* Helper function for comparing packages
|
||||||
@@ -749,7 +522,7 @@ int _alpm_pkg_cmp(const void *p1, const void *p2)
|
|||||||
{
|
{
|
||||||
pmpkg_t *pkg1 = (pmpkg_t *)p1;
|
pmpkg_t *pkg1 = (pmpkg_t *)p1;
|
||||||
pmpkg_t *pkg2 = (pmpkg_t *)p2;
|
pmpkg_t *pkg2 = (pmpkg_t *)p2;
|
||||||
return(strcmp(pkg1->name, pkg2->name));
|
return(strcoll(pkg1->name, pkg2->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test for existence of a package in a alpm_list_t*
|
/* Test for existence of a package in a alpm_list_t*
|
||||||
@@ -758,6 +531,7 @@ int _alpm_pkg_cmp(const void *p1, const void *p2)
|
|||||||
pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle)
|
pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle)
|
||||||
{
|
{
|
||||||
alpm_list_t *lp;
|
alpm_list_t *lp;
|
||||||
|
unsigned long needle_hash;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
@@ -765,13 +539,23 @@ pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle)
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
needle_hash = _alpm_hash_sdbm(needle);
|
||||||
|
|
||||||
for(lp = haystack; lp; lp = lp->next) {
|
for(lp = haystack; lp; lp = lp->next) {
|
||||||
pmpkg_t *info = lp->data;
|
pmpkg_t *info = lp->data;
|
||||||
|
|
||||||
if(info && strcmp(info->name, needle) == 0) {
|
if(info) {
|
||||||
|
/* a zero hash will cause a fall-through just in case */
|
||||||
|
if(info->name_hash && info->name_hash != needle_hash) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* finally: we had hash match, verify string match */
|
||||||
|
if(strcmp(info->name, needle) == 0) {
|
||||||
return(info);
|
return(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* package.h
|
* package.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||||
@@ -31,27 +31,92 @@
|
|||||||
#include "db.h"
|
#include "db.h"
|
||||||
|
|
||||||
typedef enum _pmpkgfrom_t {
|
typedef enum _pmpkgfrom_t {
|
||||||
PKG_FROM_CACHE = 1,
|
PKG_FROM_FILE = 1,
|
||||||
PKG_FROM_FILE
|
PKG_FROM_LOCALDB,
|
||||||
|
PKG_FROM_SYNCDB
|
||||||
} pmpkgfrom_t;
|
} pmpkgfrom_t;
|
||||||
|
|
||||||
|
/** Package operations struct. This struct contains function pointers to
|
||||||
|
* all methods used to access data in a package to allow for things such
|
||||||
|
* as lazy package intialization (such as used by the file backend). Each
|
||||||
|
* backend is free to define a stuct containing pointers to a specific
|
||||||
|
* implementation of these methods. Some backends may find using the
|
||||||
|
* defined default_pkg_ops struct to work just fine for their needs.
|
||||||
|
*/
|
||||||
|
struct pkg_operations {
|
||||||
|
const char *(*get_filename) (pmpkg_t *);
|
||||||
|
const char *(*get_name) (pmpkg_t *);
|
||||||
|
const char *(*get_version) (pmpkg_t *);
|
||||||
|
const char *(*get_desc) (pmpkg_t *);
|
||||||
|
const char *(*get_url) (pmpkg_t *);
|
||||||
|
time_t (*get_builddate) (pmpkg_t *);
|
||||||
|
time_t (*get_installdate) (pmpkg_t *);
|
||||||
|
const char *(*get_packager) (pmpkg_t *);
|
||||||
|
const char *(*get_md5sum) (pmpkg_t *);
|
||||||
|
const char *(*get_arch) (pmpkg_t *);
|
||||||
|
off_t (*get_size) (pmpkg_t *);
|
||||||
|
off_t (*get_isize) (pmpkg_t *);
|
||||||
|
pmpkgreason_t (*get_reason) (pmpkg_t *);
|
||||||
|
int (*has_scriptlet) (pmpkg_t *);
|
||||||
|
|
||||||
|
alpm_list_t *(*get_licenses) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_groups) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_depends) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_optdepends) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_conflicts) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_provides) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_replaces) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_deltas) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_files) (pmpkg_t *);
|
||||||
|
alpm_list_t *(*get_backup) (pmpkg_t *);
|
||||||
|
|
||||||
|
void *(*changelog_open) (pmpkg_t *);
|
||||||
|
size_t (*changelog_read) (void *, size_t, const pmpkg_t *, const void *);
|
||||||
|
int (*changelog_close) (const pmpkg_t *, void *);
|
||||||
|
|
||||||
|
/* still to add:
|
||||||
|
* checkmd5sum() ?
|
||||||
|
* compute_requiredby()
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
/** The standard package operations struct. get fields directly from the
|
||||||
|
* struct itself with no abstraction layer or any type of lazy loading.
|
||||||
|
* The actual definition is in package.c so it can have access to the
|
||||||
|
* default accessor functions which are defined there.
|
||||||
|
*/
|
||||||
|
extern struct pkg_operations default_pkg_ops;
|
||||||
|
|
||||||
struct __pmpkg_t {
|
struct __pmpkg_t {
|
||||||
|
unsigned long name_hash;
|
||||||
char *filename;
|
char *filename;
|
||||||
char *name;
|
char *name;
|
||||||
char *version;
|
char *version;
|
||||||
char *desc;
|
char *desc;
|
||||||
char *url;
|
char *url;
|
||||||
time_t builddate;
|
|
||||||
time_t installdate;
|
|
||||||
char *packager;
|
char *packager;
|
||||||
char *md5sum;
|
char *md5sum;
|
||||||
char *arch;
|
char *arch;
|
||||||
|
|
||||||
|
time_t builddate;
|
||||||
|
time_t installdate;
|
||||||
|
|
||||||
off_t size;
|
off_t size;
|
||||||
off_t isize;
|
off_t isize;
|
||||||
off_t download_size;
|
off_t download_size;
|
||||||
|
|
||||||
int scriptlet;
|
int scriptlet;
|
||||||
int force;
|
|
||||||
pmpkgreason_t reason;
|
pmpkgreason_t reason;
|
||||||
|
pmpkgfrom_t origin;
|
||||||
|
/* origin == PKG_FROM_FILE, use pkg->origin_data.file
|
||||||
|
* origin == PKG_FROM_*DB, use pkg->origin_data.db */
|
||||||
|
union {
|
||||||
|
pmdb_t *db;
|
||||||
|
char *file;
|
||||||
|
} origin_data;
|
||||||
|
pmdbinfrq_t infolevel;
|
||||||
|
|
||||||
alpm_list_t *licenses;
|
alpm_list_t *licenses;
|
||||||
alpm_list_t *replaces;
|
alpm_list_t *replaces;
|
||||||
alpm_list_t *groups;
|
alpm_list_t *groups;
|
||||||
@@ -64,17 +129,8 @@ struct __pmpkg_t {
|
|||||||
alpm_list_t *deltas;
|
alpm_list_t *deltas;
|
||||||
alpm_list_t *delta_path;
|
alpm_list_t *delta_path;
|
||||||
alpm_list_t *removes; /* in transaction targets only */
|
alpm_list_t *removes; /* in transaction targets only */
|
||||||
/* internal */
|
|
||||||
pmpkgfrom_t origin;
|
struct pkg_operations *ops;
|
||||||
/* Replaced 'void *data' with this union as follows:
|
|
||||||
origin == PKG_FROM_CACHE, use pkg->origin_data.db
|
|
||||||
origin == PKG_FROM_FILE, use pkg->origin_data.file
|
|
||||||
*/
|
|
||||||
union {
|
|
||||||
pmdb_t *db;
|
|
||||||
char *file;
|
|
||||||
} origin_data;
|
|
||||||
pmdbinfrq_t infolevel;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pmpkg_t* _alpm_pkg_new(void);
|
pmpkg_t* _alpm_pkg_new(void);
|
||||||
|
|||||||
331
lib/libalpm/pkghash.c
Normal file
331
lib/libalpm/pkghash.c
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
/*
|
||||||
|
* pkghash.c
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pkghash.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
|
/* List of primes for possible sizes of hash tables.
|
||||||
|
*
|
||||||
|
* The maximum table size is the last prime under 1,000,000. That is
|
||||||
|
* more than an order of magnitude greater than the number of packages
|
||||||
|
* in any Linux distribution.
|
||||||
|
*/
|
||||||
|
static const size_t prime_list[] =
|
||||||
|
{
|
||||||
|
11ul, 13ul, 17ul, 19ul, 23ul, 29ul, 31ul, 37ul, 41ul, 43ul, 47ul,
|
||||||
|
53ul, 59ul, 61ul, 67ul, 71ul, 73ul, 79ul, 83ul, 89ul, 97ul, 103ul,
|
||||||
|
109ul, 113ul, 127ul, 137ul, 139ul, 149ul, 157ul, 167ul, 179ul, 193ul,
|
||||||
|
199ul, 211ul, 227ul, 241ul, 257ul, 277ul, 293ul, 313ul, 337ul, 359ul,
|
||||||
|
383ul, 409ul, 439ul, 467ul, 503ul, 541ul, 577ul, 619ul, 661ul, 709ul,
|
||||||
|
761ul, 823ul, 887ul, 953ul, 1031ul, 1109ul, 1193ul, 1289ul, 1381ul,
|
||||||
|
1493ul, 1613ul, 1741ul, 1879ul, 2029ul, 2179ul, 2357ul, 2549ul,
|
||||||
|
2753ul, 2971ul, 3209ul, 3469ul, 3739ul, 4027ul, 4349ul, 4703ul,
|
||||||
|
5087ul, 5503ul, 5953ul, 6427ul, 6949ul, 7517ul, 8123ul, 8783ul,
|
||||||
|
9497ul, 10273ul, 11113ul, 12011ul, 12983ul, 14033ul, 15173ul,
|
||||||
|
16411ul, 17749ul, 19183ul, 20753ul, 22447ul, 24281ul, 26267ul,
|
||||||
|
28411ul, 30727ul, 33223ul, 35933ul, 38873ul, 42043ul, 45481ul,
|
||||||
|
49201ul, 53201ul, 57557ul, 62233ul, 67307ul, 72817ul, 78779ul,
|
||||||
|
85229ul, 92203ul, 99733ul, 107897ul, 116731ul, 126271ul, 136607ul,
|
||||||
|
147793ul, 159871ul, 172933ul, 187091ul, 202409ul, 218971ul, 236897ul,
|
||||||
|
256279ul, 277261ul, 299951ul, 324503ul, 351061ul, 379787ul, 410857ul,
|
||||||
|
444487ul, 480881ul, 520241ul, 562841ul, 608903ul, 658753ul, 712697ul,
|
||||||
|
771049ul, 834181ul, 902483ul, 976369ul
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Allocate a hash table with at least "size" buckets */
|
||||||
|
pmpkghash_t *_alpm_pkghash_create(size_t size)
|
||||||
|
{
|
||||||
|
pmpkghash_t *hash = NULL;
|
||||||
|
size_t i, loopsize;
|
||||||
|
|
||||||
|
MALLOC(hash, sizeof(pmpkghash_t), RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
|
hash->list = NULL;
|
||||||
|
hash->entries = 0;
|
||||||
|
hash->buckets = 0;
|
||||||
|
|
||||||
|
loopsize = sizeof(prime_list) / sizeof(*prime_list);
|
||||||
|
for(i = 0; i < loopsize; i++) {
|
||||||
|
if(prime_list[i] > size) {
|
||||||
|
hash->buckets = prime_list[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(hash->buckets < size) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("database larger than maximum size\n"));
|
||||||
|
free(hash);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
CALLOC(hash->hash_table, hash->buckets, sizeof(alpm_list_t*), \
|
||||||
|
free(hash); RET_ERR(PM_ERR_MEMORY, NULL));
|
||||||
|
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t get_hash_position(unsigned long name_hash, pmpkghash_t *hash)
|
||||||
|
{
|
||||||
|
size_t position;
|
||||||
|
alpm_list_t *ptr;
|
||||||
|
|
||||||
|
position = name_hash % hash->buckets;
|
||||||
|
|
||||||
|
/* collision resolution using open addressing with linear probing */
|
||||||
|
while((ptr = hash->hash_table[position]) != NULL) {
|
||||||
|
position = (position + 1) % hash->buckets;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Expand the hash table size to the next increment and rebin the entries */
|
||||||
|
static pmpkghash_t *rehash(pmpkghash_t *oldhash)
|
||||||
|
{
|
||||||
|
pmpkghash_t *newhash;
|
||||||
|
size_t newsize, position, i;
|
||||||
|
|
||||||
|
/* Hash tables will need resized in two cases:
|
||||||
|
* - adding packages to the local database
|
||||||
|
* - poor estimation of the number of packages in sync database
|
||||||
|
*
|
||||||
|
* For small hash tables sizes (<500) the increase in size is by a
|
||||||
|
* minimum of a factor of 2 for optimal rehash efficiency. For
|
||||||
|
* larger database sizes, this increase is reduced to avoid excess
|
||||||
|
* memory allocation as both scenarios requiring a rehash should not
|
||||||
|
* require a table size increase that large. */
|
||||||
|
if(oldhash->buckets < 500) {
|
||||||
|
newsize = oldhash->buckets * 2;
|
||||||
|
} else if(oldhash->buckets < 2000) {
|
||||||
|
newsize = oldhash->buckets * 3 / 2;
|
||||||
|
} else if(oldhash->buckets < 5000) {
|
||||||
|
newsize = oldhash->buckets * 4 / 3;
|
||||||
|
} else {
|
||||||
|
newsize = oldhash->buckets + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
newhash = _alpm_pkghash_create(newsize);
|
||||||
|
if(newhash == NULL) {
|
||||||
|
/* creation of newhash failed, stick with old one... */
|
||||||
|
return(oldhash);
|
||||||
|
}
|
||||||
|
|
||||||
|
newhash->list = oldhash->list;
|
||||||
|
oldhash->list = NULL;
|
||||||
|
|
||||||
|
for(i = 0; i < oldhash->buckets; i++) {
|
||||||
|
if(oldhash->hash_table[i] != NULL) {
|
||||||
|
pmpkg_t *package = oldhash->hash_table[i]->data;
|
||||||
|
|
||||||
|
position = get_hash_position(package->name_hash, newhash);
|
||||||
|
|
||||||
|
newhash->hash_table[position] = oldhash->hash_table[i];
|
||||||
|
oldhash->hash_table[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
newhash->entries = oldhash->entries;
|
||||||
|
|
||||||
|
_alpm_pkghash_free(oldhash);
|
||||||
|
|
||||||
|
return(newhash);
|
||||||
|
}
|
||||||
|
|
||||||
|
static pmpkghash_t *pkghash_add_pkg(pmpkghash_t *hash, pmpkg_t *pkg, int sorted)
|
||||||
|
{
|
||||||
|
alpm_list_t *ptr;
|
||||||
|
size_t position;
|
||||||
|
|
||||||
|
if(pkg == NULL || hash == NULL) {
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((hash->entries + 1) / MAX_HASH_LOAD > hash->buckets) {
|
||||||
|
hash = rehash(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
position = get_hash_position(pkg->name_hash, hash);
|
||||||
|
|
||||||
|
ptr = calloc(1, sizeof(alpm_list_t));
|
||||||
|
if(ptr == NULL) {
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
ptr->data = pkg;
|
||||||
|
ptr->next = NULL;
|
||||||
|
ptr->prev = ptr;
|
||||||
|
|
||||||
|
hash->hash_table[position] = ptr;
|
||||||
|
if(!sorted){
|
||||||
|
hash->list = alpm_list_join(hash->list, ptr);
|
||||||
|
}else{
|
||||||
|
hash->list = alpm_list_mmerge(hash->list, ptr, _alpm_pkg_cmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
hash->entries += 1;
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmpkghash_t *_alpm_pkghash_add(pmpkghash_t *hash, pmpkg_t *pkg)
|
||||||
|
{
|
||||||
|
return(pkghash_add_pkg(hash, pkg, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
pmpkghash_t *_alpm_pkghash_add_sorted(pmpkghash_t *hash, pmpkg_t *pkg)
|
||||||
|
{
|
||||||
|
return(pkghash_add_pkg(hash, pkg, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t move_one_entry(pmpkghash_t *hash, size_t start, size_t end)
|
||||||
|
{
|
||||||
|
/* Iterate backwards from 'end' to 'start', seeing if any of the items
|
||||||
|
* would hash to 'start'. If we find one, we move it there and break. If
|
||||||
|
* we get all the way back to position and find none that hash to it, we
|
||||||
|
* also end iteration. Iterating backwards helps prevent needless shuffles;
|
||||||
|
* we will never need to move more than one item per function call. The
|
||||||
|
* return value is our current iteration location; if this is equal to
|
||||||
|
* 'start' we can stop this madness. */
|
||||||
|
while(end != start) {
|
||||||
|
alpm_list_t *i = hash->hash_table[end];
|
||||||
|
pmpkg_t *info = i->data;
|
||||||
|
size_t new_position = get_hash_position(info->name_hash, hash);
|
||||||
|
|
||||||
|
if(new_position == start) {
|
||||||
|
hash->hash_table[start] = i;
|
||||||
|
hash->hash_table[end] = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the odd math ensures we are always positive, e.g.
|
||||||
|
* e.g. (0 - 1) % 47 == -1
|
||||||
|
* e.g. (47 + 0 - 1) % 47 == 46 */
|
||||||
|
end = (hash->buckets + end - 1) % hash->buckets;
|
||||||
|
}
|
||||||
|
return(end);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Remove a package from a pkghash.
|
||||||
|
*
|
||||||
|
* @param hash the hash to remove the package from
|
||||||
|
* @param pkg the package we are removing
|
||||||
|
* @param data output parameter containing the removed item
|
||||||
|
*
|
||||||
|
* @return the resultant hash
|
||||||
|
*/
|
||||||
|
pmpkghash_t *_alpm_pkghash_remove(pmpkghash_t *hash, pmpkg_t *pkg,
|
||||||
|
pmpkg_t **data)
|
||||||
|
{
|
||||||
|
alpm_list_t *i;
|
||||||
|
size_t position;
|
||||||
|
|
||||||
|
if(data) {
|
||||||
|
*data = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pkg == NULL || hash == NULL) {
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
position = pkg->name_hash % hash->buckets;
|
||||||
|
while((i = hash->hash_table[position]) != NULL) {
|
||||||
|
pmpkg_t *info = i->data;
|
||||||
|
|
||||||
|
if(info->name_hash == pkg->name_hash &&
|
||||||
|
strcmp(info->name, pkg->name) == 0) {
|
||||||
|
size_t stop, prev;
|
||||||
|
|
||||||
|
/* remove from list and hash */
|
||||||
|
hash->list = alpm_list_remove_item(hash->list, i);
|
||||||
|
if(data) {
|
||||||
|
*data = info;
|
||||||
|
}
|
||||||
|
hash->hash_table[position] = NULL;
|
||||||
|
free(i);
|
||||||
|
hash->entries -= 1;
|
||||||
|
|
||||||
|
/* Potentially move entries following removed entry to keep open
|
||||||
|
* addressing collision resolution working. We start by finding the
|
||||||
|
* next null bucket to know how far we have to look. */
|
||||||
|
stop = (position + 1) % hash->buckets;
|
||||||
|
while(hash->hash_table[stop] != NULL && stop != position) {
|
||||||
|
stop = (stop + 1) % hash->buckets;
|
||||||
|
}
|
||||||
|
stop = (hash->buckets + stop - 1) % hash->buckets;
|
||||||
|
|
||||||
|
/* We now search backwards from stop to position. If we find an
|
||||||
|
* item that now hashes to position, we will move it, and then try
|
||||||
|
* to plug the new hole we just opened up, until we finally don't
|
||||||
|
* move anything. */
|
||||||
|
while((prev = move_one_entry(hash, position, stop)) != position) {
|
||||||
|
position = prev;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
position = (position + 1) % hash->buckets;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _alpm_pkghash_free(pmpkghash_t *hash)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
if(hash != NULL) {
|
||||||
|
for(i = 0; i < hash->buckets; i++) {
|
||||||
|
free(hash->hash_table[i]);
|
||||||
|
}
|
||||||
|
free(hash->hash_table);
|
||||||
|
}
|
||||||
|
free(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmpkg_t *_alpm_pkghash_find(pmpkghash_t *hash, const char *name)
|
||||||
|
{
|
||||||
|
alpm_list_t *lp;
|
||||||
|
unsigned long name_hash;
|
||||||
|
size_t position;
|
||||||
|
|
||||||
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
|
if(name == NULL || hash == NULL) {
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
name_hash = _alpm_hash_sdbm(name);
|
||||||
|
|
||||||
|
position = name_hash % hash->buckets;
|
||||||
|
|
||||||
|
while((lp = hash->hash_table[position]) != NULL) {
|
||||||
|
pmpkg_t *info = lp->data;
|
||||||
|
|
||||||
|
if(info->name_hash == name_hash && strcmp(info->name, name) == 0) {
|
||||||
|
return(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
position = (position + 1) % hash->buckets;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vim: set ts=2 sw=2 noet: */
|
||||||
60
lib/libalpm/pkghash.h
Normal file
60
lib/libalpm/pkghash.h
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* pkghash.h
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ALPM_PKGHASH_H
|
||||||
|
#define _ALPM_PKGHASH_H
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "alpm.h"
|
||||||
|
#include "alpm_list.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief A hash table for holding pmpkg_t objects.
|
||||||
|
*
|
||||||
|
* A combination of a hash table and a list, allowing for fast look-up
|
||||||
|
* by package name but also iteration over the packages.
|
||||||
|
*/
|
||||||
|
struct __pmpkghash_t {
|
||||||
|
/** data held by the hash table */
|
||||||
|
alpm_list_t **hash_table;
|
||||||
|
/** number of buckets in hash table */
|
||||||
|
size_t buckets;
|
||||||
|
/** number of entries in hash table */
|
||||||
|
size_t entries;
|
||||||
|
/** head node of the hash table data in normal list format */
|
||||||
|
alpm_list_t *list;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct __pmpkghash_t pmpkghash_t;
|
||||||
|
|
||||||
|
pmpkghash_t *_alpm_pkghash_create(size_t size);
|
||||||
|
|
||||||
|
pmpkghash_t *_alpm_pkghash_add(pmpkghash_t *hash, pmpkg_t *pkg);
|
||||||
|
pmpkghash_t *_alpm_pkghash_add_sorted(pmpkghash_t *hash, pmpkg_t *pkg);
|
||||||
|
pmpkghash_t *_alpm_pkghash_remove(pmpkghash_t *hash, pmpkg_t *pkg, pmpkg_t **data);
|
||||||
|
|
||||||
|
void _alpm_pkghash_free(pmpkghash_t *hash);
|
||||||
|
|
||||||
|
pmpkg_t *_alpm_pkghash_find(pmpkghash_t *hash, const char *name);
|
||||||
|
|
||||||
|
#define MAX_HASH_LOAD 0.7
|
||||||
|
|
||||||
|
#endif /* _ALPM_PKGHASH_H */
|
||||||
@@ -1,19 +1,24 @@
|
|||||||
# Set of available languages.
|
# Set of available languages.
|
||||||
ca
|
ca
|
||||||
cs
|
cs
|
||||||
|
da
|
||||||
de
|
de
|
||||||
el
|
el
|
||||||
en_GB
|
en_GB
|
||||||
es
|
es
|
||||||
|
fi
|
||||||
fr
|
fr
|
||||||
hu
|
hu
|
||||||
it
|
it
|
||||||
kk
|
kk
|
||||||
|
ko
|
||||||
nb
|
nb
|
||||||
pl
|
pl
|
||||||
|
pt
|
||||||
pt_BR
|
pt_BR
|
||||||
ro
|
ro
|
||||||
ru
|
ru
|
||||||
|
sk
|
||||||
sv
|
sv
|
||||||
tr
|
tr
|
||||||
uk
|
uk
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Makefile for PO directory in any package using GNU gettext.
|
# Makefile for PO directory in any package using GNU gettext.
|
||||||
# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# This file can be copied and used freely without restrictions. It can
|
||||||
# be used in projects which are not available under the GNU General Public
|
# be used in projects which are not available under the GNU General Public
|
||||||
@@ -8,10 +8,12 @@
|
|||||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||||
# General Public License and is *not* in the public domain.
|
# General Public License and is *not* in the public domain.
|
||||||
#
|
#
|
||||||
# Origin: gettext-0.13
|
# Origin: gettext-0.18
|
||||||
|
GETTEXT_MACRO_VERSION = 0.18
|
||||||
|
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
@@ -22,18 +24,38 @@ VPATH = @srcdir@
|
|||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
localedir = $(datadir)/locale
|
datadir = @datadir@
|
||||||
|
localedir = @localedir@
|
||||||
gettextsrcdir = $(datadir)/gettext/po
|
gettextsrcdir = $(datadir)/gettext/po
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
mkinstalldirs = @INSTALL@ -d
|
|
||||||
|
|
||||||
GMSGFMT = @GMSGFMT@
|
# We use $(mkdir_p).
|
||||||
MSGFMT = @MSGFMT@
|
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
|
||||||
XGETTEXT = @XGETTEXT@
|
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
|
||||||
|
# @install_sh@ does not start with $(SHELL), so we add it.
|
||||||
|
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
|
||||||
|
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
|
||||||
|
# versions, $(mkinstalldirs) and $(install_sh) are unused.
|
||||||
|
mkinstalldirs = $(SHELL) @install_sh@ -d
|
||||||
|
install_sh = $(SHELL) @install_sh@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
|
||||||
|
GMSGFMT_ = @GMSGFMT@
|
||||||
|
GMSGFMT_no = @GMSGFMT@
|
||||||
|
GMSGFMT_yes = @GMSGFMT_015@
|
||||||
|
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
|
||||||
|
MSGFMT_ = @MSGFMT@
|
||||||
|
MSGFMT_no = @MSGFMT@
|
||||||
|
MSGFMT_yes = @MSGFMT_015@
|
||||||
|
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
|
||||||
|
XGETTEXT_ = @XGETTEXT@
|
||||||
|
XGETTEXT_no = @XGETTEXT@
|
||||||
|
XGETTEXT_yes = @XGETTEXT_015@
|
||||||
|
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
|
||||||
MSGMERGE = msgmerge
|
MSGMERGE = msgmerge
|
||||||
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
||||||
MSGINIT = msginit
|
MSGINIT = msginit
|
||||||
@@ -46,7 +68,7 @@ UPDATEPOFILES = @UPDATEPOFILES@
|
|||||||
DUMMYPOFILES = @DUMMYPOFILES@
|
DUMMYPOFILES = @DUMMYPOFILES@
|
||||||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
||||||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
||||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
|
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
|
||||||
$(POFILES) $(GMOFILES) \
|
$(POFILES) $(GMOFILES) \
|
||||||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
||||||
|
|
||||||
@@ -57,7 +79,7 @@ CATALOGS = @CATALOGS@
|
|||||||
# Makevars gets inserted here. (Don't remove this line!)
|
# Makevars gets inserted here. (Don't remove this line!)
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
|
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
@echo "$(MSGFMT) -c -o $@ $<"; \
|
@echo "$(MSGFMT) -c -o $@ $<"; \
|
||||||
@@ -66,19 +88,32 @@ CATALOGS = @CATALOGS@
|
|||||||
.po.gmo:
|
.po.gmo:
|
||||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
|
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
|
||||||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
||||||
|
|
||||||
.sin.sed:
|
.sin.sed:
|
||||||
sed -e '/^#/d' $< > t-$@
|
sed -e '/^#/d' $< > t-$@
|
||||||
mv t-$@ $@
|
mv t-$@ $@
|
||||||
|
|
||||||
|
|
||||||
all: all-@USE_NLS@
|
all: check-macro-version all-@USE_NLS@
|
||||||
|
|
||||||
all-yes: stamp-po
|
all-yes: stamp-po
|
||||||
all-no:
|
all-no:
|
||||||
|
|
||||||
|
# Ensure that the gettext macros and this Makefile.in.in are in sync.
|
||||||
|
check-macro-version:
|
||||||
|
@test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
|
||||||
|
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
|
||||||
|
exit 1; \
|
||||||
|
}
|
||||||
|
|
||||||
|
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
|
||||||
|
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
|
||||||
|
# we don't want to bother translators with empty POT files). We assume that
|
||||||
|
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
|
||||||
|
# In this case, stamp-po is a nop (i.e. a phony target).
|
||||||
|
|
||||||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
||||||
# been loosely updated. Its purpose is that when a developer or translator
|
# been loosely updated. Its purpose is that when a developer or translator
|
||||||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
||||||
@@ -88,10 +123,13 @@ all-no:
|
|||||||
# $(POFILES) has been designed to not touch files that don't need to be
|
# $(POFILES) has been designed to not touch files that don't need to be
|
||||||
# changed.
|
# changed.
|
||||||
stamp-po: $(srcdir)/$(DOMAIN).pot
|
stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||||
|
test ! -f $(srcdir)/$(DOMAIN).pot || \
|
||||||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
|
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
|
||||||
@echo "touch stamp-po"
|
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
|
||||||
@echo timestamp > stamp-poT
|
echo "touch stamp-po" && \
|
||||||
@mv stamp-poT stamp-po
|
echo timestamp > stamp-poT && \
|
||||||
|
mv stamp-poT stamp-po; \
|
||||||
|
}
|
||||||
|
|
||||||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
||||||
# otherwise packages like GCC can not be built if only parts of the source
|
# otherwise packages like GCC can not be built if only parts of the source
|
||||||
@@ -100,11 +138,34 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
|
|||||||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
|
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
|
||||||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
||||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||||
|
if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
|
||||||
|
package_gnu='GNU '; \
|
||||||
|
else \
|
||||||
|
package_gnu=''; \
|
||||||
|
fi; \
|
||||||
|
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
|
||||||
|
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
|
||||||
|
else \
|
||||||
|
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
|
||||||
|
fi; \
|
||||||
|
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||||
|
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
|
||||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
|
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
|
||||||
--files-from=$(srcdir)/POTFILES.in \
|
--files-from=$(srcdir)/POTFILES.in \
|
||||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||||
--msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
|
--msgid-bugs-address="$$msgid_bugs_address" \
|
||||||
|
;; \
|
||||||
|
*) \
|
||||||
|
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||||
|
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
|
||||||
|
--files-from=$(srcdir)/POTFILES.in \
|
||||||
|
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||||
|
--package-name="$${package_gnu}@PACKAGE@" \
|
||||||
|
--package-version='@VERSION@' \
|
||||||
|
--msgid-bugs-address="$$msgid_bugs_address" \
|
||||||
|
;; \
|
||||||
|
esac
|
||||||
test ! -f $(DOMAIN).po || { \
|
test ! -f $(DOMAIN).po || { \
|
||||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||||
@@ -130,16 +191,27 @@ $(srcdir)/$(DOMAIN).pot:
|
|||||||
# Note that a PO file is not touched if it doesn't need to be changed.
|
# Note that a PO file is not touched if it doesn't need to be changed.
|
||||||
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
||||||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
||||||
|
if test -f "$(srcdir)/$${lang}.po"; then \
|
||||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
|
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
|
||||||
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
|
cd $(srcdir) \
|
||||||
|
&& { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||||
|
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
|
||||||
|
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
|
||||||
|
*) \
|
||||||
|
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
|
||||||
|
esac; \
|
||||||
|
}; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $${lang}.po-create; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
install: install-exec install-data
|
install: install-exec install-data
|
||||||
install-exec:
|
install-exec:
|
||||||
install-data: install-data-@USE_NLS@
|
install-data: install-data-@USE_NLS@
|
||||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
|
||||||
for file in $(DISTFILES.common) Makevars.template; do \
|
for file in $(DISTFILES.common) Makevars.template; do \
|
||||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||||
@@ -152,13 +224,12 @@ install-data: install-data-@USE_NLS@
|
|||||||
fi
|
fi
|
||||||
install-data-no: all
|
install-data-no: all
|
||||||
install-data-yes: all
|
install-data-yes: all
|
||||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
|
||||||
@catalogs='$(CATALOGS)'; \
|
@catalogs='$(CATALOGS)'; \
|
||||||
for cat in $$catalogs; do \
|
for cat in $$catalogs; do \
|
||||||
cat=`basename $$cat`; \
|
cat=`basename $$cat`; \
|
||||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
$(mkdir_p) $(DESTDIR)$$dir; \
|
||||||
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
|
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
|
||||||
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
||||||
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
|
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
|
||||||
@@ -198,19 +269,18 @@ installdirs: installdirs-exec installdirs-data
|
|||||||
installdirs-exec:
|
installdirs-exec:
|
||||||
installdirs-data: installdirs-data-@USE_NLS@
|
installdirs-data: installdirs-data-@USE_NLS@
|
||||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
|
||||||
else \
|
else \
|
||||||
: ; \
|
: ; \
|
||||||
fi
|
fi
|
||||||
installdirs-data-no:
|
installdirs-data-no:
|
||||||
installdirs-data-yes:
|
installdirs-data-yes:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
|
||||||
@catalogs='$(CATALOGS)'; \
|
@catalogs='$(CATALOGS)'; \
|
||||||
for cat in $$catalogs; do \
|
for cat in $$catalogs; do \
|
||||||
cat=`basename $$cat`; \
|
cat=`basename $$cat`; \
|
||||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
$(mkdir_p) $(DESTDIR)$$dir; \
|
||||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||||
if test -n "$$lc"; then \
|
if test -n "$$lc"; then \
|
||||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||||
@@ -285,11 +355,14 @@ dist distdir:
|
|||||||
$(MAKE) update-po
|
$(MAKE) update-po
|
||||||
@$(MAKE) dist2
|
@$(MAKE) dist2
|
||||||
# This is a separate target because 'update-po' must be executed before.
|
# This is a separate target because 'update-po' must be executed before.
|
||||||
dist2: $(DISTFILES)
|
dist2: stamp-po $(DISTFILES)
|
||||||
dists="$(DISTFILES)"; \
|
dists="$(DISTFILES)"; \
|
||||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||||
dists="$$dists Makevars.template"; \
|
dists="$$dists Makevars.template"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||||
|
dists="$$dists $(DOMAIN).pot stamp-po"; \
|
||||||
|
fi; \
|
||||||
if test -f $(srcdir)/ChangeLog; then \
|
if test -f $(srcdir)/ChangeLog; then \
|
||||||
dists="$$dists ChangeLog"; \
|
dists="$$dists ChangeLog"; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -301,9 +374,9 @@ dist2: $(DISTFILES)
|
|||||||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
||||||
for file in $$dists; do \
|
for file in $$dists; do \
|
||||||
if test -f $$file; then \
|
if test -f $$file; then \
|
||||||
cp -p $$file $(distdir); \
|
cp -p $$file $(distdir) || exit 1; \
|
||||||
else \
|
else \
|
||||||
cp -p $(srcdir)/$$file $(distdir); \
|
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -312,6 +385,13 @@ update-po: Makefile
|
|||||||
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
|
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
|
||||||
$(MAKE) update-gmo
|
$(MAKE) update-gmo
|
||||||
|
|
||||||
|
# General rule for creating PO files.
|
||||||
|
|
||||||
|
.nop.po-create:
|
||||||
|
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
|
||||||
|
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
|
||||||
|
exit 1
|
||||||
|
|
||||||
# General rule for updating PO files.
|
# General rule for updating PO files.
|
||||||
|
|
||||||
.nop.po-update:
|
.nop.po-update:
|
||||||
@@ -320,9 +400,15 @@ update-po: Makefile
|
|||||||
tmpdir=`pwd`; \
|
tmpdir=`pwd`; \
|
||||||
echo "$$lang:"; \
|
echo "$$lang:"; \
|
||||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||||
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
|
echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
|
||||||
cd $(srcdir); \
|
cd $(srcdir); \
|
||||||
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
|
if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||||
|
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
|
||||||
|
$(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
|
||||||
|
*) \
|
||||||
|
$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
|
||||||
|
esac; \
|
||||||
|
}; then \
|
||||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||||
rm -f $$tmpdir/$$lang.new.po; \
|
rm -f $$tmpdir/$$lang.new.po; \
|
||||||
else \
|
else \
|
||||||
@@ -343,10 +429,13 @@ $(DUMMYPOFILES):
|
|||||||
update-gmo: Makefile $(GMOFILES)
|
update-gmo: Makefile $(GMOFILES)
|
||||||
@:
|
@:
|
||||||
|
|
||||||
Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
|
# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
|
||||||
|
# because execution permission bits may not work on the current file system.
|
||||||
|
# Use @SHELL@, which is the shell determined by autoconf for the use by its
|
||||||
|
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
|
||||||
|
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
|
||||||
cd $(top_builddir) \
|
cd $(top_builddir) \
|
||||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
&& @SHELL@ ./config.status $(subdir)/$@.in po-directories
|
||||||
$(SHELL) ./config.status
|
|
||||||
|
|
||||||
force:
|
force:
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ top_builddir = ../../../
|
|||||||
# These options get passed to xgettext.
|
# These options get passed to xgettext.
|
||||||
XGETTEXT_OPTIONS = --no-location \
|
XGETTEXT_OPTIONS = --no-location \
|
||||||
--keyword=_ --flag=_:1:c-format \
|
--keyword=_ --flag=_:1:c-format \
|
||||||
--keyword=N_ --flag=N_:1:c-format
|
--keyword=_n:1,2 --flag=_n:1:c-format --flag=_n:2:c-format
|
||||||
|
|
||||||
# This is the copyright holder that gets inserted into the header of the
|
# This is the copyright holder that gets inserted into the header of the
|
||||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||||
@@ -19,7 +19,7 @@ COPYRIGHT_HOLDER = Pacman Development Team <pacman-dev@archlinux.org>
|
|||||||
|
|
||||||
# This is the email address or URL to which the translators shall report
|
# This is the email address or URL to which the translators shall report
|
||||||
# bugs in the untranslated strings.
|
# bugs in the untranslated strings.
|
||||||
MSGID_BUGS_ADDRESS = pacman-dev@archlinux.org
|
MSGID_BUGS_ADDRESS = http://bugs.archlinux.org/index.php?project=3
|
||||||
|
|
||||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||||
# message catalogs shall be used. It is usually empty.
|
# message catalogs shall be used. It is usually empty.
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ lib/libalpm/add.c
|
|||||||
lib/libalpm/alpm.c
|
lib/libalpm/alpm.c
|
||||||
#lib/libalpm/alpm_list.c
|
#lib/libalpm/alpm_list.c
|
||||||
lib/libalpm/backup.c
|
lib/libalpm/backup.c
|
||||||
lib/libalpm/be_files.c
|
lib/libalpm/be_local.c
|
||||||
lib/libalpm/be_package.c
|
lib/libalpm/be_package.c
|
||||||
lib/libalpm/cache.c
|
lib/libalpm/be_sync.c
|
||||||
lib/libalpm/conflict.c
|
lib/libalpm/conflict.c
|
||||||
lib/libalpm/db.c
|
lib/libalpm/db.c
|
||||||
lib/libalpm/delta.c
|
lib/libalpm/delta.c
|
||||||
lib/libalpm/deps.c
|
lib/libalpm/deps.c
|
||||||
|
lib/libalpm/diskspace.c
|
||||||
lib/libalpm/dload.c
|
lib/libalpm/dload.c
|
||||||
lib/libalpm/error.c
|
lib/libalpm/error.c
|
||||||
lib/libalpm/group.c
|
lib/libalpm/group.c
|
||||||
@@ -20,6 +21,7 @@ lib/libalpm/handle.c
|
|||||||
lib/libalpm/log.c
|
lib/libalpm/log.c
|
||||||
#lib/libalpm/md5.c
|
#lib/libalpm/md5.c
|
||||||
lib/libalpm/package.c
|
lib/libalpm/package.c
|
||||||
|
lib/libalpm/pkghash.c
|
||||||
lib/libalpm/remove.c
|
lib/libalpm/remove.c
|
||||||
lib/libalpm/sync.c
|
lib/libalpm/sync.c
|
||||||
lib/libalpm/trans.c
|
lib/libalpm/trans.c
|
||||||
|
|||||||
@@ -1,32 +1,41 @@
|
|||||||
# Translation of libpalm.po to Catalan
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
# Manuel Tortosa <manutortosa@gmail.com>, 2009, 2010.
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-12 19:17+0200\n"
|
"PO-Revision-Date: 2011-03-04 18:24+0000\n"
|
||||||
"Last-Translator: Manuel Tortosa <manutortosa@gmail.com>\n"
|
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
|
||||||
"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: ca\n"
|
"Language: ca\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Lokalize 1.0\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr ""
|
msgstr "%s-%s és al dia -- s'ignorarà\n"
|
||||||
"s'està reemplaçant l'antiga versió %s-%s per %s en la llista d'objectius\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
|
msgstr "%s-%s és al dia -- es reinstal·larà\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "desactualitzant paquet %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"s'ometrà %s-%s perquè la versió més nova %s és en la llista d'objectius\n"
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "no es pot extreure %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -44,10 +53,6 @@ msgstr "extracció: no se sobreescriurà el directori amb el fitxer %s\n"
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "extracció: l'enllaç simbòlic %s no apunta al directori\n"
|
msgstr "extracció: l'enllaç simbòlic %s no apunta al directori\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "no es pot extreure %s (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "no es pot reanomenar %s a %s (%s)\n"
|
msgstr "no es pot reanomenar %s a %s (%s)\n"
|
||||||
@@ -72,6 +77,10 @@ msgstr "s'està extraient %s com %s.pacnew\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "no es pot obtenir el directori de treball actual\n"
|
msgstr "no es pot obtenir el directori de treball actual\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "no s'ha pogut canviar el directori a %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "ha ocorregut un problema en actualitzar %s\n"
|
msgstr "ha ocorregut un problema en actualitzar %s\n"
|
||||||
@@ -92,18 +101,6 @@ msgstr "no s'ha pogut afegir l'entrada '%s' en la memòria cau\n"
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "s'està eliminant la base de dades invàlida: %s\n"
|
msgstr "s'està eliminant la base de dades invàlida: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "no s'ha pogut obrir %s: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "no s'ha pogut eliminar el directori de la base de dades %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "no s'ha pogut eliminar la base de dades %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "nom invàlid per l'entrada de la base de dades '%s'\n"
|
msgstr "nom invàlid per l'entrada de la base de dades '%s'\n"
|
||||||
@@ -153,12 +150,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "falten les metadades del paquet en %s\n"
|
msgstr "falten les metadades del paquet en %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "no s'ha definit la ruta de la base de dades\n"
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "intent de re-registre de la BD 'local'\n"
|
msgstr "no s'ha definit la ruta de la base de dades\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -176,14 +173,34 @@ msgstr "%s serà instal·lar abans de la seva dependència %s\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "s'està ignorant paquet %s-%s\n"
|
msgstr "s'està ignorant paquet %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "s'ha seleccionat un paquet proveïdor (%s proveeix %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "no es pot resoldre \"%s\", una dependència de \"%s\"\n"
|
msgstr "no es pot resoldre \"%s\", una dependència de \"%s\"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "disc"
|
msgstr "disc"
|
||||||
@@ -240,6 +257,10 @@ msgstr "no es pot trobar o llegir directori"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "s'ha passat un argument erroni o NULL"
|
msgstr "s'ha passat un argument erroni o NULL"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "llibreria no inicialitzada"
|
msgstr "llibreria no inicialitzada"
|
||||||
@@ -272,6 +293,10 @@ msgstr "la base de dades ja s'ha registrat"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "no s'ha pogut trobar la base de dades"
|
msgstr "no s'ha pogut trobar la base de dades"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "no s'ha pogut actualitzar la base de dades"
|
msgstr "no s'ha pogut actualitzar la base de dades"
|
||||||
@@ -373,6 +398,10 @@ msgstr "fitxers conflictius"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "ha fallat en recuperar alguns fitxers"
|
msgstr "ha fallat en recuperar alguns fitxers"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "expressió regular invàlida"
|
msgstr "expressió regular invàlida"
|
||||||
@@ -393,6 +422,10 @@ msgstr "error en invocar el baixador extern"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "error inesperat"
|
msgstr "error inesperat"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "no s'ha pogut trobar %s en la base de dades -- s'està ometent\n"
|
msgstr "no s'ha pogut trobar %s en la base de dades -- s'està ometent\n"
|
||||||
@@ -437,18 +470,6 @@ msgstr "s'està ignorant el reemplaçament del paquet (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "no s'ha pogut reemplaçar %s per %s\n"
|
msgstr "no s'ha pogut reemplaçar %s per %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s és al dia -- s'ignorarà\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s és al dia -- es reinstal·larà\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "desactualitzant paquet %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "s'ha detectat un paquet amb un conflicte impossible de resoldre\n"
|
msgstr "s'ha detectat un paquet amb un conflicte impossible de resoldre\n"
|
||||||
@@ -471,6 +492,10 @@ msgstr "no s'ha pogut publicar la transacció d'eliminació\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "no s'ha pogut publicar la transacció\n"
|
msgstr "no s'ha pogut publicar la transacció\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "no s'ha pogut eliminar el fitxer de bloqueig %s\n"
|
msgstr "no s'ha pogut eliminar el fitxer de bloqueig %s\n"
|
||||||
@@ -488,8 +513,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "no s'ha pogut eliminar el directori temporal %s\n"
|
msgstr "no s'ha pogut eliminar el directori temporal %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "no s'ha pogut canviar el directori a %s (%s)\n"
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -500,17 +525,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "no s'ha pogut canviar el directori arrel (%s)\n"
|
msgstr "no s'ha pogut canviar el directori arrel (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "no s'ha pogut canviar el directori a / (%s)\n"
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "ha fallat la crida a popen (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "ha fallat la crida a waitpid (%s)\n"
|
msgstr "ha fallat la crida a waitpid (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "l'ordre a fallat a executar-se correctament\n"
|
msgstr "l'ordre a fallat a executar-se correctament\n"
|
||||||
@@ -522,42 +547,3 @@ msgstr "no existeix memòria cau %s, s'està creant...\n"
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "couldn't create package cache, using /tmp instead\n"
|
msgid "couldn't create package cache, using /tmp instead\n"
|
||||||
msgstr "no s'ha pogut crear la memòria cau del paquet, s'usarà /tmp\n"
|
msgstr "no s'ha pogut crear la memòria cau del paquet, s'usarà /tmp\n"
|
||||||
|
|
||||||
#~ msgid "conflicting packages were found in target list\n"
|
|
||||||
#~ msgstr "s'han trobat paquets conflictius en la llista d'objectius\n"
|
|
||||||
|
|
||||||
#~ msgid "you cannot install two conflicting packages at the same time\n"
|
|
||||||
#~ msgstr "no podeu instal·lar dos paquets amb conflictes alhora\n"
|
|
||||||
|
|
||||||
#~ msgid "replacing packages with -U is not supported yet\n"
|
|
||||||
#~ msgstr "no està implementat reemplaçar paquets amb -U\n"
|
|
||||||
|
|
||||||
#~ msgid "you can replace packages manually using -Rd and -U\n"
|
|
||||||
#~ msgstr "podeu reemplaçar paquets manualment usant -Rd i -U\n"
|
|
||||||
|
|
||||||
#~ msgid "url scheme not specified, assuming HTTP\n"
|
|
||||||
#~ msgstr "no s'ha especificat l'esquema url, s'està assumint HTTP\n"
|
|
||||||
|
|
||||||
#~ msgid "cannot write to file '%s'\n"
|
|
||||||
#~ msgstr "no s'ha pogut escriure al fitxer '%s'\n"
|
|
||||||
|
|
||||||
#~ msgid "no such repository"
|
|
||||||
#~ msgstr "no existeix aquest repositori"
|
|
||||||
|
|
||||||
#~ msgid "repository '%s' not found\n"
|
|
||||||
#~ msgstr "no s'ha trobat el repositori '%s'\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create removal transaction\n"
|
|
||||||
#~ msgstr "no s'ha pogut crear la transacció d'eliminació\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create transaction\n"
|
|
||||||
#~ msgstr "no s'ha pogut crear la transacció\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize the removal transaction\n"
|
|
||||||
#~ msgstr "no s'ha pogut inicialitzar la transacció d'eliminació\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize transaction\n"
|
|
||||||
#~ msgstr "no s'ha pogut inicialitzar la transacció\n"
|
|
||||||
|
|
||||||
#~ msgid "could not prepare removal transaction\n"
|
|
||||||
#~ msgstr "no s'ha pogut preparar la transacció d'eliminació\n"
|
|
||||||
|
|||||||
@@ -1,29 +1,41 @@
|
|||||||
# translation of cs.po to Čeština
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# Vojtěch Gondžala <vojtech.gondzala@gmail.com>, 2007, 2008, 2009, 2010.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-05 12:56+0200\n"
|
"PO-Revision-Date: 2011-03-14 18:54+0000\n"
|
||||||
"Last-Translator: Vojtěch Gondžala <vojtech.gondzala@gmail.com>\n"
|
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
|
||||||
"Language-Team: Czech <kde-i18n-doc@kde.org>\n"
|
"Language-Team: Czech <None>\n"
|
||||||
"Language: cs\n"
|
"Language: cs\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Lokalize 1.0\n"
|
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
|
||||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr "v seznamu cílů nahrazena starší verze %s-%s za %s\n"
|
msgstr "%s-%s je aktuální -- vynechat\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr "vynechává se %s-%s, protože v seznamu cílů je novější veze %s\n"
|
msgstr "%s-%s je aktuální -- přeinstalovat\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "snížení verze balíčku %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "varování při rozbalování %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "nelze rozbalit %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -41,10 +53,6 @@ msgstr "rozbalení: adresář nebyl přepsán souborem %s\n"
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "rozbalení: symbolický odkaz %s neodkazuje na adresář\n"
|
msgstr "rozbalení: symbolický odkaz %s neodkazuje na adresář\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "nelze rozbalit %s (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "nelze přejmenovat %s na %s (%s)\n"
|
msgstr "nelze přejmenovat %s na %s (%s)\n"
|
||||||
@@ -69,6 +77,10 @@ msgstr "%s byl rozbalen jako %s.pacnew\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "nelze určit aktuální pracovní adresář\n"
|
msgstr "nelze určit aktuální pracovní adresář\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "nelze změnit adresář na %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "nastal problém při aktualizaci %s\n"
|
msgstr "nastal problém při aktualizaci %s\n"
|
||||||
@@ -83,24 +95,12 @@ msgstr "nelze aktualizovat záznam databáze %s-%s\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not add entry '%s' in cache\n"
|
msgid "could not add entry '%s' in cache\n"
|
||||||
msgstr "nelze přidat položku '%s' do cache\n"
|
msgstr "nelze přidat položku '%s' do mezipaměti\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "odstraňuje se chybná databáze: %s\n"
|
msgstr "odstraňuje se chybná databáze: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "nelze otevřít %s: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "nelze odstranit adresář databáze %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "nelze odstranit záznam v databázi %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "chybný název záznamu v databázi '%s'\n"
|
msgstr "chybný název záznamu v databázi '%s'\n"
|
||||||
@@ -150,12 +150,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "chybí metadata balíčku v %s\n"
|
msgstr "chybí metadata balíčku v %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "cesta k databázi není definována\n"
|
msgstr "odstraněn neplatný soubor: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "pokus o opětovné zaregistrování databáze 'local'\n"
|
msgstr "cesta k databázi není definována\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -173,14 +173,35 @@ msgstr "%s bude nainstalován před %s, na kterém závisí\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "ignoruje se balíček %s-%s\n"
|
msgstr "ignoruje se balíček %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "byl vybrán nahrazující balíček (%s poskytuje %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "nelze vyřešit \"%s\", závislost \"%s\"\n"
|
msgstr "nelze vyřešit \"%s\", závislost \"%s\"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "nepodařilo se získat informace o souborovém systému\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr "nepodařilo se získat informace o souborovém systému %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "nepodařilo se určit připojovací bod pro soubor %s"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "nepodařilo se určit připojovací body pro souborové systémy"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "Diskový oddíl %s je připojen jen pro čtení\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
"Diskový oddíl %s je příliš plný: je potřeba %ld bloků, %ld bloků je volných\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "disk"
|
msgstr "disk"
|
||||||
@@ -237,6 +258,10 @@ msgstr "nelze nalézt nebo číst adresář"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "předán chybný nebo NULL argument"
|
msgstr "předán chybný nebo NULL argument"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "není dostatek volného místa na disku"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "knihovna nebyla inicializována"
|
msgstr "knihovna nebyla inicializována"
|
||||||
@@ -269,6 +294,10 @@ msgstr "databáze zaregistrována"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "nelze nalézt databázi"
|
msgstr "nelze nalézt databázi"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "databáze má nesprávnou verzi"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "nelze aktualizovat databázi"
|
msgstr "nelze aktualizovat databázi"
|
||||||
@@ -369,6 +398,10 @@ msgstr "konfliktní soubory"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "selhalo získání některých souborů"
|
msgstr "selhalo získání některých souborů"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "selhalo kopírování souboru"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "nesprávný regulární výraz"
|
msgstr "nesprávný regulární výraz"
|
||||||
@@ -389,6 +422,10 @@ msgstr "chyba volání externího programu pro stahování souborů"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "neočekávaná chyba"
|
msgstr "neočekávaná chyba"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "databáze je větší než maximální přípustná velikost\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "nelze nalézt %s v databázi -- vynechat\n"
|
msgstr "nelze nalézt %s v databázi -- vynechat\n"
|
||||||
@@ -407,7 +444,7 @@ msgstr "nelze odstranit záznam databáze %s-%s\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove entry '%s' from cache\n"
|
msgid "could not remove entry '%s' from cache\n"
|
||||||
msgstr "nelze odstranit položku '%s' z cache\n"
|
msgstr "nelze odstranit položku '%s' z mezipaměti\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: ignoring package upgrade (%s => %s)\n"
|
msgid "%s: ignoring package upgrade (%s => %s)\n"
|
||||||
@@ -415,11 +452,11 @@ msgstr "%s: ignoruje se aktualizace balíčku (%s => %s)\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: ignoring package downgrade (%s => %s)\n"
|
msgid "%s: ignoring package downgrade (%s => %s)\n"
|
||||||
msgstr "%s: ignoruje se ponížení verze balíčku (%s => %s)\n"
|
msgstr "%s: ignoruje se snížení verze balíčku (%s => %s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: downgrading from version %s to version %s\n"
|
msgid "%s: downgrading from version %s to version %s\n"
|
||||||
msgstr "%s: ponížení z verze %s na verzi %s\n"
|
msgstr "%s: snížení z verze %s na verzi %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: local (%s) is newer than %s (%s)\n"
|
msgid "%s: local (%s) is newer than %s (%s)\n"
|
||||||
@@ -433,18 +470,6 @@ msgstr "ignoruje se náhrada balíčku (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "nelze nahradit soubor %s souborem %s\n"
|
msgstr "nelze nahradit soubor %s souborem %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s je aktuální -- vynechat\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s je aktuální -- přeinstalovat\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "ponížení verze balíčku %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "zjištěn konflikt nerozlišitelných balíčků\n"
|
msgstr "zjištěn konflikt nerozlišitelných balíčků\n"
|
||||||
@@ -465,6 +490,10 @@ msgstr "nelze provést transakci pro odstranění\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "nelze provést transakci\n"
|
msgstr "nelze provést transakci\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "verze databáze %s je příliš stará\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "nelze odstranit zamykací soubor %s\n"
|
msgstr "nelze odstranit zamykací soubor %s\n"
|
||||||
@@ -482,8 +511,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "nelze odstranit dočasný adresář %s\n"
|
msgstr "nelze odstranit dočasný adresář %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "nelze změnit adresář na %s (%s)\n"
|
msgstr "nepodařilo se vytvořit rouru (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -494,109 +523,25 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "nelze změnit kořenový adresář (%s)\n"
|
msgstr "nelze změnit kořenový adresář (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "nelze změnit adresář na / (%s)\n"
|
msgstr "volání execv selhalo (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "volání popen selhalo (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "volání waitpid selhalo (%s)\n"
|
msgstr "volání waitpid selhalo (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "nepodařilo se otevřít rouru (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "příkaz se nepodařilo spustit správně\n"
|
msgstr "příkaz se nepodařilo spustit správně\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "no %s cache exists, creating...\n"
|
msgid "no %s cache exists, creating...\n"
|
||||||
msgstr "neexistuje cache %s, vytváří se...\n"
|
msgstr "neexistuje mezipaměť %s, vytváří se...\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "couldn't create package cache, using /tmp instead\n"
|
msgid "couldn't create package cache, using /tmp instead\n"
|
||||||
msgstr "nelze vytvořit cache balíčků, používá se /tmp\n"
|
msgstr "nelze vytvořit mezipaměť balíčků, používá se /tmp\n"
|
||||||
|
|
||||||
#~ msgid "conflicting packages were found in target list\n"
|
|
||||||
#~ msgstr "v seznamu cílů byly nalezeny konfliktní balíčky\n"
|
|
||||||
|
|
||||||
#~ msgid "you cannot install two conflicting packages at the same time\n"
|
|
||||||
#~ msgstr "nelze instalovat dva konfliktní balíčky současně\n"
|
|
||||||
|
|
||||||
#~ msgid "replacing packages with -U is not supported yet\n"
|
|
||||||
#~ msgstr "nahrazování balíčků pomocí -U není nyní podporováno\n"
|
|
||||||
|
|
||||||
#~ msgid "you can replace packages manually using -Rd and -U\n"
|
|
||||||
#~ msgstr "balíčky lze nahradit ručně použitím -Rd a -U\n"
|
|
||||||
|
|
||||||
#~ msgid "url scheme not specified, assuming HTTP\n"
|
|
||||||
#~ msgstr "schéma URL nedefinováno, předpokládá se HTTP\n"
|
|
||||||
|
|
||||||
#~ msgid "cannot write to file '%s'\n"
|
|
||||||
#~ msgstr "nelze zapisovat do souboru '%s'\n"
|
|
||||||
|
|
||||||
#~ msgid "no such repository"
|
|
||||||
#~ msgstr "takový repositář není nastaven"
|
|
||||||
|
|
||||||
#~ msgid "repository '%s' not found\n"
|
|
||||||
#~ msgstr "repositář '%s' nebyl nalezen\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create removal transaction\n"
|
|
||||||
#~ msgstr "nelze vytvořit transakci pro odstranění\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create transaction\n"
|
|
||||||
#~ msgstr "nelze vytvořit transakci\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize the removal transaction\n"
|
|
||||||
#~ msgstr "nelze inicializovat transakci pro odstranění\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize transaction\n"
|
|
||||||
#~ msgstr "nelze inicializovat transakci\n"
|
|
||||||
|
|
||||||
#~ msgid "could not prepare removal transaction\n"
|
|
||||||
#~ msgstr "nelze připravit transakci pro odstranění\n"
|
|
||||||
|
|
||||||
#~ msgid "error downloading '%s': %s\n"
|
|
||||||
#~ msgstr "chyba při stahování '%s': %s\n"
|
|
||||||
|
|
||||||
#~ msgid "could not chdir to %s\n"
|
|
||||||
#~ msgstr "nelze změnit adresář na %s\n"
|
|
||||||
|
|
||||||
#~ msgid "running XferCommand: fork failed!\n"
|
|
||||||
#~ msgstr "spouští se XferCommand: větvení selhalo!\n"
|
|
||||||
|
|
||||||
#~ msgid "could not commit transaction"
|
|
||||||
#~ msgstr "nelze provést transakci"
|
|
||||||
|
|
||||||
#~ msgid "could not download all files"
|
|
||||||
#~ msgstr "nelze stáhnout všechny soubory"
|
|
||||||
|
|
||||||
#~ msgid "cannot load package data"
|
|
||||||
#~ msgstr "nelze načíst data z balíčku"
|
|
||||||
|
|
||||||
#~ msgid "package not installed or lesser version"
|
|
||||||
#~ msgstr "balíček není nainstalovaný nebo má nižší verzi"
|
|
||||||
|
|
||||||
#~ msgid "group not found"
|
|
||||||
#~ msgstr "skupina nebyla nalezena"
|
|
||||||
|
|
||||||
#~ msgid "user aborted the operation"
|
|
||||||
#~ msgstr "uživatel zrušil operaci"
|
|
||||||
|
|
||||||
#~ msgid "internal error"
|
|
||||||
#~ msgstr "interní chyba"
|
|
||||||
|
|
||||||
#~ msgid "not confirmed"
|
|
||||||
#~ msgstr "nepotvrzeno"
|
|
||||||
|
|
||||||
#~ msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
|
|
||||||
#~ msgstr "%s-%s: ignoruje se aktualizace balíčku (měl být nahrazen %s-%s)\n"
|
|
||||||
|
|
||||||
#~ msgid "command: %s\n"
|
|
||||||
#~ msgstr "příkaz: %s\n"
|
|
||||||
|
|
||||||
#~ msgid "could not prepare transaction\n"
|
|
||||||
#~ msgstr "nelze připravit transakci\n"
|
|
||||||
|
|
||||||
#~ msgid "No /bin/sh in parent environment, aborting scriptlet\n"
|
|
||||||
#~ msgstr "V rodičovském prostředí chybí /bin/sh, ruší se provádění skriptů\n"
|
|
||||||
|
|||||||
546
lib/libalpm/po/da.po
Normal file
546
lib/libalpm/po/da.po
Normal file
@@ -0,0 +1,546 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
|
"PO-Revision-Date: 2011-03-04 18:24+0000\n"
|
||||||
|
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
|
||||||
|
"Language-Team: Danish <None>\n"
|
||||||
|
"Language: da\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
|
msgstr "%s-%s er opdateret - springer over\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
|
msgstr "%s-%s er opdateret - springer over\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "nedgraderer pakke %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "kunne ikke udtrække %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"directory permissions differ on %s\n"
|
||||||
|
"filesystem: %o package: %o\n"
|
||||||
|
msgstr ""
|
||||||
|
"mapperettigheder er forskellige for %s\n"
|
||||||
|
"filsystem: %o pakke: %o\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "extract: not overwriting dir with file %s\n"
|
||||||
|
msgstr "udtræk: overskriver ikke mappe med fil %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
|
msgstr "udtræk: symbolsk henvisning %s peger ikke på mappe\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
|
msgstr "kunne ikke omdøbe %s til %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s saved as %s\n"
|
||||||
|
msgstr "%s gemt som %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not install %s as %s (%s)\n"
|
||||||
|
msgstr "kunne ikke installere %s som %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s installed as %s\n"
|
||||||
|
msgstr "%s installeret som %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "extracting %s as %s.pacnew\n"
|
||||||
|
msgstr "udtrækker %s som %s.pacnew\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get current working directory\n"
|
||||||
|
msgstr "kunne ikke hente aktuelt arbejdsmappe\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "kunne ikke ændre mappe til %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "problem occurred while upgrading %s\n"
|
||||||
|
msgstr "der opstod et problem under opgradering %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "problem occurred while installing %s\n"
|
||||||
|
msgstr "der opstod et problem under installation af %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not update database entry %s-%s\n"
|
||||||
|
msgstr "kunne ikke opdatere databasepunkt %s-%s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not add entry '%s' in cache\n"
|
||||||
|
msgstr "kunne ikke tilføje punkt »%s« i mellemlager\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing invalid database: %s\n"
|
||||||
|
msgstr "fjerner ugyldig database: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid name for database entry '%s'\n"
|
||||||
|
msgstr "ugyldigt navn for databasepunkt »%s«\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "duplicated database entry '%s'\n"
|
||||||
|
msgstr "duplikeret databasepunkt »%s«\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "corrupted database entry '%s'\n"
|
||||||
|
msgstr "ødelagt databasepunkt »%s«\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open file %s: %s\n"
|
||||||
|
msgstr "kunne ikke åbne fil %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database is inconsistent: name mismatch on package %s\n"
|
||||||
|
msgstr "%s-database er inkonsistent: forskellige navne på pakke %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database is inconsistent: version mismatch on package %s\n"
|
||||||
|
msgstr "%s-database er inkonsistent: forskellige versioner på pakke %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create directory %s: %s\n"
|
||||||
|
msgstr "kunne ikke oprette mappe %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not parse package description file in %s\n"
|
||||||
|
msgstr "kunne ikke fortolke pakkebeskrivelsesfil i %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "missing package name in %s\n"
|
||||||
|
msgstr "manglende pakkenavn i %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "missing package version in %s\n"
|
||||||
|
msgstr "manglende pakkeversion i %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "error while reading package %s: %s\n"
|
||||||
|
msgstr "der opstod en fejl under læsning af pakke %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "missing package metadata in %s\n"
|
||||||
|
msgstr "manglende pakkemetadata i %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing invalid file: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database path is undefined\n"
|
||||||
|
msgstr "databasesti er udefineret\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "dependency cycle detected:\n"
|
||||||
|
msgstr "afhængighedscyklus detekteret:\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s will be removed after its %s dependency\n"
|
||||||
|
msgstr "%s vil blive fjernet efter dennes %s-afhængighed\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s will be installed before its %s dependency\n"
|
||||||
|
msgstr "%s vil blive installeret før dennes %s-afhængighed\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "ignoring package %s-%s\n"
|
||||||
|
msgstr "ignorerer pakke %s-%s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
|
msgstr "kan ikke læse »%s«, en afhængighed af »%s«\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "disk"
|
||||||
|
msgstr "disk"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "url '%s' is invalid\n"
|
||||||
|
msgstr "adressen »%s« er ugyldig\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed retrieving file '%s' from %s : %s\n"
|
||||||
|
msgstr "fejlede i indhentning af fil »%s« fra %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "resuming download of %s not possible; starting over\n"
|
||||||
|
msgstr "det er ikke muligt at genoptage hentning af %s; starter forfra\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "error writing to file '%s': %s\n"
|
||||||
|
msgstr "fejl under skrivning til fil »%s«: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed retrieving file '%s' from %s\n"
|
||||||
|
msgstr "kunne ikke indhente fil »%s« fra %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s appears to be truncated: %jd/%jd bytes\n"
|
||||||
|
msgstr "%s ser ud til at være afkortet: %jd/%jd byte\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to download %s\n"
|
||||||
|
msgstr "kunne ikke hente %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "out of memory!"
|
||||||
|
msgstr "ikke nok hukommelse!"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unexpected system error"
|
||||||
|
msgstr "uventet systemfejl"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "insufficient privileges"
|
||||||
|
msgstr "utilstrækkelige privilegier"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find or read file"
|
||||||
|
msgstr "kunne ikke finde eller læse fil"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find or read directory"
|
||||||
|
msgstr "kunne ikke finde eller læse mappe"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "wrong or NULL argument passed"
|
||||||
|
msgstr "forkert eller NULL-argument vidersendt"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "library not initialized"
|
||||||
|
msgstr "bibliotek er ikke initialiseret"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "library already initialized"
|
||||||
|
msgstr "bibliotek er allerede initialiseret"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unable to lock database"
|
||||||
|
msgstr "kunne ikke låse database"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open database"
|
||||||
|
msgstr "kunne ikke åbne database"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create database"
|
||||||
|
msgstr "kunne ikke oprette database"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database not initialized"
|
||||||
|
msgstr "database er ikke initialiseret"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database already registered"
|
||||||
|
msgstr "database er allerede registreret"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find database"
|
||||||
|
msgstr "kunne ikke finde database"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not update database"
|
||||||
|
msgstr "kunne ikke opdatere database"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove database entry"
|
||||||
|
msgstr "kunne ikke fjerne databasepunkt"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid url for server"
|
||||||
|
msgstr "ugyldig adresse for server"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "no servers configured for repository"
|
||||||
|
msgstr "ingen servere konfigureret for arkiv"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction already initialized"
|
||||||
|
msgstr "transaktion allerede initialiseret"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction not initialized"
|
||||||
|
msgstr "transaktion er ikke initialiseret"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "duplicate target"
|
||||||
|
msgstr "dupliker mål"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction not prepared"
|
||||||
|
msgstr "transaktion er ikke forberedt"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction aborted"
|
||||||
|
msgstr "transaktion afbrudt"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "operation not compatible with the transaction type"
|
||||||
|
msgstr "handling er ikke kompatibel med transaktionstype"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction commit attempt when database is not locked"
|
||||||
|
msgstr "forsøg på transaktionsindsendelse (commit) når database ikke er låst"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find or read package"
|
||||||
|
msgstr "kunne ikke finde eller læse pakke"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "operation cancelled due to ignorepkg"
|
||||||
|
msgstr "handling afbrudt på grund af igonrepkg"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid or corrupted package"
|
||||||
|
msgstr "ugyldig eller ødelagt pakke"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot open package file"
|
||||||
|
msgstr "kan ikke åbne pakkefil"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot remove all files for package"
|
||||||
|
msgstr "kan ikke fjerne alle filer for pakke"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "package filename is not valid"
|
||||||
|
msgstr "pakkefilnavn er ugyldigt"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "package architecture is not valid"
|
||||||
|
msgstr "pakkearkitektur er ikke gyldig"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find repository for target"
|
||||||
|
msgstr "kunne ikke finde arkiv for mål"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid or corrupted delta"
|
||||||
|
msgstr "ugyldig eller ødelagt delta"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "delta patch failed"
|
||||||
|
msgstr "deltarettelse (patch) fejlede"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not satisfy dependencies"
|
||||||
|
msgstr "kunne ikke tilfredsstille afhængigheder"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "conflicting dependencies"
|
||||||
|
msgstr "konfliktende afhængigheder"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "conflicting files"
|
||||||
|
msgstr "konfliktende filer"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to retrieve some files"
|
||||||
|
msgstr "kunne ikke indhente nogle filer"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid regular expression"
|
||||||
|
msgstr "ugyldigt regulært udtryk"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "libarchive error"
|
||||||
|
msgstr "biblioteksarkivfejl"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "download library error"
|
||||||
|
msgstr "hent biblioteksfejl"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "error invoking external downloader"
|
||||||
|
msgstr "fejl under opstart af ekstern hentningsprogram"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unexpected error"
|
||||||
|
msgstr "uventet fejl"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find %s in database -- skipping\n"
|
||||||
|
msgstr "kunne ikke finde %s i database - springer over\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing %s from target list\n"
|
||||||
|
msgstr "fjerner %s fra målliste\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot remove file '%s': %s\n"
|
||||||
|
msgstr "kan ikke fjerne fil »%s«:%s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove database entry %s-%s\n"
|
||||||
|
msgstr "kunne ikke fjerne databasepunkt %s-%s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove entry '%s' from cache\n"
|
||||||
|
msgstr "kunne ikke fjerne punkt '%s' fra mellemlager\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: ignoring package upgrade (%s => %s)\n"
|
||||||
|
msgstr "%s: ignorerer pakkeopgradering (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: ignoring package downgrade (%s => %s)\n"
|
||||||
|
msgstr "%s: ignorerer pakkenedgradering (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: downgrading from version %s to version %s\n"
|
||||||
|
msgstr "%s: nedgraderer fra version %s til version %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: local (%s) is newer than %s (%s)\n"
|
||||||
|
msgstr "%s: lokal (%s) er nyere end %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "ignoring package replacement (%s-%s => %s-%s)\n"
|
||||||
|
msgstr "ignorerer pakkeerstatning (%s-%s => %s-%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot replace %s by %s\n"
|
||||||
|
msgstr "kan ikke erstatte %s med %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unresolvable package conflicts detected\n"
|
||||||
|
msgstr "pakkekonflikter, der ikke kan løses, er detekteret\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing '%s' from target list because it conflicts with '%s'\n"
|
||||||
|
msgstr "fjerner »%s« fra målliste da det konflikter med »%s«\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to retrieve some files from %s\n"
|
||||||
|
msgstr "kunne ikke indhente nogle filer fra %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not commit removal transaction\n"
|
||||||
|
msgstr "kunne ikke indsende (commit) fjernelsestransaktion\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not commit transaction\n"
|
||||||
|
msgstr "kunne ikke indsende (commit) transaktion\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove lock file %s\n"
|
||||||
|
msgstr "kunne ikke fjerne låsningsfil %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create temp directory\n"
|
||||||
|
msgstr "kunne ikke oprette midlertidig mappe\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not copy tempfile to %s (%s)\n"
|
||||||
|
msgstr "kunne ikke kopier midlertidig fil til %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove tmpdir %s\n"
|
||||||
|
msgstr "kunne ikke fjerne tmpdir %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create pipe (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not fork a new process (%s)\n"
|
||||||
|
msgstr "kunne ikke forgren en ny proces (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change the root directory (%s)\n"
|
||||||
|
msgstr "kunne ikke ændre rodmappen (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "call to execv failed (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "call to waitpid failed (%s)\n"
|
||||||
|
msgstr "kald til waitpid fejlede (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "command failed to execute correctly\n"
|
||||||
|
msgstr "kommando kunne ikke udføres korrekt\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "no %s cache exists, creating...\n"
|
||||||
|
msgstr "intet %s-mellemlager findes, opretter...\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "couldn't create package cache, using /tmp instead\n"
|
||||||
|
msgstr "kunne ikke oprette pakkemellemlager, bruger /tmp i steden for\n"
|
||||||
@@ -1,35 +1,41 @@
|
|||||||
# translation of de.po to German
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# German translations for Pacman package manager package.
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
# Marcus Habermehl <bmh1980@frugalware.org>, 2006.
|
|
||||||
# Pierre Schmitz <pierre@archlinux.de>, 2007.
|
|
||||||
# Niclas Pfeifer <macwolf@archlinux.de>, 2007.
|
|
||||||
# Matthias Gorissen <matthias@archlinux.de>, 2008-2009.
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-07 20:02+0100\n"
|
"PO-Revision-Date: 2011-03-08 14:50+0000\n"
|
||||||
"Last-Translator: Matthias Gorissen <matthias@archlinux.de>\n"
|
"Last-Translator: tlaloc <matthias@archlinux.de>\n"
|
||||||
"Language-Team: German <archlinux.de>\n"
|
"Language-Team: German <None>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);X-Generator: KBabel 1.11.4\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
"X-Generator: KBabel 1.11.4\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr "Ersetze ältere Version %s-%s durch %s in der Ziel-Liste\n"
|
msgstr "%s-%s ist aktuell -- Überspringe\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr ""
|
msgstr "%s-%s ist aktuell -- Reinstalliere\n"
|
||||||
"Überspringe %s-%s, da sich die neuere Version %s in der Ziel-Liste befindet\n"
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "Downgrade des Paketes %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "Es erscheint eine Warnung, wenn %s extrahiert wird (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "Konnte %s nicht entpacken (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -47,10 +53,6 @@ msgstr "Entpacken: Überschreibe Verzeichnis nicht mit Datei %s\n"
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "Entpacken: Symlink %s zeigt nicht zum Verzeichnis\n"
|
msgstr "Entpacken: Symlink %s zeigt nicht zum Verzeichnis\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "Konnte %s nicht entpacken (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "Konnte %s nicht in %s umbenennen (%s)\n"
|
msgstr "Konnte %s nicht in %s umbenennen (%s)\n"
|
||||||
@@ -75,6 +77,10 @@ msgstr "Entpacke %s als %s.pacnew\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "Konnte aktuelles Arbeitsverzeichnis nicht ermitteln\n"
|
msgstr "Konnte aktuelles Arbeitsverzeichnis nicht ermitteln\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "Konnte nicht zu Verzeichnis %s wechseln (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "Fehler traten auf, während %s aktualisiert wurde\n"
|
msgstr "Fehler traten auf, während %s aktualisiert wurde\n"
|
||||||
@@ -95,18 +101,6 @@ msgstr "Konnte Eintrag '%s' nicht zum Pufferspeicher hinzufügen\n"
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "Entferne die ungültige Datenbank: %s\n"
|
msgstr "Entferne die ungültige Datenbank: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "Konnte Datei %s nicht öffnen: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "Konnte Datenbank-Verzeichnis %s nicht entfernen\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "Konnte Datenbank %s nicht entfernen\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "Ungültiger Name für Datenbank-Eintrag '%s'\n"
|
msgstr "Ungültiger Name für Datenbank-Eintrag '%s'\n"
|
||||||
@@ -160,12 +154,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "Fehlende Paket-Metadaten in %s\n"
|
msgstr "Fehlende Paket-Metadaten in %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "Datenbank-Pfad ist nicht definiert\n"
|
msgstr "Entferne ungültige Datei: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "Versuche die lokale Datenbank neu zu registrieren\n"
|
msgstr "Datenbank-Pfad ist nicht definiert\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -183,14 +177,35 @@ msgstr "%s wird vor seiner Abhängigkeit %s installiert werden\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "Ignoriere Paket %s-%s)\n"
|
msgstr "Ignoriere Paket %s-%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "Bereitstellendes Paket wurde ausgewählt (%s enthält %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "Kann \"%s\" nicht auflösen (eine Abhängigkeit von \"%s\")\n"
|
msgstr "Kann \"%s\" nicht auflösen (eine Abhängigkeit von \"%s\")\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "Konnte keine Dateisystem-Informationen erhalten\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr "Konnte keine Dateisystem-Informationen für %s erhalten: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "Konnte keinen Einhänge-Punkt für die Datei %s ermitteln"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "Konnte die Einhängepunkte des Dateisystems nicht bestimmen"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "Die Partition %s ist so eingehängt, daß sie nur gelesen werden kann\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
"Partition %s überfüllt: %ld Blöcke werden benötigt, %ld Blöcke sind frei\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "Platte"
|
msgstr "Platte"
|
||||||
@@ -205,7 +220,7 @@ msgstr "Konnte Datei '%s' nicht von %s übertragen : %s\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "resuming download of %s not possible; starting over\n"
|
msgid "resuming download of %s not possible; starting over\n"
|
||||||
msgstr "Kann den Download von %s wieder aufnehmen, starte neu\n"
|
msgstr "Kann den Download von %s nicht wieder aufnehmen, starte neu\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "error writing to file '%s': %s\n"
|
msgid "error writing to file '%s': %s\n"
|
||||||
@@ -247,6 +262,10 @@ msgstr "Konnte Verzeichnis nicht finden oder lesen"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "Falsches oder NULL-Argument übergeben"
|
msgstr "Falsches oder NULL-Argument übergeben"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "Nicht genug freier Festplattenplatz"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "Bibliothek nicht initialisiert"
|
msgstr "Bibliothek nicht initialisiert"
|
||||||
@@ -279,6 +298,10 @@ msgstr "Datenbank bereits registriert"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "Konnte Datenbank nicht finden"
|
msgstr "Konnte Datenbank nicht finden"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "Keine korrekte Version der Datenbank"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "Konnte Datenbank nicht aktualisieren"
|
msgstr "Konnte Datenbank nicht aktualisieren"
|
||||||
@@ -380,6 +403,10 @@ msgstr "In Konflikt stehende Dateien"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "Konnte manche Dateien nicht übertragen"
|
msgstr "Konnte manche Dateien nicht übertragen"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "Konnte irgendeine Datei nicht kopieren"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "Ungültiger Regulärer Ausdruck"
|
msgstr "Ungültiger Regulärer Ausdruck"
|
||||||
@@ -400,6 +427,10 @@ msgstr "Fehler beim Aufruf eines externen Downloaders"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "Unerwarteter Fehler"
|
msgstr "Unerwarteter Fehler"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "Datenbank überschreitet die maximal erlaubte Größe\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "Konnte %s nicht in Datenbank finden -- Überspringe\n"
|
msgstr "Konnte %s nicht in Datenbank finden -- Überspringe\n"
|
||||||
@@ -444,18 +475,6 @@ msgstr "Ignoriere Paket-Ersetzung (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "Kann %s nicht durch %s ersetzen\n"
|
msgstr "Kann %s nicht durch %s ersetzen\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s ist aktuell -- Überspringe\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s ist aktuell -- Reinstalliere\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "Downgrade des Paketes %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "Nicht lösbare Paketkonflikte gefunden\n"
|
msgstr "Nicht lösbare Paketkonflikte gefunden\n"
|
||||||
@@ -476,6 +495,10 @@ msgstr "Konnte Lösch-Vorgang nicht durchführen\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "Konnte den Vorgang nicht durchführen\n"
|
msgstr "Konnte den Vorgang nicht durchführen\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "Datenbank-Version %s ist zu alt\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "Konnte Sperrdatei %s nicht entfernen\n"
|
msgstr "Konnte Sperrdatei %s nicht entfernen\n"
|
||||||
@@ -493,8 +516,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "Konnte temporäres Verzeichnis %s nicht entfernen\n"
|
msgstr "Konnte temporäres Verzeichnis %s nicht entfernen\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "Konnte nicht zu Verzeichnis %s wechseln (%s)\n"
|
msgstr "Konnte Weiterleitung nicht erstellen (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -505,17 +528,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "Konnte Root-Verzeichnis nicht wechseln (%s)\n"
|
msgstr "Konnte Root-Verzeichnis nicht wechseln (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "Konnte nicht zu Verzeichnis / (%s) wechseln\n"
|
msgstr "Konnte execv nicht aufrufen (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "Aufruf von 'popen' fehlgeschlagen (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "Aufruf von 'waitpid' fehlgeschlagen (%s)\n"
|
msgstr "Aufruf von 'waitpid' fehlgeschlagen (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "Konnte Weiterleitung nicht öffnen (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "Befehl konnte nicht korrekt ausgeführt werden\n"
|
msgstr "Befehl konnte nicht korrekt ausgeführt werden\n"
|
||||||
|
|||||||
@@ -1,33 +1,41 @@
|
|||||||
# Greek translations for Pacman package manager package.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
# Christos Nouskas <nous@archlinux.us>, 2009, 2010.
|
|
||||||
# Χρήστος Νούσκας (Christos Nouskas) <nous@archlinux.us>, 2010.
|
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-09 23:02+0300\n"
|
"PO-Revision-Date: 2011-03-05 00:39+0000\n"
|
||||||
"Last-Translator: Χρήστος Νούσκας (Christos Nouskas) <nous@archlinux.us>\n"
|
"Last-Translator: nous <nous@archlinux.us>\n"
|
||||||
"Language-Team: Greek <>\n"
|
"Language-Team: Greek <None>\n"
|
||||||
"Language: Greek\n"
|
"Language: el\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Lokalize 1.0\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr ""
|
msgstr "%s-%s ενημερωμένο -- παράλειψη\n"
|
||||||
"αντικατάσταση παλαιότερης έκδοσης %s-%s από %s στην λίστα διεκπεραίωσης\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr ""
|
msgstr "%s-%s ενημερωμένο -- επανεγκατάσταση\n"
|
||||||
"παράλειψη %s-%s καθώς υπάρχει νεότερη έκδοση %s στην λίστα διεκπεραίωσης\n"
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "υποβάθμιση πακέτου %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "προειδοποίηση κατά την εξαγωγή του %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "αδυναμία εξαγωγής %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -45,10 +53,6 @@ msgstr "εξαγωγή: μη αντικατάσταση καταλόγου απ
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "εξαγωγή: ο συμβολικός δεσμός %s δεν δείχνει σε κατάλογο\n"
|
msgstr "εξαγωγή: ο συμβολικός δεσμός %s δεν δείχνει σε κατάλογο\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "αδυναμία εξαγωγής %s (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "αδυναμία μετονομασίας %s σε %s (%s)\n"
|
msgstr "αδυναμία μετονομασίας %s σε %s (%s)\n"
|
||||||
@@ -73,6 +77,10 @@ msgstr "εξαγωγή %s ως %s.pacnew\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "αδυναμία χρήσης τρέχοντος καταλόγου\n"
|
msgstr "αδυναμία χρήσης τρέχοντος καταλόγου\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "αδυναμία μετάβασης στον κατάλογο %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "πρόβλημα κατά την αναβάθμιση του %s\n"
|
msgstr "πρόβλημα κατά την αναβάθμιση του %s\n"
|
||||||
@@ -93,18 +101,6 @@ msgstr "αδυναμία προσθήκης εγγραφής '%s' στην κρ
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "διαγραφή άκυρης βάσης: %s\n"
|
msgstr "διαγραφή άκυρης βάσης: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "αδυναμία ανάγνωσης %s: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "αδυναμία διαγραφής καταλόγου βάσης %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "αδυναμία διαγραφής βάσης %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "άκυρο όνομα εγγραφής βάσης '%s'\n"
|
msgstr "άκυρο όνομα εγγραφής βάσης '%s'\n"
|
||||||
@@ -154,12 +150,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "απόντα μετα-δεδομένα πακέτου στο %s\n"
|
msgstr "απόντα μετα-δεδομένα πακέτου στο %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "ακαθόριστη διαδρομή βάσης\n"
|
msgstr "διαγραφή άκυρου αρχείου: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "προσπάθεια επανακαταχώρησης 'τοπικής' βάσης\n"
|
msgstr "ακαθόριστη διαδρομή βάσης\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -177,14 +173,34 @@ msgstr "εγκατάσταση του %s πρίν από την εξάρτησή
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "παράβλεψη πακέτου %s-%s\n"
|
msgstr "παράβλεψη πακέτου %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "επιλογή παρέχοντος πακέτου (το %s παρέχει το %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "αδυναμία εύρεσης του \"%s\", εξάρτησης του \"%s\"\n"
|
msgstr "αδυναμία εύρεσης του \"%s\", εξάρτησης του \"%s\"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "αδυναμία λήψης πληροφοριών συστήματος αρχείων\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr "αδυναμία λήψης πληροφοριών συστήματος αρχείων για το %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "αδυναμία καθορισμού σημείου προσάρτησης αρχείου %s"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "αδυναμία καθορισμού σημείων προσάρτησης συστήματος αρχείων"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "Kατάτμηση %s: προσαρτημένη μόνο για ανάγνωση\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr "Kατάτμηση %s πλήρης: %ld blocks απαιτούνται, %ld ελεύθερα\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "δίσκο"
|
msgstr "δίσκο"
|
||||||
@@ -241,6 +257,10 @@ msgstr "αδυναμία εύρεσης ή ανάγνωσης καταλόγου
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "εσφαλμένο ή NULL όρισμα"
|
msgstr "εσφαλμένο ή NULL όρισμα"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "ανεπαρκής ελεύθερος χώρος στον δίσκο"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "βιβλιοθήκη μη εκκινηθείσα"
|
msgstr "βιβλιοθήκη μη εκκινηθείσα"
|
||||||
@@ -273,6 +293,10 @@ msgstr "βάση ήδη εκκινηθείσα"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "αδυναμία εύρεσης βάσης"
|
msgstr "αδυναμία εύρεσης βάσης"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "εσφαλμένη έκδοση βάσης"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "αδυναμία ενημέρωσης βάσης"
|
msgstr "αδυναμία ενημέρωσης βάσης"
|
||||||
@@ -373,6 +397,10 @@ msgstr "διένεξη αρχείων"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "αποτυχία λήψης κάποιων αρχείων"
|
msgstr "αποτυχία λήψης κάποιων αρχείων"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "αποτυχία αντιγραφής αρχείου"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "άκυρη κανονική έκφραση"
|
msgstr "άκυρη κανονική έκφραση"
|
||||||
@@ -393,6 +421,10 @@ msgstr "σφάλμα κλήσης προγράμματος λήψης"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "απροσδόκητο σφάλμα"
|
msgstr "απροσδόκητο σφάλμα"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "βάση μεγαλύτερη από μέγιστο όριο\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "δεν βρέθηκε το %s στη βάση -- παράλειψη\n"
|
msgstr "δεν βρέθηκε το %s στη βάση -- παράλειψη\n"
|
||||||
@@ -437,18 +469,6 @@ msgstr "παράβλεψη αντικαταστάτη πακέτου (%s-%s => %
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "αδυναμία αντικατάστασης του %s από το %s\n"
|
msgstr "αδυναμία αντικατάστασης του %s από το %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s ενημερωμένο -- παράλειψη\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s ενημερωμένο -- επανεγκατάσταση\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "υποβάθμιση πακέτου %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "εντοπισμός ανεπίλυτων διενέξεων πακέτων\n"
|
msgstr "εντοπισμός ανεπίλυτων διενέξεων πακέτων\n"
|
||||||
@@ -470,6 +490,10 @@ msgstr "αδυναμία διεκπεραίωσης διαγραφής\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "αδυναμία διεκπεραίωσης\n"
|
msgstr "αδυναμία διεκπεραίωσης\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "πολύ παλιά έκδοση βάσης %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "αδυναμία διαγραφής αρχείου κλειδώματος %s\n"
|
msgstr "αδυναμία διαγραφής αρχείου κλειδώματος %s\n"
|
||||||
@@ -487,8 +511,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "αδυναμία διαγραφής προσωρινού καταλόγου %s\n"
|
msgstr "αδυναμία διαγραφής προσωρινού καταλόγου %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "αδυναμία μετάβασης στον κατάλογο %s (%s)\n"
|
msgstr "αδυναμία δημιουργίας αγωγού (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -499,17 +523,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "αδυναμία αλλαγής ριζικού καταλόγου (%s)\n"
|
msgstr "αδυναμία αλλαγής ριζικού καταλόγου (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "αδυναμία αλλαγής καταλόγου σε / (%s)\n"
|
msgstr "αποτυχία κλήσης execv (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "αποτυχία κλήσης popen (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "αποτυχία κλήσης waitpid (%s)\n"
|
msgstr "αποτυχία κλήσης waitpid (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "αποτυχία ανοίγματος αγωγού (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "αποτυχία σωστής εκτέλεσης εντολής\n"
|
msgstr "αποτυχία σωστής εκτέλεσης εντολής\n"
|
||||||
@@ -521,43 +545,3 @@ msgstr "δημιουργία κρύπτης %s...\n"
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "couldn't create package cache, using /tmp instead\n"
|
msgid "couldn't create package cache, using /tmp instead\n"
|
||||||
msgstr "αδυναμία δημιουργίας κρύπτης πακέτων, χρήση /tmp\n"
|
msgstr "αδυναμία δημιουργίας κρύπτης πακέτων, χρήση /tmp\n"
|
||||||
|
|
||||||
#~ msgid "conflicting packages were found in target list\n"
|
|
||||||
#~ msgstr "βρέθηκαν αντιτιθέμενα πακέτα στην λίστα διεκπεραίωσης\n"
|
|
||||||
|
|
||||||
#~ msgid "you cannot install two conflicting packages at the same time\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "δεν επιτρέπεται η ταυτόχρονη εγκατάσταση δύο αντιτιθεμένων πακέτων\n"
|
|
||||||
|
|
||||||
#~ msgid "replacing packages with -U is not supported yet\n"
|
|
||||||
#~ msgstr "η αντικατάσταση πακέτων με όρισμα -U δεν υποστηρίζεται ακόμη\n"
|
|
||||||
|
|
||||||
#~ msgid "you can replace packages manually using -Rd and -U\n"
|
|
||||||
#~ msgstr "η αντικατάσταση πακέτων μπορεί να γίνει χειροκίνητα με -Rd and -U\n"
|
|
||||||
|
|
||||||
#~ msgid "url scheme not specified, assuming HTTP\n"
|
|
||||||
#~ msgstr "ακαθόριστο πρωτόκολλο url, εικάζεται HTTP\n"
|
|
||||||
|
|
||||||
#~ msgid "cannot write to file '%s'\n"
|
|
||||||
#~ msgstr "αδυναμία εγγραφής στο '%s'\n"
|
|
||||||
|
|
||||||
#~ msgid "no such repository"
|
|
||||||
#~ msgstr "δεν υπάρχει τέτοια αποθήκη"
|
|
||||||
|
|
||||||
#~ msgid "repository '%s' not found\n"
|
|
||||||
#~ msgstr "δεν βρέθηκε αποθήκη'%s'\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create removal transaction\n"
|
|
||||||
#~ msgstr "αδυναμία διεκπεραίωσης κατάργησης\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create transaction\n"
|
|
||||||
#~ msgstr "αδυναμία δημιουργίας διεκπεραίωσης\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize the removal transaction\n"
|
|
||||||
#~ msgstr "αδυναμία εκκίνησης κατάργησης\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize transaction\n"
|
|
||||||
#~ msgstr "αδυναμία εκκίνησης διεκπεραίωσης\n"
|
|
||||||
|
|
||||||
#~ msgid "could not prepare removal transaction\n"
|
|
||||||
#~ msgstr "αδυναμία προετοιμασίας κατάργησης\n"
|
|
||||||
|
|||||||
@@ -1,28 +1,41 @@
|
|||||||
# English (British) translations for Pacman package manager package.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# Jeff Bailes <thepizzaking@gmail.com>, 2007, 2009.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2009-10-04 17:08+0200\n"
|
"PO-Revision-Date: 2011-03-11 04:03+0000\n"
|
||||||
"Last-Translator: Dan McGee <dpmcgee@gmail.com>\n"
|
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
|
||||||
"Language-Team: English <en_gb@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: en\n"
|
"Language: en_GB\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr "replacing older version %s-%s by %s in target list\n"
|
msgstr "%s-%s is up to date -- skipping\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr "skipping %s-%s because newer version %s is in target list\n"
|
msgstr "%s-%s is up to date -- reinstalling\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "downgrading package %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "warning given when extracting %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "could not extract %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -40,10 +53,6 @@ msgstr "extract: not overwriting dir with file %s\n"
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "extract: symlink %s does not point to dir\n"
|
msgstr "extract: symlink %s does not point to dir\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "could not extract %s (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "could not rename %s to %s (%s)\n"
|
msgstr "could not rename %s to %s (%s)\n"
|
||||||
@@ -68,6 +77,10 @@ msgstr "extracting %s as %s.pacnew\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "could not get current working directory\n"
|
msgstr "could not get current working directory\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "could not change directory to %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "problem occurred while upgrading %s\n"
|
msgstr "problem occurred while upgrading %s\n"
|
||||||
@@ -88,18 +101,6 @@ msgstr "could not add entry '%s' in cache\n"
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "removing invalid database: %s\n"
|
msgstr "removing invalid database: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "could not open %s: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "could not remove database directory %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "could not remove database %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "invalid name for database entry '%s'\n"
|
msgstr "invalid name for database entry '%s'\n"
|
||||||
@@ -149,12 +150,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "missing package metadata in %s\n"
|
msgstr "missing package metadata in %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "database path is undefined\n"
|
msgstr "removing invalid file: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "attempt to re-register the 'local' DB\n"
|
msgstr "database path is undefined\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -172,14 +173,34 @@ msgstr "%s will be installed before its %s dependency\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "ignoring package %s-%s\n"
|
msgstr "ignoring package %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "provider package was selected (%s provides %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgstr "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "could not get filesystem information\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr "could not get filesystem information for %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "could not determine mount point for file %s"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "could not determine filesystem mount points"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "Partition %s is mounted read only\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "disk"
|
msgstr "disk"
|
||||||
@@ -236,6 +257,10 @@ msgstr "could not find or read directory"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "wrong or NULL argument passed"
|
msgstr "wrong or NULL argument passed"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "not enough free disk space"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "library not initialised"
|
msgstr "library not initialised"
|
||||||
@@ -268,6 +293,10 @@ msgstr "database already registered"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "could not find database"
|
msgstr "could not find database"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "database is incorrect version"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "could not update database"
|
msgstr "could not update database"
|
||||||
@@ -368,6 +397,10 @@ msgstr "conflicting files"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "failed to retrieve some files"
|
msgstr "failed to retrieve some files"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "failed to copy some file"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "invalid regular expression"
|
msgstr "invalid regular expression"
|
||||||
@@ -388,6 +421,10 @@ msgstr "error invoking external downloader"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "unexpected error"
|
msgstr "unexpected error"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "database larger than maximum size\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "could not find %s in database -- skipping\n"
|
msgstr "could not find %s in database -- skipping\n"
|
||||||
@@ -432,18 +469,6 @@ msgstr "ignoring package replacement (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "cannot replace %s by %s\n"
|
msgstr "cannot replace %s by %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s is up to date -- skipping\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s is up to date -- reinstalling\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "downgrading package %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "unresolvable package conflicts detected\n"
|
msgstr "unresolvable package conflicts detected\n"
|
||||||
@@ -464,6 +489,10 @@ msgstr "could not commit removal transaction\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "could not commit transaction\n"
|
msgstr "could not commit transaction\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "%s database version is too old\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "could not remove lock file %s\n"
|
msgstr "could not remove lock file %s\n"
|
||||||
@@ -481,8 +510,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "could not remove tmpdir %s\n"
|
msgstr "could not remove tmpdir %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "could not change directory to %s (%s)\n"
|
msgstr "could not create pipe (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -493,17 +522,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "could not change the root directory (%s)\n"
|
msgstr "could not change the root directory (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "could not change directory to / (%s)\n"
|
msgstr "call to execv failed (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "call to popen failed (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "call to waitpid failed (%s)\n"
|
msgstr "call to waitpid failed (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "could not open pipe (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "command failed to execute correctly\n"
|
msgstr "command failed to execute correctly\n"
|
||||||
|
|||||||
@@ -1,35 +1,41 @@
|
|||||||
# Juan Pablo González Tognarelli <jotapesan@gmail.com>, 2008, 2009.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Juan Pablo González Tognarelli <juan.gonzalez.tognarelli@gmail.com>, 2009.
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# Juan Pablo Gonzalez <jotapesan@gmail.com>, 2010.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-13 10:49-0400\n"
|
"PO-Revision-Date: 2011-03-15 18:34+0000\n"
|
||||||
"Last-Translator: Juan Pablo Gonzalez <jotapesan@gmail.com>\n"
|
"Last-Translator: Traumness <traumness@gmail.com>\n"
|
||||||
"Language-Team: Spanish <kde-i18n-doc@kde.org>\n"
|
"Language-Team: Spanish (Castilian) <>\n"
|
||||||
"Language: es\n"
|
"Language: es\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Poedit-Language: Spanish\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
"X-Poedit-Country: CHILE\n"
|
|
||||||
"X-Poedit-SourceCharset: utf-8\n"
|
|
||||||
"X-Generator: Lokalize 1.0\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr ""
|
msgstr "%s-%s esta al día -- saltando\n"
|
||||||
"reemplazando la versión antigua %s-%s por %s en la lista de objetivos\n"
|
|
||||||
|
|
||||||
# , c-format
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr ""
|
msgstr "%s-%s esta al día -- re-instalando\n"
|
||||||
"saltando %s-%s debido a la nueva versión de %s esta en la lista de "
|
|
||||||
"objetivos\n"
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "decrementando la versión del paquete %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "alerta producida mientras se extraía %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "no se pudo extraer %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -41,16 +47,12 @@ msgstr ""
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "extract: not overwriting dir with file %s\n"
|
msgid "extract: not overwriting dir with file %s\n"
|
||||||
msgstr "extract: no sobrescribiendo el dir. con el archivo %s\n"
|
msgstr "extract: no se puede sobreescribir el dir con el archivo %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "extract: el link simbólico %s no apunta al directorio\n"
|
msgstr "extract: el link simbólico %s no apunta al directorio\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "no se pudo extraer %s (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "no se pudo renombrar %s a %s (%s)\n"
|
msgstr "no se pudo renombrar %s a %s (%s)\n"
|
||||||
@@ -75,46 +77,37 @@ msgstr "descomprimiendo %s como %s.pacnew\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "no se pudo obtener el directorio de trabajo actual\n"
|
msgstr "no se pudo obtener el directorio de trabajo actual\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "no se pudo cambiar el directorio a %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "ocurrieron errores mientras actualizando %s\n"
|
msgstr "ocurrió un error durante la actualización de %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while installing %s\n"
|
msgid "problem occurred while installing %s\n"
|
||||||
msgstr "ocurrieron errores mientras instalando %s\n"
|
msgstr "ocurrió un error durante la instalación de %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database entry %s-%s\n"
|
msgid "could not update database entry %s-%s\n"
|
||||||
msgstr "no se pudo actualizar en la base de datos la entrada %s-%s\n"
|
msgstr "no se pudo actualizar la entrada %s-%s en la base de datos\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not add entry '%s' in cache\n"
|
msgid "could not add entry '%s' in cache\n"
|
||||||
msgstr "no se pudo agregar '%s' en la cache\n"
|
msgstr "no se pudo agregar la entrada '%s' a la caché\n"
|
||||||
|
|
||||||
# , c-format
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "quitando la base de datos inválida: %s\n"
|
msgstr "quitando la base de datos inválida: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "no se pudo abrir %s: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "no se pudo quitar el directorio de la base de datos %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "no se pudo quitar la base de datos %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "nombre invalido para la entrada de la base de datos '%s'\n"
|
msgstr "nombre inválido para la entrada '%s' de la base de datos \n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "duplicated database entry '%s'\n"
|
msgid "duplicated database entry '%s'\n"
|
||||||
msgstr "entrada duplicada en la base de datos '%s'\n"
|
msgstr "entrada '%s' duplicada en la base de datos \n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "corrupted database entry '%s'\n"
|
msgid "corrupted database entry '%s'\n"
|
||||||
@@ -146,7 +139,7 @@ msgstr "no se pudo interpretar el archivo de descripción en %s\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "missing package name in %s\n"
|
msgid "missing package name in %s\n"
|
||||||
msgstr "falta el nombre de paquete en %s\n"
|
msgstr "falta el nombre del paquete en %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "missing package version in %s\n"
|
msgid "missing package version in %s\n"
|
||||||
@@ -161,12 +154,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "faltan los metadatos del paquete en %s\n"
|
msgstr "faltan los metadatos del paquete en %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "la ruta para la base de datos no está definida\n"
|
msgstr "eliminando archivo inválido: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "intento para re-registrar la base de datos 'local'\n"
|
msgstr "la ruta de la base de datos no está definida\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -174,7 +167,7 @@ msgstr "ciclo de dependencias detectado:\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s will be removed after its %s dependency\n"
|
msgid "%s will be removed after its %s dependency\n"
|
||||||
msgstr "%s será quitado luego de su dependencia %s\n"
|
msgstr "%s será eliminado después de su dependencia %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s will be installed before its %s dependency\n"
|
msgid "%s will be installed before its %s dependency\n"
|
||||||
@@ -184,14 +177,38 @@ msgstr "%s será instalado antes de su dependencia %s\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "ignorando el paquete %s-%s\n"
|
msgstr "ignorando el paquete %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "El paquete proveedor fue seleccionado (%s provee %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "no se pudo resolver \"%s\", una dependencia para \"%s\"\n"
|
msgstr "no se pudo resolver \"%s\", una dependencia para \"%s\"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "no se pudo obtener información del sistema de archivos\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
"no se pudo obtener información del sistema de archivos para %s: %s\n"
|
||||||
|
"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "no se pudo determinar el punto de montaje para el archivo %s"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "no se pudo determinar los puntos de montajes del sistema de archivos"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "La partición %s está montada como sólo lectura\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
"La partición %s está muy llena: %ld bloques necesarios, %ld bloques "
|
||||||
|
"disponibles\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "disco"
|
msgstr "disco"
|
||||||
@@ -202,7 +219,7 @@ msgstr "la url %s no es válida\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "failed retrieving file '%s' from %s : %s\n"
|
msgid "failed retrieving file '%s' from %s : %s\n"
|
||||||
msgstr "falló al obtener archivo '%s' desde %s: %s\n"
|
msgstr "fallo al obtener archivo '%s' desde %s: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "resuming download of %s not possible; starting over\n"
|
msgid "resuming download of %s not possible; starting over\n"
|
||||||
@@ -226,11 +243,11 @@ msgstr "no se pudo descargar %s\n"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "out of memory!"
|
msgid "out of memory!"
|
||||||
msgstr "memoria insuficiente!"
|
msgstr "¡memoria insuficiente!"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unexpected system error"
|
msgid "unexpected system error"
|
||||||
msgstr "error de sistema inesperado"
|
msgstr "error inesperado del sistema"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "insufficient privileges"
|
msgid "insufficient privileges"
|
||||||
@@ -242,19 +259,23 @@ msgstr "no se pudo encontrar o leer el archivo"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find or read directory"
|
msgid "could not find or read directory"
|
||||||
msgstr "no se pudo leer el directorio"
|
msgstr "no se pudo encontrar o leer el directorio"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "se pasó un argumento erróneo o NULO"
|
msgstr "se pasó un argumento erróneo o NULO"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "no hay suficiente espacio en el disco"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "biblioteca no inicializada"
|
msgstr "biblioteca no inicializada"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library already initialized"
|
msgid "library already initialized"
|
||||||
msgstr "la biblioteca ya fue inicializada"
|
msgstr "la biblioteca ya ha sido inicializada"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unable to lock database"
|
msgid "unable to lock database"
|
||||||
@@ -280,6 +301,10 @@ msgstr "base de datos ya registrada"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "no se pudo encontrar la base de datos"
|
msgstr "no se pudo encontrar la base de datos"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "la base de datos es una versión incorrecta"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "no se pudo actualizar la base de datos"
|
msgstr "no se pudo actualizar la base de datos"
|
||||||
@@ -323,7 +348,7 @@ msgstr "la operación no es compatible con el tipo de transacción"
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "transaction commit attempt when database is not locked"
|
msgid "transaction commit attempt when database is not locked"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"intento de envío de la transación cuando la base de datos no esta bloqueada"
|
"intento de envío de la transación cuando la base de datos no está bloqueada"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find or read package"
|
msgid "could not find or read package"
|
||||||
@@ -351,7 +376,7 @@ msgstr "el nombre de archivo del paquete no es válido"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "package architecture is not valid"
|
msgid "package architecture is not valid"
|
||||||
msgstr "no es válida la arquitectura del paquete"
|
msgstr "la arquitectura del paquete no es válida"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find repository for target"
|
msgid "could not find repository for target"
|
||||||
@@ -381,6 +406,10 @@ msgstr "archivos en conflicto"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "falló al descargar algunos archivos"
|
msgstr "falló al descargar algunos archivos"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "falló al copiar algún archivo"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "expresión regular inválida"
|
msgstr "expresión regular inválida"
|
||||||
@@ -401,11 +430,14 @@ msgstr "error invocando el descargador externo"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "error inesperado"
|
msgstr "error inesperado"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "la base de datos es más grande del tamaño máximo\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "no se pudo encontrar %s en la base de datos -- saltando\n"
|
msgstr "no se pudo encontrar %s en la base de datos -- saltando\n"
|
||||||
|
|
||||||
# , c-format
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "removing %s from target list\n"
|
msgid "removing %s from target list\n"
|
||||||
msgstr "quitando %s de la lista de objetivos\n"
|
msgstr "quitando %s de la lista de objetivos\n"
|
||||||
@@ -446,18 +478,6 @@ msgstr "ignorando el reemplazo del paquete (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "no se pudo reemplazar el archivo %s por %s\n"
|
msgstr "no se pudo reemplazar el archivo %s por %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s esta al día -- saltando\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s esta al día -- re-instalando\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "decrementando la versión del paquete %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "se han detectado paquetes con conflictos no resueltos\n"
|
msgstr "se han detectado paquetes con conflictos no resueltos\n"
|
||||||
@@ -480,6 +500,10 @@ msgstr "no se pudo enviar la operación de eliminación\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "no se pudo asignar la transacción\n"
|
msgstr "no se pudo asignar la transacción\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "%s versión de la base de datos es muy vieja\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "no se pudo eliminar el archivo de bloqueo %s\n"
|
msgstr "no se pudo eliminar el archivo de bloqueo %s\n"
|
||||||
@@ -497,8 +521,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "no se pudo eliminar el directorio temporal %s\n"
|
msgstr "no se pudo eliminar el directorio temporal %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "no se pudo cambiar el directorio a %s (%s)\n"
|
msgstr "no se pudo crear tubería (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -509,18 +533,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "no se pudo cambiar el directorio raíz (%s)\n"
|
msgstr "no se pudo cambiar el directorio raíz (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "no se pudo cambiar el directorio a / (%s)\n"
|
msgstr "llamada a execv fallida (%s)\n"
|
||||||
|
|
||||||
# , c-format
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "falló la llamada a popen (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "llamada a waitpid fallida (%s)\n"
|
msgstr "llamada a waitpid fallida (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "no se pudo abrir la tubería (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "el comando falló al ejecutarse\n"
|
msgstr "el comando falló al ejecutarse\n"
|
||||||
@@ -532,45 +555,3 @@ msgstr "no existe la cache %s, creando...\n"
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "couldn't create package cache, using /tmp instead\n"
|
msgid "couldn't create package cache, using /tmp instead\n"
|
||||||
msgstr "no se pudo crear la cache de paquetes, usando /tmp en su lugar\n"
|
msgstr "no se pudo crear la cache de paquetes, usando /tmp en su lugar\n"
|
||||||
|
|
||||||
# , c-format
|
|
||||||
#~ msgid "conflicting packages were found in target list\n"
|
|
||||||
#~ msgstr "se encontraron paquetes con conflictos en la lista de objetivos\n"
|
|
||||||
|
|
||||||
#~ msgid "you cannot install two conflicting packages at the same time\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "usted no puede instalar simultáneamente dos paquetes que poseen "
|
|
||||||
#~ "conflictos entre si\n"
|
|
||||||
|
|
||||||
#~ msgid "replacing packages with -U is not supported yet\n"
|
|
||||||
#~ msgstr "reemplazar paquetes con -U aún no esta soportado\n"
|
|
||||||
|
|
||||||
#~ msgid "you can replace packages manually using -Rd and -U\n"
|
|
||||||
#~ msgstr "usted puede reemplazar manualmente los paquetes usando -Rd y -U\n"
|
|
||||||
|
|
||||||
#~ msgid "url scheme not specified, assuming HTTP\n"
|
|
||||||
#~ msgstr "no fue especificado el esquema de url, asumiendo HTTP\n"
|
|
||||||
|
|
||||||
#~ msgid "cannot write to file '%s'\n"
|
|
||||||
#~ msgstr "no se puede escribir en el archivo '%s'\n"
|
|
||||||
|
|
||||||
#~ msgid "no such repository"
|
|
||||||
#~ msgstr "no existe el repositorio"
|
|
||||||
|
|
||||||
#~ msgid "repository '%s' not found\n"
|
|
||||||
#~ msgstr "repositorio '%s' no encontrado\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create removal transaction\n"
|
|
||||||
#~ msgstr "no se pudo crear la operación de eliminación\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create transaction\n"
|
|
||||||
#~ msgstr "no se pudo crear la operación\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize the removal transaction\n"
|
|
||||||
#~ msgstr "no se pudo iniciar la operación de eliminación\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize transaction\n"
|
|
||||||
#~ msgstr "no se pudo iniciar la operación\n"
|
|
||||||
|
|
||||||
#~ msgid "could not prepare removal transaction\n"
|
|
||||||
#~ msgstr "no se pudo preparar la operación de eliminación\n"
|
|
||||||
|
|||||||
546
lib/libalpm/po/fi.po
Normal file
546
lib/libalpm/po/fi.po
Normal file
@@ -0,0 +1,546 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
|
"PO-Revision-Date: 2011-03-12 18:34+0000\n"
|
||||||
|
"Last-Translator: Huulivoide <jesse.jaara@gmail.com>\n"
|
||||||
|
"Language-Team: Finnish <None>\n"
|
||||||
|
"Language: fi\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "tiedostoa %s ei voitu purkaa (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"directory permissions differ on %s\n"
|
||||||
|
"filesystem: %o package: %o\n"
|
||||||
|
msgstr ""
|
||||||
|
"kansion oikeuksissa eriavaisuuksia kohdassa %s\n"
|
||||||
|
"tiedostojärjestelmä: %o paketti: %o\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "extract: not overwriting dir with file %s\n"
|
||||||
|
msgstr "purku: kansiota ei ylikirjoiteta tiedostolla %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
|
msgstr "purku: symboolinenlinkki %s ei osoita kansioon\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
|
msgstr "kohdetta %s ei voitu uudelleen kohteeksi %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s saved as %s\n"
|
||||||
|
msgstr "kohde %s tallennettu kohteena %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not install %s as %s (%s)\n"
|
||||||
|
msgstr "kohdetta %s ei voitu tallentaa kohteena %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s installed as %s\n"
|
||||||
|
msgstr "%s asennettu %s:na\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "extracting %s as %s.pacnew\n"
|
||||||
|
msgstr "tiedosto %s puretaan tiedostona %s.pacnew\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get current working directory\n"
|
||||||
|
msgstr "nykyisen kansion sijaintia ei voitu määrittää\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "problem occurred while upgrading %s\n"
|
||||||
|
msgstr "pakettia %s päivitettäessä tapahtui virhe\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "problem occurred while installing %s\n"
|
||||||
|
msgstr "pakettia %s asennettaessa tapahtui virhe\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not update database entry %s-%s\n"
|
||||||
|
msgstr "ei voitu päivittää titokantamerkintää: %s-%s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not add entry '%s' in cache\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing invalid database: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid name for database entry '%s'\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "duplicated database entry '%s'\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "corrupted database entry '%s'\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open file %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database is inconsistent: name mismatch on package %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database is inconsistent: version mismatch on package %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create directory %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not parse package description file in %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "missing package name in %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "missing package version in %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "error while reading package %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "missing package metadata in %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing invalid file: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database path is undefined\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "dependency cycle detected:\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s will be removed after its %s dependency\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s will be installed before its %s dependency\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "ignoring package %s-%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "disk"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "url '%s' is invalid\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed retrieving file '%s' from %s : %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "resuming download of %s not possible; starting over\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "error writing to file '%s': %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed retrieving file '%s' from %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s appears to be truncated: %jd/%jd bytes\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to download %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "out of memory!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unexpected system error"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "insufficient privileges"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find or read file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find or read directory"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "wrong or NULL argument passed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "library not initialized"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "library already initialized"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unable to lock database"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open database"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create database"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database not initialized"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database already registered"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find database"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not update database"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove database entry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid url for server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "no servers configured for repository"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction already initialized"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction not initialized"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "duplicate target"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction not prepared"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction aborted"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "operation not compatible with the transaction type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "transaction commit attempt when database is not locked"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find or read package"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "operation cancelled due to ignorepkg"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid or corrupted package"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot open package file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot remove all files for package"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "package filename is not valid"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "package architecture is not valid"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find repository for target"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid or corrupted delta"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "delta patch failed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not satisfy dependencies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "conflicting dependencies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "conflicting files"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to retrieve some files"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid regular expression"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "libarchive error"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "download library error"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "error invoking external downloader"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unexpected error"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find %s in database -- skipping\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing %s from target list\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot remove file '%s': %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove database entry %s-%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove entry '%s' from cache\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: ignoring package upgrade (%s => %s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: ignoring package downgrade (%s => %s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: downgrading from version %s to version %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s: local (%s) is newer than %s (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "ignoring package replacement (%s-%s => %s-%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot replace %s by %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "unresolvable package conflicts detected\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "removing '%s' from target list because it conflicts with '%s'\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to retrieve some files from %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not commit removal transaction\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not commit transaction\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove lock file %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create temp directory\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not copy tempfile to %s (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not remove tmpdir %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not create pipe (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not fork a new process (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change the root directory (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "call to execv failed (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "call to waitpid failed (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "command failed to execute correctly\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "no %s cache exists, creating...\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "couldn't create package cache, using /tmp instead\n"
|
||||||
|
msgstr ""
|
||||||
@@ -1,31 +1,41 @@
|
|||||||
# French translations for Pacman package manager package.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-06 20:26+0200\n"
|
"PO-Revision-Date: 2011-03-04 20:43+0000\n"
|
||||||
"Last-Translator: Xavier <shiningxc@gmail.com>\n"
|
"Last-Translator: shining <chantry.xavier@gmail.com>\n"
|
||||||
"Language-Team: solsTiCe d'Hiver <solstice.dhiver@laposte.net>\n"
|
"Language-Team: French <>\n"
|
||||||
"Language: \n"
|
"Language: fr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Poedit-Language: French\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||||
"X-Poedit-Country: FRANCE\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr ""
|
msgstr "%s-%s est à jour -- ignoré\n"
|
||||||
"remplacement de l'ancienne version %s-%s par %s dans la liste des cibles\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr ""
|
msgstr "%s-%s est à jour -- réinstalle\n"
|
||||||
"ignore le paquet %s-%s car une version plus récente %s est dans la liste des "
|
|
||||||
"cibles\n"
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "retourne à la version antérieure du paquet %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "problème pendant l'extraction de %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "l'extraction de %s a échoué (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -43,10 +53,6 @@ msgstr "extraction: n'écrase pas le répertoire par le fichier %s\n"
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "extraction: le lien %s ne pointe pas vers un répertoire\n"
|
msgstr "extraction: le lien %s ne pointe pas vers un répertoire\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "l'extraction de %s a échoué (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "impossible de renommer %s en %s (%s)\n"
|
msgstr "impossible de renommer %s en %s (%s)\n"
|
||||||
@@ -67,11 +73,14 @@ msgstr "%s installé en tant que %s\n"
|
|||||||
msgid "extracting %s as %s.pacnew\n"
|
msgid "extracting %s as %s.pacnew\n"
|
||||||
msgstr "extraction de %s comme %s.pacnew\n"
|
msgstr "extraction de %s comme %s.pacnew\n"
|
||||||
|
|
||||||
# j'ai traduit chaque fois "could not" par "a échoué"
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "déterminer le répertoire courant a échoué\n"
|
msgstr "déterminer le répertoire courant a échoué\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "changer de répertoire vers %s a échoué (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "des erreurs sont survenues pendant la mise à jour de %s\n"
|
msgstr "des erreurs sont survenues pendant la mise à jour de %s\n"
|
||||||
@@ -92,18 +101,6 @@ msgstr "l'ajout au cache de l'entrée '%s' a échoué\n"
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "suppression d'une base de données invalide: %s\n"
|
msgstr "suppression d'une base de données invalide: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "l'ouverture de %s: %s a échoué\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "la suppression de la base de données %s a échoué\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "la suppression de la base de données %s a échoué\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "nom invalide pour l'entrée de base de données '%s'\n"
|
msgstr "nom invalide pour l'entrée de base de données '%s'\n"
|
||||||
@@ -153,12 +150,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "méta-données du paquet manquantes dans %s\n"
|
msgstr "méta-données du paquet manquantes dans %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "base de données non initialisée\n"
|
msgstr "suppression du fichier invalide: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "tentative de ré-enregistrer la base de données locale\n"
|
msgstr "base de données non initialisée\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -176,14 +173,37 @@ msgstr "%s sera installé avant sa dépendance %s\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "ignore le paquet %s-%s\n"
|
msgstr "ignore le paquet %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "Une provision a été sélectionnée (%s fournit %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "impossible de résoudre \"%s\", une dépendance de \"%s\"\n"
|
msgstr "impossible de résoudre \"%s\", une dépendance de \"%s\"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "impossible de récupérer les informations du système de fichier\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
"impossible de récupérer les informations du système de fichier pour %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "impossible de déterminer le point de montage pour le fichier %s"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "impossible de déterminer les point de montage"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "La partition %s est en lecture seule\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
"La partition %s n'a pas assez d'espace libre : besoin de %ld blocs mais "
|
||||||
|
"seulement %ld libres\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "disque"
|
msgstr "disque"
|
||||||
@@ -240,6 +260,10 @@ msgstr "trouver ou lire le répertoire a échoué"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "un argument erroné ou nul a été fourni"
|
msgstr "un argument erroné ou nul a été fourni"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "pas assez d'espace libre"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "librairie non initialisée"
|
msgstr "librairie non initialisée"
|
||||||
@@ -272,6 +296,10 @@ msgstr "base de données déjà enregistrée"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "trouver la base de données a échoué"
|
msgstr "trouver la base de données a échoué"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "la base de données n'est pas à la bonne version"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "la mise à jour de la base de données a échoué"
|
msgstr "la mise à jour de la base de données a échoué"
|
||||||
@@ -374,6 +402,10 @@ msgstr "conflit de fichiers"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "échec de récupération de certains fichiers"
|
msgstr "échec de récupération de certains fichiers"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "erreur lors d'une copie de fichier"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "expression régulière incorrecte"
|
msgstr "expression régulière incorrecte"
|
||||||
@@ -394,6 +426,10 @@ msgstr "erreur en invoquant le client externe de téléchargement"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "erreur non prévue"
|
msgstr "erreur non prévue"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "la base de données est plus grande que la taille maximale\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "trouver %s dans la base de données a échoué -- ignoré\n"
|
msgstr "trouver %s dans la base de données a échoué -- ignoré\n"
|
||||||
@@ -438,18 +474,6 @@ msgstr "ignore le remplacement du paquet (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "le remplacement de %s par %s est impossible\n"
|
msgstr "le remplacement de %s par %s est impossible\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s est à jour -- ignoré\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s est à jour -- réinstalle\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "retourne à la version antérieure du paquet %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "un conflit de paquets impossible à résoudre a été détecté\n"
|
msgstr "un conflit de paquets impossible à résoudre a été détecté\n"
|
||||||
@@ -470,6 +494,10 @@ msgstr "appliquer la transaction de suppression a échoué\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "appliquer la transaction a échoué\n"
|
msgstr "appliquer la transaction a échoué\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "La version de la base de données %s est trop vieille\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "la suppression du fichier de verrouillage %s a échoué\n"
|
msgstr "la suppression du fichier de verrouillage %s a échoué\n"
|
||||||
@@ -487,8 +515,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "la suppression du répertoire temporaire %s a échoué\n"
|
msgstr "la suppression du répertoire temporaire %s a échoué\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "changer de répertoire vers %s a échoué (%s)\n"
|
msgstr "impossible de créer le tube (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -499,17 +527,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "changer le répertoire racine a échoué (%s)\n"
|
msgstr "changer le répertoire racine a échoué (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "changer de répertoire vers / a échoué (%s)\n"
|
msgstr "l'appel à execv a échoué (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "l'appel de popen a échoué (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "l'appel de waitpid a échoué (%s)\n"
|
msgstr "l'appel de waitpid a échoué (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "impossible d'ouvrir le tube (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "la commande n'a pas pu être exécutée correctement\n"
|
msgstr "la commande n'a pas pu être exécutée correctement\n"
|
||||||
|
|||||||
@@ -1,30 +1,41 @@
|
|||||||
# Hungarian translations for libalpm package.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# Miklos Vajna <vmiklos@frugalware.org>, 2006.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2009-10-04 17:08+0200\n"
|
"PO-Revision-Date: 2011-03-07 12:32+0000\n"
|
||||||
"Last-Translator: Nagy Gabor <ngaba@bibl.u-szeged.hu>\n"
|
"Last-Translator: ngaba <ngaba@bibl.u-szeged.hu>\n"
|
||||||
"Language-Team: <hu@li.org>\n"
|
"Language-Team: Hungarian <None>\n"
|
||||||
"Language: \n"
|
"Language: hu\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
"X-Generator: KBabel 1.11.4\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr "régebbi verzió (%s-%s) lecserélése %s verzióra a célok listájában\n"
|
msgstr "a(z) %s-%s naprakész -- kihagyás\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr "%s-%s kihagyása, mert újabb verzió (%s) van a célok között\n"
|
msgstr "a(z) %s-%s naprakész -- újratelepítés\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "visszatérés egy régebbi %s verzióhoz (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "figyelmeztetés a %s kicsomagolása közben (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "nem sikerült kicsomagolni: %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -42,10 +53,6 @@ msgstr "kicsomagolás: nem írok felül könyvtárat a %s fájllal\n"
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "kicsomagolás: %s szimbolikus link nem könyvtárra mutat\n"
|
msgstr "kicsomagolás: %s szimbolikus link nem könyvtárra mutat\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "nem sikerült kicsomagolni: %s (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "nem sikerült az átnevezés: %s -> %s (%s)\n"
|
msgstr "nem sikerült az átnevezés: %s -> %s (%s)\n"
|
||||||
@@ -70,6 +77,10 @@ msgstr "%s kicsomagolása %s.pacnew néven\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "a jelenlegi munkakönyvtár nem kapható meg\n"
|
msgstr "a jelenlegi munkakönyvtár nem kapható meg\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "nem sikerült a könyvtárváltás ide: %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "hiba történt a(z) %s frissítése közben\n"
|
msgstr "hiba történt a(z) %s frissítése közben\n"
|
||||||
@@ -90,18 +101,6 @@ msgstr "sikertelen a '%s' bejegyzés hozzáadása a gyorsítótárhoz\n"
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "hibás adatbázis eltávolítása: %s\n"
|
msgstr "hibás adatbázis eltávolítása: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "nem sikerült megnyitni a %s fájlt: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "nem sikerült eltávolítani a(z) %s adatbázis-könyvtárat\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "sikertelen a(z) %s adatbázis eltávolítása\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "hibás név a '%s' adatbázis-bejegyzés számára\n"
|
msgstr "hibás név a '%s' adatbázis-bejegyzés számára\n"
|
||||||
@@ -151,12 +150,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "hiányzó csomaginformációs fájl itt: %s\n"
|
msgstr "hiányzó csomaginformációs fájl itt: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "az adatbázis-útvonal nincs megadva\n"
|
msgstr "hibás fájl eltávolítása: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "kísérlet a 'local' adatbázis újraregisztrálására\n"
|
msgstr "az adatbázis-útvonal nincs megadva\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -174,14 +173,36 @@ msgstr "a(z) %s csomag saját %s függősége előtt lesz telepítve\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "%s-%s csomag kihagyása\n"
|
msgstr "%s-%s csomag kihagyása\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "közvetett csomagválasztás (%s szolgáltatja %s-t)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "nem sikerült a(z) \"%2$s\" csomag \"%1$s\" függőségét feloldani\n"
|
msgstr "nem sikerült a(z) \"%2$s\" csomag \"%1$s\" függőségét feloldani\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "nem sikerült meghatározni a fájlrendszer-információt\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr "nem sikerült meghatározni a fájlrendszer-információt %s-hez: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "nem sikerült meghározni a csatolási pontot a %s fájlhoz"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "nem sikerült meghatározni a fájlrendszer csatolási pontokat"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "A %s partíció csak olvashatóként van csatolva\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
"Nincs elég szabad hely a %s partíción: %ld blokk szükséges, %ld blokk "
|
||||||
|
"szabad\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "diszk"
|
msgstr "diszk"
|
||||||
@@ -238,6 +259,10 @@ msgstr "nem található vagy nem olvasható a könyvtár"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "rossz vagy NULL argumentum érkezett"
|
msgstr "rossz vagy NULL argumentum érkezett"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "nincs elég szabad lemezterület"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "a könyvtár nem inicializált"
|
msgstr "a könyvtár nem inicializált"
|
||||||
@@ -270,6 +295,10 @@ msgstr "az adatbázis már regisztrált"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "nem található az adatbázis"
|
msgstr "nem található az adatbázis"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "hibás verziójú az adatbázis"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "nem sikerült megnyitni az adatbázist"
|
msgstr "nem sikerült megnyitni az adatbázist"
|
||||||
@@ -370,6 +399,10 @@ msgstr "ütköző fájlok"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "nem sikerült néhány fájlt letölteni"
|
msgstr "nem sikerült néhány fájlt letölteni"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "nem sikerült néhány fájlt másolni"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "hibás reguláris kifejezés"
|
msgstr "hibás reguláris kifejezés"
|
||||||
@@ -390,6 +423,10 @@ msgstr "hiba a külső letöltő meghívásakor"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "nemvárt hiba"
|
msgstr "nemvárt hiba"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "az adatbázis nagyobb, mint a maximális megengedett méret\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "nem található a(z) %s az adatbázisban -- kihagyás\n"
|
msgstr "nem található a(z) %s az adatbázisban -- kihagyás\n"
|
||||||
@@ -434,18 +471,6 @@ msgstr "csomag-lecserélés kihagyása (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "nem lehet lecserélni a(z) %s csomagot a(z) %s csomaggal\n"
|
msgstr "nem lehet lecserélni a(z) %s csomagot a(z) %s csomaggal\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "a(z) %s-%s naprakész -- kihagyás\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "a(z) %s-%s naprakész -- újratelepítés\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "visszatérés egy régebbi %s verzióhoz (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "feloldhatatlan csomagütközéseket találtam\n"
|
msgstr "feloldhatatlan csomagütközéseket találtam\n"
|
||||||
@@ -466,6 +491,10 @@ msgstr "nem sikerült végrehajtani az eltávolító tranzakciót\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "nem sikerült végrehajtani a tranzakciót\n"
|
msgstr "nem sikerült végrehajtani a tranzakciót\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "a(z) %s adatbázis túl régi verziójú\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "nem sikerült a zároló fájl (%s) eltávolítása\n"
|
msgstr "nem sikerült a zároló fájl (%s) eltávolítása\n"
|
||||||
@@ -483,8 +512,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "nem sikerült eltávolítani a %s ideiglenes könyvtárat\n"
|
msgstr "nem sikerült eltávolítani a %s ideiglenes könyvtárat\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "nem sikerült a könyvtárváltás ide: %s (%s)\n"
|
msgstr "nem sikerült a pipe létrehozása (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -495,17 +524,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "nem sikerült a chroot (%s)\n"
|
msgstr "nem sikerült a chroot (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "nem sikerült a könyvtárat a /-re váltani (%s)\n"
|
msgstr "sikertelen execv hívás (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "popen hívás sikertelen (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "waitpid hívás sikertelen (%s)\n"
|
msgstr "waitpid hívás sikertelen (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "nem sikerült a pipe megnyitása (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "a parancs nem futott le sikeresen\n"
|
msgstr "a parancs nem futott le sikeresen\n"
|
||||||
|
|||||||
@@ -1,33 +1,43 @@
|
|||||||
# Italian translation of libalpm.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# Giovanni 'voidnull' Scafora <giovanni@archlinux.org>, 2007, 2008, 2009, 2010
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
# Andrea 'bash' Scarpino <bash.lnx@gmail.com>, 2008
|
|
||||||
# Alessio 'mOLOk' Bolognino <themolok@gmail.com>, 2007
|
|
||||||
# Lorenzo '^zanDarK' Masini <lorenxo86@gmail.com>, 2007
|
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.4.0\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-05 18:00+0200\n"
|
"PO-Revision-Date: 2011-03-05 17:03+0000\n"
|
||||||
"Last-Translator: Giovanni Scafora <giovanni@archlinux.org>\n"
|
"Last-Translator: giovanni <giovanni@archlinux.org>\n"
|
||||||
"Language-Team: Arch Linux Italian Team <giovanni@archlinux.org>\n"
|
"Language-Team: Italian <None>\n"
|
||||||
"Language: \n"
|
"Language: it\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr "sostituzione in corso della vecchia versione di %s-%s con %s\n"
|
msgstr "%s-%s è aggiornato, sarà ignorato\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
|
msgstr "%s-%s è aggiornato, sarà reinstallato\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ignoro %s-%s perché la nuova versione %s è presente nella lista dei "
|
"installazione in corso di una versione meno recente del pacchetto %s (%s => "
|
||||||
"pacchetti\n"
|
"%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "è stato rilevato un warning durante l'estrazione di %s (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "impossibile estrarre %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -45,10 +55,6 @@ msgstr "estrazione: non posso sovrascrivere la directory con il file %s\n"
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "estrazione: il link simbolico %s non punta alla directory\n"
|
msgstr "estrazione: il link simbolico %s non punta alla directory\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "impossibile estrarre %s (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "impossibile rinominare %s in %s (%s)\n"
|
msgstr "impossibile rinominare %s in %s (%s)\n"
|
||||||
@@ -73,6 +79,10 @@ msgstr "estrazione di %s come %s.pacnew\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "impossibile determinare la directory corrente\n"
|
msgstr "impossibile determinare la directory corrente\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "impossibile spostarsi nella directory %s (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "si sono verificati degli errori durante l'aggiornamento di %s\n"
|
msgstr "si sono verificati degli errori durante l'aggiornamento di %s\n"
|
||||||
@@ -93,18 +103,6 @@ msgstr "impossible includere la voce '%s' nella cache\n"
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "rimozione del database: %s\n"
|
msgstr "rimozione del database: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "impossibile aprire %s: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "impossibile rimuovere la directory %s del database\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "impossibile rimuovere il database %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "nome non valido per la voce del database '%s'\n"
|
msgstr "nome non valido per la voce del database '%s'\n"
|
||||||
@@ -157,12 +155,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "manca il metadata del pacchetto in %s\n"
|
msgstr "manca il metadata del pacchetto in %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "il percorso del database non è stato definito\n"
|
msgstr "rimozione del file non valido: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "tentativo in corso di registrare di nuovo il DB 'locale'\n"
|
msgstr "il percorso del database non è stato definito\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -180,14 +178,37 @@ msgstr "%s sarà installato prima della sua dipendenza %s\n"
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "sto ignorando il pacchetto %s-%s\n"
|
msgstr "sto ignorando il pacchetto %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "il pacchetto è già stato selezionato (%s dipende da %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "impossibile risolvere \"%s\", una dipendenza di \"%s\"\n"
|
msgstr "impossibile risolvere \"%s\", una dipendenza di \"%s\"\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "impossibile ottenere le informazioni relative al filesystem\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
"impossibile ottenere le informazione relative al filesystem per %s: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "impossibile determinare il punto di montaggio del file %s"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "impossibile determinare i punti di montaggio del filesystem"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "La partizione %s è montata in sola lettura\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr ""
|
||||||
|
"La partizione %s è troppo piena: sono necessari %ld blocchi e ci sono solo "
|
||||||
|
"%ld blocchi liberi\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "disco"
|
msgstr "disco"
|
||||||
@@ -244,6 +265,10 @@ msgstr "impossibile trovare o leggere la directory"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "è stato passato un argomento sbagliato o NULL"
|
msgstr "è stato passato un argomento sbagliato o NULL"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "lo spazio libero sul disco non è sufficiente"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "la libreria non è stata inizializzata"
|
msgstr "la libreria non è stata inizializzata"
|
||||||
@@ -276,6 +301,10 @@ msgstr "il database è già stato registrato"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "impossibile trovare il database"
|
msgstr "impossibile trovare il database"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "la versione del database non è esatta"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "impossibile aggiornare il database"
|
msgstr "impossibile aggiornare il database"
|
||||||
@@ -376,6 +405,10 @@ msgstr "file in conflitto"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "impossibile scaricare alcuni file"
|
msgstr "impossibile scaricare alcuni file"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "impossibile copiare alcuni file"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "l'espressione regolare non è valida"
|
msgstr "l'espressione regolare non è valida"
|
||||||
@@ -396,6 +429,11 @@ msgstr "si è verificato un errore lanciando il downloader esterno"
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "errore inaspettato"
|
msgstr "errore inaspettato"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr ""
|
||||||
|
"la grandezza del database è superiore alla dimensione massima consentita\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "impossibile trovare %s nel database, sarà ignorato\n"
|
msgstr "impossibile trovare %s nel database, sarà ignorato\n"
|
||||||
@@ -441,20 +479,6 @@ msgstr "sto ignorando la sostituzione del pacchetto (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "impossibile sostituire %s con %s\n"
|
msgstr "impossibile sostituire %s con %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s è aggiornato, sarà ignorato\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s è aggiornato, sarà reinstallato\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr ""
|
|
||||||
"installazione in corso di una versione meno recente del pacchetto %s (%s => "
|
|
||||||
"%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "sono stati rilevati dei conflitti irrisolvibili\n"
|
msgstr "sono stati rilevati dei conflitti irrisolvibili\n"
|
||||||
@@ -476,6 +500,10 @@ msgstr "impossibile eseguire l'operazione di rimozione\n"
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "impossibile eseguire l'operazione\n"
|
msgstr "impossibile eseguire l'operazione\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "la versione del database %s è troppo vecchia\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "impossibile rimuovere il file di lock %s\n"
|
msgstr "impossibile rimuovere il file di lock %s\n"
|
||||||
@@ -493,8 +521,8 @@ msgid "could not remove tmpdir %s\n"
|
|||||||
msgstr "impossibile rimuovere la directory temporanea %s\n"
|
msgstr "impossibile rimuovere la directory temporanea %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "impossibile spostarsi nella directory %s (%s)\n"
|
msgstr "impossibile creare una pipe (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
@@ -505,17 +533,17 @@ msgid "could not change the root directory (%s)\n"
|
|||||||
msgstr "impossibile cambiare la root directory (%s)\n"
|
msgstr "impossibile cambiare la root directory (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "impossibile spostarsi nella directory / (%s)\n"
|
msgstr "impossibile chiamare execv (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "chiamata a popen non riuscita (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "chiamata a waitpid non riuscita (%s)\n"
|
msgstr "chiamata a waitpid non riuscita (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "impossibile aprire una pipe (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "l'esecuzione del comando non è riuscita correttamente\n"
|
msgstr "l'esecuzione del comando non è riuscita correttamente\n"
|
||||||
|
|||||||
@@ -1,30 +1,41 @@
|
|||||||
# Kazakh translations for Pacman package manager package.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) 2010 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
|
||||||
# This file is distributed under the same license as the pacman package manager package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# Baurzhan Muftakhidinov <baurthefirst@gmail.com> 2009
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Pacman package manager 3.3.1\n"
|
"Project-Id-Version: Arch Linux Pacman package manager\n"
|
||||||
"Report-Msgid-Bugs-To: pacman-dev@archlinux.org\n"
|
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||||
"POT-Creation-Date: 2010-06-04 13:36-0500\n"
|
"POT-Creation-Date: 2011-03-14 13:51-0500\n"
|
||||||
"PO-Revision-Date: 2010-06-07 09:22+0600\n"
|
"PO-Revision-Date: 2011-03-05 03:56+0000\n"
|
||||||
"Last-Translator: Baurzhan Muftakhidinov <baurthefirst@gmail.com>\n"
|
"Last-Translator: sotrud_nik <baurthefirst@gmail.com>\n"
|
||||||
"Language-Team: Kazakh\n"
|
"Language-Team: Kazakh <None>\n"
|
||||||
"Language: \n"
|
"Language: kk\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=1; plural=0\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "replacing older version %s-%s by %s in target list\n"
|
msgid "%s-%s is up to date -- skipping\n"
|
||||||
msgstr ""
|
msgstr "%s-%s ескірмеді -- өткізіледі\n"
|
||||||
"мақсаттар тізімінде ескірген %s-%s нұсқасы жаңа %s нұсқасымен алмастырылады\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "skipping %s-%s because newer version %s is in target list\n"
|
msgid "%s-%s is up to date -- reinstalling\n"
|
||||||
msgstr ""
|
msgstr "%s-%s ескірмеді -- қайта орнатылады\n"
|
||||||
"%s-%s өткізіледі, өйткені жаңа %s нұсқасы мақсаттар тізімінде бар болып тұр\n"
|
|
||||||
|
#, c-format
|
||||||
|
msgid "downgrading package %s (%s => %s)\n"
|
||||||
|
msgstr "дестенің нұсқасын төмендету %s (%s => %s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "warning given when extracting %s (%s)\n"
|
||||||
|
msgstr "%s тарқатқанда ескерту алынды (%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not extract %s (%s)\n"
|
||||||
|
msgstr "%s тарқату қатесі (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -42,17 +53,13 @@ msgstr "тарқату: бума %s файлымен ауыстырылмайд
|
|||||||
msgid "extract: symlink %s does not point to dir\n"
|
msgid "extract: symlink %s does not point to dir\n"
|
||||||
msgstr "тарқату: %s символдық сілтемесі бумаға көрсетіп тұрған жоқ\n"
|
msgstr "тарқату: %s символдық сілтемесі бумаға көрсетіп тұрған жоқ\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not extract %s (%s)\n"
|
|
||||||
msgstr "%s тарқату қатесі (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not rename %s to %s (%s)\n"
|
msgid "could not rename %s to %s (%s)\n"
|
||||||
msgstr "%s атын жаңа %s атына ауыстыру мүмкін емес (%s)\n"
|
msgstr "%s атын жаңа %s атына ауыстыру мүмкін емес (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s saved as %s\n"
|
msgid "%s saved as %s\n"
|
||||||
msgstr "%s қазір %s деп сақталды\n"
|
msgstr "%s қазір %s етіп сақталды\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not install %s as %s (%s)\n"
|
msgid "could not install %s as %s (%s)\n"
|
||||||
@@ -70,6 +77,10 @@ msgstr "%s қазір %s.pacnew ретінде сақталды\n"
|
|||||||
msgid "could not get current working directory\n"
|
msgid "could not get current working directory\n"
|
||||||
msgstr "ағымдағы жұмыс бумасын анықтау мүмкін емес\n"
|
msgstr "ағымдағы жұмыс бумасын анықтау мүмкін емес\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not change directory to %s (%s)\n"
|
||||||
|
msgstr "%s бумасына ауысу мүмкін емес (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "problem occurred while upgrading %s\n"
|
msgid "problem occurred while upgrading %s\n"
|
||||||
msgstr "%s жаңарту кезінде қате кетті\n"
|
msgstr "%s жаңарту кезінде қате кетті\n"
|
||||||
@@ -90,25 +101,13 @@ msgstr "кэш ішіне '%s' жазбасын қосу мүмкін емес\n
|
|||||||
msgid "removing invalid database: %s\n"
|
msgid "removing invalid database: %s\n"
|
||||||
msgstr "қате дерекқорды өшіру: %s\n"
|
msgstr "қате дерекқорды өшіру: %s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not open %s: %s\n"
|
|
||||||
msgstr "%s ашу мүмкін емес: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database directory %s\n"
|
|
||||||
msgstr "дерекқор %s бумасын өшіру мүмкін емес\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "could not remove database %s\n"
|
|
||||||
msgstr "%s дерекқорын өшіру мүмкін емес\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid name for database entry '%s'\n"
|
msgid "invalid name for database entry '%s'\n"
|
||||||
msgstr "дерекқордағы '%s' жазбасының аты қате\n"
|
msgstr "дерекқордағы '%s' жазбасының аты қате\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "duplicated database entry '%s'\n"
|
msgid "duplicated database entry '%s'\n"
|
||||||
msgstr "деркқордағы '%s' жазбасы қайталанып жатыр\n"
|
msgstr "деркқордағы '%s' жазбасы қайталанып тұр\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "corrupted database entry '%s'\n"
|
msgid "corrupted database entry '%s'\n"
|
||||||
@@ -151,12 +150,12 @@ msgid "missing package metadata in %s\n"
|
|||||||
msgstr "%s ішінде дестенің мета мәліметтері жоқ\n"
|
msgstr "%s ішінде дестенің мета мәліметтері жоқ\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database path is undefined\n"
|
msgid "removing invalid file: %s\n"
|
||||||
msgstr "дерекқорға жол анықталмаған\n"
|
msgstr "қате файлды өшіру: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "attempt to re-register the 'local' DB\n"
|
msgid "database path is undefined\n"
|
||||||
msgstr "дерекқорды қайта тіркеу талабы\n"
|
msgstr "дерекқорға жол анықталмаған\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "dependency cycle detected:\n"
|
msgid "dependency cycle detected:\n"
|
||||||
@@ -174,14 +173,34 @@ msgstr "%s қазір тәуелділік ретінде %s алдынан ор
|
|||||||
msgid "ignoring package %s-%s\n"
|
msgid "ignoring package %s-%s\n"
|
||||||
msgstr "дестені елемеу %s-%s\n"
|
msgstr "дестені елемеу %s-%s\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "provider package was selected (%s provides %s)\n"
|
|
||||||
msgstr "тандалған %s дестесі %s ұсынады\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
|
||||||
msgstr "\"%s\" шешу мүмкін емес, ол \"%s\" тәуелділігі болып тұр\n"
|
msgstr "\"%s\" шешу мүмкін емес, ол \"%s\" тәуелділігі болып тұр\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information\n"
|
||||||
|
msgstr "файлдық жүйе ақпаратын алу мүмкін емес\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get filesystem information for %s: %s\n"
|
||||||
|
msgstr "%s үшін файлдық жүйе ақпаратын алу мүмкін емес: %s\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine mount point for file %s"
|
||||||
|
msgstr "%s файлы үшін тіркеу нүктесін анықтау мүмкін емес"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine filesystem mount points"
|
||||||
|
msgstr "файлдық жүйенің тіркеу нүктелерін анықтау мүмкін емес"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s is mounted read only\n"
|
||||||
|
msgstr "%s бөлімі тек оқу үшін тіркелген\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
|
||||||
|
msgstr "%s бөлімі тым толық: %ld блок керек, %ld блок бос\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "disk"
|
msgid "disk"
|
||||||
msgstr "дискі"
|
msgstr "дискі"
|
||||||
@@ -208,7 +227,7 @@ msgstr "'%s' файлын %s адресінен алу қатемен аяқт
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s appears to be truncated: %jd/%jd bytes\n"
|
msgid "%s appears to be truncated: %jd/%jd bytes\n"
|
||||||
msgstr "%s қысқартылады: %jd/%jd байт\n"
|
msgstr "%s қысқартылған сияқты: %jd/%jd байт\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "failed to download %s\n"
|
msgid "failed to download %s\n"
|
||||||
@@ -238,13 +257,17 @@ msgstr "буманы табу не оқу мүмкін емес"
|
|||||||
msgid "wrong or NULL argument passed"
|
msgid "wrong or NULL argument passed"
|
||||||
msgstr "аргумент қате не нөлдік болып тұр"
|
msgstr "аргумент қате не нөлдік болып тұр"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough free disk space"
|
||||||
|
msgstr "дискідегі бос орын жеткіліксіз"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library not initialized"
|
msgid "library not initialized"
|
||||||
msgstr "library іске қосылмады"
|
msgstr "жинақ іске қосылмады"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "library already initialized"
|
msgid "library already initialized"
|
||||||
msgstr "library іске қосылған болып тұр"
|
msgstr "жинақ іске қосылған болып тұр"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unable to lock database"
|
msgid "unable to lock database"
|
||||||
@@ -256,7 +279,7 @@ msgstr "дерекқорды ашу мүмкін емес"
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not create database"
|
msgid "could not create database"
|
||||||
msgstr "дерекқорды құру мүмкін емес"
|
msgstr "дерекқорды жасау мүмкін емес"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "database not initialized"
|
msgid "database not initialized"
|
||||||
@@ -270,6 +293,10 @@ msgstr "дерекқор тіркелген болып тұр"
|
|||||||
msgid "could not find database"
|
msgid "could not find database"
|
||||||
msgstr "дерекқорды табу мүмкін емес"
|
msgstr "дерекқорды табу мүмкін емес"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database is incorrect version"
|
||||||
|
msgstr "дерекқор нұсқасы дұрыс емес"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not update database"
|
msgid "could not update database"
|
||||||
msgstr "дерекқорды жаңарту мүмкін емес"
|
msgstr "дерекқорды жаңарту мүмкін емес"
|
||||||
@@ -370,6 +397,10 @@ msgstr "ерегісетін файлдар"
|
|||||||
msgid "failed to retrieve some files"
|
msgid "failed to retrieve some files"
|
||||||
msgstr "кейбір файлдарды алу сәтсіз аяқталды"
|
msgstr "кейбір файлдарды алу сәтсіз аяқталды"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "failed to copy some file"
|
||||||
|
msgstr "кейбір файлдарды көшіру сәтсіз"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid regular expression"
|
msgid "invalid regular expression"
|
||||||
msgstr "тұрақты өрнек дұрыс емес"
|
msgstr "тұрақты өрнек дұрыс емес"
|
||||||
@@ -390,13 +421,17 @@ msgstr "сыртқы жүктемелер менеджерін шақыру қа
|
|||||||
msgid "unexpected error"
|
msgid "unexpected error"
|
||||||
msgstr "күтпеген қате кетті"
|
msgstr "күтпеген қате кетті"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "database larger than maximum size\n"
|
||||||
|
msgstr "дерекқор рұқсат етілген өлшемінен үлкен\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not find %s in database -- skipping\n"
|
msgid "could not find %s in database -- skipping\n"
|
||||||
msgstr "дерекқор ішінде %s табылмады -- өткізіп жібереміз\n"
|
msgstr "дерекқор ішінде %s табылмады -- өткізіп жібереміз\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "removing %s from target list\n"
|
msgid "removing %s from target list\n"
|
||||||
msgstr "мақсаттар тізімінен '%s' өшіріру\n"
|
msgstr "мақсаттар тізімінен '%s' өшіру\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot remove file '%s': %s\n"
|
msgid "cannot remove file '%s': %s\n"
|
||||||
@@ -434,21 +469,9 @@ msgstr "дестені алмастыруды елемеу (%s-%s => %s-%s)\n"
|
|||||||
msgid "cannot replace %s by %s\n"
|
msgid "cannot replace %s by %s\n"
|
||||||
msgstr "%s жаңа %s нұсқасымен алмастыру мүмкін емес\n"
|
msgstr "%s жаңа %s нұсқасымен алмастыру мүмкін емес\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- skipping\n"
|
|
||||||
msgstr "%s-%s ескірмеді -- өткізіледі\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%s-%s is up to date -- reinstalling\n"
|
|
||||||
msgstr "%s-%s ескірмеді -- қайта орнатылады\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "downgrading package %s (%s => %s)\n"
|
|
||||||
msgstr "дестенің нұсқасын төмендету %s (%s => %s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unresolvable package conflicts detected\n"
|
msgid "unresolvable package conflicts detected\n"
|
||||||
msgstr "шешілмейтін дестелер ерегісі табылды\n"
|
msgstr "дестелердің шешілмейтін ерегісі табылды\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "removing '%s' from target list because it conflicts with '%s'\n"
|
msgid "removing '%s' from target list because it conflicts with '%s'\n"
|
||||||
@@ -467,6 +490,10 @@ msgstr "өшіруге сұранымды орындау мүмкін емес\n
|
|||||||
msgid "could not commit transaction\n"
|
msgid "could not commit transaction\n"
|
||||||
msgstr "сұранымды аяқтау мүмкін емес\n"
|
msgstr "сұранымды аяқтау мүмкін емес\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%s database version is too old\n"
|
||||||
|
msgstr "%s дерекқор нұсқасы тым ескі\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove lock file %s\n"
|
msgid "could not remove lock file %s\n"
|
||||||
msgstr "%s оқшау файлын өшіру мүмкін емес\n"
|
msgstr "%s оқшау файлын өшіру мүмкін емес\n"
|
||||||
@@ -481,32 +508,32 @@ msgstr "уақытша файлды %s ішіне көшіру мүмкін ем
|
|||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not remove tmpdir %s\n"
|
msgid "could not remove tmpdir %s\n"
|
||||||
msgstr "tmpdir %s өшіру мүмкін емес\n"
|
msgstr "%s уақытша бумасын өшіру мүмкін емес\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to %s (%s)\n"
|
msgid "could not create pipe (%s)\n"
|
||||||
msgstr "%s бумасына ауысу мүмкін емес (%s)\n"
|
msgstr "pipe жасау мүмкін емес (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not fork a new process (%s)\n"
|
msgid "could not fork a new process (%s)\n"
|
||||||
msgstr "жаңа үрдісті құру мүмкін емес (%s)\n"
|
msgstr "жаңа үрдісті жасау мүмкін емес (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change the root directory (%s)\n"
|
msgid "could not change the root directory (%s)\n"
|
||||||
msgstr "түбірлік буманы ауыстыру мүмкін емес (%s)\n"
|
msgstr "түбірлік буманы ауыстыру мүмкін емес (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not change directory to / (%s)\n"
|
msgid "call to execv failed (%s)\n"
|
||||||
msgstr "/ бумасына ауысу мүмкін емес (%s)\n"
|
msgstr "execv шақыру талабы сәтсіз (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "call to popen failed (%s)\n"
|
|
||||||
msgstr "popen шақыру сәтсіз аяқталды (%s)\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "call to waitpid failed (%s)\n"
|
msgid "call to waitpid failed (%s)\n"
|
||||||
msgstr "waitpid шақыру қатемен аяқталды(%s)\n"
|
msgstr "waitpid шақыру қатемен аяқталды(%s)\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "could not open pipe (%s)\n"
|
||||||
|
msgstr "pipe ашу мүмкін емес (%s)\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "command failed to execute correctly\n"
|
msgid "command failed to execute correctly\n"
|
||||||
msgstr "команда дұрыс орындалмады\n"
|
msgstr "команда дұрыс орындалмады\n"
|
||||||
@@ -518,89 +545,3 @@ msgstr "%s кэші жоқ болып тұр, құрылады...\n"
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "couldn't create package cache, using /tmp instead\n"
|
msgid "couldn't create package cache, using /tmp instead\n"
|
||||||
msgstr "дестелер кэшін құру мүмкін емес, оның орнына /tmp қолданылады\n"
|
msgstr "дестелер кэшін құру мүмкін емес, оның орнына /tmp қолданылады\n"
|
||||||
|
|
||||||
#~ msgid "conflicting packages were found in target list\n"
|
|
||||||
#~ msgstr "мақсаттар тізімінде ерегісетін дестелер табылды\n"
|
|
||||||
|
|
||||||
#~ msgid "you cannot install two conflicting packages at the same time\n"
|
|
||||||
#~ msgstr "сіз екі екі ерегісетін дестені орната алмайсыз\n"
|
|
||||||
|
|
||||||
#~ msgid "replacing packages with -U is not supported yet\n"
|
|
||||||
#~ msgstr "дестелерді -A мен -U опцияларын қолданып алмастыру әлі жасалмаған\n"
|
|
||||||
|
|
||||||
#~ msgid "you can replace packages manually using -Rd and -U\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "сіз дестелерді қолмен алмастыра аласыз, ол үшін -Rd мен -U қолданыңыз\n"
|
|
||||||
|
|
||||||
#~ msgid "url scheme not specified, assuming HTTP\n"
|
|
||||||
#~ msgstr "сілтеменің түрі анықталмады, HTTP деп саналады\n"
|
|
||||||
|
|
||||||
#~ msgid "cannot write to file '%s'\n"
|
|
||||||
#~ msgstr "'%s' файлына жазу мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "no such repository"
|
|
||||||
#~ msgstr "мұндай репозиторий жоқ"
|
|
||||||
|
|
||||||
#~ msgid "repository '%s' not found\n"
|
|
||||||
#~ msgstr "'%s' репозиторийі табылмады\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create removal transaction\n"
|
|
||||||
#~ msgstr "өшіруге сұранымды құру мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "could not create transaction\n"
|
|
||||||
#~ msgstr "сұранымды жасау мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize the removal transaction\n"
|
|
||||||
#~ msgstr "өшіруге сұранымды іске қосу мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "could not initialize transaction\n"
|
|
||||||
#~ msgstr "сұранымды іске қосу мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "could not prepare removal transaction\n"
|
|
||||||
#~ msgstr "өшіруге сұранымды дайындау мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "error downloading '%s': %s\n"
|
|
||||||
#~ msgstr "'%s' жүктеп алу қатесі: %s\n"
|
|
||||||
|
|
||||||
#~ msgid "could not chdir to %s\n"
|
|
||||||
#~ msgstr "%s бумасына ауысу мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "running XferCommand: fork failed!\n"
|
|
||||||
#~ msgstr "XferCommand қосу: сәтсіз аяқталды\n"
|
|
||||||
|
|
||||||
#~ msgid "could not commit transaction"
|
|
||||||
#~ msgstr "сұранымды аяқтау мүмкін емес"
|
|
||||||
|
|
||||||
#~ msgid "could not download all files"
|
|
||||||
#~ msgstr "барлық файлдарды жүктеп алу мүмкін емес"
|
|
||||||
|
|
||||||
#~ msgid "cannot load package data"
|
|
||||||
#~ msgstr "дестенің мәліметтерін жүктеу мүмкін емес"
|
|
||||||
|
|
||||||
#~ msgid "package not installed or lesser version"
|
|
||||||
#~ msgstr "десте орнатылмаған, не оның нұсқасы ескі"
|
|
||||||
|
|
||||||
#~ msgid "group not found"
|
|
||||||
#~ msgstr "топ табылмады"
|
|
||||||
|
|
||||||
#~ msgid "user aborted the operation"
|
|
||||||
#~ msgstr "әрекетті пайдаланушы тоқтатты"
|
|
||||||
|
|
||||||
#~ msgid "internal error"
|
|
||||||
#~ msgstr "ішкі қате орын алды"
|
|
||||||
|
|
||||||
#~ msgid "not confirmed"
|
|
||||||
#~ msgstr "расталмады"
|
|
||||||
|
|
||||||
#~ msgid "%s-%s: ignoring package upgrade (to be replaced by %s-%s)\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "%s-%s: дестені жаңартуды елемеу (ол %s-%s нұсқасымен ауыстырылады)\n"
|
|
||||||
|
|
||||||
#~ msgid "command: %s\n"
|
|
||||||
#~ msgstr "командасы: %s\n"
|
|
||||||
|
|
||||||
#~ msgid "could not prepare transaction\n"
|
|
||||||
#~ msgstr "сұранымды дайындау мүмкін емес\n"
|
|
||||||
|
|
||||||
#~ msgid "No /bin/sh in parent environment, aborting scriptlet\n"
|
|
||||||
#~ msgstr "Бастапқы ортада /bin/sh жоқ, скрипт орындалмайды\n"
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user