Commit Graph

13 Commits

Author SHA1 Message Date
lolilolicon d6e3446e70 bacman: pkgrel does not have to be an integer
pkgrel, as with pkgver, simply mustn't contain hyphens.

Signed-off-by: lolilolicon <lolilolicon@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21 12:31:24 -05:00
lolilolicon 22abe27bfa bacman: use globbing to get local package db path
The original code- pkg_dir="$(echo $pac_db/$pkg_name-[0-9]*)" is
problematic in several ways:

 - $pac_db and $pkg_name should be quoted, obviously.
 - It assumes pkgver always starts with an integer, while in fact
   it just can't contain ':' and '-'.
   Counterexample: the code breaks on lshw B.02.15-1.
 - It assumes there are no more than one directory matching the
   pattern.  While this should be the case if everything works
   perfectly, it certainly relies on external conditions.
   Counterexample: if the local db contains two packages named
   foo and foo-3g, even if everything else is perfect, the code
   will match two directories.

Don't make assumptions, use what is known.

Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06 02:10:25 -05:00
lolilolicon 4928f9edc3 bacman: add tar.Z package creation support
bacman should support whatever makepkg does as PKGEXT.
Also remove obsolete $EXT variable.

Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06 02:10:25 -05:00
lolilolicon 273cc66a8a bacman: small code cleanup
This includes:
 - Quoting fixes.
 - Drop deprecated mktemp option -p.
 - Set extglob nullglob shell options at the top.
 - Use extended globbing instead of regex to match %HEADER% in pacman db.

Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06 02:10:25 -05:00
lolilolicon 7e5bbf0387 bacman: bashify using [[ ]] and (( ))
Another style change.  The [[ expression ]] form is particularly
cleaner, safer and more powerful than the [ expression ] form.

Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06 02:10:24 -05:00
lolilolicon 3f937c8404 bacman: indent code using TAB
As every piece of code in the whole project uses TAB as indentation
character, bacman shouldn't be an exception.

Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06 02:10:24 -05:00
Florian Pritz 9efd10cd2a fix vim syntax highlighting of .sh files
vim recognises what type of shell script it's dealing with by looking at
the shebang. If detection fails it falls back to sh which doesn't
support some bash features. Adding a normal, possibly broken, shebang
which gets fixed by the Makefile allows vim to detect bash syntax.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30 10:44:45 -05:00
Dan McGee 31cb210057 bacman: fix the fact that the depends file no longer exists
Addresses FS#23641.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-09 17:26:55 -05:00
Dan McGee bf46e04614 Remove epoch as an independent field
Instead, go the same route we have always taken with version-release in
libalpm and treat it all as one piece of information. Makepkg is the only
script that knows about epoch as a distinct value; from there on out we will
parse out the components as necessary.

This makes the code a lot simpler as far as epoch handling goes. The
downside here is that we are tossing some compatibility to the wind;
packages using force will have to be rebuilt with an incremented epoch to
keep their special status.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21 19:30:45 -06:00
Dan McGee 0d5fa576b3 Update contrib/ for epoch
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 23:29:27 -05:00
Dan McGee 6eedf06fcc Fix bash shell location check
BASH is defined when you are actually using bash during configure, which
sucks because it ends up being '/bin/sh', messing up all of our scripts.
Change the name of the variable we use in configure, and also ensure we get
a full path to the executable by using AC_PATH_PROGS rather than
AC_CHECK_PROGS. Finally, change the variable name everywhere we use it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 17:50:54 -05:00
Nezmer 05f0a28932 Use sysconfdir, localstatedir, BASH instead of hardcoded values
This applies to contrib/ files, our scripts, and the documentation.

Dan: fix 'make clean' in contrib/ directory.

Signed-off-by: Nezmer <git@nezmer.info>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-11 20:29:22 -05:00
Nezmer bce3c8efc7 Add .in extension to files in contrib
This is needed If we want to use sysconfdir,localstatedir and other variables.

Signed-off-by: Nezmer <git@nezmer.info>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-11 20:29:22 -05:00