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

3077 Commits

Author SHA1 Message Date
Andres P
ae73d75660 makepkg: replace unnecessary uses of grep
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-05-24 21:23:55 -05:00
Allan McRae
3cd237dec3 makepkg: fix permissions on install and changelog files
The .INSTALL and .CHANGELOG files in a package retained the permissions
that they had in $startdir.   Do a chmod after copying to ensure
that the permissions are sane.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-24 21:23:47 -05:00
Andres P
52c3f871db makepkg: don't decompress when stripping binaries
f569c4a042 wrongly relied on file's output.

The fix is to not decompress files in the first place.

Signed-off-by: Andres P <aepd87@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-24 21:18:57 -05:00
Allan McRae
f948cb25bb Change directory in package function in PKGBUILD.proto
makepkg goes back to the $startdir between the build() and
package() functions so we need to change directory at the
start of the package function.

TODO: fix makepkg to make this unnecessary

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-05-19 20:33:35 +10:00
Jonathan Conder
9ab6bfad22 fix memory leak in _alpm_sync_commit
Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:51:31 -05:00
Daenyth
ac722c9327 rankmirrors: Add a --repo option to target a specific repo
Signed-off-by: Daenyth <Daenyth+Arch@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:43:17 -05:00
Allan McRae
c1fc00508e makepkg: allow skipping integrity checks when making source package
Extends the use of the --skipinteg option to creating a source
package. Fixes FS#15984.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:35:55 -05:00
Nagy Gabor
0e7ba6bddd New pactest: unresolvable001.py
To test the regression of commit eada558e12.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:33:56 -05:00
Nagy Gabor
eada558e12 Partial fix for the phonon/qt issue
This patch fixes the phonon/qt issue, if all to-be-upgraded packages are
explicit targets (ie. only not-yet-installed packages are pulled by
resolvedeps). This condition covers the most common situations, for example
it should hold with every -Su operation.

After this patch sync405.py passes, but sync406.py doesn't.

The work is inspired by the patch of Henning Garus, thanks for his work:
http://mailman.archlinux.org/pipermail/pacman-dev/2010-February/010429.html
(I moved the alpm_list_diff computation to sync.c in order to compute it
only once.)

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:33:00 -05:00
Nezmer
c6f0fc27ed Resolve dependencies whenever --syncdeps is passed and --nodeps is not
With this patch, dependencies will be resolved and not silently ignored
when running:

makepkg --nobuild --syncdeps
makepkg --repackage --syncdeps

Also, a warning is displayed when repackaging and dependencies are not
being resolved.

Thank you Allan for the feedback.

Signed-off-by: Nezmer <git@nezmer.info>
[Allan: Only warn when repackaging with a package function]
Signed-off-by: Allan McRae <allan@archlinux.org>

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:31:59 -05:00
Xavier Chantry
d44e509933 configure.ac : disable doc by default and check for asciidoc
This is a complaint that has been reported many many times. By default, docs
are enabled and there is no check for asciidoc, so anyone building from git
will see their build fail.

We cannot do a strict check for asciidoc because released source tarballs
have man pages already built, and it should be possible to install them
without having asciidoc.

This patch attempts to improve the situation in two ways :
1) disable doc by default
2) print a warning if docs are enabled but asciidoc is not installed

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:30:29 -05:00
Dieter Plaetinck
d32f6daa66 fix for incorrect checking of return code, which causes syntax errors
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:29:05 -05:00
Marc-A. Dahlhaus
5752e276fb Allow to include a path containing wildcards
Dan: line wrapping and man page touchup.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18 11:26:22 -05:00
Dan McGee
a6ace987a9 Add some machinery to test the Include directive
After the previous patch that re-enabled its use outside of sync repository
sections which we had unintentionally disabled.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17 18:47:30 -05:00
Xavier Chantry
3a85f83840 Allow Include directive in any sections
Fix a regression of 51f9e5e40a that only allowed Include in repo sections.

Thanks to Marc - A. Dahlhaus for reporting the issue.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17 18:27:01 -05:00
Dan McGee
df842e11cf pactest: remove cargo-cult option reset
This doesn't need to be here. We don't even support non-CamelCase options
anymore.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17 18:23:07 -05:00
Nagy Gabor
25cd6c2e8d Fix a serious bug in the download code
After commit df99495b82 pacman downloaded files from the first repo only,
and reported corrupted packages for all files from other repos.

