Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2009-11-15makepkg: Clarified error message when a sourceball exist alreadyEric Bélanger
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-15makepkg: fix abortion after sourcing /etc/profileCedric Staniewski
The source command triggers / might trigger the ERR trap which makes makepkg abort right after a successful installation of missing dependencies. Thanks to Xavier Chantry <shiningxc@gmail.com> for finding this solution. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-10Merge branch 'maint'Dan McGee
2009-11-10makepkg: quote arrays in order to preserve spaces in array itemsCedric Staniewski
Fixes FS#16871 and makes the pkgdesc workaround obsolete. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-26Merge branch 'maint'Dan McGee
2009-10-24makepkg: allow passing arguments with spacesAllan McRae
Currently makepkg takes the commandline arguments, assigns them to a variable and passes that variable to the next makepkg call (within fakeroot). Use a comination of quotes and arrays in this process to ensure any arguments passed within quotes and containing spaces stay as a single argument during the second makepkg call. Thanks to Dan for figuring out how to get this working. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24Merge branch 'maint'Dan McGee
2009-10-24makepkg: change preselected option for cleaning the cache from Y to NCedric Staniewski
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: use tput for terminal-safe colored and bold textCedric Staniewski
Suggested-by: Dan McGee <dan@archlinux.org> Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: define escape sequences globallyCedric Staniewski
In doing so, it is possible to get rid of all the tests for colored messages except for one global one. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: check for non-empty pkgbase instead of pkgnameCedric Staniewski
pkgbase is used in the following rm calls, and since pkgname can be present when pkgbase is not, it is safer to check for pkgbase. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: remove empty .part files after a failed downloadCedric Staniewski
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-20makepkg: fix testing for built package presenceAllan McRae
Commit c7e4d10d introduced a small error in the testing of whether a package is already built. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-20makepkg: allow overriding arch in split packagesAllan McRae
This allows building a mixture of binary and arch=any packages. Fixes FS#15955. The value of CARCH is no longer overridden to "any" in when arch=any is used and the assigning of the "any" arch is delayed to during the packaging stage. Adjustments were required to fix installing and checking for pre-built packages of varing arches. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-20makepkg: allow overriding pkgver and pkgrel in split packagesAllan McRae
Fixing a single package within a split package requires the overriding or pkgrel. In very rare (but existing) cases, it is useful to override pkgver. Partial fix for FS#15955. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-20makepkg, repo-add: replace external commands with bash substitutions where ↵Cedric Staniewski
possible This also removes the awk dependency from makepkg and repo-add. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11Introduce new PKGBUILD variable `changelog`Cedric Staniewski
Currently, a changelog is added to a package if a specific file with a hardcoded name exists in the PKGBUILD's directory. This approach is not pretty and also inconsistent with the handling of install files, but it works. With the introduction of split PKGBUILDs, however, a drawback in this old behavior has arisen: you only have the possibility to include one specific changelog file in either every package defined in the PKGBUILD or in none. The use of an additional variable, `changelog`, works around this issue and makes it possible to include a changelog in only some of the packages, and besides, each package of the PKGBUILD can have its own changelog file. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11Fix stderr redirectionCedric Staniewski
When redirecting both stderr and stdout and using the 2>&1 construct, you have to redirect stdout first. Otherwise stderr will be redirected to the 'old' stdout and not to the new resource. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11replace rankmirrors by bash cloneXavier Chantry
This removes python optdepends in pacman package This bash clone is a courtesy of Matthew Bruenig <matthewbruenig@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-09-29Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/dload.c
2009-09-23repo-add: clean up options parsingDan McGee
-f/--force has been dead for a while, so kill it off. In addition, the check for > 2 args is pretty useless when you do something like: repo-add -q -q or a more legit: repo-add -q /path/to/mine.db.tar.gz So instead make repo-add just return 1 when it doesn't do anything with the database which seems to make more sense. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-23repo-remove: create empty DB when all packages are removedDan McGee
Rather than creating no database at all, create an empty zipped tar archive in its place. This keeps the download side of repositories a bit more sane as a DB will always exist, and pacman handles this empty case just fine. For this to be fully transparent, we also need to make sure repo-add and repo-remove accept an empty "DB" as an argument, which in reality is a completely void of files .tar.{gz,bz2,xz} archive. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-22makepkg: tidy usage outputAllan McRae
Various tidying to the usage output - change "--config <config>" to "--config <file>" to prevent wrapping in a 80 character wide terminal - re-alphabetise options, including moving all long only opts to the end - use same indentation for additional pacman options - remove useless comment Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-20Merge branch 'maint'Dan McGee
Message updates made this one a bit messy, but nothing too bad. Conflicts: lib/libalpm/add.c lib/libalpm/remove.c
2009-09-16String improvementsXavier Chantry
Add more untranslated strings, improve consistency, etc. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06sanity check for optdepends syntaxXavier Chantry
only allow optdepends like: pkgname: description some (real) examples of invalid optdepends: 'tcl, python and/or ruby: to use corresponding binding' 'xorg-fonts-75dpi : X bitmap fonts needed for the interface' 'ruby-htmlentities (AUR): for one provider named Deastore' 'xpdf - for pdf' Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Allan: rebase off de39a1f6 and adjust man page] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06makepkg : check for invalid backup entryXavier Chantry
This implements FS#13551 Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06makepkg : refactor run_build and run_packageXavier Chantry
These two functions were very similar. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06makepkg: exit on error during build() or package()Henning Garus
Set the ERR trap to abort upon encountering an error during the execution of a build or package function. Activate set -E, which lets functions inherit the ERR trap. Signed-off-by: Henning Garus <henning.garus@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06Merge branch 'maint'Dan McGee
2009-09-06Allow $arch to be used in ServerXavier Chantry
similarly to the $repo variable, Server can now contain $arch, which will be automatically replaced by the appropriate architecture. This allows us to have one universal mirrorlist file, for both i686 and x86_64, woohoo! Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06fix typos in makepkg.sh.inFrancois Charette
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06makepkg: always keep sources symlinksXavier Chantry
Make bunzip2/xz/gunzip decompressing to stdout, because gzip does not offer something like a -k option. The selection of the decompression command for gzip/bzip2/xz compressed files now also depends on the file suffix, since we need to strip the extensions to get the output filename. Thanks to Cedric Staniewski <cedric@gmx.ca> for reporting this issue and contributing patches. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06makepkg: new --skipinteg optionXavier Chantry
Implements FS#15830 This option allows to build a PKGBUILD with no checksums Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-08Merge branch 'maint'Dan McGee
2009-08-08Be consistent with naming of handle_deps functionAllan McRae
All other "dep" functions (check_deps, resolve_deps, remove_deps) have underscores separating words. Being consistent, convert handledeps to handle_deps. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-08Remove builddeps from option parserAllan McRae
Leftover from commit ae5ef3b9 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-08makepkg: change to pkgdir before creating PKGINFO fileAllan McRae
Commit 01f9ae63 moved that creation of the PKGINFO file to before changing to pkgdir. This causes issues when using the -R option (FS#15851). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-03repo-add: clarify one messageXavier Chantry
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-26Do not allow pkgnames to start with a hyphenCedric Staniewski
Commandline arguments starting with a hyphen are usually recognized as options by unix tools. Therefore, allowing hyphens at the beginning of a package name requires a different handling of pkgnames as suggested by rm's manpage. It would be possible to make the scripts 'hyphen-safe', but hyphen-prefixed packages will cause trouble for pacman users which do not know these tricks. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> [Dan: remove the repo-add check] Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-26Revert "makepkg: Exit on failure within build() or package() functions"Dan McGee
As reported in FS#15210, we have some problems with split packages and variable overrides because of this patch. For now, in prep for a release, it is best to back it out and see what we can do later. This reverts commit 621aa26e26fcf578221051e896d6440a0095b8a3. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-22makepkg: add pkgbase to .PKGINFO and database for split packagesAllan McRae
With split packages, the pkgbase variable provides a useful way to find out which packages were build from the same PKGBUILD. Add it to the packages .PKGINFO file and the repo database only when package splitting is used. Original-patch-by: Pierre Schmitz <pierre@archlinux.de> [Allan: restrict to including only with spilt packages and include after pkgname] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-12makepkg: clean up BUILDSCRIPT usageAllan McRae
FS#15448 (which is made worse by the "fix" for FS#14727...), highlighted some deficiencies in the usage of the BUILDSCRIPT variable. In particular, only relative paths worked with "-p" and some output was very strange in combination with the "-p" flag or reading from /dev/stdin. e.g. "Please add a license line to your /dev/stdin!". This patch adds a new variable, BUILDFILE, which contains the full path to the BUILDSCRIPT. This defaults to $startdir/$BUILDSCRIPT. Also, fix a missed quoting of $BUILD{SCRIPT->FILE} and remove warning about missing BUILDSCRIPT definition in makepkg.conf as the default BUILDSCRIPT value is now specified during configure. Add check that BUILDFILE is writable before updating VCS PKGBUILDs. When making a source package, the BUILDSCRIPT always gets given the default name, regardless of what it was originally called. Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-12makepkg: allow spaces in source file namesAllan McRae
The download command failed with sources that contained spaces. Remainder of fix for FS#15323. Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-12makepkg: fix breakage with '%' in source filenamesDan McGee
Ensure we don't pass a bare filename to printf that might contain a lookalike '%' escape sequence. Fixes part of FS#15323. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-12makepkg: quote filenames when extractingDan McGee
We currently fall apart on files with spaces in the names. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-10makepkg: check for package functions when package splittingAllan McRae
Makes sure the required package functions are present when using package splitting. Also moves setting of pkgbase variable outside the check_sanity function to somewhere more appropriate. Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-10makepkg: fix pkgdesc restoration with split packagingAllan McRae
A pkgdesc with spaces in it would get restored to an array and thus only the first word would be restored (FS#15210). Convert that array back to a string. Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-10makepkg: Exit on failure within build() or package() functionsAllan McRae
Errors in build() functions were only fatal, if "--log" was enabled. Errors in package() functions were never fatal. Piping these functions through "cat -" triggers error trapping. This prevents the need for "|| return 1" usage in PKGBUILDs. Original-patch-by: Juergen Hoetzel <juergen@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-10makepkg: fix check for previously built packages with package splittingAllan McRae
Checks if some or all packages are built before overwriting/installing. Adds some new strings for translation. Signed-off-by: Allan McRae <allan@archlinux.org>