Age | Commit message (Collapse) | Author | Files | Lines |
|
* add unit test for sourceballs and cleanup
* introduce SRCPOOL and LOGDIR variables in config
|
|
* runtime reduced to < 1 second
* uses file lists and the comm command
* searches for missing packages
* removes empty legacy directories like extra/os/any
|
|
* This should fix the cleanup of packages that were not within the pacakge pool before being updated.
* a test case for this was added
|
|
These functions are copied from makepkg
|
|
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.
|
|
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.
|
|
|
|
There is no need to have a variable for things like PKGBUILD
that are very unlikely to ever change.
|
|
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
This should remove files if they are symlinks (pooled packages)
and move them to the cleanup dir if not
|
|
* The per repo script now simply removes files as they should all be
symlinks at this time
* The cron job script will do the extra job of checking the global
pool. If there are no more symlinks, move the pooled package
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This isn't needed and if "os" ever changes, we have bigger changes.
Won't save us any time and it's longer to type.
|
|
|
|
|
|
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>
|
|
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>
|
|
|
|
|
|
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
getpkgname / getpkgver were replaced with versions that
scanned the .PKGINFO file. These don't work for source
packages, so add the functionality back in for this case
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Only output "Creating sourceball" text when we're actually
creating it
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
The revampled getpkgname/getpkgver functions need the full
path to the file now, not just the filename
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This is in the db-functions file, and does a better job.
In order to do this, we had to change some path related code
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This allows us to still remove older, non architecture
prefixed packages
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
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>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This source the config file and gets us functions such as
getpkgname which were duplicated elsewhere
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Remove dependance on makepkg.conf
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
No real reason, this is just easier to understand, and checks
like this should be the norm.
If file does not exist, continue
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
|
|
|
|
If no packages are present in the repository, a message like this will be generated, and the corresponding mv command will be issued.
Prevent this by checking if *$arch$PKGEXT equals "*$arch$PKGEXT":
Scan complete for core (i686) at /srv/ftp/core/os/i686
The following files are in the repo but not the db
They will be moved to '/srv/package-cleanup'
*i686.pkg.tar.gz
|
|
Remove the hardcoded i686/x86_64 and loop over the ARCHES
array in the config file, checking for valid symlinks.
If none are found, remove the 'any' package
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Clean up some output so when we do nothing, we get no output
This is preferred as the mailer will simply not send a mail
in this case.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This may look like a rather large patch, but the changes are mostly a
reshuffling of the code to loop over all arches first, and then handle
the arch-indep packages. The cronjob has been changed accordingly.
Added new category DELETESYMLINKS, which are deleted instead of being
moved to package-cleanup. I have also fixed the arch-specific issue
with the ftppath, using parameters in config instead.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Failed hard on empty 'any' directories
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Previous logic was stupid... let's just check the missing files.
If it's missing and exists in the any dir, then common sense says
we deleted a symlink somewhere...
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|