1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
Commit Graph

2029 Commits

Author SHA1 Message Date
Dan McGee
ca1a187131 More cleanup to alpm_list
* Remove some #include statements that are not strictly necessary
* Remove node_new function that is really just a one-liner

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24 18:07:44 -06:00
Nagy Gabor
8cfccf68c1 alpm_list.c clean-up
* Introduces 'list == NULL' convention for empty list. That means
alpm_list_new isn't needed anymore, so kill it

* Small straightforward fixes in alpm_list.c

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25 00:52:58 +01:00
Dan McGee
3ad3077d8d Merge branch 'maint'
Conflicts:

	src/pacman/callback.c
2008-02-24 01:22:07 -06:00
Dan McGee
96f7613d15 Add some NULL checks into recently modified output functions
After a merge with master where some strings we print (such as descriptions)
could be NULL, a few segfaults popped up due to strlen() calls on null
pointers. Fix this by doing some preemptive checks and returning from
functions early if the string was null.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24 01:17:17 -06:00
Dan McGee
3a6f62d4c7 Remove all unnecessary snprintf usage
Both alpm_logaction() and yesno() are vararg functions, so we might as well
use this functionality and take advantage of it. Remove all of the
snprintf() calls and the LOG_STR_LEN constant that never seemed quite right.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24 00:54:11 -06:00
Sergey Tereschenko
105e01c8ef Update Russian translation
Some corrections from the previous translation.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24 00:44:35 -06:00
Dan McGee
4c14dcc580 A few more wide character output fixes
Fix up the indentprint and list printing functions so they work properly.
This output can be seen in places such as -Ss, -Si, -Qs, and -Qi.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22 23:47:03 -06:00
Dan McGee
a6470956bc Fix wide character output for add/remove/upgrade/conflict progress
Due to the addition of the Chinese translation, our column widths were all
messed up as mentioned in the download progress commit fixing this same
problem there. This is a port of the code and ideas from that fix to the
installation progress bars. Once again, a handful of examples were tested to
ensure we work in all locales and with varying byte and char widths.

English (before & after):
(1/1) checking for file conflicts                   [-----------------] 100%
(1/1) upgrading man-pages                           [-----------------] 100%

German (before & after):
(1/1) Prüfe auf Dateikonflikte                      [-----------------] 100%
(1/1) Aktualisiere man-pages                        [-----------------] 100%

Chinese (before):
(1/1) 正在检查文件冲突                                      [-----------------] 100%
(1/1) 生在升级 man-pages                                [c  o  o  o  o  o ] (1/1) 生在升级 man-pages                                [----------C o  o ] (1/1) 生在升级 man-pages                                [-----------------] 100%

Chinese (after):
(1/1) 正在检查文件冲突                              [-----------------] 100%
(1/1) 生在升级 man-pages                            [-----------------] 100%

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22 22:00:15 -06:00
Dan McGee
29f55fb7c9 Fix wide character output for download progress
Now that we have a Chinese translation, all of the problems with new
character sets crop up. Assumptions were made in the past that all
characters occupied one column, which is not true with a Chinese character
set. In addition, the download code even failed on such things as 'ö', which
is two bytes wide but only 1 column.

This code will need to also be ported to the add/remove/upgrade/conflicts
progress printouts.

Note that the tests below try to incorporate a number of things:
1. download filenames too long to fit
2. download filenames cut off in the middle of a multibyte sequence
3. download filenames incorporating multicolumn chars
4. download filenames incorporating multibyte, single-column chars
5. 'plain' download filenames that have always worked

Before:
:: 正在同步软件包数据库……
 正在解决倚赖��...    0.0K  199.8K/s 00:00:00 [-----------------] 100%
错误:无法升级正在解决倚赖关系junköëjunköëjunköëäää (未预计的系统错误)
 正在解决倚赖��...    0.0K  308.4K/s 00:00:00 [-----------------] 100%
错误:无法升级正在解决倚赖关系 (未预计的系统错误)
 junköëä                 0.0K  390.6K/s 00:00:00 [-----------------] 100%
错误:无法升级junköëä (未预计的系统错误)
 pacman-git                 0.5K    4.3M/s 00:00:00 [-----------------] 100%
本地数据库已是最新的

After:
:: 正在同步软件包数据库……
 正在解决倚赖关系jun...     0.0K   89.7K/s 00:00:00 [-----------------] 100%
错误:无法升级正在解决倚赖关系junköëjunköëjunköëäää (未预计的系统错误)
 正在解决倚赖关系           0.0K  147.7K/s 00:00:00 [-----------------] 100%
错误:无法升级正在解决倚赖关系 (未预计的系统错误)
 junköëä                    0.0K  156.9K/s 00:00:00 [-----------------] 100%
