summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2009-07-27Do not allow pkgnames to start with a hyphenCedric Staniewski1-0/+4
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-27Ensure version screen fits in 80 colsDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-27PKGBUILD-split.proto: pkgbase is a string not an arrayAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-26Revert "makepkg: Exit on failure within build() or package() functions"Dan McGee1-5/+3
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-26Use lstat instead of stat for -QoXavier Chantry1-1/+1
This fixes: FS#15675 - pacman can not determine ownership of dangling symlinks Using lstat seems more correct than stat for the -Qo operation anyway. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-23Add a fetch callback to allow front-end download supportSebastian Nowicki7-118/+156
This allows a frontend to define its own download algorithm so that the libfetch dependency can be omitted without using an external process. The callback will be used when if it is defined, otherwise the old behavior applies. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> [Dan: minor cleanups] Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-23Introduce -SuuNagy Gabor8-11/+38
If the user switches from unstable repo to a stable one, it is quite hard to sync its system with the new repo (the user will see many "Local is newer than stable" messages, nothing more). That's why I introduced -Suu, which treats a sync package like an upgrade, iff the package version doesn't match with the local one's. I added a new pactest (sync104.py) to test this, and I updated the documentation of -Su. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: slight doc reword] Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-23New feature: files verificationDan McGee6-13/+91
This implements FS#13877. Add a new option "-Qk" which checks if all of the files for a given package (or packages) are really on the system (i.e. not accidentally deleted). This can be combined with filters and other display options. It also respects both the --quiet and --verbose flags to give varying levels of output. Based on the original patch by Charly Coste <changaco@laposte.net>, thanks for your work! Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-22makepkg: add pkgbase to .PKGINFO and database for split packagesAllan McRae2-0/+2
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-22Fix a minor memleakNagy Gabor1-0/+1
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-22Update Italian TranslationGiovanni Scafora2-225/+256
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20Fix one bug with .paccheck leftover fileXavier Chantry1-2/+5
This happens for example if you install a new package, and one of its backup config file is already on the file system. If the local file was different, it was saved to .pacorig which is fine. However if the local file and pkg file were the same, the pkg file (temporarily extracted as .paccheck) was left on the system. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20Fix 2 minor memleaksXavier Chantry3-1/+3
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20Do not create .pacsave with -R, if the file is unchangedXavier Chantry2-24/+27
This fixes FS#15546 Also fix the interface of unlink_file which was really stupid.. (alpm_list_t used with only one element) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20Fix klibc conflict case.Xavier Chantry2-0/+30
A package can now replace symdir->dir by dir without fileconflicts. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20Fix fileconflict004Xavier Chantry5-29/+103
When one package wants to replace a directory by a file, we check that all files in that directory were owned by that package. Additionally pacman can be more verbose when the extraction of the symlink (or file) fails. The patch to add.c looks more complex than it is, I just moved and reindented code to handle cases 10 and 11 together. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20pactest : safety check with MODEXavier Chantry1-2/+5
check that the file exists first, otherwise pactest just breaks. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-16Offer to clean up non-package files in cache directory.Xavier Chantry1-6/+8
This implements FS#15142. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-16Run ldconfig inside chroot.Xavier Chantry5-92/+102
This fixes FS#15294. The code to run a command inside a chroot was refactored from the _alpm_runscriptlet function to _alpm_run_chroot. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-16Update Romanian translationVolodia Macovei1-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-12makepkg: clean up BUILDSCRIPT usageAllan McRae1-20/+20
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-11makepkg: allow spaces in source file namesAllan McRae1-4/+4
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-11makepkg: fix breakage with '%' in source filenamesDan McGee1-1/+1
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-11makepkg: quote filenames when extractingDan McGee1-6/+6
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-10Quote values in the arch array in example PKGBUILDAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-10makepkg: check for package functions when package splittingAllan McRae1-3/+11
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 McRae1-0/+5
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 McRae1-3/+5
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 McRae1-9/+38
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>
2009-07-10makepkg: clean up moving PKGINFO creation to a functionAllan McRae1-2/+1
Someone forgot to commit this when pulling in the original patch to his working branch... Signed-off-by: Allan McRae <allan@archlinux.org>
2009-07-01Update copyright headers and messagesDan McGee62-72/+134
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01Allow remove to accept 'local/' prefixDan McGee1-3/+11
See FS#14642- this allows -Qs output to be fed back into pacman without problems or having to strip off the 'local/' prefix manually. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01Update NEWS for 3.3Xavier Chantry1-4/+21
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01Add new Romanian translationVolodia Macovei5-0/+2187
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01Fix compile warning fail on older versions of GCCDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-24Update the documentation of -Qs and -SsNagy Gabor1-2/+6
It was undocumented that multiple regexps are interpreted using logical AND. Thanks to Recursive@#archlinux for his help. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-24Document the .pacnew extension with NoUpgradeNagy Gabor1-1/+2
See FS#13832. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-24Merge commit 'allan/working'Dan McGee2-27/+31
2009-06-24Search package groups when searching a DBDan McGee1-2/+11
See FS#13099. This makes sense especially for the pacman frontend, as we show groups in the search output. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-24repo-add: use bsdtar optimization for better performanceDan McGee1-3/+3
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>
2009-06-22makepkg: Move .PKGINFO creation into a function.Loui Chang1-16/+20
Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2009-06-21makepkg: Download sources and check checksums for any source package.Loui Chang1-9/+9
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>
2009-06-21Fix typos in PKGBUILD man pageAllan McRae1-2/+2
Original-patch-by: Jason Ribeiro Signed-off-by: Allan McRae <allan@archlinux.org>
2009-06-13Enable remove progressbar with -S (conflict resolving)Nagy Gabor1-0/+1
$ sudo pacman -S mc Old output: *********** :: mc conflicts with mc-mp. Remove mc-mp? [Y/n] y ... (1/1) checking for file conflicts [################] 100% (1/1) installing mc [################] 100% New output: *********** :: mc conflicts with mc-mp. Remove mc-mp? [Y/n] y ... (1/1) checking for file conflicts [################] 100% (1/1) removing mc-mp [################] 100% (1/1) installing mc [################] 100% Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-13makepkg: fix variable backup/restore for splitpkgAllan McRae1-2/+2
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>
2009-06-13makepkg: fix PKGBUILD sanity checkAllan McRae1-4/+1
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>
2009-06-09Give sensible feedback when a repo has no configured serversDan McGee6-2/+18
This fixes FS#14899. When running an -Sp operation without servers configured for a repository, we would segfault, so add an assert to the backend method returning the first server preventing a null pointer dereference. In addition, add a new error code to libalpm that indicates we have no servers configured for a repository. This makes -Sy and -S <package> operations fail gracefully and helpfully when a repo is set up with no servers, as the default mirrorlist in Arch is provided this way. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-07Introduce _alpm_pkg_free_trans()Nagy Gabor4-14/+18
The main purpose of this function to make our code more readable. It frees transaction specific fields of pmpkg_t. (It is used when a package is removed from the target list.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-07makepkg: refactor sanity checking into a functionDan McGee1-66/+76
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>
2009-06-06xdelta : only handle gz compression specificallyXavier Chantry1-7/+4
There is apparently no need to handle the re-compression manually when applying a xdelta patch in case of bzip2 or xz. Only gzip needs to be handled specifically for disabling timestamp with the -n option. After this patch, if xdelta is enhanced with xz support (1-line patch), it will be transparent from pacman side. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>