summaryrefslogtreecommitdiffstats
path: root/db-functions
AgeCommit message (Collapse)AuthorFilesLines
2011-03-23Add support for packages which use the epoch variablePierre Schmitz1-1/+14
2011-01-15Move repo manipulation code into common functionsPierre Schmitz1-0/+28
repo-add and repo-remove is now indirectly called by arch_repo_add/remove. This simplifies future extensions like incremental file list creations. See FS#11302
2010-12-09repo_lock: check if repo is locked by repo-add or repo-removePierre Schmitz1-0/+7
2010-12-02db-update: Fail if a set of split packages is incompletePierre Schmitz1-1/+57
2010-11-23Rewrite sourceballs to increase performance and reliabilityPierre Schmitz1-33/+2
* Decrease file stats as much as possible * Create a list of all packages and meta data only once * Create a list of available source packages only once * Create a list of expected packages only once * Combine all three scripts into one to share data and code * Use as much information from the db files as possible and avoid using svn * Avoid attempting to create the same source package twice Logic works as follows: 1) create a list of all packages 2) Check for each package if we need a src package and create one 3) During this process create a list of all src packages that should be there 4) Diff both lists for the cleanup
2010-11-22Set CARCH as needed by some PKGBUILDsPierre Schmitz1-0/+3
PKGBUILDs expect CARCH to be set. This is needed when sourcing them directly.
2010-09-12_grep_pkginfo: use a more specific formatPierre Schmitz1-6/+6
2010-09-12check_pkgsvn: Don't assume the same PKGBUILD for all architecturesPierre Schmitz1-5/+5
2010-09-12check_pkgsvn: check if pkgname is in sync with svnPierre Schmitz1-12/+16
In addition to pkgver and pkgrel it is checked if pkgname is defined in the PKGBUILD.
2010-09-11Fix check_pkgreposPierre Schmitz1-6/+6
Don't use globing as this will match a package of the same version but another arch. We can be more specific here as there are no longer packages without $arch extension.
2010-09-11Use local config instead of guessing by hostnamePierre Schmitz1-21/+8
Using the hostname to decide which repos to use is not releiable and hard to test. Instead use config.local to configure these. config files for sigurd and gerolde were added which can be copied or symlinked to config.local on the specific host.
2010-09-11Fix check_repo_permissionPierre Schmitz1-6/+4
2010-09-05Check if package exists in any other repository on update20100906Pierre Schmitz1-0/+25
This also checks if the sam package exists within the old package layout (without package pool)
2010-09-05Fix updating of same package into different repositories at aoncePierre Schmitz1-4/+4
See FS#20745
2010-09-02Set correct group after touching the db filePierre Schmitz1-0/+14
* When writing the db file ensure that it has write permission of the group which owns the parent directory. * This should make the adjust-permissions cron job obsolete.
2010-09-01Simplify repo configurationPierre Schmitz1-6/+6
* Repositories can now be defined in the config file for each host * added community-staging, gnome-unstable and kde-unstable * Exception is the adjust-permission cron-job; but we might want to use acls in future anyway Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-08-22add makepkg.conf for [multilib]Pierre Schmitz1-1/+1
2010-08-17Add additional checks when reading PKGBUILDsPierre Schmitz1-0/+1
If reading from a PKGBUILD fails stop immediatly. Also put out more usefull error messages.
2010-08-17Add [staging] repositoryPierre Schmitz1-1/+1
2010-08-15Lock repos before checkingPierre Schmitz1-2/+2
2010-08-15Use common names for reposPierre Schmitz1-4/+4
2010-08-14Add common function to check for correct repo and archPierre Schmitz1-9/+20
2010-08-14Rewrite of db-updatePierre Schmitz1-7/+43
* db-update now updates all repos with packages in its staging dirs * sanity checks are performed before any repo is touched * improved performance * less code; easier to maintain
2010-08-13Use common functions to print messages, warnings and errorsPierre Schmitz1-16/+54
These functions are copied from makepkg
2010-08-13Check permission before any actionPierre Schmitz1-1/+28
Added a function to check if user has permission to alter the repos and db files.
2010-08-10Use more consitent naming for package poolPierre Schmitz1-2/+2
There are no longer architecture-specific subdirs and the structure was switch to this: ftp └── pool ├── community └── packages packages contains all packages from core, extra and testing; this naming is in sync with the svn repo naming: svn-packages and svn-community
2010-08-08Fix typoPierre Schmitz1-1/+1
2010-08-08Cleanup db-functionsPierre Schmitz1-55/+60
* fix indention * use consistent output * set vars local
2010-08-08Move common function to db-functionsPierre Schmitz1-6/+68
db-functions now sets an individual $WORKDIR and implements trap functinos that remove locks on exit or error. There are new functions to lock and unlock the running script. misc-scripts/ftpdir-cleanup was renamed to ftpdir-cleanup-repo as the cron-job had the same name. Script names have to be unique when using db-functions.
2010-08-08use common workdirPierre Schmitz1-2/+2
2010-06-20Replace PKGPOOL_DIR by a function callPierre Schmitz1-0/+8
The package pool dir depends on the host; so we solve this similar to get_repos_for_host() Note: There is no "os" subdir for the package pool.
2010-04-11Fail if lock couldn't be obtained; Unlock the repos if ftpdir-cleanup failsPierre Schmitz1-5/+12
2010-03-13sourceballs: Make cleanup more efficientEric Bélanger1-0/+21
Moved all cleanup related code in sourceballs-cleanup script and moved, now common, functions in db-functions. The cleanup script is now ran after all the new sourceballs have been fetched. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
2010-03-03Make repo locking an atomic process and added timeout argumentEric Bélanger1-16/+32
The repo locking function now use a lock directory instead of a lock file. This makes the lock checking and creation an atomic process. The repo_lock function will now try to obtain a lock every $LOCK_DELAY seconds until it is successful. An optional third argument can be use to give a timeout in seconds; this is intended for scripts that runs unattended. Repo locking is now used in the ftpdir-cleanup script. This should fix the problem of the ftpdir-cleanup script removing the new package instead of the old one (FS#17058). Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
2010-02-21Accept any *.pkg.tar.* package file namePierre Schmitz1-3/+31
With this patch packages with different compressions are accepted. It is ensured that one cannot have the same package with different compression extensions. The new functions getpkgfile{,s} are used to sanitize globed filenames. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2009-10-30Echo pkginfo parsing errors to stderrAaron Griffin1-3/+3
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-10-26Moved chk_license to db-functions fileEric Bélanger1-0/+16
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-14Add new get_repos_for_host() functionDan McGee1-0/+7
And use it. This allows us to have server-specific behavior in our scripts without further patching, and it also allows us to simplify some of our scripts a fair amount. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-14Be more careful with config file inclusionDan McGee1-8/+0
We can't really do the basedir magic from db-functions as it is just being sourced and is not the currently executing script. Although a bit repetitive, it is a lot safer to just include the config file everywhere. Noticed this when trying to run the latest available scripts on sigurd. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-18Remove dependence on makepkg.confAaron Griffin1-9/+0
Removed the need for makepkg.conf * Killed off CARCH * Added PKGEXT to the config file * Remove source_makepkg function * Source config file where makepkg.conf was needed Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-22remove support for different svn reposPierre Schmitz1-14/+0
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-21db-functions: minor cleanup - remove echoAaron Griffin1-1/+1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-21db-scripts: getpkgbase: return pkgbase by defaultPierre Schmitz1-4/+3
Check for pkgbase first. If and only if this doesn't exist, return pkgname. This fixes potential ordering issues. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-20Minor syntactic improvements in db-updateFrancois Charette1-0/+3
* also added error msg for repo_lock in db-functions [Aaron: keep quotes around $WORKDIR] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-20Bugfix in db-functions for _grep_pkginfoFrancois Charette1-1/+1
* undefined argument $pattern changed to $2 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-14Refactor PKGINFO reading into a functionAaron Griffin1-4/+13
This is just for readability and cleanup Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-14Read meta data from .PKGINFO instead of filenamePierre Schmitz1-15/+31
Prefer pkgbase over pkgname in getpkgbase() Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-14fix syntax errorPierre Schmitz1-2/+2
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-12fix redirection to stderr in get_svnpathFrancois Charette1-2/+2
[Aaron: Use >&2 instead of /dev/stderr, just in the offchance that /dev is missing for some reason] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-05-13use pkgext defined in makepkg.confPierre Schmitz1-1/+1
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>