1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
Commit Graph

2527 Commits

Author SHA1 Message Date
Dan McGee
20ab91fb79 doc: add 'html' target to Makefile.am
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 12:34:15 -05:00
Dan McGee
afb2f39291 doc: fix repo-add manpage
Now the comment was showing up in the generated manpage and HTML
documentation. Just kill it as asciidoc keeps screwing us over.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 12:33:33 -05:00
Dan McGee
e37ecbe8a4 Fix asciidoc formatting warnings and issues
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 11:14:28 -05:00
Dan McGee
22a4616550 Add the pacman home page to the doc directory
Also ignore .html files in doc/.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 11:00:22 -05:00
Allan McRae
cb8aee58eb Fix doc building for asciidoc >= 8.4.1
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-05 21:51:08 -05:00
Samed Beyribey
3cb4eaef4f fixed typos and alignment problem in Turkish translation
Signed-off-by: Samed Beyribey <ras0ir@eventualis.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-05 21:40:58 -05:00
Dan McGee
f385242f99 Merge commit 'allan/working' 2009-04-05 21:12:28 -05:00
Nagy Gabor
5fcc9ae7f4 Document --debug
After some irc/forum experiences, I decided to document this option.
However, I left the debug-level undocumented (--debug=2).

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-05 21:11:48 -05:00
Allan McRae
442b91a5dd makepkg: run tidy_install with no package() function
After the splitpkg implementation, the tidy_install function
was not being called in PKGBUILDs with only the build() function.

Signed-off-by: Allan McRae <allan@archlinux.org>
2009-03-30 17:41:34 +10:00
Allan McRae
deff57ce8b makepkg: do not bail on failure to install built package
Fixes FS#13417.  Do no exit makepkg on a failure to install the
built package(s).  This allows clean-up to still occur.

Signed-off-by: Allan McRae <allan@archlinux.org>
2009-03-29 16:49:57 +10:00
Allan McRae
7370fd595b makepkg: adjust log clean-up for new filenames
The log files now have -build or -package at the end and there
are separate log files for each *_package() function. Alter
clean_up() to deal with this. Also, move glob outside quotes so
this actually works.

Signed-off-by: Allan McRae <allan@archlinux.org>
2009-03-26 01:39:13 +10:00
Allan McRae
4c27a776bd makepkg: adjust install_package for split packages
Install all created packages when using the install option with
package splitting.

Signed-off-by: Allan McRae <allan@archlinux.org>
2009-03-25 23:52:27 +10:00
Allan McRae
7a8ba5a978 Refactor testing for color message output
Signed-off-by: Allan McRae <allan@archlinux.org>
2009-03-16 09:18:41 +10:00
Allan McRae
7df0d048d1 makepkg: add pkgbase variable
The pkgbase variable is added to improve informational output and
source package naming when using split packages.  Defaults to
${pkgname[0]} if not set.

Also:
 - move splitpkg detection to after pkgname presence is verified
 - add "cd" line to package_foo() functions in splitpkg proto

Signed-off-by: Allan McRae <allan@archlinux.org>
2009-03-16 09:17:10 +10:00
Xavier Chantry
9519d22df7 be_files.c : use %jd instead of %ju for intmax_t
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:41:37 -05:00
Xavier Chantry
de97282fbd Revert "popen does NOT require /bin/sh in a subchroot"
This reverts commit 9558639d80.

This change was wrong, popen does require /bin/sh in a subchroot.

1) pacman -S lilo -r root

Notice no error

2) rm root/bin/sh ; pacman -S lilo -r root

Notice an error :
error: scriptlet failed to execute correctly

Actually, we already get an explicit error here, when popen is run, so there
is no need to check for bin/sh explicitely.

Besides this check was problematic in some cases. For example, bash itself
has a scriptlet, but only post_install and post_upgrade, no pre_install and
pre_upgrade. However, since bash has a scriptlet, runscriptlet will also be
called before bash is installed. It won't do anything since the scriptlet
has no pre_install function. But if we keep the check, we will still get
"error : no /bin/sh".

Conflicts:

	lib/libalpm/trans.c

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:41:37 -05:00
Xavier Chantry
36863b968f runscriptlet : Flush open fds before fork() to avoid cloning buffers
This is a bug I noticed 2 years ago :
http://www.nabble.com/Re%3A-logging-output-crazy-to11437357.html#a11479679

I thought I fixed it with 57d77eab32

But the bug was still here. Reading man fork, this part caught my attention:

*  The child inherits copies of the parent's set  of  open  file
descriptors.  Each  file descriptor  in  the  child refers to the same open
file description (see open(2)) as the corresponding file descriptor in the
parent.  This means that the two descriptors  share open  file  status
flags, current file offset, and signal-driven I/O attributes (see the
description of F_SETOWN and F_SETSIG in fcntl(2)).

Since the open file descriptors are inherited, it is probably a good idea to
flush them before forking.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:40:49 -05:00
Allan McRae
687f04ab46 Only check checksums if there is a source file
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:38:54 -05:00
Allan McRae
a864a50bc6 contrib/pacscripts - print install scripts from a package
Prints the install script from a given package file or from a package
in the pacman repo.