错误:无法升级junköëä (未预计的系统错误)
 pacman-git                 0.5K 1515.9K/s 00:00:00 [-----------------] 100%
本地数据库已是最新的

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22 21:59:11 -06:00
甘露(Lu.Gan)
731a774319 Add new Simplified Chinese translation
Thanks a lot! Now we get to fix the breakage this causes in output messages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22 08:24:08 -06:00
Dan McGee
8ded60326a Updates before 3.1.2 release
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-20 19:02:51 -06:00
Chantry Xavier
a3e6a6b822 Move -Sy operation into its own transaction
This allows us to remove the sync_only flag, and also do the following
steps in the future :
1) refresh the database (if asked)
2) do other stuff (eg checking if a newer pacman version is available)
3) start the actual transaction

Currently when we detect a newer pacman version, we have to release the
current transaction and start a new one.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-20 18:58:43 -06:00
Dan McGee
4bd52f3fe4 Merge branch 'maint'
Remove gettext() function addition from gensync and updatesync in master as
gettext is no longer used in them anyway.
2008-02-20 18:58:04 -06:00
Mark Constable
420c8846b9 Fix two missing BUILDSCRIPT variables in makepkg.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-20 18:50:56 -06:00
Chantry Xavier
7879e4bef7 Lock the database on -Sc operation.
This partly fixes FS#9609.

Weird things could happen when running -Sc while another instance was
already running. The cleancache function could delete packages that were
just being downloaded.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-19 22:08:06 -06:00
Chantry Xavier
6f3949e3da Add new sync_trans_init and sync_trans_release.
Factorize these two functions to avoid code duplication, especially since
they could be used for locking the database during -Sc and -Sy operation
too.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-19 22:07:44 -06:00
Fernando Lagos
2b3a85dc4a More small updates to Spanish translation
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-19 22:05:37 -06:00
Dan McGee
fc9d12bef0 When cleaning DBs, only look at directories
FS#9609 brought up an interesting issue where a user was prompted to remove
db.lck when running a -Sc operation concurrently with an -Syu operation
during a long download. Although there are other problems here, this fixes
the issue where files other than directories could be considered to be
databases. Fix this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-19 08:47:05 -06:00
Mateusz Herych
5676dbae4d Final updates to Polish translation
Good job on the group effort guys, thanks for getting this one complete.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-19 08:41:05 -06:00
Vitaly Dolgov
81db1847c9 Update pacman Russian translation.
Cleaned up by Oleg Finkelshteyn.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-18 13:15:35 -06:00
Sergey Tereschenko
848edb2f38 Update libalpm russian translation.
Cleaned up by Oleg Finkelshteyn.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-18 12:53:30 -06:00
Allan McRae
b091ccc400 Do not warn about up to date package when downloading only
Stops the "<pkg> is up to date -- reinstalling" message when using the
download only flag.
Ref: http://archlinux.org/pipermail/pacman-dev/2008-January/010952.html

Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-18 00:18:43 -06:00
Владимир Байраковский
4ac9b2eb06 Updates to Russian translation
Note that it still is not complete.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-17 23:58:22 -06:00
Dan McGee
3559306546 scripts: allow usage when gettext is not installed
Address the issue of our scripts not working so great when gettext is not
available. This has come up in multiple bug reports, and is relatively easy
to address by adding a simple check and a stub function if gettext was not
found that simply echos the original message.

Addresses concerns from FS#9214 and FS#9607.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-17 21:25:41 -06:00
Chantry Xavier
2374c81e55 Fix conflict progress bar with UTF-8 chars
This fixes FS#6437. Dan already explained the problem in that bug report.

Instead of letting printf deal with the length of utf8 strings, we can
handle it more explicitly in the case of conflict progress bar, just like we
do for add/remove progress bars. We compute the remaining space left for
displaying the pkgname in case of add/remove, and an empty string in case of
conflict.

