summaryrefslogtreecommitdiffstats
path: root/db-remove
AgeCommit message (Collapse)AuthorFilesLines
2011-12-19Avoid calls to basenamePierre Schmitz1-2/+2
2011-11-05db-remove: support removing multiple packages at oncePierre Schmitz1-15/+18
2011-11-05db-repo-{add, remove}: allow specifying multiple packagesDan McGee1-2/+2
This allows invoking these commands for more than one package at a time which is incredibly more efficient as the database doesn't need to be locked, unpacked, modified, changed, and unlocked for every single passed package name or file if you have more than one. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-05db-*: always handle pkgname/pkgbase/pkgfile argument lastDan McGee1-4/+4
This matches what we do in db-update, and makes the most sense if we want to expand these commands to take multiple arguments at the same time. Especially in the case of db-repo-add and db-repo-remove, these wrapper commands should be no more limiting than repo-add and repo-remove which always allow multiple arguments and are more efficient that way. This patch simply reorders the arguments; a later patch will support multiple pkgname/pkgbase/pkgfile arguments on the command line. Although this does break backwards compatibility and requires some changing of muscle memory, I think it is a worthwhile change to make as the functionality of these commands becomes more powerful and the order of arguments becomes the same in all of them. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-24db-remove: remove package if not in svnFlorian Pritz1-0/+3
We know what the user wants us to do (remove a package from the repo and svn) so if it's not in svn it should still be removed from the db. Having to use a seperate tool (db-repo-remove) is confusing. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-01-30Try to remove a package even if it is no longer in svnPierre Schmitz1-1/+1
2011-01-15Move repo manipulation code into common functionsPierre Schmitz1-6/+1
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-11-22Add wrappers for repo-add and repo-removePierre Schmitz1-3/+1
2010-09-02Set correct group after touching the db filePierre Schmitz1-0/+1
* 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-08-24db-remove: source functions before using themPierre Schmitz1-3/+3
2010-08-15Fix locking in db-removePierre Schmitz1-31/+25
2010-08-15Use common names for reposPierre Schmitz1-1/+1
2010-08-14Don't use hard coded architectures in db-removePierre Schmitz1-3/+3
2010-08-13Use common functions to print messages, warnings and errorsPierre Schmitz1-6/+4
These functions are copied from makepkg
2010-08-13Check permission before any actionPierre Schmitz1-0/+5
Added a function to check if user has permission to alter the repos and db files.
2010-08-08Source PKGBUILD in subshellsPierre Schmitz1-11/+11
This patch sources a PKGBUILD in a subshells instead of directly. This way we don't polute our scope or overwrite our vars which might lead to unexpected behavior.
2010-08-08Move common function to db-functionsPierre Schmitz1-21/+2
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-5/+0
2010-08-08Remove BUILDSCRIPT variablePierre Schmitz1-1/+1
There is no need to have a variable for things like PKGBUILD that are very unlikely to ever change.
2010-08-08Cleanup db-removePierre Schmitz1-18/+5
* There is no need to copy the db into a working dir * cleanup is automatically called on exit
2010-08-08Reduce verbosityPierre Schmitz1-12/+9
Only inform of errors and processes that might take longer.
2010-04-11Fail if lock couldn't be obtained; Unlock the repos if ftpdir-cleanup failsPierre Schmitz1-1/+1
2009-09-14Be more careful with config file inclusionDan McGee1-0/+1
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-19Fix arch parameter handling in db-removeEric BĂ©langer1-6/+6
db-remove use the arch variable to handle the arch parameter passed to the script. As the arch variable is already used in PKGBUILD, this variable conflict cause unwanted behaviour. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-18Remove dependence on makepkg.confAaron Griffin1-4/+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-08-18Replace DB_COMPRESSION with DBEXT in the configAaron Griffin1-5/+4
DBEXT contains the full extension for the db files (.db.tar.gz) and is recorded in the config file Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-16Add DB_COMPRESSION var to all scripts that need itDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-22remove support for different svn reposPierre Schmitz1-2/+1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-21add support for split packages to db-removePierre Schmitz1-8/+14
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-03-20'any' architecture support for db-move, db-removeAbhishek Dasgupta1-14/+22
Also: changed empty variable '$ftpdir' in db-remove to '$ftppath/$architecture'
2009-03-11Add per-repo SVN configsAaron Griffin1-1/+2
This could be useful if we move community to a separate SVN repo Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-12Quiet down repo-add just a bitAaron Griffin1-1/+1
This assumes the -q flag patch is accepted for pacman 8) Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-11-23Remove 'copy_helper' as chmodding is failAaron Griffin1-2/+2
The chmod doesn't work unless the user is the owner of the file Resorting to umask changes here Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-11-21Clear traps on cleanupAaron Griffin1-0/+1
This prevents us from trying to remove the lockfile twice, and calling cleanup multiple times Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-11-21Move everything to /srv to support new server confAaron Griffin1-1/+1
Additionally, make TMPDIR configurable so we can move that Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-11-12Move as much as we can out to a config fileAaron Griffin1-5/+2
This should allow us to move FTP and SVN placement around Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-11-09Remove an erroneous '1' signal trap for cleanup() funcAaron Griffin1-1/+1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-21Add copy_helper function to ensure correct permissionsAaron Griffin1-2/+2
This will force all files copied back and forth to have 0664 permissions so that we can attempt to do away with this permission adjusting cron job Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-14Move temporary directories to /home/tmpAaron Griffin1-1/+1
This is to allow moves to /home/ftp/ to remain on the same filesystem, thus making the final moves atomic Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-08-31Create a "common functions" file for DB scriptsAaron Griffin1-18/+7
Common functions, such as sourcing makepkg, and locking a repo Additionally, repo-locking has been unified to prevent multiple users from corrupting a repo (i.e. db-move run while db-remove in progress) Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-05-22Fix db-remove usage textAaron Griffin1-1/+1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-05-14Add new db-remove scriptAaron Griffin1-0/+97
This script deletes by package NAME only. Additionally, it also removes from svn. The goal is to simplify the process of removing packages. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>