The download_size was set to 0 for _all_ transaction packages after
downloading some files from the first repo. This code-block was moved to its
correct place.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-14 15:03:21 -05:00
Dan McGee
f03f09011f doc: fix up description of where example PKGBUILD is located
As Allan pointed out, this actually ships with pacman (at least with Arch)
and not necessarily with ABS or any other package. Also fix the language
dealing with the prototype install files.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 19:14:16 -05:00
Dan McGee
10b0acfc20 PKGBUILD.vim: only allow hex characters in checksums
Of course, we still have only md5 and sha1 hardcoded here but I resisted the
urge to copy paste for the rest of our supported checksums in hope that
someone knows how to do it a better way.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 17:46:30 -05:00
Dan McGee
07b2ba251f Add 'pkgbase' highlighting to vim syntax file
Simple change and probably a bit too copy/paste, but works for now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 17:26:54 -05:00
Xavier Chantry
df833f6c64 PKGBUILD.vim : update valid licenses
Updated list with :
echo $(pacman -Ql licenses | grep "/usr/share/licenses/common/.*/$" | cut
-d'/' -f6 )

Maybe PKGBUILD.vim could do this at runtime ?

Dan: you forgot the symlinks; readded FDL, GPL, LGPL.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 17:11:25 -05:00
Allan McRae
7f02f7cb9f Allow -Qo to perform a functional 'which'
When pacman queries the ownership of an object that is not a path, it will
check in the users PATH for a match. Implements FS#8798.

Dan: did some small refactoring and error message changes when PATH is
searched and nothing is found.

Original-patch-by: Shankar <jatheendra@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-11 12:09:43 -05:00
David Campbell
364ebf4e16 Switch Contributor line with Maintainer line.
When someone is creating a new PKGBUILD he will most likely be the maintainer
not a contributor.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-06 11:38:08 -05:00
Allan McRae
2ce444ee10 makepkg: rework --skipinteg
The current --skipinteg is a bit weird.  It does not skip integrity
checks, but instead does them and prints a warning. Change this
behaviour to actually skipping the checks.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 19:31:58 -05:00
Xavier Chantry
79987c92cb makepkg -g: use checksums defined in the pkgbuild
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Allan: amend documentation]
Signed-off-by: Allan McRae <allan@archlinux.org>

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 19:28:49 -05:00
Allan McRae
64c3255b0e makepkg: handle multiple install and changelog files
The presence of all install and changelog files (multiple files may
be used with package splitting) is checked for in check_sanity().

All install and changelog files are copied to the source location
when using --source.  The check for install and changelog file presence
is removed in create_srcpackage() as this is redundant to the checks
performed in check_sanity().

Moved install and changelog handling in create_srcpackage() to after
source array files, as this is more logical and readily allows for the
following.

A check is made when creating a source package that a symlink to an
install file has not already been added.  This can occur if the
install file is used multiple times or if it is listed in the source
array.

Fixes FS#18831, FS#18394 and partially fixes FS#16004

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-05-05 19:27:55 -05:00
Ray Kohler
590606a5d7 makepkg: fall back to su if sudo is not available
Signed-off-by: Ray Kohler <ataraxia937@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 19:26:56 -05:00
Allan McRae
ccbef232c9 makepkg: improve removal of installed dependencies
Compare a list of packages on the system before and after dependency
resolution in order to get a complete list of packages to remove.  This
allows makepkg to remove packages installed due to provides.

Bail in cases where packages that were on the system originally have been
removed as there is a risk of breaking the system when removing the new
packages.

Fixes FS#15144.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 19:26:06 -05:00
Jonathan Conder
df99495b82 Compute package download size outside _alpm_sync_prepare
And add a new info level for this piece of data.

Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 18:15:52 -05:00
Dan McGee
d485c0370f Improve documentation of -k/--dbonly
We had the long option wrong in some places and its behavior wasn't
documented at all with regards to -U/--upgrade.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 11:18:27 -05:00
Dan McGee
9528c36452 Add two new pactests for --dbonly
It caught me by surprise that:
1. These weren't being tested at all
2. The --dbonly combined with -U not only "works" but is also completely
   undocumented. It also has some weird behavior on install vs. upgrade that
   may need addressing.