Before :
(1/1) Prüfe auf Dateikonflikte                 [###################] 100%
(1/1) Aktualisiere rxvt-unicode                 [###################] 100%
After :
(1/1) Prüfe auf Dateikonflikte                  [###################] 100%
(1/1) Aktualisiere rxvt-unicode                 [###################] 100%

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-17 20:41:23 -06:00
Dan McGee
42f5579fd7 Remove reference to gnome in DOC_DIRS
Arch no longer installs Gnome here, and we should be stripping any doc dirs
in /opt anyway, so generalize it. Fixes FS#9597.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-17 20:40:47 -06:00
Juan Pablo Gonzalez
3078494767 Updated Spanish translation for 3.1.2 release
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-17 13:59:50 -06:00
Dan McGee
273950473e Add gettext call to 2 'failed' messages
Noticed-by: Vojtěch Gondžala <vogo@seznam.cz>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-16 17:44:21 -06:00
Dan McGee
92ab7c33fb Move pmgraph_t struct and functions to their own header file
This will allow us to utilize this helpful type and functions in places
besides dependency calculations. In addition, remove the public declaration
of pmgraph_t in alpm.h- there is zero need to expose this internal type.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-16 11:58:49 -06:00
Dan McGee
6b07b5d345 Merge branch 'maint'
Conflicts:

	lib/libalpm/be_files.c
	lib/libalpm/package.c
2008-02-15 19:40:22 -06:00
Dan McGee
a16608c610 Update Doxyfile with some new options in new version
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-15 19:29:17 -06:00
Matthias Gorissen
be95e4d8a0 More small updates to German translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-15 16:07:28 -06:00
Jaroslaw Swierczynski
fe4e07bd2f Update Polish translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-15 15:58:26 -06:00
Dan McGee
59a6b519da Merge branch 'translations' into maint 2008-02-14 21:22:27 -06:00
Benjamin Andresen
2b0c89b06a Update German translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-14 21:19:37 -06:00
João Felipe Santos
0f74ae0885 Updated Brazilian Portuguese translation for 3.1.2 release
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-15 01:27:15 +01:00
Dan McGee
b206aaee88 Ensure DESC infolevel is loaded before checking pkg->filename
This is the first step of fixing FS#9547. This should not break any existing
code that may rely on this function behaving the way it did, and should be
good for inclusion in a maint release.

In addition, update pactest so it fills the FILENAME field in the DB entries
it creates so we can move forward with a real fix to this issue.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-13 22:52:53 -06:00
Nagy Gabor
141e569840 Updated Hungarian translation for 3.1.2 release
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-12 23:26:43 +01:00
Vojtěch Gondžala
706c690b64 Updated Czech translation for 3.1.2 release
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-12 23:05:33 +01:00
Jeff Bailes
ccc57de6b6 Updated English translation for 3.1.2 release
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-12 12:18:46 +01:00
Chantry Xavier
279fbc44b1 Update french translation.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-12 12:17:20 +01:00
Giovanni Scafora
69188d75fb Updated Italian translation for 3.1.2 release
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-02-12 12:15:36 +01:00
Dan McGee
e8d665fbf7 Update translation files in prep for 3.1.2 release
For 7 message changes, this commit is far too large...

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-11 20:52:50 -06:00
Dan McGee
f4ac63ab43 Update NEWS in prep for 3.1.2 release
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-11 20:44:16 -06:00
Dan McGee
8068a14c52 setlibpaths(): remove a stray set_option line
For some reason, we set our dbpath to the logfile path, which was completely
broken, and we didn't even check the return value coming back (which of
course was -1 meaning the set failed). Add some comments so people can
understand what is going on here now too.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-11 20:40:44 -06:00
Dan McGee
9bf487b2ff Move some translations to their generic language code
For our Czech, Polish, and Russian translations, they do not need to be at
the more specific 'lang_COUNTRY' code, but can live at just plain 'lang'.
This follows the pattern of most other translated programs out there as
Roman pointed out on IRC.

ru_RU: 2 (pacman and libalpm)
ru: 128 for him, 131 for me (everything else)

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-11 20:40:44 -06:00
Dan McGee
fbf3beb8d2 ensure chk_fileconflicts reads entire file list
If the end of the pB list was reached before the end of pA, we failed to
read any remaining files from the pA list. Add an additional loop to ensure
all entries of pA are added to the return list regardless of whether we have
reached the end of pB.

This new loop also eliminates the now-unnecessary check for a null pB, as we
need to ensure we are excluding directories in the resulting output anyway.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-11 20:40:43 -06:00
Nagy Gabor
7586072beb Fixes file relocation pactests
This patch fixes upgrade040.py and upgrade041.py (041 now fails!):
* the old pactests didn't check the existence of the relocated file
* upgrade041.py was broken due to a typo (missing comma)

New upgrade046.py pactest was added (derived from the fixed upgrade041.py).
This fails because the file relocation check is _hacked_ to conflict.c, and
_alpm_db_find_fileconflicts is not called in case of --force.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-11 20:40:43 -06:00
Chantry Xavier
17180890a5 makepkg : set sane umask before source extraction.
This fixes FS#9242 and FS#9362.

Set umask before the sources are extracted, and after the /etc/profile.d/*
files are sourced in handledeps.
This sourcing of profile.d files is why umask was moved to the build
function in the first place, as can be seen in commit ac965ed401.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-11 20:40:43 -06:00
Dan McGee
bfc024eab3 Merge branch 'maint' 2008-02-07 20:16:16 -06:00