summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-01-22Mark backup status strings as untranslatedDan McGee1-3/+3
And also change "Not Modified" -> "UNMODIFIED" for consistency. This makes it a lot easier to machine-parse this and not worry about locale differences. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Refactor backup file status check into separate functionDan McGee1-24/+35
This will make it a lot easier to use this stuff elsewhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: revamp modified logicDan McGee6-91/+18
Remove all logic dealing with PKG_MODIFIED as this rule no longer exists. This removes a bunch of unnecessary stat and checksum logic that most of the time we were never even using. Also update the file modified checks to mark every file created using mkfile() with an older time so any modified checks will just work without hacks. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Modify all pactests to not use PKG_MODIFIEDDan McGee10-10/+14
All conditions that this particular rule tested are better served by using a more specific rule, whether that be checking a package version or whether files inside the package have changed or still exist. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmdbDan McGee1-35/+30
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for utilDan McGee1-29/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmtestDan McGee3-40/+44
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmpkgDan McGee1-13/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmruleDan McGee2-14/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmenvDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pactestDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22pactest: pylint changes for pmfileDan McGee1-14/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Compute download size for sync packages onlyDan McGee1-1/+1
Neither packages from files nor packages from the local database will ever have a download size. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Merge branch 'maint'Dan McGee25-24/+116
2011-01-22Update 3.4.3 release dateDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Merge branch 'epoch-work'Dan McGee31-178/+318
2011-01-22Makefile: Use git describe --dirty for GIT VERSIONXavier Chantry3-3/+3
dirty indicates if the repo has uncommited changes or not when building, so dont hardcode this info. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22repo-add: only attempt to create deltas when askedAllan McRae1-9/+11
repo-add should only attempt to create the delta file when using the -d option. Also adjust a couple of tests to use the "double bracket" syntax. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22doc: update current list of authorsDan McGee1-1/+2
Allan, I had no idea you were not listed here. I think you count as an active developer at the moment. Also, move Aaron to the past contributors section. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22doc: add a vercmp manpageDan McGee5-2/+81
This includes info on version comparison that is very similar to the stuff in the pacman manpage, but also a few vercmp examples, the return values, and other fun stuff. Also update the version comparison stuff in the pacman manpage. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22makepkg: encode epoch in version specifier if > 0Dan McGee1-24/+46
This makes things consistent with everywhere else we are incorporating the new optional epoch field. Add a helper function that forms the version string for you and use it in makepkg where I found 'pkgver.*-.*pkgrel'. This exposes a few shortcomings in a previous "Override pkgver" patch (2020e629) in the install package and check if built functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Remove epoch as an independent fieldDan McGee22-132/+26
Instead, go the same route we have always taken with version-release in libalpm and treat it all as one piece of information. Makepkg is the only script that knows about epoch as a distinct value; from there on out we will parse out the components as necessary. This makes the code a lot simpler as far as epoch handling goes. The downside here is that we are tossing some compatibility to the wind; packages using force will have to be rebuilt with an incremented epoch to keep their special status. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Allow version comparison to contain epoch specifierDan McGee3-42/+138
Adapting from RPM, follow the [epoch:]version[-release] syntax. We can also borrow some of their parsing code for our purposes (thanks!). Add some new tests to our vercmp shell script tester for epoch comparisons, and then make the code work with these newfangled epoch specifiers. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21pactest: add more testing for epochDan McGee7-0/+48
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21pactest: Rename epoch pactestsDan McGee4-0/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Copy new backend translation over from frontend translationDan McGee22-22/+110
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-213.4.3 release preparationDan McGee4-3/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Add a likely_pkg hint argument to sync_db_readDan McGee1-10/+16
In most (all?) cases, we will process all files for a given sync database entry sequentially. The code currently does an _alpm_pkg_find() for every file in the database, but we had the "current" package readily available. Shift some local variables around a bit to expose this to sync_db_read() and use it if the package is the correct one. On my system, this cuts calls to _alpm_pkg_find() from 20,769 to 10,349 calls during a -Qu operation, and results in a ~30% speedup of the same operation (0.35 sec -> 0.27 sec). This benefit should be apparent anywhere we read in the full contents of the sync databases. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Improve splitname memory allocationDan McGee1-14/+13
We don't need to create a temporary copy of the string if we are smart with our pointer manipulation and string copying. This saves a bunch of string duplication during database parsing, both local and sync. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Improve depends string parsingDan McGee1-33/+20
Remove the need for an unconditional string duplication by using pointer arithmetic instead, and strndup() instead of an unspecified-length strdup(). This should reduce memory churn a fair amount as this is called pretty frequently during database loads. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Add strndup fallback function to libalpm utilDan McGee2-0/+27
The same fallback we are currently using in the pacman frontend. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Update valgrind suppressions fileDan McGee1-13/+14
We haven't tweaked this in a while, but some of the old stuff seems to no longer be necessary and there are a few new things we should add. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Add a pactest for the situation in FS#7524Dan McGee1-0/+38
Confirming the current behavior. And yes, the error message is still no better than it was when this was reported 3.5 years ago. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-18Fix integrity check status when installing from fileDan McGee1-2/+1
When installing packages from a file, the integrity check count stays at (0/x) complete. This ensures it is bumped to (x/x) at the end of the process. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-14makepkg: perform all sanity checks before erroring outDan McGee1-18/+19
It is pretty annoying to get one, fix it, and then get another. We should be able to continue on through most of the sanity checks in one go so the user gets all the error messages at once. Also ensure $pkgbase is defined by the time we call this function; previously we printed nothing where a package name should have been due to this oversight. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-13repo-add: fix misguided conditional correctionDan McGee1-6/+8
I tried to move things around here when testing and did a bit too much; the warning message always showed regardless of delta inclusion in the call. Fix it so we only warn if we have a filename, but the file couldn't be located. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-12Merge branch 'maint'Dan McGee1-2/+2
Conflicts: lib/libalpm/be_files.c
2011-01-12Fix double read issue in maint releasesDan McGee1-8/+10
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-12pactest: build the filelist using a set()Dan McGee1-6/+4
This will prevent duplicates, which we had plenty of once I made a few tests that had a list of files greater than the normal two. The previous logic was not working quite right. Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 0d4dd09993971924d379be4d0944d72f4c77b021)
2011-01-11Make debug config messages consistent in capitalizationDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11Back out anticipated epoch changesDan McGee1-4/+0
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>
2011-01-11Merge branch 'diskspace-fixes'Dan McGee2-8/+18
2011-01-11Merge branch 'fix-double-load'Dan McGee5-21/+59
2011-01-11Merge branch 'repo-add-improvements'Dan McGee2-14/+32
2011-01-11Fix double filelist issue when upgrading a packageDan McGee2-15/+25
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. A debug log message was added to upgraderemove as well to match the one already in the normal remove codepath. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11Call archive_read_data_skip() while checking diskspaceDan McGee1-0/+7
libarchive eventually calls it anyway, but backtraces make a lot more sense if we call it, as well as matching our precedent from alpm_pkg_load(). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11Add error message stating which partition is fullDan McGee1-7/+10
This is helpful anyway to the user, and should also be helpful to us if we see problems cropping up in the check during development. Also add a missing ->used = 0 initialization in the code path less taken. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11Unify two free diskspace error messagesDan McGee1-1/+1
Although they won't be the same in the gettext catalog because of the '\n' we should still use the same text. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11Add a progressbar for package integrity checkingDan McGee3-4/+18
This can take a while too, and it is really easy to add the necessary callback stuff for adding a progressbar. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11Small fix to download size lookup and a loggerDan McGee2-1/+5
These were just two small things I came across today and found could be fixed or helpful, so I've added them and I'm not sure what else to bundle them with. commit_count++ Signed-off-by: Dan McGee <dan@archlinux.org>