Age | Commit message (Collapse) | Author |
|
Conflicts:
lib/libalpm/dload.c
|
|
-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>
|
|
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>
|
|
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>
|
|
Message updates made this one a bit messy, but nothing too bad.
Conflicts:
lib/libalpm/add.c
lib/libalpm/remove.c
|
|
Add more untranslated strings, improve consistency, etc.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
Leftover from commit ae5ef3b9
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
The download command failed with sources that contained spaces.
Remainder of fix for FS#15323.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Someone forgot to commit this when pulling in the original patch
to his working branch...
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
When unzipping packages and the database archives, we don't need to look
through the entire archive to do what we need to do. For packages, .PKGINFO
should only be found once and should be the first file in the package. For
the database check, we only really need to look for one desc file.
The bsdtar -q option is very similar to the GNU tar --occurrence=1 option.
Example of speedup:
$ time repo-add junkdb.db.tar.gz *.pkg.tar.gz >/dev/null
real 0m16.159s
user 0m14.836s
sys 0m2.277s
$ time ./scripts/repo-add junkdb.db.tar.gz *.pkg.tar.gz >/dev/null
real 0m4.949s
user 0m3.730s
sys 0m2.093s
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
It wouldn't be very nice to ship a PKGBUILD with the wrong checksums.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The backup and restore of variables that can be overridden while
making split packages only dealt with the first element, not the
whole array (FS#15010). Adjust the bash voodoo to fix it...
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If PKGBUILD was good, the "insane" variable was not defined and so
the if statement failed. Simplify and fix this check.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
No new checks, just move it into a function and return 1 rather than exit
directly. This also allows the use of local variables.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Before this commit, the repo creation could fail after all packages have
been added to the database. Now this will be detected before adding
anything.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This simple patch adds support for the xz archive format to makepkg and repo-
add.
Xz can be used as source, package and package db file type.
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
[Dan: fixed a few alignment issues]
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The bash source command looks in the users PATH for the file to source
before the local directory. This causes issues when someone has a
PKGBUILD somewhere in their path (for unknown some reason...).
Fixes FS#14727.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
When making a source package for a SCM PKGBUILD, makepkg should not
update the pkgver/pkgrel. Noted in FS#14456.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
1) Do not attempt to strip compressed binaries
Original-work-by: Marc - A. Dahlhaus <mad@wol.de>
2) Add "\" in "GPL\'ed" so quote mark does not break source code highlighting
3) Add local to docdir paths in makepkg.conf for consistency
4) Use full path to sed in MacOSX in case users have GNU sed earlier in
path
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Do a sed replacement in-place is not very portable. On Mac OSX and
BSDs, the syntax is "sed -i ''" where as with GNU sed the command is
"sed -i''" or just "sed -i". This patch detects which command should
be used during configure.
Credit to Kevin Barry who researched this issue and provided a patch
to work around this using temporary backup files.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
Commit 142225fd typo-ed this one, as it should look like the rest of the
checks similar to it.
Signed-off-by: Dan McGee <dan@archlinux.org>
|