Original-work-by: Giulio "giulivo" Fidente <giulivo.navigante@gmail.com>
Improvements-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:38:53 -05:00
Dan McGee
d8d9ab8c87 Update checks for python in configure
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-28 15:46:51 -06:00
Dan McGee
4458f71851 Merge branch 'maint' 2009-02-28 15:43:36 -06:00
Xavier Chantry
b4e1365657 makepkg : remove xdelta support
The pkgdelta script can be used instead.

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-02-28 15:42:07 -06:00
Xavier Chantry
8c09c19139 libalpm: remove from_md5 and to_md5 from pmdelta_t
The from_md5 and to_md5 fields were a nice extra safety, which would avoid
trying to apply deltas on corrupted package files. However, they are not
strictly necessary, since xdelta should be able to detect that on its own.

The main problem is that it is impossible to compute these informations from
the delta only. So repo-add would not be able to compute the delta entry
based on just the delta file.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-28 15:33:46 -06:00
Xavier Chantry
f09f82ee59 repo-add: print warning if same version already exists
Simple fix for FS#13414.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-28 15:33:39 -06:00
Baurzhan Muftakhidinov
b3c67a195f Add new Kazakh translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-24 08:24:47 -06:00
Dan McGee
2268981ebf Merge branch 'maint' 2009-02-23 20:40:27 -06:00
Dan McGee
9d661240fe Update pactest to use hashlib
The md5 module is deprecated in favor of hashlib.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-23 20:40:00 -06:00
Bryan Ischo
f57f8d3386 Don't prompt the user for unignore of IgnorePkg/IgnoreGroup packages
Don't prompt the user for unignore of IgnorePkg/IgnoreGroup packages,
except for packages explicitly listed for sync by the user.  This
eliminates many unnecessary prompts when IgnorePkg/IgnoreGroup is
used.

Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-23 20:37:14 -06:00
Bryan Ischo
0268550401 Enabled new interactive prompt and updated some tests
Enabled a new prompt to ask the user if they'd like to remove
unresolvable packages from the transaction rather than failing it.

Many pactest tests that used to fail now return success codes, because
pacman now issues a prompt allowing the user to cancel rather than
failing many transactions, and the pactest scripts always choose to
cancel with no error rather than failing.  The only net effect is that
the return status of pacman is now 0 in cases where it used to be
nonzero.

Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-23 20:33:56 -06:00
Allan McRae
a309a016bf makepkg: fix updating pkgrel with pkgver in SCM packages
Commit 1e656c0a introduced the changing of pkgrel to 1 when the
pkgver was updated in SCM PKGBUILDs. However, the output in the
"Making package:" was wrong. Attempting to fix that created
another bug (FS#13416). Interestingly, pkgver was only ever
being updated in the fakeroot stage which caused this problem.
Now both pkgver and pkgrel are updated after the first
devel_check and devel_update. Enjoy the really long explaination
for a two line fix...

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-23 20:18:08 -06:00
Xavier Chantry
c8a41b7d6d repo-add : remove realpath usage
Rework slightly db_write_entry so that $pkgfile is no longer referenced
from the temporary dir. This means $pkgfile can be a relative path and does
not need to be converted with realpath anymore.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-19 19:20:27 -06:00
Xavier Chantry
c590ac0997 repo-add : remove the need of realpath for REPO_DB_FILE
REPO_DB_FILE does not need to be an absolute path anymore so no need to
call realpath.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-19 19:20:19 -06:00
Dan McGee
1c4633ea2c Merge branch 'maint' 2009-02-18 21:20:17 -06:00
Bryan Ischo
6c4d702cb1 Reorganize code for one-at-a-time resolving
This change reorganizes the internal code so that packages are
resolved one at a time instead of all at once from a list.  This will
allow a future checkin to prompt the user to see if they'd rather
remove unresolvable packages from the transaction and continue, or
fail the transaction.  This change does not affect the actual behavior
of libalpm and all tests pass without changes.

Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-18 20:52:22 -06:00
Jan Stępień
e7daa59f84 A tiny fix in the Polish translation.
The previous translation of 'targets' meant literally 'it targets' and it
sounded awkwardly. The current version is a plural of a 'target'.

Signed-off-by: Jan Stępień <jstepien@users.sourceforge.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-18 19:25:57 -06:00
Xavier Chantry
e515d89969 repo-add : remove useless test_repo_db_file function
This function was used only once, was basically just one line, and was also
called with an unused argument.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-18 19:21:34 -06:00
Xavier Chantry
dce7aa8569 contrib/pacdiff : rework and cleanup
I initially only wanted to add a -l/--locate option to use locate instead of
find, which should have been easy.

Then I thought I would try to support filename with whitespace while I was
at it, and this was a bit more complex. The safest ways seem to be the
following ones : http://mywiki.wooledge.org/BashFAQ/020

Then I received a lot of suggestions on #bash about how to improve the
script, which I tried to address.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Dan: fix grouping of find arguments]
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-18 19:20:10 -06:00
Dan McGee
48b209d612 Rework optdepends documentation for clarity
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-17 16:58:33 -06:00
Kevin Barry
14c1a4423e configure.ac: use full path of stat for Mac OS X
Change configure.ac to use the full path of stat when on darwin/mac.
This is needed for situations when a user installs the GNU/coreutils
and places it in their path before /usr/bin, but the SIZECMD is
already configured for Darwin's version of stat.

