summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* alpm/remove.c : respect --dbonly during remove-upgradeXavier Chantry2010-12-12
| | | | | | | | | | | | | | | | | When a -Sk or -Uk operation induced a removal of an existing local package, --dbonly was not in effect and the files were all removed. Fixing this behavior was already marked as TODO in database012 pactest ------------ TODO: I honestly think the above should NOT delete the original les, it hould upgrade the DB entry without touching anything on the file stem. E.g. this test should be the same as: pacman -R --dbonly dummy && pacman -U --dbonly dummy.pkg.tar.gz ------------ Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> [Dan: small coding style touchup] Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman: sort --help outputXavier Chantry2010-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example with pacman -Uh : $ pacman -Uh options: -b, --dbpath <path> set an alternate database location -d, --nodeps skip dependency checks -f, --force force install, overwrite conflicting files -k, --dbonly only modify database entries, not package files -r, --root <path> set an alternate installation root -v, --verbose be verbose --arch <arch> set an alternate architecture --asdeps install packages as non-explicitly installed --asexplicit install packages as explicitly installed --cachedir <dir> set an alternate package cache location --config <path> set an alternate configuration file --debug display debug messages --ignore <pkg> ignore a package upgrade (can be used more than once) --ignoregroup <grp> ignore a group upgrade (can be used more than once) --logfile <path> set an alternate log file --noconfirm do not ask for any confirmation --noprogressbar do not show a progress bar when downloading files --noscriptlet do not execute the install scriptlet if one exists --print only print the targets instead of performing the operation --print-format <string> specify how the targets should be printed Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> [Dan: small coding style touchups] Signed-off-by: Dan McGee <dan@archlinux.org>
* CLI args: update --help and manpageXavier Chantry2010-12-12
| | | | | | | | | | | | | | | The three parts (help, manpage and code) are now organized in the same way and much easier to compare : - specific options - install/upgrade options for -S and -U - transaction options for -S -R and -U - global options After this re-organization, it was easy to update and sync the three components together. Duplication is also avoided. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* alpm: don't expose alpm_depcmpXavier Chantry2010-12-12
| | | | | | | | | | | | | Either we expose all low levels function dealing with pmdepend_t (splitdep and depfree come to mind), or we don't. Since none of the tools use depcmp, I chose to remove it. In the future, we might want to expose higher level functions such as alpm_find_satisfier, or just lower level functions like splitdep and depfree together with depcmp. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* alpm: kill alpm_deptestXavier Chantry2010-12-12
| | | | | | | | This has been replaced by the more flexible alpm_find_satisfier function, and alpm_deptest was completely unsused now. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman/deptest: reimplement with alpm_find_satisfierXavier Chantry2010-12-12
| | | | | | | | | It's very easy to re-implement the -T feature with the more generic alpm_find_satisfier rather then the more specific and less useful alpm_deptest. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* alpm: add new alpm_find_satisfier functionXavier Chantry2010-12-12
| | | | | | | | | | | | whatprovides and splitdep were removed, so depcmp alone is quite useless now without splitdep, and deptest is not flexible enough. Introduce a new alpm_find_satisfier which is hopefully more flexible, this should make implementation of deptest very easy, and also help alpm tools such as pactree. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a few problems reported by clang-analyzerXavier Chantry2010-12-12
| | | | | | | One missing NULL-check and 3 dead assignments. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Ensure stdin args are correctly terminatedDan McGee2010-12-12
| | | | | | And don't require pm_targets to be empty to read from stdin either. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2010-12-12
|\ | | | | | | | | | | Conflicts: lib/libalpm/be_local.c lib/libalpm/trans.c
| * be_files: write EPOCH instead of FORCEXavier Chantry2010-12-12
| | | | | | | | | | | | | | | | | | | | | | | | This patch is only meant for 3.4.x. It prepares the place for the future epoch-aware release. All force packages that get reinstalled or upgraded will get an EPOCH entry in the local database, and thus the new pacman with epoch won't reinstall them by mistake on the first -Su. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix possible null pointer deref in check_archDan McGee2010-12-10
| | | | | | | | | | | | | | | | | | | | | | If we have a corrupted database, a package can come through without an arch, causing the code to blow up when making strcmp() calls. It might even be possible with perfectly valid database entries lacking an 'arch =' line. This behavior was seen as at least one of the problems in FS#21668. Ensure pkgarch is not null before doing anything further. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Small update to Russian translationSergey Tereschenko2010-11-08
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add initial 3.4.2 NEWS draftDan McGee2010-10-28
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update Swedish translationTobias Eriksson2010-10-28
| | | | | | | | | | | | | | | | 442 translated strings, no fuzzies, no untranslated. modified: po/sv.po Signed-off-by: Dan McGee <dan@archlinux.org>
| * PKGBUILD.vim: add special licenses BSD MIT ZLIB PythonXavier Chantry2010-10-28
| | | | | | | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Small updates to Spanish translationRicardo PĂ©rez2010-10-28
| | | | | | | | | | | | Also addresses FS#21373. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Support reading package args from stdinDave Reisner2010-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only occurs if no arguments were provided directly. Arguments can be separated by any amount of valid whitespace. This allows for piping into pacman from other programs or from itself, e.g.: pacman -Qdtq | pacman -Rs This is better than using xargs, as xargs will not reconnect stdin to the terminal. The above operation performed using xargs would require the --noconfirm flag to be passed to pacman. Signed-off-by: Dave Reisner <d@falconindy.com>
* | Merge branch 'maint'Dan McGee2010-10-18
|\|
| * alpm/sync: very small memleak fixXavier Chantry2010-10-18
| | | | | | | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * libalpm/remove: fix funny progress bar problem with empty packagesXavier Chantry2010-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ pacman -Rd kde-meta Remove (15): kde-meta-kdewebdev-4.5-1 [0.00 MB] kde-meta-kdeutils-4.5-1 [0.00 MB] kde-meta-kdetoys-4.5-1 [0.00 MB] kde-meta-kdesdk-4.5-1 [0.00 MB] kde-meta-kdeplasma-addons-4.5-1 [0.00 MB] kde-meta-kdepim-4.5-1 [0.00 MB] kde-meta-kdenetwork-4.5-1 [0.00 MB] kde-meta-kdemultimedia-4.5-1 [0.00 MB] kde-meta-kdegraphics-4.5-1 [0.00 MB] kde-meta-kdegames-4.5-1 [0.00 MB] kde-meta-kdeedu-4.5-1 [0.00 MB] kde-meta-kdebase-4.5-1 [0.00 MB] kde-meta-kdeartwork-4.5-1 [0.00 MB] kde-meta-kdeadmin-4.5-1 [0.00 MB] kde-meta-kdeaccessibility-4.5-1 [0.00 MB] Total Removed Size: 0.06 MB Do you want to remove these packages? [Y/n] ( 1/15) removing kde-meta-kdewebdev [------------------------] 100% $ it stopped here.. On one side, libalpm did not initialize the progress bar at 0 percent. So with meta-packages that have 0 files, there was only one progress bar call with percent == 100. On the other side, pacman callback kept track of the last percent that it received. When there are only meta-packages, we always received only 100, so pacman believed the progress bar needed not update. Thus only the first package was actually displayed. A proper fix for the callback would be to keep track of last package name to make sure the recorded prev percent applies. But since we now specify that both Add and Remove should at least send percent=0 at beginning and percent=100 at the end, there is no need for that. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pactest: use valgrind.supp fileXavier Chantry2010-10-18
| | | | | | | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Tests: '-S repo/group' syntaxJakob Gruber2010-10-18
| | | | | | | | | | | | | | when calling '-S repo/group', only group members in <repo> should should be installed (group members in other repos are ignored) Signed-off-by: Dan McGee <dan@archlinux.org>
* | Tests: Sync group which includes ignored pkgsJakob Gruber2010-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * FS#19854 (--ignore is ignored with groups) * http://www.archlinux.org/pipermail/pacman-dev/2009-June/008847.html (operation aborts when a package from a group is ignored/and user chooses not to install it) If a group member is ignored, we expect a) a question whether to install b) after saying 'no' to a), the ignored member not to be installed c) all other group members to be installed d) pacman to execute successfully Signed-off-by: Dan McGee <dan@archlinux.org>
* | be_package: read force entry and convert to epochXavier Chantry2010-10-14
| | | | | | | | | | | | | | | | We still need to read force entry in epoch-aware pacman, so that when we install an old force package, EPOCH gets written to the local db. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | bash_completion: remove upstream deprecated functionsCarlos Diaz2010-10-14
| | | | | | | | | | | | | | | | | | Populate $cur and $prev with the new bash-completion 1.2 function, _get_comp_words_by_ref. _get_cword and _get_pword have been deprecated. Signed-off-by: Carlos Diaz <839273@gmail.com>
* | Merge branch 'maint'Dan McGee2010-10-13
|\|
| * Read 'force' entry from packagesDan McGee2010-10-11
| | | | | | | | | | | | | | | | We weren't reading this in from our packages, thus causing us not to write it out to our local database. Adding this now will help ease the upgrade path for epoch later and not require reinstallation of all force packages. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add several pactests for epoch codeDan McGee2010-10-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add epoch verification to makepkgDan McGee2010-10-13
| | | | | | | | | | | | If defined, it must be an integer. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Update contrib/ for epochDan McGee2010-10-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add epoch support to pactestDan McGee2010-10-13
| | | | | | | | | | | | | | | | This adds epoch support to pactest, while still producing packages and database entries the same way makepkg and repo-add currently do in a backward compatible fashion (still including the 'force' option). Signed-off-by: Dan McGee <dan@archlinux.org>
* | Make repo-add and makepkg epoch-awareDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | Allow it to be a variable in the PKGBUILD as well as propagating it through to the built package and the package database. We leave some backward compatibility in place by placing the '%FORCE%' option in the database if the package contains an epoch; this will be used by older versions of pacman and more or less ignored by versions that use epoch. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Update documentation to reflect new epoch package variableDan McGee2010-10-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add epoch support to pacman/libalpmDan McGee2010-10-13
| | | | | | | | | | | | | | This will allow for better control of what was previously the 'force' option in a PKGBUILD and transferred into the built package. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Small tweaks after backend mergeDan McGee2010-10-13
| | | | | | | | | | | | Just a few small things I noticed looking through the code. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge remote branch 'allan/backend'Dan McGee2010-10-13
|\ \
| * | Only write to local reposAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | We do not write to sync repos so kill the code for that. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Clean-up parsing sync databaseAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | Remove unnecessary parsing of fields not found in sync desc file. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Clean-up parsing local databaseAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary parsing of fields not found in local desc files. Leave %FORCE% parsing as this likely will make an appearance in desc files in the future. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Remove lazy loading of deltasAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | Local packages do not have deltas so remove lazy loading of delta information. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Move and rename splitnameAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The splitname function is a general utility function and so is better suited to util.h. Rename it to _alpm_splitname to indicate it is an internal libalpm function as was the case prior to splitting local and sync db handling. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Restrict visibility of checkdbdir and get_pkgpathAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | These functions are only needed by be_local and were only promoted to db.{h,c} as part of the splitting of handling the local and sync dbs. Move them into be_local.c and make them static again. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Clean up all old database files and directoriesAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | Clean-up the previous download location of the sync database and any old extracted sync database directories which are unneeded with the tar-db backend. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Only download sync databasesAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | As the sync databases are read directly from the tarball, we no longer need to extract them. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Parse sync databaseAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | Read in package information for a tar based sync database. Do not use lazy loading for sync db. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Populate sync db from archiveAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Read in list of packages for sync db from tar archive. Breaks reading in _alpm_sync_db_read and a lot of pactests (which is expected as they do not handle sync db in archives...). Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Completely separate local and sync db handlingAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | Put the db_operations struct to use and completely split the handling of the sync and local databases. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Separate be_files into be_sync and be_localAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file be_files.c is "split" to be_local.c and be_sync.c in order to achieve separate handling of sync and local databases. Some basic clean-up of functions that are only of use for local or sync databases has been performed and some rough function renaming in duplicated code has been performed to prevent compilation errors. However, most of the clean-up and final separation of sync and local db handling occurs in following patches. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Move db cache handling functionsAllan McRae2010-10-13
| | | | | | | | | | | | | | | | | | | | | These will be needed for the handling of both local and sync database caches, so put them in a common location. Signed-off-by: Allan McRae <allan@archlinux.org>