summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2008-07-08Remove requiredby from pactestsNagy Gabor35-183/+2
Also remove some meaningless pactests (broken requiredby, requiredby*.py tests). requiredby001.py was renamed to upgrade076.py. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-08Resolvedeps reworkNagy Gabor4-132/+92
I divided resolvedeps into 2 functions. The new _alpm_resolvedep function will resolve one dependency, for example the 'foo>=1.0-1' dependency. It can be useful in sync_addtarget refactoring. The resolvedeps parameters were changed, to be coherent with recursedeps: * the target-list is an alpm_list* instead of alpm_list**. This is OK, because alpm_list_add == alpm_list_add_last * syncpkg param was removed. list contains the to-be-installed packages, resolvedeps will add the required dependencies into this list * trans param was removed, it was used in QUESTION() only, which can be used on the main (handle->trans) transaction only (because the front-end cannot access our pseudo-transactions at all!). The patch fixes some wrong dynamic pmdepmissing_t usage. I did a behavior change (and sync1003.py was modified accordingly), which needs some explanation: The old resolvedeps didn't elect packages from 'remove' list. I've dropped this because I don't want that 2nd excluding list param. In fact, in real life, we ~never need this rule. Resolvedeps is called before checkconflicts, so only -Su's %REPLACES% packages are sitting in 'remove' list. This means, that we have the replacement packages in our target list. Usually "foo replaces bar" means, that bar isn't in our repos any more, so resolvedeps *cannot* elect it; but usually it won't try it at all, because foo is in the target list, and it is expected to satisfy 'bar>=1.0-1'-like dependencies too. Since checkdeps and checkconflicts is done after resolvedeps, this cannot cause any harm. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-08Swap parameters on PM_TRANS_CONV_INSTALL_IGNOREPKG callback functionNagy Gabor2-4/+4
PM_TRANS_CONV_INSTALL_IGNOREPKG callback function can get 2 params: foo, bar in this order (packages), bar can be NULL. Old API: foo, NULL: Do you want to install foo from IgnorePkg? foo, bar: foo requires bar from IgnorePkg. Do you want to install bar? New API: foo, bar: Do you want to install foo from IgnorePkg? (If bar!=NULL:) bar requires it. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-08New _alpm_find_dep_satisfier functionNagy Gabor2-6/+20
This function finds the first satisfier package in a pkglist. Using it instead of _alpm_find_dep_satisfiers eliminates some memleaks and it is faster. (_alpm_find_dep_satisfiers and _alpm_find_pkg_satisfiers will be removed soon.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-08New _alpm_dep_edge functionNagy Gabor3-40/+31
The function is introduced to kill some code duplication. The function name uses the 'dependency graph' terminology. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-08Don't duplicate packages in requiredby listNagy Gabor1-3/+2
This is a "fix" for FS#10226. I think that multiple versioned dependencies are quite common now, and the old behavior is quite annoying there. This patch won't cause any slow-down. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-02Use $PKGEXT (from /etc/makepkg.conf) in bacmanNagy Gabor1-1/+2
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-30repo-add cleanup.Xavier Chantry2-15/+15
* change ln -s to ln -sf in the Makefile to prevent a failure when the link already exists. * make test_repo_db_file simpler and more natural, move the complexity out of it. * remove one $cmd = repo-remove check that wasn't needed Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-23bacman: fix issue with symlink early copyCarlo Bersani1-9/+10
test -e tries to resolve the link before testing, so if the link is copied before the actual file, the script exited. This fixes the issue. [Dan: also add some improved quoting in the script] Signed-off-by: Carlo Bersani <carlocci@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-23Additional path quoting and srcdir/pkgdir usageAllan McRae1-9/+8
Removes the remaining $startdir/{src,pkg} usage and adds quoting around (hopefully) all remaining path variables Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-20Add information on version comparison to manpagesDan McGee2-2/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-19Merge branch 'maint'Dan McGee5-5/+643
2008-06-19makepkg.conf: make keeping docs the defaultDan McGee2-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-19autoclean.sh: Fix paths to po/ dirDan McGee1-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-19Add libalpm Türkçe (Turkish) translationAlper KANAT2-0/+586
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-16Use access() instead of stat() when possibleDan McGee6-27/+17
We were using the stat() system call in quite a few places when we didn't actually need anything the stat struct returned- we were simply checking for file existence. access() will be more efficient in those cases. Before (strace pacman -Ss pacman): % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 33.16 0.005987 0 19016 stat64 After: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 34.85 0.003863 0 12633 1 access 7.95 0.000881 0 6391 7 stat64 Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-15makepkg: add several quotes needed after nullglob.Xavier Chantry1-6/+6
After the "shopt -s nullglob" change, all regular expressions should be properly quoted. This commit only fixes the ones I found, there are probably others left, so this should be kept in mind for easier future fixing. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-15makepkg: Add missing quotes for the source array.Xavier Chantry1-4/+4
Now makepkg can handle filenames with whitespaces in the source array. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-15Use openssl for checksum verification instead of *sum utilitiesSebastian Nowicki1-7/+7
md5sum, sha1sum, etc, do not exist on BSD systems by default. Openssl is a good portable alternative. This also brings in a dependency for openssl. Closes FS#10530. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14Expand PKGBUILD documentationDan McGee1-1/+43
Add documentation for $startdir, $srcdir, and $pkgdir variables, as well as general information about the build() function and about custom variables in PKGBUILDs. This addresses FS#10634. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14Document pacman -q/--quiet operationDan McGee1-0/+10
Fixes FS#10644. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14Combine repo-add and repo-remove into one scriptDan McGee4-245/+76
They shared about 75% of their code, so there is no real reason we should maintain them separately. Merge the differences accordingly and add a check based on the basename of the command used to decide what behavior to follow. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14repo-*: allow use of readlink or realpathDan McGee2-10/+33
Linux coreutils provides readlink, and BSD systems tend to have realpath available. Both commands provide similar functionality but of course have different names. Add a check for either and use what is available. While doing this, also unify some of the differences that have cropped up between repo-add and repo-remove. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14Move geninteg block in makepkg before error checkingAllan McRae1-11/+12
This patch moves the generating of integrity checks to before any error checking takes place in the PKGBUILD file. This allows integrity generation to complete when unrelated errors exist in a PKGBUILD file and allows the removal of multiple checks of the GENINTEG variable that would otherwise be needed. In addition a minor fix is made to a comment. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-13Merge branch 'maint'Dan McGee5-4/+1704
2008-06-13fr.po : fix one minor alignment problem.Xavier Chantry1-2/+2
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2008-06-13Add pacman Türkçe (Turkish) translationAlper KANAT2-0/+1700
No libalpm translation yet. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-13Spanish translation updatesJuan Pablo González Tognarelli2-626/+393
Fixes to old translations and new strings for upcoming 3.2 release. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-13Use shell builtin to list files for package inclusionDan McGee1-1/+5
On BSD systems, as super user, the 'ls' command displays all dot files by default, causing these to get included when not intended. If we use the bash glob operator, we can avoid issues with ls on different platforms; however, we need to turn the nullglob shell option on first to ensure we don't have problems in empty directories. Originally-noticed-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-09Allow use of GIT_VERSION in documentation dirDan McGee1-1/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-09makepkg: remove deprecated --usesudo codeDan McGee1-7/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-09makepkg: add --allsource optionAllan McRae1-12/+34
This supplements the --source option and does nearly the same thing, except downloaded source files are included in the archive as well. The sources are now packages with a pkgname/ prefix. Original-work-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-08Various updates needed prior to a new releaseDan McGee10-30/+40
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-07Minor fix to German translationThomas Bächler1-1/+1
Signed-off-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-06bacman - regenerate package from systemAllan McRae4-79/+284
Original work by Carlo "carlocci" Bersani with additions by Xavier Chantry and Allan McRae This script rebuilds an already installed package using metadata stored into the pacman database and system files. Replaces the outdated re-pacman script Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-05Reformat -Sg output to look like -QgDan McGee1-15/+10
We used list_display() on -Sg output, which might have been slightly nicer looking but made it much harder to parse in something like a shell script. Reformat it in the 'grpname pkgname' format that -Qg is already using. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04Don't display filename on -Qip operation.Xavier Chantry2-6/+6
Some previous commits apparently broke the get_filename function for package loaded with pkg_load (on a -Qip operation) because this field was no longer filled. Now pkg_load fills it. But the -Qip operation needs to be run like this : -Qip <filename>, so the filename is already known. There is no need to display it again. Besides, on a normal -Qi operation, the filename is not displayed either because this information is not stored in the local database. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04src/pacman/sync.c : cleanup of pacman_syncXavier Chantry1-39/+37
By putting the search / group / info / list operations just after the -Sy op, we can simplify several checks : 1) the check for "missing targets". Since we took care of the above operations, we now have less cases to consider : * -Syu or -Su : we can proceed * -Sy : we can end now (this is actually a bugfix) * -S : this op requires targets, so exit with an error 2) the check to see if a transaction is needed. If we arrive at the end of the function, it is either because we have -Su or -S <targets> so we already know a transaction is needed there. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04Get rid of double / in database paths.Xavier Chantry2-31/+63
Errors like the following one happen regularly (for unknown reasons...) : error: could not open file /var/lib/pacman/local//glibc-2.7-9/depends: No such file or directory Anyway, every time an user reported an error like that, it always seemed like he thought the error was caused by the double /, which is obviously wrong. Since db->path always include a trailing /, there is no need to add one when concatenating paths in be_files.c or add.c. Additionally, some static strings were switched to dynamic. And the computation of the "dbpath"/"pkgname"-"pkgversion" was refactored in db_read, db_write and db_remove with a get_pkgpath static function. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04Reimplement TotalDownload functionalityDan McGee7-21/+107
Add a new totaldlcb callback function to libalpm and make pacman utilize it when the TotalDownload option is enabled. This callback function is pretty simple- it is meant to be called once at the beginning of a "list download" action, and once at the end (with value 0 to indicate the list has been finished). The frontend is responsible for keeping track of adding individual file download amounts to the total xfered amount in order to display some sort of overall progress. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04Use correct C type for file sizesDan McGee14-50/+66
We have been using unsigned long as a file size type for a while, which works but isn't quite correct and could easily break. Worse was probably our use of int in the download callback functions, which could be restrictive for packages > 2GB in size. Switch all file size variables to use off_t, which is the preferred type for file sizes. Note that at least on Linux, all applications compiled against libalpm must now be sure to use large file support, where _FILE_OFFSET_BITS is defined to be 64 or there will be some weird issues that crop up. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04libalpm/md5: Fix license headerDan McGee2-6/+4
This was mistakenly referencing the LGPL even after the XySSL code bump, so fix the license clause to be correct. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-02Don't require --force when using the --nobuild optionAnton Fiuman1-1/+1
makepkg should not abort with error when a user uses the --nobuild option to extract sources if a package has already been built. Signed-off-by: Anton Fiuman <llexiw@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-31makepkg: remove some dead TODO codeDan McGee1-7/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-31Allow GIT version to be used in pacman buildsDan McGee4-16/+51
Add a new configure flag, --enable-git-version, that allows the output of 'git describe' to be used in the version string associated with this package. This could aid in debugging for users that are using a development version of pacman and we should be able to figure out which cut of code they are using. Sample output: $ pacman --version Pacman v3.1.4-190-g4cfa-dirty - libalpm v2.3.1 $ makepkg --version makepkg (pacman) 3.1.4-190-g5861-dirty Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-30Fix versioncmp regression after updateDan McGee3-18/+59
Commit 84283672853350a84d2a71b72dc06e180cad1587 introduced the regression, and a previous commit introduced the vercmptest.sh test script to track down these issues. This commit solves the problem by removing the previous attempt at locating the pkgrel portions and replacing it with something that performs the correct logic. While tracking down everything I needed to, I also found a mistake in one of the pactests which is fixed here as well as increased the functionality and verbosity of the vercmptest script to both print out each test it is running as well as automatically run the mirror of each test case. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-30Add simple vercmp test scriptDan McGee2-2/+81
Commit 84283672853350a84d2a71b72dc06e180cad1587 updated the versioncmp code in libalpm. Unfortunately for us, it also introduced the regression that becomes apparant with the following upgrade: warning: sonata: local (1.5-2) is newer than extra (1.5.1-2) Add a vercmptest.sh test script that is run during the make check phase which now points out three regressions in the version comparison function that will need fixing. All current tests in this script pass with the old versioncmp code. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-30Add missing NULL set in group printingDan McGee1-2/+4
If we don't set the pkgname var to NULL, we run into all sorts of beautiful segfault behavior when a group spans multiple repositories and we try to print out the location of the former list. Easy fix. This regression was introduced in bf8670036907b3ede18d37b7a3f0f7e14542a5ac. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-29Merge branch 'maint'Dan McGee1-89/+89
2008-05-29Add trailing / to DESTDIR for stupid Makefiles.Geoffroy Carrier1-1/+1
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>