summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | makepkg: tidy usage outputAllan McRae2009-09-22
| | | | | | | | | | | | | | | | | | | | | | Various tidying to the usage output - change "--config <config>" to "--config <file>" to prevent wrapping in a 80 character wide terminal - re-alphabetise options, including moving all long only opts to the end - use same indentation for additional pacman options - remove useless comment Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | testdb : fix many memleaksXavier Chantry2009-09-22
| | | | | | | | | | | | | | | | | | | | Yes, it was that bad :P We still have memleaks left because we cannot free the error data returned by libalpm, but pacman has the same issue. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Allow cache cleaning to process all cache directoriesDan McGee2009-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously we only looked at the first cache directory returned by the library. This allows us to look at all cache directories for cleaning. In addition, change the way we do a full (-Scc) cache cleaning operation. Instead of removing the parent directory, remove each package one-by-one as in the -Sc case. This would be ideal for someone mounting a cache directory over NFS, as it ensures we don't wipe out the mountpoint from underneath the directory. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Propagate return status up in DB cleaning codeDan McGee2009-09-21
| | | | | | | | | | | | | | We didn't look at the return status of sync_cleandb() in sync_cleandb_all(). Make it do so and return it up the call chain. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add missing closedir calls in cache cleanupDan McGee2009-09-21
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fully implement database lazy loadingDan McGee2009-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 34e1413d75 attempted to implement lazy loading of package databases. Although it took care of my main complaint (creating the database directory if it didn't exist), it didn't allow sync repos to be registered before alpm_option_set_dbpath() had been called. With this patch, we no longer compute the individual repository DB paths until necessary, allowing full lazy loading to work as intended, and allowing us to drop the extra setlibpath() calls from the frontend. This allows the changes introduced in a2cd48960 (but later reverted) to be added back in again. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-09-20
|\| | | | | | | | | | | | | | | Message updates made this one a bit messy, but nothing too bad. Conflicts: lib/libalpm/add.c lib/libalpm/remove.c
| * Merge branch 'xav/trans' into maintDan McGee2009-09-20
| |\
| | * Update Italian translationGiovanni Scafora2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Ukrainian translationRoman Kyrylych2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Turkish translationSamed Beyribey2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Spanish translationJuan Pablo González Tognarelli2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Russian translationSergey Tereschenko2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Romanian translationVolodia Macovei2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Kazakh translationBaurzhan Muftakhidinov2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update Hungarian translationNagy Gabor2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| | * Update German translationMatthias Gorissen2009-09-18
| | | | | | | | | | | | Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
| * | Strndup usage and small typo fixLaszlo Papp2009-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./src/pacman/package.c: - small typo fix ./src/pacman/pacman.c: - strdup is changed to strndup, because it's safer like in case of config option Signed-off-by: Laszlo Papp <djszapi2@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Kill -F option for good in option parsingDan McGee2009-09-18
| |/ | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Updates in prep for 3.3.1 releaseDan McGee2009-09-16
| | | | | | | | | | | | Bump versions in configure.ac; update NEWS accordingly Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update en_GB translationDan McGee2009-09-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update french translationXavier Chantry2009-09-16
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update all pot and po files for 3.3.1 releaseXavier Chantry2009-09-16
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * String improvementsXavier Chantry2009-09-16
| | | | | | | | | | | | | | Add more untranslated strings, improve consistency, etc. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Catch an untranslated warning in lib/remove.cNagy Gabor2009-09-15
| | | | | | | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Ask user confirmation for -R operation, tooNagy Gabor2009-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 0da96abc, pacman always asks user confirmation for -U, so it is more coherent to doing that for -R, too. Btw, most users use -Rs always, so they won't notice any change. In the old code the -Ru operation was forgotten: Though it is a not "dangerous" operation, but the target list can be changed by that, too. Non-interactive scripts should always use --noconfirm (unexpected questions can be asked by all transactions). [That's why we should always default to the safest answers.] I've also added a pkglist != NULL sanity check (because -Ru can empty target list in trans_prepare part). Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | delta : simple code refactoringXavier Chantry2009-09-20
| | | | | | | | | | | | | | This will make the code re-usable for other purpose. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | sync.c : duplicate the target before modifying itXavier Chantry2009-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was probably a bad idea to modify the target directly in case of repo/pkg syntax. Duplicating it also allows us to keep the original target string, which is more informative when printing errors. Also remove a duplicated error message from libalpm, and improve the message already returned to the frontend. $ pacman -S foo/bar before error: repository 'foo' not found error: 'bar': no such repository after error: 'foo/bar': could not find repository for target Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-09-14
|\|
| * Add makepkgopt to be_package.cNagy Gabor2009-09-14
| | | | | | | | | | | | | | | | | | After commit 774c252 the --debug output shows 5-6 "syntax error..." lines for each package. After this patch pacman recognizes makepkgopt as a valid key, but doesn't do anything. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Revert "Fix a memleak involving lazy DB loading"Dan McGee2009-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't quite work, as can be seen by the pactest results: Total = 179 Pass = 108 ( 60.34%) Expected Fail = 5 ( 2.79%) Unexpected Pass = 0 ( 0.00%) Fail = 66 ( 36.87%) If you peek inside '_alpm_db_new' when it gets called for the sync databases, the base dbpath is still at the default value, causing things like pactest to fail miserably. We need some further work to do fully lazy loading, and that belongs on master, not maint. This reverts commit a2cd48960e33043f75c81e0ecbc2d33b20b695fe. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix a memleak involving lazy DB loadingXavier Chantry2009-09-08
| | | | | | | | | | | | | | | | | | | | | | | | Lazy opening of databases is supported since 34e1413d75. We don't need that setlibpath call each time we register a database. Besides this caused a memleak in case setlibpath failed, because setlibpath exit directly and we did not do the cleanup part (section string was not freed, and a file descriptor remained open). Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Change the interface for target loadingXavier Chantry2009-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -int alpm_trans_sysupgrade(int enable_downgrade); -int alpm_trans_sync(char *target); -int alpm_trans_add(char *target); -int alpm_trans_remove(char *target); +int alpm_sync_sysupgrade(int enable_downgrade); +int alpm_sync_target(char *target); +int alpm_sync_dbtarget(char *db, char *target); +int alpm_add_target(char *target); +int alpm_remove_target(char *target); * functions renaming * add new sync_dbtarget which allows to specify the db * repo/ syntax handling is moved to frontend ( should implement FS#15141) * group handling is moved to backend ( see http://www.archlinux.org/pipermail/pacman-dev/2009-June/008847.html )
* | Re-enable REMOVE_PKGS test in pactest suiteNagy Gabor2009-09-08
| | | | | | | | | | | | | | | | | | With the help of --ask switch it is possible to test remove_unresolvable feature, so I reverted the change of commit f2061c5f on ignore005.py with --ask=32 added. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove transaction typeXavier Chantry2009-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This basically started with this change : /* Transaction */ struct __pmtrans_t { - pmtranstype_t type; pmtransflag_t flags; pmtransstate_t state; - alpm_list_t *packages; /* list of (pmpkg_t *) */ + alpm_list_t *add; /* list of (pmpkg_t *) */ + alpm_list_t *remove; /* list of (pmpkg_t *) */ And then I have to modify all the code accordingly.
* | Use sync.c for upgrade transaction prepare and commitNagy Gabor2009-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch utilizes the power of sync.c to fix FS#3492 and FS#5798. Now an upgrade transaction is just a sync transaction internally (in alpm), so all sync features are available with -U as well: * conflict resolving * sync dependencies from sync repos * remove unresolvable targets See http://www.archlinux.org/pipermail/pacman-dev/2009-June/008725.html for the concept. We use "mixed" target list, where PKG_FROM_FILE origin indicates local package file, PKG_FROM_CACHE indicates sync package. The front-end can add only one type of packages (depending on transaction type) atm, but if alpm resolves dependencies for -U, we may get a real mixed trans->packages list. _alpm_pkg_free_trans() was modified so that it can handle both target types _alpm_add_prepare() was removed, we use _alpm_sync_prepare() instead _alpm_add_commit() was renamed to _alpm_upgrade_targets() sync.c (and deps.c) was modified slightly to handle mixed target lists, the modifications are straightforward. There is one notable change here: We don't create new upgrade trans in sync.c, we replace the pkgcache entries with the loaded package files in the target list (this is a bit hackish) and call _alpm_upgrade_targets(). This implies a TODO (pkg->origin_data.db is not accessible anymore), but it doesn't hurt anything with pacman front-end, so it will be fixed later (otherwise this patch would be huge). I updated the documentation of -U and I added a new pactest, upgrade090.py, to test the syncdeps feature of -U. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Do not remove conflict by defaultNagy Gabor2009-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a conflict is detected, pacman asks if the user wants to remove the conflicting package. In many cases this is a bad idea. e.g. udev conflicts with initscripts (initscripts<2009.07). Remove initscripts [Y/n] This changes the query to [y/N]. The --noconfirm behavior has been also changed, because it chooses the default answer. Since the yes answer is more interesting in our pactests dealing with conflicts, I inserted '--ask=4' to all of them with one exception: sync042.py tests the no answer. (I also fixed a typo in sync043.py) Original-work-by: Allan McRae <allan@archlinux.org> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
* | Re-add the non-user friendly --ask optionXavier Chantry2009-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-implements the --ask option which was removed in commit 1ff8e7f364a9f640ada7526384646d510ac29967. This option does not have to be exposed to the user (help,doc,etc), but is very very useful for pactest if we want to have more coverage there. This was rewritten in a smarter way, without code duplication. And with a different behavior : this option is now only used to inverse default behavior to questions. We still use bit operations based on the following struct : /* Transaction Conversations (ie, questions) */ typedef enum _pmtransconv_t { PM_TRANS_CONV_INSTALL_IGNOREPKG = 0x01, PM_TRANS_CONV_REPLACE_PKG = 0x02, PM_TRANS_CONV_CONFLICT_PKG = 0x04, PM_TRANS_CONV_CORRUPTED_PKG = 0x08, PM_TRANS_CONV_LOCAL_NEWER = 0x10, PM_TRANS_CONV_REMOVE_PKGS = 0x20, } pmtransconv_t; for each conv matched, the default answer is inversed. --ask 0 : all default answers are preserved --ask 4 : only conflict question is inversed --ask 63 : all questions are inversed (63 == 1+2+4+8+16+32) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a new reason field to pmconflict_t structNagy Gabor2009-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes "foo conflicts with bar" information is not enough, see this thread: http://bbs.archlinux.org/viewtopic.php?id=77647. That's why I added a new reason field to our pmconflict_t struct that stores the packager- defined conflict that induced the fact that package1 conflicts with package2. I modified the front-end (in callback.c, sync.c, upgrade.c) to print this new information as well. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
* | Change Y/n to y/N with REMOVE_PKGS (remove_unresolvable) callbackNagy Gabor2009-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reason for this change is that scripts could not catch the removed targets with -S --noconfirm (the return value was 0). So the effect of a pacman command may have differed from the expected one. Moreover, for my taste the default no answer is better (I wanted to install the specified targets, not a subset of them). I had to change some pactest files as well, because now the default behavior is not to remove unresolvable targets. In fact, the only pactest file that tested this feature was ignore005.py. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Allow '-Su foo' operationXavier Chantry2009-09-08
| | | | | | | | | | | | | | | | | | | | | | This implements FS#15581 '-Su foo' should be more or less equivalent do '-Su ; -S foo' Note : I moved a block of code to a new process_target function Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-09-07
|\|
| * Update doc and vim syntax for arch=anyXavier Chantry2009-09-07
| | | | | | | | | | | | | | This fixes FS#15870 Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update the doc for --sourceXavier Chantry2009-09-07
| | | | | | | | | | | | | | | | | | | | | | See FS#15984 After commit 02acf65, the --source behavior changed. Thanks to Dan for actually writing the new sentence :) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add 3.3.0 release to index.txtDan McGee2009-09-06
| |
* | rewrite strreplaceXavier Chantry2009-09-07
| | | | | | | | | | | | | | | | | | | | | | | | * just do one malloc call * p = realloc(p, new_size) was not good (see http://www.iso-9899.info/wiki/Why_not_realloc) * use more efficient strncpy instead of strncat Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | use strreplace in the xfercommand codeXavier Chantry2009-09-07
| | | | | | | | | | | | | | | | this operation was re-implemented using static strings, instead of using the existing strreplace function Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | fix small memleak in an error caseXavier Chantry2009-09-06
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | libalpm/util.c : remove _alpm_strreplaceXavier Chantry2009-09-06
| | | | | | | | | | | | | | | | | | This function is unused since commit 358cc5804a2df873180e6d9ef2420ab3247f8437. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Dan: also kill from util.h] Signed-off-by: Dan McGee <dan@archlinux.org>
* | sanity check for optdepends syntaxXavier Chantry2009-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only allow optdepends like: pkgname: description some (real) examples of invalid optdepends: 'tcl, python and/or ruby: to use corresponding binding' 'xorg-fonts-75dpi : X bitmap fonts needed for the interface' 'ruby-htmlentities (AUR): for one provider named Deastore' 'xpdf - for pdf' Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Allan: rebase off de39a1f6 and adjust man page] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>