Commit Graph

2433 Commits

Author SHA1 Message Date
Nagy Gabor e27a8c9ae3 Add new list_display_linebreak function
list_display puts several members on the same line, which is not appropriate
for optdepends:

Optdepends: foo: feature1  bar: feature2  baz: feature3

The new list_display_linebreak function puts every member on its own line,
which is much better with optdepends:

Optdepends: foo: feature1
            bar: feature2
            baz: feature3

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
[Xav: implement this new behavior as a new function rather than as a
parameter of list_display]
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-23 08:38:18 -05:00
Nagy Gabor 9451b2e4f2 Move the the description parsing logic to string_display()
So dump_pkg_full will indent all strings correctly.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
[Xav: add string_length function]
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-23 08:38:11 -05:00
Xavier Chantry 901e4aa5c2 makepkg: do insensitive comparisons of checksums.
This fixes FS#11283 , which was originally reported on the forums :
http://bbs.archlinux.org/viewtopic.php?id=53794

Insensitive comparisons were implicitly made before since md5sum --status was
used for checking. Now that we use openssl and compare checksums manually in
bash, we lost that feature.
This can be easily reintroduced using tr '[A-F]' '[a-f]'

What convinced me to fix it is that the md5 command line tool generates md5sums
in upper case by default :
http://www.fourmilab.ch/md5/

And finally, A-F and a-f are the same in hex and both are used.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-23 08:37:19 -05:00
Dan McGee 282eeadc68 Factor shell script size command into configure script
Commit 149839c539 introduced a small behavior regression as a drawback
for a better portability. repo-add now includes the approximate size (to the
nearest KB) rather than an exact size due to the switching of the du command
to a more portable form. Instead of sacrificing the exact size, use
configure to help us determine a valid command to acquire our filesize and
place it in the sync database.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-19 23:29:56 -05:00
Xavier Chantry 9609c0f135 repo-add: add optdepends to the sync database.
See FS#10630.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-19 19:24:56 -05:00
Nagy Gabor 6417ac129d repo-add: Fix whitespaces handling in variables.
repo-add didn't handle whitespaces nicely in fields value, and this has hurt
us several times, first with provision version (FS#9171) and then with
optdepends (FS#10630), so it is time to fix it.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-19 19:24:48 -05:00
Nagy Gabor 729651a554 Remove an usused variable from alpm/util.c/_alpm_lckmk()
Probably a tweakable "lockdb-retry" option was planned which is not
implemented. (Now it should be implemented in front-end.)

So now this variable was unused and caused a small memleak.
(FREE(dir) was not reached in case of error.)

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-19 18:43:46 -05:00
Xavier Chantry 232b838a54 libalpm/add.c : ensure the old pkg was fully loaded.
This fixes FS#11218.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-19 18:42:51 -05:00
Xavier Chantry fb5c5086e1 pacman.c: fix typo s/NoPassiveFTP/NoPassiveFtp
This fixes FS#11203.

The doc has always mentioned NoPassiveFtp, but an inconsistency was
introduced with commit 76f816b9f7 when case
sensitive comparision was introduced, and was only found after commit
b3e6cf652c which dropped the case insensitive
comparison.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-19 18:42:42 -05:00
Xavier Chantry a28b8e187f pacman.conf : add curl example for XferCommand.
curl is likely to be available on the majority of systems and supports the
file:// protocol.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-13 21:13:16 -05:00
Xavier Chantry 89c2c51964 pacman/callback.c : fix detection of totaldownload
This fixes FS#11180.

The usage of the total percent was detected like this :
/* use disp_percent if it is not 0, else show bar_percent */

However, it is very possible that the total percent is 0 at the beginning,
if the first packages downloaded are very small compared to the total
download.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-13 21:13:10 -05:00
Allan McRae a23fc08758 Fix error when sourcing profile script
With the "set -e" property set, a failure when sourcing /etc/profile
can cause makepkg to exit without error message.  The bash-completion
package activates this bug.  Fixes FS#11179.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-13 21:09:38 -05:00
Allan McRae 57bd8974c7 Fix creation of source package with local source files
Fixes FS#11149.

Signed-off-by: Allan McRae <allan@archlinux.org>
2008-08-09 07:23:37 -05:00
Dan McGee d8f8a12665 Fix segfault on x86_64 when using UseSyslog
Due to differences in handling va_list between i686 and x86_64, this bug
can only be seen on x86_64. va_list usage is not allowed but we had been
getting away with it. See
http://lists.opensuse.org/opensuse-programming/2008-02/msg00005.html
for details and explanation.

This fixes FS#11096.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-08 22:18:00 -05:00
Dan McGee 57393eb730 Fix variable naming issues in _alpm_db_cmp
When this function got a rewrite in commit f43805d875, argument and variable
names got a bit mixed up when separating the casts from the strcmp
operation. Fix the mixup which also fixes a possible segfault when this
function is called.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-08 13:45:46 -05:00
Dan McGee f201f107db doc: allow asciidoc to format the note
By doing the bolding manually, it doesn't look as cool in the HTML generated
manpages. Let asciidoc do the work.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-07 13:11:20 -05:00
Xavier Chantry 72c5a298a3 Avoid double slashes in URLs given to libdownload.
If a Server specified in pacman.conf had a trailing slash, libalpm ended up
building URLs with double slashes, and this broke libdownload with errors
like the following one :

error: failed retrieving file 'redland-1.0.8-1-i686.pkg.tar.gz'
from 192.168.0.90 : Command okay

So the public function alpm_db_set_server will make sure to remove the
trailing slash of servers.  For the private function
_alpm_download_single_file, I only added a comment.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-05 19:30:29 -05:00
Xavier Chantry 4476598e4e dload.c : drop the specific handling of file: url.
Before commit fc48dc31, file:/// urls forced the use of the internal
downloader (libdownload), because the default XferCommand, wget, does not
handle them.  We tried to move away from forcing usage of libdownload, so
this commit implemented the handling of file:/// urls manually. However,
this implementation is way too basic. It does not handle the progress bar,
thus nothing at all appears in pacman's output when a file: repo is
synchronized, or when a file is downloaded from a sync repo. Also, it is not
able to detect when the repo is already up-to-date. When libdownload was
used, both were handled.

It seems better to just drop this implementation for now. All users who use
libdownload will get the much better file:// handling back. For the users of
XferCommand, it will be more problematic, but they have several options:

1) Switch to a downloader handling file:// (wget doesn't, but curl does for
example).
2) Drop the file:// repo, and set up light http or ftp servers instead.
Consider that going that way would make this repo available for the whole
local network, which can be useful.
3) Switch back to libdownload, which works perfectly for many users.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-05 09:58:52 -05:00
Xavier Chantry 9bc799ec7b makepkg: fix download functions with weird urls.
This fixes FS#11076.

