Update the GPL boilerplate to direct people to the GNU website for a copy of
the license, as well as bump all of Judd's copyrights to 2007.
Signed-off-by: Dan McGee <dan@archlinux.org>
This patch introduces versioned provisions in "provision 1.0-1" format.
_alpm_db_whatprovides was modified accordingly (added sync500.py),
alpm_depcmp was modified accordingly (add043.py passes now; added add044.py
and add045.py).
Notes:
alpm_db_search now uses the whole versioned %PROVIDES% string in its search.
debug logging was simplified in alpm_depcmp.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
[Xavier: fixed a few typos, duplicate const strings with strdup before
modifying them, put some debugging back in alpm_depcmp, minor code cleanups
(var/function renaming), added a note in PKGBUILD man page.]
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
[Dan: made strcmp checks clearer, added a comment]
Signed-off-by: Dan McGee <dan@archlinux.org>
This file only contained one private function : _alpm_db_whatprovides .
And the public alpm_db_whatprovides was in db.c , so I moved everything there.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
[Dan: updated POTFILES.in as well]
Signed-off-by: Dan McGee <dan@archlinux.org>
Legacy code is hitting the trash here. Remove unnecessary _alpm_time2string
time storage abstraction in favor of just writing the time_t value to the
disk.
The only drawback is that everyone's sync DBs will have to be updated at
least once so that the lastupdate values are stored right. :)
Signed-off-by: Dan McGee <dan@archlinux.org>
This reverts commit dfc85cb5f5
and b6f3fe6957.
This DB check is already in testdb (among others).
Also testdb now uses the db path set at make time by default,
so specifying the db path is optional.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Introduce two new methods into the API - alpm_db_register_sync and
alpm_db_register_local, which replace the functionality of
alpm_db_register. db_register_local always returns the local DB, and
db_register_sync will always try to register a sync DB. This conceptually
separates the local DB from sync DBs in the code. Also updated the pacman
frontend to use the new functions. In addition, this changes the location
of all sync DBs in the filesystem from $DBPATH/$REPO to $DBPATH/sync/$REPO,
This removes the silly limitation that a sync DB couldn't be named 'local',
along with structurally separating sync DBs and the local DB in the
filesystem.
Signed-off-by: Travis Willard <travis@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This basically moves the code from alpm_release, which was mostly about
unregistering all databases, to a safer alpm_db_unregister_all.
This allows to avoid modifying the dbs_sync list while iterating over it,
and and also prevent alpm_release from looping infinitely when a database
can't be unregistered.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Add some 'const' keywords all over the code to make it a bit more strict on
what you can and can't do with data. This is especially important when we
return pointers to the pacman frontend- ideally this would always be
untouchable data.
Signed-off-by: Dan McGee <dan@archlinux.org>
Switch over to the new frontend parseconfig.
* Fix a few issues in parseconfig
* Remove unused callback upon database registration
* Remove conf file related errors from error.c/alpm.h
Signed-off-by: Dan McGee <dan@archlinux.org>
This change allows us to use all autoconf specified paths, most notably
$(localstatedir). It is quite a change and touches a lot of files, as
all references to the DB and cache were done with the ROOTDIR as a prefix.
* add --lock command-line option to pacman to specify the location of the
lockfile (this can now be specified at configure time by setting the
$localstatedir path).
* Rip quite a few settings out of configure.ac as they are now picked by
setting the paths during configure or make.
* Fix bug with /tmp fallback for sync downloads not working correctly
(related to root location, now the system tmp dir is used).
* Simplified the parameters to some libalpm functions, and added get/set
for the new lockfile option.
* Renamed several of the DEFS to names without the PM_ prefix.
Signed-off-by: Dan McGee <dan@archlinux.org>
duplicated.
* Updated the util Makefile.am to link with the proper libalpm.la.
* Fixed bitmasking issues in be_files.c and db.h.
* Rankmirrors updates from James Rosten (with some cleaning up of my own).
KeyboardInterrupts are now handled gracefully.
* Moved entirely to alpm_pkg_get_* accessors, to read data on demand
* Mostly removed the INFRQ_ parameters from outside the be_files backend (making
the backend more extensible in the long run)
* packages created from _alpm_db_scan now have the db and origin set (making
accessors actually work for these packages)
* removed _alpm_db_ensure_pkgcache
* totally revamped the _alpm_checkconflicts function, making it cleaner and
easier to read (and thus fix in the long run) - maintainable code ftw
NOTE: feel free to rename the functions... I couldn't think of anything better
* removed an extra loop in sync.c:find_replacements - no sense in looping over
an entire DB while strcmp'ing the name, when we have get_pkgfromcache
Other:
* package struct "license" -> "licenses"
* Created _alpm_sync_find (duplicate code in some places, find_pkginsync
* Minor const correctness changes along the way
* fixed a couple extra '/' pathing issues (non-issues really)
* removed a duplicate pkg_cmp function
allows for the same bit operators to be used across the board on pkg_get
operations.
* Changed name of INFRQ_NONE -> INFRQ_BASE to more clearly reflect what it
does (loads pkg name and version).
* Added a few missing things on package functions, such as SYMEXPORT and
ALPM_LOG_FUNC.
* Slight updates to pmenv to print 'pass' and 'fail' instead of 'passed' and
'failed'. Keeps output a bit more concise.
* Fixed a doxygen comment spelling error. :P
* Unified some functions names "package" -> "pkg" for consistency
* Removed the goofy 'faketarget' stuff used for dep testing
* Renamed alpm_pkg_isin -> alpm_pkg_find
* Renamed alpm_db_readpkg -> alpm_db_get_pkg
optimizations in order to make the code much more readable and
type-checkable. Every enum in the library now has it's own type that
should be used instead of the generic 'unsigned char'. In addition,
several #define statements dealing with constants were converted to
enums.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* renamed pmlist_t -> alpm_list_t
* made alpm_list_t a public type (alpm_list.h header)
* removed additional storage for registered DBs in pacman source
* some code cleanup
* removed duplicate (pm)list_display functions from pacman source
* misc code cleanup
* libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a
typesafe _get_what_we_want(p) scheme [not 100% complete yet]
* some const correctness changes
* removal of PM_* types in alpm.h in favor of the pm*_t types used throughout
libalpm
* Removed the PMList typedef, in favor of the same naming scheme other
structs use 'pmlist_t'
* Added a time stamp on debug output, to make it more informational
* Moved alpm_db_register to _alpm_db_register, making the public function
not take a callback parameter