summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Use LC_ALL=C everywhereAllan McRae2008-07-19
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* alpm_list_remove treat NULL needle as "nothing"Nagy Gabor2008-07-17
| | | | | | | | So if you want to remove NULL needle from a list, alpm_list_remove will return with "not found". Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a possible segfault in alpm/remove.cNagy Gabor2008-07-17
| | | | | | | | Before removing a package from target list (in remove_prepare_keep_needed), we should check whether we have already removed it. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* _alpm_db_add_pkgincache reworkNagy Gabor2008-07-15
| | | | | | | | | | | | | | | | | | | | | Commit 8240da6cb3ff95ad480efe3e1876104024398fae broke some alpm hierarchy and introduced a new memleak (trans->packages was never freed in case of add transaction, even if the transaction wasn't committed), so it is reverted now. We follow a different approach to reduce memory usage: _alpm_db_add_pkgincache doesn't duplicate the whole package before adding it to the cache, only the package name and version (INFRQ_BASE). This method needs very small extra memory (compared to the reverted method), and after transaction commit we use less memory than before (since the big 'files' fields are not copied to cache), this is useful in GUIs. Note: The old add_pkgincache was a bit broken, since pkg->origin wasn't filled in correctly. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Acked-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Use "pacman -S $dep" in makepkg's dependency resolvingNagy Gabor2008-07-15
| | | | | | | | This method is equivalent with pacman's resolvedeps. $dep can be any (versioned) dependency. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix some memleaks in alpm/add.cNagy Gabor2008-07-15
| | | | | | | | In case of error some allocated memory wasn't freed in commit_single_pkg. Note: The return value of this function is not used. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a wrong FREELIST usage in add.cNagy Gabor2008-07-15
| | | | | | | The dynamic pmconflict_t must be freed with _alpm_conflict_free. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: speed up svn revision check for large repositoriesDan McGee2008-07-15
| | | | | | | | Using the suggestion from FS#10905, use 'svn info' rather than 'svn log' to get the current revision number, which is much quicker for large Subversion repositories. Eventually git will rule the world. :) Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove pacman.static build from build filesDan McGee2008-07-15
| | | | | | | | | | This presents plenty of problems on OSes besides Linux, and even on Linux when the libtool file for libarchive isn't present. The static build isn't all that useful anyway as missing something such as glibc will still leave you unable to run the pacman.static binary. Remove it from the formal build process. Signed-off-by: Dan McGee <dan@archlinux.org>
* src/pacman/sync.c : Display only errors with -Sp and -Sw operations.Xavier Chantry2008-07-13
| | | | | | | | In particular, this avoids warnings cluttering the output of these operations. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* sync_addtarget reworkNagy Gabor2008-07-13
| | | | | | | | | | | | | | | | | | | | | | Now '-S provision' handling is done in the back-end. In case of multiple providers, the first one is selected (behavior change: deleted provision002.py). The old processing order was: literal, group, provision; the new one: literal, provision, group. This is more rational, but "pacman -S group" will be slower now. "pacman -S repo/provision" also works. Provision was generalized to dependencies, so you can resolve deps by hand: "pacman -S 'bash>2.0'" or "pacman -S 'core/bash>2.0'" etc. This can be useful in makepkg dependency resolving. The changes were documented in pacman manual. alpm_find_pkg_satisfiers and _alpm_find_dep_satisfiers functions were removed, since they are no longer needed. I added some verbosity to "select provider instead of literal" and "fallback to group". Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* remove_addtarget rework (in front-end)Nagy Gabor2008-07-13
| | | | | | | | | | | | Now "pacman -R foo" first searches for literal, and then for group. This is faster in most cases, see: http://www.archlinux.org/pipermail/pacman-dev/2008-July/012311.html "-R group" implementation was broken, since alpm_grp_get_pkgs returns with an pmpkg_t list, not a string list. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* New remove060.py pactestNagy Gabor2008-07-13
| | | | | | | This is a group removal test. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2008-07-07
|\
| * Fix a bogus message in Hungarian translationNagy Gabor2008-07-07
| | | | | | | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Remove symlinks to libtool filesAllan McRae2008-06-27
| | | | | | | | | | | | | | | | This prevents dangling symlinks to removed libtool files when the !libtool option is used. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove requiredby from pactestsNagy Gabor2008-07-07
| | | | | | | | | | | | | | | | 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>
* | Resolvedeps reworkNagy Gabor2008-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Swap parameters on PM_TRANS_CONV_INSTALL_IGNOREPKG callback functionNagy Gabor2008-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | New _alpm_find_dep_satisfier functionNagy Gabor2008-07-07
| | | | | | | | | | | | | | | | | | | | 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>
* | New _alpm_dep_edge functionNagy Gabor2008-07-07
| | | | | | | | | | | | | | | | 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>
* | Don't duplicate packages in requiredby listNagy Gabor2008-07-07
| | | | | | | | | | | | | | | | | | 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>
* | Use $PKGEXT (from /etc/makepkg.conf) in bacmanNagy Gabor2008-07-01
| | | | | | | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add cleanup.Xavier Chantry2008-06-29
| | | | | | | | | | | | | | | | | | | | | | * 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>
* | bacman: fix issue with symlink early copyCarlo Bersani2008-06-22
| | | | | | | | | | | | | | | | | | | | 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>
* | Additional path quoting and srcdir/pkgdir usageAllan McRae2008-06-22
| | | | | | | | | | | | | | | | 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>
* | Add information on version comparison to manpagesDan McGee2008-06-19
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-06-19
|\|
| * autoclean.sh: Fix paths to po/ dirDan McGee2008-06-19
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add libalpm Türkçe (Turkish) translationAlper KANAT2008-06-19
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Expand PKGBUILD documentationDan McGee2008-06-14
| | | | | | | | | | | | | | | | 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>
| * Document pacman -q/--quiet operationDan McGee2008-06-14
| | | | | | | | | | | | Fixes FS#10644. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg.conf: make keeping docs the defaultDan McGee2008-06-19
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use access() instead of stat() when possibleDan McGee2008-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: add several quotes needed after nullglob.Xavier Chantry2008-06-15
| | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: Add missing quotes for the source array.Xavier Chantry2008-06-15
| | | | | | | | | | | | | | 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>
* | Use openssl for checksum verification instead of *sum utilitiesSebastian Nowicki2008-06-15
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Combine repo-add and repo-remove into one scriptDan McGee2008-06-14
| | | | | | | | | | | | | | | | 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>
* | repo-*: allow use of readlink or realpathDan McGee2008-06-14
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Move geninteg block in makepkg before error checkingAllan McRae2008-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Dan McGee2008-06-12
|\|
| * fr.po : fix one minor alignment problem.Xavier Chantry2008-06-12
| | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * Add pacman Türkçe (Turkish) translationAlper KANAT2008-06-12
| | | | | | | | | | | | No libalpm translation yet. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Minor fix to German translationThomas Bächler2008-06-07
| | | | | | | | | | Signed-off-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Don't require --force when using the --nobuild optionAnton Fiuman2008-06-01
| | | | | | | | | | | | | | | | 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>
* | Spanish translation updatesJuan Pablo González Tognarelli2008-06-12
| | | | | | | | | | | | Fixes to old translations and new strings for upcoming 3.2 release. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use shell builtin to list files for package inclusionDan McGee2008-06-12
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Allow use of GIT_VERSION in documentation dirDan McGee2008-06-08
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove deprecated --usesudo codeDan McGee2008-06-08
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add --allsource optionAllan McRae2008-06-08
| | | | | | | | | | | | | | | | | | | | 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>