summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-07-27Merge branch 'maint'Dan McGee7-13/+72
2010-07-27Small fix to Kazakh translationBaurzhan Muftakhidinov1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27bash_completion: negate expression inside bracketsDave Reisner1-2/+2
Avoids letting the shell evaluate ! as something else (e.g. an alias). Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Fix compile error in certain casesDan McGee1-0/+1
I'm not sure why it doesn't happen everywhere, but we need <sys/stat.h> for umask and mkdir in this file. I hit this today: cc1: warnings being treated as errors util.c: In function ‘makepath’: util.c:128:2: error: implicit declaration of function ‘umask’ util.c:141:5: error: implicit declaration of function ‘mkdir’ make[2]: *** [util.o] Error 1 Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Mark sync_pkg and sync_target as static functionsDan McGee1-6/+6
We no longer use these anywhere outside of sync.c, so do the rename and add static to their definition to meet our coding standards. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Maintain a list of seen packages when installing a groupDan McGee2-6/+8
As reported in FS#20221, we don't always do the right thing when installing a group and using the --needed option. This was due to the code pulling packages based on what was already in the transaction's add list, but completely ignoring the fact that we may have already seen and skipped this same package in an earlier repository. Add a list to the private _alpm_sync_pkg() function that allows us to have this extra information so we don't mistakenly downgrade a package when using --needed. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Add two pactests for group and --needed interactionDan McGee2-0/+56
The first step for resolving FS#20221. sync023 is the case from the bug report; sync022 is already working fine but we have no tests at all that test the --needed option in any form. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-27Always treat PKGLIST as an array.Dave Reisner1-3/+3
Fixes repackaging issues when multiple package names are passed to the --pkg option. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Download sync db into DBPath/syncAllan McRae1-4/+8
The sync db should be stored in the sync/ folder. This cleans up DBPath to only have local/ and sync/ directories in it. A nice side effect is that the db are now in the right place so we can implement directly reading from them. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Remove DBEXT usageAllan McRae7-18/+7
With commit 5dffef78, the repo database always has a symlink of the form reponame.db. Use that filename and let libarchive determine the compression type. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Check return value of fgets callsAllan McRae2-4/+7
Prevents compiler warnings with -D_FORTIFY_SOURCE=2 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Merge branch 'maint'Dan McGee5-68/+78
Conflicts: scripts/makepkg.sh.in
2010-07-03makepkg: undeclared local variablesAndres P1-8/+20
Variables that are only meaningful within the function they are declared in are now prefixed by "local". Signed-off-by: Andres P <aepd87@gmail.com> [Allan: fix whitespace] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03manpage: add real world examplesNico Schottelius1-0/+19
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch> Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03docs: Add a 'website' targetDan McGee2-2/+13
This will allow me to be not quite as lazy in getting website changes out to the Arch Linux server by making it trivial to get everything packaged up and working correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Fix some incorrect asciidoc syntaxDan McGee1-18/+18
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-01makepkg: fix sudo/su calling of pacmanAllan McRae1-7/+6
This fixes two issues: 1) using "sudo -l" results in excess password asking under certian configurations. Revert to the pre 3.4 behaviour of always using sudo if it is installed. 2) Properly escape the command so that that versioned dependencies, such as "foo>4", do not get treated as output redirection when using su. This also unifies the generation of the pacman line and its privilege escalation. Based on patches supplied by Andres P <aepd87@gmail.com> with minor adjustments for suitability for the maint branch. Original-work-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-07-01Update Chinese translation to fix gettext positional params甘露(Gan Lu)1-41/+41
Because the shell gettext doesn't allow for positional gettext substitution, be more careful about where we use it. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-01Check return value of chdir and getcwdAllan McRae3-11/+28
Prevents compiler warnings when building with -D_FORTIFY_SOURCE=2 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-01Check return value of fwrite when copying filesAllan McRae2-1/+10
Check that writing to destination file actually occurs in _alpm_copyfile. Required adding a new error (PM_ERR_WRITE) as none of the others appeared appropriate. Prevents compiler warning when using -D_FORTIFY_SOURCE=2. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-30Merge branch 'maint'Dan McGee4-4/+9
2010-06-30makepkg: clarify aborting on packaging failureAllan McRae1-2/+3
When makepkg catches a command failure it currently prints "Aborting..." and exits. Clarify the reason for aborting from packaging is a failure during one of the PKGBUILDs functions. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-30Do not compare signed and unsigned typesAllan McRae2-2/+2
The casting of nread is safe as it is tested to be >0 when it is initally assigned. It is also being implicitly cast in the fwrite call in the line above. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-30makepkg: try standard paths for coreutils duAllan McRae3-1/+3
Attempt to find "du" from coreutils in the standard paths and if not revert to the version in the users PATH. Using the full path prevents issues such as FS#19932, where a different and incompatible version of du is put earlier in the users path. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-30makepkg: remove bash4-only parameter expansion in check_sanityAndres P1-1/+1
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-30makepkg: Only check regular files in $srcdir checkThomas Bächler1-1/+1
The 'grep -R' in the $srcdir check would not only grep regular files, but also devices, symlinks (that might potentially point outside of $pkgdir), pipes and so on. Use find to ensure only regular files are examined. This should fix https://bugs.archlinux.org/task/19975 Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-24repo-add: try symlink, then hardlink, then copy for DB fileDan McGee1-1/+4
We were seeing some issues when trying to create our new database alias using symlinks on certain filesystems (see FS#19907). Have a fallback method in place where we first try a symlink, then a hard link, then just copy the database if all else fails. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-24Merge branch 'maint'Dan McGee3-14/+25
2010-06-24makepkg: Place source packages symlinks in build dir when SRCPKGDEST is usedEric Bélanger1-1/+11
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>
2010-06-24makepkg: fix regression in split package function checkingAndres P1-1/+1
Commit 13748ca0529 inversed the nature of one test wherein the if clause would throw a fatal error if a legitimate package function was defined in PKGBUILD. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-23bash_completion: fix bash 3.2 incompatibilityAndres P1-5/+12
To avoid errors with bash 3.2, compopt will be skipped if it's not a shell builtin. compopt is needed to not append slashes to package names that coincide with directories in PWD. This is currently not possible to fix in bash versions that do not support compopt, so these users will have to bear that regression. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-23makepkg: prevent error trap activation in bash-3.2Allan McRae1-3/+7
Running "pacman -T foo" is expected to return a non-zero value when "foo" is not installed. This sets of the error trap in bash-3.2 but not bash 4.x. Work around this by disabling the error trap around this pacman call as we are manually checking the return value anyway. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-23rankmirrors: pipe errors to stderrAndres P1-1/+1
If this is to be scripted with AIF or another tool, it needs to respect stderr. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-23rankmirrors: fix bogus pacman configuration parsingAndres P1-2/+2
Valid pacman configuration files do not have to start with a hash for that line to be a comment, neither do directives need to be in column 0. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-23rankmirrors: fix bogus variable assignmentAndres P1-3/+3
$replacedurl was being built from an expansion of itself. But at the time it happened, it was empty. Fixes FS#19911 Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-21Merge branch 'maint'Dan McGee4-9/+23
2010-06-21makepkg: revert bash4-ismAllan McRae1-5/+5
Commit 3d67d9b1 introduced multiple bash4 string manipulations. Revert those in order retain compatibility with bash-3.2 which is still widely used. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20Handle sync target + ignore properlyDan McGee2-1/+15
Rather than say we can't find the target after saying "No, I guess I don't want to install this", we should make sure the ignored status gets passed all the way through. This fixes FS#19866. Pactest is also included that failed before due to the fact that we normally treat an unfound package as a reason to exit with a non-zero status. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20Clarify testing within conditional statementsAllan McRae11-34/+34
Follow the HACKING guidelines and always use != 0 or == 0 rather than negation within conditional statements to improve clarity. Most of these are !strcmp usages which is the example of what not to do in the HACKING document. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: remove unnecessary use of sortAndres P1-2/+2
pacman -Qq output is sorted according to the users LC_COLLATE setting as is needed for comm. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: adjust commit message] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20libalpm: compare pkgname with strcollAndres P1-1/+1
Use strcoll to compare package names to provide output sorted according to a users LC_COLLATE settings. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: added commit message] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: use parameter expansion instead of basenameAndres P1-1/+1
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: fix inconsistent output when checking dependenciesAndres P1-2/+2
Instead of writing: ==> Checking Runtime Dependencies... ==> Checking Buildtime Dependencies... ==> Installing missing dependencies... Just make it homogeneous: ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Installing missing dependencies... Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: merge in-line splitpkg handling logicAndres P1-22/+16
Ease maintainace; the two parts that have been combined into a function were identical. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: rename function] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: add to variables without expanding themAndres P1-8/+8
Use foo+=" bar" instead of foo="${foo} bar" Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: less code repetition for empty variable checkingAndres P1-12/+7
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: use "declare -f" to test for function presenceAndres P1-4/+4
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: fix variable checks when writing pkginfoAndres P1-8/+8
Regression caused by c71fe7db. Was checking for "optdepend" and "conflict" rather than "optdepends" and "conflicts" when populating .PKGINFO. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: adjust commit message] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-17Revert disabling of make in doc/ dir by defaultDan McGee1-3/+3
This is a partial revert of commit d44e5099. By making disabling docs the default, it presents all sorts of problems- namely anyone who builds from a tarball and isn't careful enough to include '--enable-doc' will get an install without any manpages at all. Remember that make includes both 'build' and 'install' steps. The warning introduced by the commit is kept, so we do not lose all its benefits, but I am not happy to see regressions introduced in packaging and installing of this piece of software. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-17makepkg: fallback to sane defaults for library strippingAllan McRae1-0/+3
If the library stripping variables are not defined in makepkg.conf, libraries will be fully stripped and become broken. Fallback to a sane default stripping level. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>