Signed-off-by: Kevin Barry <barryk gmail com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-16 08:06:29 -06:00
Dan McGee
eb1775e485 repo-add: fix eval and quote issues
eval was ugly and dirty, and bit us here. Instead, use a safer form of
variable declaration to ensure quotes don't foil us in pkgdesc or any other
fields.

This fixes FS#10837.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-15 21:16:21 -06:00
Dan McGee
04c2b9d4ed Merge branch 'maint' 2009-02-08 11:43:08 -06:00
Sebastian Nowicki
ea84819bbb makepkg: Make stripping debug symbols cross-platform
The Linux and BSD versions of strip have the --strip-debug option (as
well as the -S option), however Mac OS X only has -S.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-08 11:33:33 -06:00
Xavier Chantry
34e1413d75 Delay the creation of local and sync db dir.
We don't need to create the directories when local or sync dbs are
registered. For example, if a sync db does not exist, we cannot even do
"pacman -Q" as an user.

Instead, we can create the local db if needed during the db_prepare
operation, and sync dbs on db_update.

Also remove some more useless abstractions in db_update and switch to a much
more efficient way to remove a sync db : rm -rf.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-01-20 14:07:15 +01:00
Xavier Chantry
14230869e6 Remove some db abstraction crap.
These db_open and db_close looked quite useless. And they caused the db
directory to be opened on a simple registering of a database. This is
totally unneeded, this opening can be delayed to when we actually need it.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-01-20 14:04:54 +01:00
Xavier Chantry
eab9684837 alpm_unpack : change prefix handling to workaround FS#12148.
Instead of appending the prefix to each entry name, we can chdir to the
prefix before extracting, and restoring when it is done.
This seems to work better with the strange and special case of FS#12148
where an archive contained the "./" entry.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-01-20 14:03:46 +01:00
Dan McGee
c794661f1e Merge branch 'maint' 2009-01-18 13:48:48 -06:00
Dan McGee
8929769902 makepkg: test fixes, part 2
The goal of this fix was empty string comparisons:
-  if [ "$pkgname" != "" ]; then
+  if [ -n "$pkgname" ]; then

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-18 13:48:31 -06:00
Dan McGee
350c3eb6ec makepkg: clean up test usage
In a lot of places, we had the following construct:
  [ "$foobar" = "0" ]
which is better represented by using the integer tests:
  [ $foobar -eq 0 ]

Attempt to unify makepkg to use the latter rather than the former in all
places. From here on out we should ensure anything that is set to 0, 1, etc.
uses the -eq format rather than =.

In addition, fix a few other test anomalies including usage of double
equals.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-18 13:46:23 -06:00
Nagy Gabor
472e51b975 Use archive_entry_set_perm instead of archive_entry_set_mode
This patch fixes FS#12148 ('unstable' regular file).
I also changed the other archive_entry_set_mode usage in add.c to
archive_entry_set_perm.

Since I cannot find any relevant info in libarchive manual, I quote
Tim Kientzle (the author of libarchive) here, and I say thank you for
his help.

*** Tim Kientzle wrote *************************************

This is the problem in libalpm/util.c:

323    if(S_ISREG(st->st_mode)) {
324            archive_entry_set_mode(entry, 0644);
325    } else if(S_ISDIR(st->st_mode)) {
326            archive_entry_set_mode(entry, 0755);
327    }

Your example unstable.db.tar.gz is not empty.  It has
one entry in it, called "./".  That entry is marked
as a directory.  But, when you call archive_entry_set_mode(),
you are changing the file type!  archive_read_extract()
then creates the file /var/unstable as you requested.
(archive_read_extract() will replace an empty directory
with a file.)

You should either set the mode value correctly:

323    if(S_ISREG(st->st_mode)) {
324            archive_entry_set_mode(entry, IFREG | 0644);
325    } else if(S_ISDIR(st->st_mode)) {
326            archive_entry_set_mode(entry, IFDIR | 0755);
327    }

Or use archive_entry_set_perm(), which does not change
the file type:

323    if(S_ISREG(st->st_mode)) {
324            archive_entry_set_perm(entry, 0644);
325    } else if(S_ISDIR(st->st_mode)) {
326            archive_entry_set_perm(entry, 0755);
327    }

************************************************************

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-18 13:35:17 -06:00
Allan McRae
fba5771fa4 makepkg: repackage rework with package functions
When using the optional package() function or split packages, the
entire packaging step is rerun instead of just final package
creation step.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-17 09:19:35 -06:00