Add some tests which will hopefully provoke some discussion.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 11:11:20 -05:00
Nagy Gabor
f9fa822ccb Remove unused 'z' option from getopt_long's optstring
In addition, I permuted shortopts to make it more readable.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 10:39:44 -05:00
Nagy Gabor
ac9dde072c Introduce -D, --database
The request of FS#12950 is implemented.

On the backend side, I introduced a new function, alpm_db_set_pkgreason(),
to modify the install reason of a package in the local database. On the
front-end side, I introduced a new main operation, -D/--database, which has
two options, --asdeps and --asexplicit. I documented this in pacman manual.
I've created two pactests to test -D: database001.py and database002.py.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05 10:37:01 -05:00
Dan McGee
6b6eb6345b Fix up the cross-compilation patch library lookup
Don't explicitly add things to the list that might not need to be there, and
get the fallback list of libraries correct.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04 23:43:43 -05:00
Dan McGee
eb6af031ec Build vercmp without needing link to libalpm
Include the object file directly from the libalpm version comparison code as
it is the only thing we need. This drops the dependency of vercmp on
libalpm and all of the stuff we know it drags in.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04 23:42:01 -05:00
Dan McGee
4f80993933 Remove call to function logger
It isn't really necessary here and it helps us get rid of some link
pollution so we can have a slim vercmp binary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04 23:38:52 -05:00
Dan McGee
2a6f3f0652 Move vercmp code into a separate file
This will facilitate using this object file on its own in the vercmp tool
which will be done in a future commit. The net impact on the generated
binaries should not be noticeable after this commit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04 23:32:13 -05:00
Dan McGee
8a6bbed98e Update PKGBUILD.proto to include a package() function
Relevant after we deprecated `makepkg -R` without a package() function being
present in the PKGBUILD.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-27 13:08:09 -05:00
Allan McRae
90aca75cb9 makepkg: BSD find compatibility fix
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-26 18:49:28 -05:00
Christophe Chapuis
753599b504 contrib/pactree: generate reverse dependency trees
Add an option to show the tree of packages which depend on a given
package

Signed-off-by: Allan McRae <allan@archlinux.org>
2010-04-26 18:49:11 -05:00
Nagy Gabor
652762488a New pactests for the phonon/qt issue
Original-work-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-26 18:47:56 -05:00
Allan McRae
6995aed9ae makepkg: deprecate repackaging without a package function
File permissions are not guaranteed to stay the same on exit from fakeroot,
so repackaging may result in files with different permissions. This is
avoided when using a package() function (or split packages) as the
packaging step is rerun.

Signed-off-by: Allan McRae <allan@archlinux.org>
[Dan: touched up message for translation purposes]
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-26 18:46:41 -05:00
Serge Ziryukin
7608dd74d7 check for valid optarg before using strdup
Signed-off-by: Serge Ziryukin <ftrvxmtrx@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-26 14:50:31 -05:00
Nagy Gabor
88254d762d Show --print and --print-format options with -Rh, -Sh and -Uh only
http://mailman.archlinux.org/pipermail/pacman-dev/2010-March/010519.html

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-25 21:59:27 -05:00
Xavier Chantry
7965345d43 More consistent printing of off_t and time_t
time_t : %ld
off_t : %jd and cast to intmax_t

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-25 21:58:35 -05:00
Dan McGee
21abae98cb Update -Si docs to reflect new -Sii operation
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-25 21:36:30 -05:00
Allan McRae
98ee520907 Sort and avoid duplicates in -Sii output
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-25 21:32:48 -05:00
Allan McRae
526806e7ac alpm_list_diff_sorted - make some arguments const
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-25 21:31:37 -05:00
Matthias Lanzinger
bf7c3eb17f Fix cross-compilation issues with git and libfetch
This patch fixes 2 issues I encountered when cross-compiling pacman.
First is the test for libfetch which requires explicit linking to all
libraries libfetch depends on.

The other problem results from the AC_CHECK_PROGS test for git. This
test will stop configure with an error when cross-compiling.
The fix moves the call to AC_CHECK_PROG so that is only called of
--enable-git is actually set.

Signed-off-by: Matthias Lanzinger <mlaenz@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-25 21:28:01 -05:00
Dan McGee
cdbb90aceb Show 'Required By' in -Sii output
Just as we do in -Qi, we can compute required by information for sync
database packages. The behavior seems sane; for a given package, the -Sii
required by will show all packages in *any* sync database that require it.

Implements FS#16244.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-23 22:24:14 -05:00