summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* update czech translationVojtech Gondzala2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update spanish translationJuan Pablo Gonzalez Tognarelli2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update italian translationGiovanni Scafora2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update French translationXavier Chantry2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update PO files in prep for 3.3 releaseDan McGee2009-07-27
|
* Update POT filesDan McGee2009-07-27
|
* Update copyrights in gettext filesDan McGee2009-07-27
|
* Add a fetch callback to allow front-end download supportSebastian Nowicki2009-07-22
| | | | | | | | | | | This allows a frontend to define its own download algorithm so that the libfetch dependency can be omitted without using an external process. The callback will be used when if it is defined, otherwise the old behavior applies. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> [Dan: minor cleanups] Signed-off-by: Dan McGee <dan@archlinux.org>
* Introduce -SuuNagy Gabor2009-07-22
| | | | | | | | | | | | | | | If the user switches from unstable repo to a stable one, it is quite hard to sync its system with the new repo (the user will see many "Local is newer than stable" messages, nothing more). That's why I introduced -Suu, which treats a sync package like an upgrade, iff the package version doesn't match with the local one's. I added a new pactest (sync104.py) to test this, and I updated the documentation of -Su. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: slight doc reword] Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a minor memleakNagy Gabor2009-07-21
| | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Italian TranslationGiovanni Scafora2009-07-21
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix one bug with .paccheck leftover fileXavier Chantry2009-07-20
| | | | | | | | | | | | | This happens for example if you install a new package, and one of its backup config file is already on the file system. If the local file was different, it was saved to .pacorig which is fine. However if the local file and pkg file were the same, the pkg file (temporarily extracted as .paccheck) was left on the system. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix 2 minor memleaksXavier Chantry2009-07-20
| | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Do not create .pacsave with -R, if the file is unchangedXavier Chantry2009-07-20
| | | | | | | | | | This fixes FS#15546 Also fix the interface of unlink_file which was really stupid.. (alpm_list_t used with only one element) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix klibc conflict case.Xavier Chantry2009-07-20
| | | | | | | A package can now replace symdir->dir by dir without fileconflicts. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix fileconflict004Xavier Chantry2009-07-20
| | | | | | | | | | | | When one package wants to replace a directory by a file, we check that all files in that directory were owned by that package. Additionally pacman can be more verbose when the extraction of the symlink (or file) fails. The patch to add.c looks more complex than it is, I just moved and reindented code to handle cases 10 and 11 together. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Run ldconfig inside chroot.Xavier Chantry2009-07-16
| | | | | | | | | This fixes FS#15294. The code to run a command inside a chroot was refactored from the _alpm_runscriptlet function to _alpm_run_chroot. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update copyright headers and messagesDan McGee2009-07-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow remove to accept 'local/' prefixDan McGee2009-07-01
| | | | | | | See FS#14642- this allows -Qs output to be fed back into pacman without problems or having to strip off the 'local/' prefix manually. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add new Romanian translationVolodia Macovei2009-06-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix compile warning fail on older versions of GCCDan McGee2009-06-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Search package groups when searching a DBDan McGee2009-06-23
| | | | | | | See FS#13099. This makes sense especially for the pacman frontend, as we show groups in the search output. Signed-off-by: Dan McGee <dan@archlinux.org>
* Enable remove progressbar with -S (conflict resolving)Nagy Gabor2009-06-13
| | | | | | | | | | | | | | | | | | | | | | $ sudo pacman -S mc Old output: *********** :: mc conflicts with mc-mp. Remove mc-mp? [Y/n] y ... (1/1) checking for file conflicts [################] 100% (1/1) installing mc [################] 100% New output: *********** :: mc conflicts with mc-mp. Remove mc-mp? [Y/n] y ... (1/1) checking for file conflicts [################] 100% (1/1) removing mc-mp [################] 100% (1/1) installing mc [################] 100% Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Give sensible feedback when a repo has no configured serversDan McGee2009-06-08
| | | | | | | | | | | | | | This fixes FS#14899. When running an -Sp operation without servers configured for a repository, we would segfault, so add an assert to the backend method returning the first server preventing a null pointer dereference. In addition, add a new error code to libalpm that indicates we have no servers configured for a repository. This makes -Sy and -S <package> operations fail gracefully and helpfully when a repo is set up with no servers, as the default mirrorlist in Arch is provided this way. Signed-off-by: Dan McGee <dan@archlinux.org>
* Introduce _alpm_pkg_free_trans()Nagy Gabor2009-06-07
| | | | | | | | | The main purpose of this function to make our code more readable. It frees transaction specific fields of pmpkg_t. (It is used when a package is removed from the target list.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* xdelta : only handle gz compression specificallyXavier Chantry2009-06-06
| | | | | | | | | | | | | | There is apparently no need to handle the re-compression manually when applying a xdelta patch in case of bzip2 or xz. Only gzip needs to be handled specifically for disabling timestamp with the -n option. After this patch, if xdelta is enhanced with xz support (1-line patch), it will be transparent from pacman side. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Introduce PM_TRANS_FLAG_NOLOCKNagy Gabor2009-06-01
| | | | | | | | | | | | This flag indicates that the front-end will not call alpm_trans_commit(), so the database needn't be locked. This is the first step toward fixing FS#8905. If this flag is set, alpm_trans_commit() does nothing and returns with an error (that has new code: PM_ERR_TRANS_NOT_LOCKED). Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unused error codes and handle PM_ERR_RETRIEVE by alpm_strerror()Nagy Gabor2009-05-18
| | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove find_replacements()Nagy Gabor2009-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Foo replaces bar" simply means that "foo is a new version of bar". So this patch refactors the code to use this "rule". _alpm_sync_sysupgrade now does the following for each local package [bar] (pseudo-code): for db in syncdbs { if(db contains bar) {check if db/bar is an upgrade; break;} replacers = find(bar replacers in db); if(replacers!=NULL) {ask_user; break;} } Note: 1. Replacers are grouped per repo. If more than one package replace bar in a repo, all of them are considered ("package set of bar replacers"). 2. If repo1/foo1 and repo2/foo2 both replaces bar, only repo1/foo1 is considered (if repo1 stands before repo2 in pacman.conf). FS#11737 is fixed. 3. It can happen that pacman doesn't consider any replacer, if it found a literal "earlier", so sync132.py modified accordingly (btw, that situation should not appear irl). The new sysupgrade code doesn't use sync_newversion(), so I removed the "local is newer than repo" message, which was annoying with -Qu and SyncFirst. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix non-C style comments in libalpmGerardo Exequiel Pozzi2009-05-11
| | | | | Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dan McGee <dan@archlinux.org>
* Look in target-list first to resolve dependenciesBryan Ischo2009-04-11
| | | | | | | | | | | | | | | This fixes a bug introduced by my previous changes which changes the behavior of IgnorePkg/IgnoreGroup to allow the user to remove unresolvable packages from the transaction. The bug is that the target-list was no longer being consulted first to resolve dependencies, which means that if two packages in the sync database satisfied a dependency, and the user explicitly requested one of those two packages in the sync, the other package was still being pulled in. A new test was added, sync993.py, to verify the desired behavior. Signed-off-by: Bryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove duplicates from the unresolvable list before prompting userBryan Ischo2009-04-11
| | | | | Signed-off-by: Bryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* const-ify endswith()Dan McGee2009-04-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove pmsyncpkg_tNagy Gabor2009-04-11
| | | | | | | | | | | | | | | | | | | | | pmsyncpkg_t data sructure was removed: 1. pmpkg_t.reason is used instead of pmsyncpkg_t.newreason. (The target packages come from sync repos, so we can use this field without any problems. Upgrade transaction also uses this field to store this info.) 2. pmsyncpkg_t.removes was moved to pmpkg_t.removes. This step requires careful programming, because we don't duplicate packages when we add them to trans->packages. So we modify sync pkgcache when we add this transaction-only info to our package. Hence it is important to free this list when we remove any package from the target list (remove_unresolvable, remove_conflicts, trans_free), otherwise this could confuse the new sync transactions (with non-pacman GUI). Overall, our code became ~100 line shorter, and we can call our helper functions directly on trans->packages in sync.c, we don't need to maintain parallel package lists. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix for trans001.py (FS#9088)Nagy Gabor2009-04-11
| | | | | | | | | | | | | | | | | | | | | | | From now on _alpm_db_find_fileconflicts() works with upgrade and remove target lists (like checkdeps), which makes it transaction independent (we still need a trans param because of the progressbar). This is a small step towards the universal transaction. So we call this function directly from sync.c before commiting the remove transaction. This is much safer, but we can get false fileconflict error alarms in some tricky cases ("symlinks puzzle" etc). The patch on find_fileconflict looks complex, but it is mainly an "indent-patch", the new code-part can be found after the /* check remove list ... */ comment, and I modified something around the "file has changed hand" case (see comment modifications in the code). Unfortunately sync.c became more ugly, because we have to create 2 parallel internal transactions: to avoid duplicated work, upgrade transaction is used to load package data (filelists). This problem will disappear, when we finally get rid of internal transactions. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Free *data list when user removes unresolvable packagesNagy Gabor2009-04-11
| | | | | | | | | | | | | | Resolvedeps reports error when it cannot resolve some dependencies, puts them into the *data list, and set pm_errno. If user removes the unresolvable packages from the target list, we have no error anymore, so from now on we free *data list (we eliminate a memleak) and unset pm_errno. (Additionally I removed two needless lines from the code, unresolvable list is always freed in cleanup.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Print warning in _alpm_resolvedep() if a satisfier package is ignored ↵Nagy Gabor2009-04-11
| | | | | | | | | | | | | without QUESTION After commit f57f8d33862050acc8d131710c100ba47877e675 pacman *silently* ignores packages from IgnorePkg/IgnoreGroup during dependency resolving, if prompt == 0. This behavior is changed to "give warning + ignore". (Otherwise the user is not informed about the fact that the package resolving was blocked by ignorepkg.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* New error type: PM_ERR_PKG_IGNOREDNagy Gabor2009-04-11
| | | | | | | | | | This patch fixes FS#12059. Now sync_addtarget can return with PM_ERR_PKG_IGNORED, which indicates that although the requested package was found it is in ignorepkg, so alpm could not add it to the transaction. So the front-end can decide what to do. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'xav/repo-add'Dan McGee2009-04-11
|\
| * Fix several issues with xdeltaXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 1) The changes to sync.c look big but there are mostly caused by the indentation. Fix a bug where download_size == 0 because the packages and deltas are already in the cache, but we still need to build the deltas list and apply the deltas to create the final package. 2) Fix the gzip / md5sum issue by switching to xdelta3, disabling external recompression and using gzip -n in pacman, and disable bsdtar compression and using gzip -n in makepkg. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* | Add detail documentation for alpm_db_update()Sebastian Nowicki2009-04-11
| | | | | | | | | | | | | | This adds alpm_db_update() to the alpm_databases Doxygen group. The function is described in more detail and a code example is given. Signed-off-by: Dan McGee <dan@archlinux.org>
* | fixed typos and alignment problem in Turkish translationSamed Beyribey2009-04-05
|/ | | | | Signed-off-by: Samed Beyribey <ras0ir@eventualis.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* be_files.c : use %jd instead of %ju for intmax_tXavier Chantry2009-03-15
| | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Revert "popen does NOT require /bin/sh in a subchroot"Xavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9558639d8009483fbf422b138d020745986f82f1. This change was wrong, popen does require /bin/sh in a subchroot. 1) pacman -S lilo -r root Notice no error 2) rm root/bin/sh ; pacman -S lilo -r root Notice an error : error: scriptlet failed to execute correctly Actually, we already get an explicit error here, when popen is run, so there is no need to check for bin/sh explicitely. Besides this check was problematic in some cases. For example, bash itself has a scriptlet, but only post_install and post_upgrade, no pre_install and pre_upgrade. However, since bash has a scriptlet, runscriptlet will also be called before bash is installed. It won't do anything since the scriptlet has no pre_install function. But if we keep the check, we will still get "error : no /bin/sh". Conflicts: lib/libalpm/trans.c Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* runscriptlet : Flush open fds before fork() to avoid cloning buffersXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | This is a bug I noticed 2 years ago : http://www.nabble.com/Re%3A-logging-output-crazy-to11437357.html#a11479679 I thought I fixed it with 57d77eab32c01cd7572a11f76480a3724d09c029 But the bug was still here. Reading man fork, this part caught my attention: * The child inherits copies of the parent's set of open file descriptors. Each file descriptor in the child refers to the same open file description (see open(2)) as the corresponding file descriptor in the parent. This means that the two descriptors share open file status flags, current file offset, and signal-driven I/O attributes (see the description of F_SETOWN and F_SETSIG in fcntl(2)). Since the open file descriptors are inherited, it is probably a good idea to flush them before forking. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2009-02-28
|\
| * Add new Kazakh translationBaurzhan Muftakhidinov2009-02-24
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | libalpm: remove from_md5 and to_md5 from pmdelta_tXavier Chantry2009-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | The from_md5 and to_md5 fields were a nice extra safety, which would avoid trying to apply deltas on corrupted package files. However, they are not strictly necessary, since xdelta should be able to detect that on its own. The main problem is that it is impossible to compute these informations from the delta only. So repo-add would not be able to compute the delta entry based on just the delta file. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Don't prompt the user for unignore of IgnorePkg/IgnoreGroup packagesBryan Ischo2009-02-23
| | | | | | | | | | | | | | | | | | | | Don't prompt the user for unignore of IgnorePkg/IgnoreGroup packages, except for packages explicitly listed for sync by the user. This eliminates many unnecessary prompts when IgnorePkg/IgnoreGroup is used. Signed-off-by: Bryan Ischo <bryan@ischo.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Enabled new interactive prompt and updated some testsBryan Ischo2009-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabled a new prompt to ask the user if they'd like to remove unresolvable packages from the transaction rather than failing it. Many pactest tests that used to fail now return success codes, because pacman now issues a prompt allowing the user to cancel rather than failing many transactions, and the pactest scripts always choose to cancel with no error rather than failing. The only net effect is that the return status of pacman is now 0 in cases where it used to be nonzero. Signed-off-by: Bryan Ischo <bryan@ischo.com> Signed-off-by: Dan McGee <dan@archlinux.org>