1) quote the url in get_downloadclient
2) only enable nullglob where it is needed
You can see in 7fc306cd41 that nullglob was only enabled for one part, and
that it already caused other problems, which were fixed in 7ff5a917fd.
Thanks to Henning Garus for pointing out that nullglob was problematic with
urls containing expansion char like '?'.
3) change get_downloadcmd which displayed the download command line to
download_file which actually executes the download. It seems nicer that way.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-04 13:11:18 -05:00
Dan McGee 692ea72822 makepkg: Clarify usage instructions for --allsource/--source
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-04 13:02:58 -05:00
Dan McGee fabf7ad6c4 Version bumps to configure for 3.2.0 release
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-30 19:28:07 -05:00
Xavier Chantry 8485b7b3a4 NEWS: updates from ML
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-30 07:25:23 -05:00
Xavier Chantry 115dcf0911 Final update of all translations.
Two recent commits slightly broke the translations, so this fixes all of
them.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-30 07:24:32 -05:00
Xavier Chantry 5949936777 Update README file.
Several pieces of information were outdated for the 3.2 release.  Add a
section for the API changes between 3.1 and 3.2.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Dan: small updates/grammar corrections]
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 22:33:26 -05:00
Dan McGee a7244e6ab2 Further updates to submitting-patches
Xavier started the job, this should clean it up and get it up to date that
final bit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 22:25:02 -05:00
Xavier Chantry 5d6788b36e Update submitting-patches file.
The submitting patches page needed a bit of updating. It was currently a
mash-up between the pre and post git eras.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 22:24:42 -05:00
Xavier Chantry 6ede1a5af0 makepkg: Fix STRIP_DIRS test.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 21:57:17 -05:00
Xavier Chantry 0e0a846135 makepkg : use /etc/profile
This fixes FS#9486.
source /etc/profile instead of all individual files in /etc/profile.d/*
(which is done by /etc/profile anyway).

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 21:48:20 -05:00
Nagy Gabor 428b2fd8cc Put CleanMethod to pacman.conf (commented out)
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 21:46:55 -05:00
Nagy Gabor 9a6fd1b021 Remove UseColor from front-end
This option wasn't used.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 21:46:42 -05:00
Nagy Gabor e4b1a97ff2 New fileconflict005.py pactest
This makes the fileconflict004.py test complete.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 21:46:36 -05:00
Robson Roberto Souza Peixoto 85f5279ec0 Small fix to pt_BR translation.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-29 21:46:08 -05:00
Giovanni Scafora 20a0b8e201 Small fix to Italian translation
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-25 07:14:55 -05:00
Dan McGee 3bf9448943 vercmptest: fix binary existence check
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-25 07:12:04 -05:00
Dan McGee cf25884e99 pactest: exit with a non-zero error code on unexpected failure
This will allow the return code of pactest to be useful, for such things as
use in a git-bisect test script.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:29 -05:00
Dan McGee 9f57921467 pactest: add test.expectfailure option for tests
This will enable us to mark tests we know currently fail to differentiate
them from those that we know should pass. Regressions should be easier to
spot this way.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:29 -05:00
Allan McRae 7bc34ccde3 Update NEWS file for 3.2.0 release
Signed-off-by: Allan McRae <allan@archlinux.org>
[Dan: updates of my own + some from ML]
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:29 -05:00
Xavier Chantry b8e306b73e Implement AND based package searching.
This fixes FS#2334.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Dan: add some comments to the code]
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:29 -05:00
Xavier Chantry 8877c88def Show number of packages to be installed / removed.
This fixes FS#7794.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:29 -05:00
Xavier Chantry dfae7bdd52 src/pacman : rework the display_targets function.
We had a lot of duplicated code here. The code handling the showsize option
needed to be there three times :
1) for install part of -S
2) for remove part of -S (conflict removal)
3) for -R

This patch introduce a new display_targets(pkglist, install) function which
can handle the 3 cases above. We pass install == 1 for case 1), and install
== 0 for case 2) and 3).

Now we can finally get the benefit of an old patch which handled the
ShowSize option consistently in the 3 cases above, without an awful lot of
duplicated code :
http://www.archlinux.org/pipermail/pacman-dev/2008-January/011029.html

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:29 -05:00
Dan McGee e6fb229534 Remove unused strverscmp substitute
Our internal vercmp function was the only user of this, and it no longer
relies on it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Dan McGee 5078ca580e pacsearch: quote args passed to pacman
Something such as "pacsearch foo|bar" would cause problems due to the
quoting being dropped. Adding quotes solves the problem.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Xavier Chantry 310b13a4b7 libalpm/package.c : fix infolevel bug in pkg_dup
The pkg_dup function shouldn't call any alpm_pkg_get_ accessors because
this can fill the old package with all INFRQ_DESC fields for example, and
this won't necessarily be reproduced in the new package (for all the fields
that were copied before).

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Carlo Bersani c317222d71 contrib: add pactree script
Pactree is a dependency tree viewer for installed packages.
It features both textual and graphic (through graphviz) output.

Script by: Carlo Bersani <carlocci@gmail.com>
[Allan: removed whitespace errors]
Signed-off-by: Allan McRae <allan@archlinux.org>
[Dan: killed some unnecessary lines, moved license header]
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Allan McRae 67f388c3fc makepkg: add packages to pkgdeps list only after successful install
This fixed FS#9403.  With this you can use "makepkg -sr", install the
dependencies, Ctrl+c during the makedepends installation and have
makepkg remove the installed packages on the exit.  Previously makepkg
tried to also remove the makedepends which were not installed.

The deplist="" line in remove_deps is due to an obscure bug where local
varaibles from the handle_deps function seem stay in scope because we
never formally exited it.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Dan McGee 5e4882dfe8 Fix vercmp and add additional tests
This vercmp issue has been a sticking point but this should resolve many of
the issues that have come up. Only a few minor code changes were necessary
to get the behavior we desired, and this version appears to beat any other
vercmp rendition on a few more cases added in this commit.

This commit passes all 58 vercmp tests currently out there. Other 'fixes'
still fail on a few tests, namely these ones:

test: ver1: 1.5.a ver2: 1.5 ret: -1 expected: 1
  ==> FAILURE
test: ver1: 1.5 ver2: 1.5.a ret: 1 expected: -1
  ==> FAILURE
test: ver1: 1.5-1 ver2: 1.5.b ret: 1 expected: -1
  ==> FAILURE
test: ver1: 1.5.b ver2: 1.5-1 ret: -1 expected: 1
  ==> FAILURE
4 of 58 tests failed

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-24 22:16:28 -05:00
Nagy Gabor 075b244be2 -Sqg and -Qqg
With --quiet, "pacman -Sg grp" and "pacman -Qg grp" don't list group names.

Note that "pacman -Qgq" and "pacman -Sggq" (without targets) still list
group names becuase their output would not be very useful without them.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-22 19:50:35 -05:00
Nagy Gabor 69f00385a9 Update pactest README
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-22 19:50:10 -05:00
Nagy Gabor 06a4a5bd68 Re-enable --debug with -Sw and -Sp
Commit 8741908276 disabled --debug in these
cases. We just clear PM_LOG_WARNING flag now.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-22 19:49:30 -05:00
Nagy Gabor 22722261cc New fileconflict004.py pactest
Thread: http://www.archlinux.org/pipermail/pacman-dev/2008-July/012465.html

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2008-07-22 19:47:35 -05:00