summaryrefslogtreecommitdiff
path: root/lib/libalpm
AgeCommit message (Collapse)Author
2011-01-21Copy new backend translation over from frontend translationDan McGee
Since it is the same string. Done with some bash looping and sed magic. for src in po/*.po; do echo $src newtrans=$(grep -A1 "msgid.*$1" $src | tail -n1) newtrans=${newtrans//\\/\\\\} echo "$newtrans" fname=${src##*/} dest=lib/libalpm/po/$fname sed -i -e "/msgid.*$1/{N; s/msgstr.*$/$newtrans/}" $dest done Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-12Fix double read issue in maint releasesDan McGee
This is essentially a backport/cherry-pick of commit 33240e87b99e from master, but has to be done by hand because the DB format has diverged. Read more in the commit message used there, which follows. Due to the way we funk around with package data loading, we had a condition where the filelist got doubled up because it was loaded twice. Packages are originally loaded with INFRQ_BASE. In an upgrade/sync, the package is checked for file conflicts next, leaving us in an "INFRQ_BASE | INFRQ_FILES" state. Later, when committing a single package, we have an explicit call to _alpm_local_db_read() with INFRQ_ALL as the level. Because the package's level did not match this, we skipped over our previous "does the incoming level match where I'm at" shortcut, and continued to load things again, because of a lack of fine-grained checking for each of DESC, FILES, and INSTALL. The end result is we loaded the filelist twice, causing our remove logic to iterate twice over the installed files, spewing a bunch of "cannot find file X" messages. Fix the problem by doing a bit more bitmasking logic throughout the load method, and also fix the sanity check at the beginning of the function- this should *only* be used for local packages as opposed to the "not a package" check that was there before. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11Back out anticipated epoch changesDan McGee
After all the debate as to what to do on maint, we are going to end up just incorporating epoch into the version string, so we don't need this separate field at all. Revert commit 5c8083baa4a and also kill the force flag we were recording here as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-30Respect Ignore{Pkg,Group} for group membersJakob Gruber
Fixes FS#19854. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-30Move group code to separate functionJakob Gruber
This makes the following commits more readable. No logic was changed in this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12be_files: write EPOCH instead of FORCEXavier Chantry
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>
2010-12-10Fix possible null pointer deref in check_archDan McGee
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>
2010-10-18alpm/sync: very small memleak fixXavier Chantry
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-18libalpm/remove: fix funny progress bar problem with empty packagesXavier Chantry
$ 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>
2010-10-11Read 'force' entry from packagesDan McGee
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>
2010-09-15Update Kazakh translationBaurzhan Muftakhidinov
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Minor translation file updates after `make distcheck`Dan McGee
It touched up these a bit after it ran, so might as well check the changes in so we don't have to deal with them again later. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03libalpm Swedish translation updatev3.4.1Tobias Eriksson
Signed-off by: Tobias Eriksson <tobier@tobier.se> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-01Add new European Portuguese translationGaspar Santos
This is being checked in as 'pt' rather than 'pt_PT' as that is what Transifex seems to want, and it is also the dominant choice of packages already installed on my system when doing a count of the files located in the /usr/share/locale translation directories. Thanks for the new translation! Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-23Add Slovak translationJozef Riha
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-18Updates for Polish translationsMateusz Herych
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Small fix to Kazakh translationBaurzhan Muftakhidinov
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Mark sync_pkg and sync_target as static functionsDan McGee
We no longer use these anywhere outside of sync.c, so do the rename and add static to their definition to meet our coding standards. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Maintain a list of seen packages when installing a groupDan McGee
As reported in FS#20221, we don't always do the right thing when installing a group and using the --needed option. This was due to the code pulling packages based on what was already in the transaction's add list, but completely ignoring the fact that we may have already seen and skipped this same package in an earlier repository. Add a list to the private _alpm_sync_pkg() function that allows us to have this extra information so we don't mistakenly downgrade a package when using --needed. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20Handle sync target + ignore properlyDan McGee
Rather than say we can't find the target after saying "No, I guess I don't want to install this", we should make sure the ignored status gets passed all the way through. This fixes FS#19866. Pactest is also included that failed before due to the fact that we normally treat an unfound package as a reason to exit with a non-zero status. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Update Romanian translationIonuț Bîru
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Revise Portuguese (Brazil) translationLeandro Inácio
Fix the '\t' characters that got introduced by the last update of this translation that should not have been there. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Updating Catalan translationManuel Tortosa
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Update Spanish translationJuan Pablo González T
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-14Update Ukrainian translationRoman Kyrylych
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-11Update Portuguese (Brazil) translationLeandro Inácio
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-11translations: rename Norwegian translation from nb_NO to nbDan McGee
This puts us more in line with other projects that don't attach the country code to the language code. $ du -sh /usr/share/locale/nb*/LC_MESSAGES 3.5M /usr/share/locale/nb/LC_MESSAGES 132K /usr/share/locale/nb_NO/LC_MESSAGES Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-11translations: rename Swedish translation from sv_SE to svDan McGee
This puts us more in line with other projects that don't attach the country code to the language code. $ du -sh /usr/share/locale/sv*/LC_MESSAGES 7.2M /usr/share/locale/sv/LC_MESSAGES 60K /usr/share/locale/sv_SE/LC_MESSAGES Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-09Revise Greek translationChristos Nouskas
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Update English (British) translationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Update German translationMatthias Gorissen
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Update Russian translationSergey Tereschenko
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Add note about XySSL/PolarSSL name changeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07Update Kazakh translationBaurzhan Muftakhidinov
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-06Update French translationXavier Chantry
Thanks to CalimeroTeknik <calimeroteknik@free.fr> for providing many corrections ! Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-06Update Greek translationChristos Nouskas
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Czech translationVojtěch Gondžala
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Hungarian translationNagy Gabor
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Italian translationGiovanni Scafora
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05Update Chinese translation甘露(Gan Lu)
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-04Update Turkish translationSamed Beyribey
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-04translation: update pot/po files for libalpm in prep for releaseDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18fix memory leak in _alpm_sync_commitJonathan Conder
Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18Partial fix for the phonon/qt issueNagy Gabor
This patch fixes the phonon/qt issue, if all to-be-upgraded packages are explicit targets (ie. only not-yet-installed packages are pulled by resolvedeps). This condition covers the most common situations, for example it should hold with every -Su operation. After this patch sync405.py passes, but sync406.py doesn't. The work is inspired by the patch of Henning Garus, thanks for his work: http://mailman.archlinux.org/pipermail/pacman-dev/2010-February/010429.html (I moved the alpm_list_diff computation to sync.c in order to compute it only once.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-14Fix a serious bug in the download codeNagy Gabor
After commit df99495b82 pacman downloaded files from the first repo only, and reported corrupted packages for all files from other repos. The download_size was set to 0 for _all_ transaction packages after downloading some files from the first repo. This code-block was moved to its correct place. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05Compute package download size outside _alpm_sync_prepareJonathan Conder
And add a new info level for this piece of data. Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05Introduce -D, --databaseNagy Gabor
The request of FS#12950 is implemented. On the backend side, I introduced a new function, alpm_db_set_pkgreason(), to modify the install reason of a package in the local database. On the front-end side, I introduced a new main operation, -D/--database, which has two options, --asdeps and --asexplicit. I documented this in pacman manual. I've created two pactests to test -D: database001.py and database002.py. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Remove call to function loggerDan McGee
It isn't really necessary here and it helps us get rid of some link pollution so we can have a slim vercmp binary. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Move vercmp code into a separate fileDan McGee
This will facilitate using this object file on its own in the vercmp tool which will be done in a future commit. The net impact on the generated binaries should not be noticeable after this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-25More consistent printing of off_t and time_tXavier Chantry
time_t : %ld off_t : %jd and cast to intmax_t Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>