summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* 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
| * 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>
| * 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>
* | 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>
* | 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 )
* | 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>
* | 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>
* | 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>
* | Check package arch before installingXavier Chantry2009-09-06
| | | | | | | | | | | | | | This implements FS#15622 Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add Architecture and --arch optionXavier Chantry2009-09-06
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-08-18
|\| | | | | | | | | Conflicts: lib/libalpm/dload.c
| * dload.c : change the way to check for mtimesXavier Chantry2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | libfetch supports checking mtime so we do not need to do it manually. when the databases are already up-to-date, initiating a connection with fetchXGet and closing it right after with fetchIO_close took a very long time (up to 10min!) on some network. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit d7675e393ff3cecb5408c243898ebaae80c5988d)
| * Make fetch timeout actually 10 secondsDan McGee2009-08-13
| | | | | | | | | | | | | | | | | | We had 10000 as our timeout value, assuming it was expressed in ms. This is false after looking at the current code, so reset it back to 10 seconds. Addresses FS#15369. Signed-off-by: Dan McGee <dan@archlinux.org>
* | dload.c : various fixesXavier Chantry2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fix one memleak if get_filename failed - cleanup according to Joerg's feedback: "url_for_string: If fetchParseURL returned successful, you should always have a scheme set. The logic for anonftp should only be needed for very broken server -- do you know of any such? download_internal: Specifying 'p' is now a nop -- it is tried by default first with fall-back to active FTP." Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Dan: remove from pacman.conf and pacman.conf.5] Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-08-08
|\|
| * Add a missing newline.Xavier Chantry2009-08-03
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Use full path to ldconfigMarc - A. Dahlhaus2009-08-03
| | | | | | | | | | | | | | | | | | | | If /sbin is not in the PATH and sudo is used, ldconfig cannot be found. So use /sbin/ldconfig instead. The code checked for the existence of /sbin/ldconfig anyway.. Signed-off-by: Marc - A. Dahlhaus <mad@wol.de> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | dload.c : only call fwrite onceXavier Chantry2009-08-08
| | | | | | | | | | | | | | | | | | I assume the loop was never iterated more than once, because the write location was not updated at each loop iteration (buffer instead of buffer + nwritten), yet we never had reports of corrupted download. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | dload.c : change the way to check for mtimesXavier Chantry2009-08-08
|/ | | | | | | | | | | libfetch supports checking mtime so we do not need to do it manually. when the databases are already up-to-date, initiating a connection with fetchXGet and closing it right after with fetchIO_close took a very long time (up to 10min!) on some network. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* fix warning when internal download is not usedXavier Chantry2009-08-02
| | | | | | | | | After commit 30c4d53ce5c16cbbb17a88fe1ad14faf53d91999, get_destfile and get_tempfile are only used for internal download, so move these two functions inside the ifdef Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Brazilian Portuguese translationArmando M. Baratti2009-08-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* French translation reformatDan McGee2009-08-01
| | | | | | | | 'make distcheck' had issues with this one and reformatted it. In addition, it found a fuzzy message which is now fixed due to an inadvertent msgid edit. Signed-off-by: Dan McGee <dan@archlinux.org>
* update english british translationJeff Bailes2009-07-31
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update hungarian translationNagy Gabor2009-07-30
| | | | | | | Thanks to Avramucz Peter <muczyjoe@gmail.com> for having translated all the scripts ! Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update simplified chinese translationLu Gan2009-07-30
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update russian translationSergey Tereschenko2009-07-30
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update ukrainian translationRoman Kyrylych (Роман Кирилич)2009-07-30
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update german translationMatthias Gorissen2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update Kazakh translationBaurzhan Muftakhidinov2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update romanian translationVolodia Macovei2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update polish translationMateusz Herych2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update turkish translationSamed Beyribey2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update czech translationVojtech Gondzala2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>