1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-10 11:35:00 -05:00
Commit Graph

5846 Commits

Author SHA1 Message Date
Allan McRae
54db3745d6 Update translations from transifex
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19 13:53:35 +10:00
Allan McRae
14dc3389fd Update NEWS for pacman-4.2 release
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19 11:52:43 +10:00
Allan McRae
c9e9c1ccfd Update README for pacman-4.2
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19 11:52:02 +10:00
Andrew Gregory
3af0268fdb remove.c: honor inverted patterns in noupgrade
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18 22:22:35 +10:00
Andrew Gregory
df36fe2e79 add alpm_option_match_noupgrade
For parity with alpm_option_match_noextract.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18 22:22:35 +10:00
Dave Reisner
768b65e934 updpkgsums: drop in-place rewrite hack, use a tempfile
This apparently exposes (what I think is) a subtle bug in cygwin's
handling of subst'd drives. Let's just drop the hackery and use a
tempfile, which should always work.

Also, introduce a proper die() function which replaces previous
hand-rolled error+exit pattern, but which wrote to stdout.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18 16:36:18 +10:00
Dave Reisner
16259d728e shut up GCC on -Wmaybe-initialized warnings
Admittedly, these are totally bogus, but a clean build is a happy build.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18 16:34:03 +10:00
Dave Reisner
0cd174efd5 makepkg: correctly add changelog files
Before this, we'd see bizzare behavior of:

  -> Adding changelog file (systemd.install)...

And, changelog files in the global section would not be added at all.

The code is clearly wrong here, as it references 'install' within a
loop of 'changelog' and 'install'. Let's use parameter indirection to
ensure that the proper file is identified and added.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18 16:33:37 +10:00
Micah Saint Germain
a4b23417f9 Fix pointer declarations to be globally consistent
Refactored inconsistent pointer declarations to better improve consistency
throughout the pacman codebase which will, in turn, increase readability to
the user.

Expected format of a pointer declaration:
`typename *varname`

Signed-off-by: Micah Saint Germain <micah@lexme.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18 16:32:55 +10:00
Miguel de Val-Borro
c54af84180 doc/translation-help.txt: Transifex example usage
Replace harcoded language code in example

Signed-off-by: Miguel de Val-Borro <miguel@archlinux.net>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-08 15:43:20 +10:00
Allan McRae
ed4032a908 pacman-db-upgrade: fix issue with find argument list length overflow
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-26 12:53:44 +10:00
Tobias Powalowski
41c8263ba2 pacman-key: compatibility with gnupg-2.1
GnuPG 2.1 no longer allow empty passphrases by default.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-21 20:54:58 +10:00
Allan McRae
bb878217cd Remove pacsysclean
This script parsed pacman output and was broken by the change to the use
of appropriate units for package sizes.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-21 14:13:57 +10:00
Dave Reisner
04bc3a24eb pacsort: parse inputs up front into control struct
This moves most of the parsing work out of the sorting path. The explode
and splitfile functions now call input_new and append input_t structs
to the list of sort candidates instead of raw strings. This lets us
make smarter and easier decisions in the sorting callbacks, which are
now also split into the version and file comparison methods for clarity.

This fixes two bugs:

1) Incorrect ordering with filenames containing epoch in the pkgver
2) Incorrect ordering with package names which are substrings of
each other (e.g. "systemd" and "systemd-sysvcompat").

Performance of the --files mode degrades slightly as a result of this
change, but not unreasonably. Sorting with small inputs (5-10) doubles
in runtime, but larger inputs (4000+) only increase by 20%.

ref: https://bugs.archlinux.org/task/37631

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-20 14:40:25 +10:00
Allan McRae
c23ff87893 checkupdates: do not print ignored packages
FS#41223

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-19 17:09:55 +10:00
Dave Reisner
ef0577e3d5 version: fix memory leak in early return
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-19 14:14:04 +10:00
Allan McRae
3446453c72 Fix translation error and remove empty po files
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-19 14:13:15 +10:00
Allan McRae
193b2b33f8 Update po files to send to Transifex
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 15:14:51 +10:00
Allan McRae
db402d6029 Pull translation updates from Transifex
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 15:12:40 +10:00
Allan McRae
eda65967ec Do not warn about missing files in NoExtract
When checking a packages files, ignore any missing files in NoExtract

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 12:50:56 +10:00
Allan McRae
96e9cf35f1 Add alpm_option_match_noextract
This is useful for frontends testing whether a file is in NoExtract

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 12:31:30 +10:00
Allan McRae
5d11605958 extract_single_file: fix memory leak in error condition
The memory assigned to checkfile was leaked in the error condition.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 11:58:26 +10:00
Allan McRae
5d618438c4 _alpm_backup_dup: fix memory leak in error case
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 11:58:26 +10:00
Allan McRae
a7298c36fd makepkg: symlink files in noextract into $srcdir
File in noextract should still be symlinked into $srcdir so that they
can be accessed without using $SRCDEST.  Using noextract on VCS files
makes no sense as these are not being extracted, so now this does
nothing.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 11:58:25 +10:00
Allan McRae
d9aa7025ea Remove logging of NoExtract events
With globbing in NoExtract, these log events can quickly pile up hiding
important information from the log.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18 11:58:25 +10:00
Allan McRae
8c00dd7341 Fix crash when using external downloader
Commit 9d96bed9 attempts to use the same effective URL for the db and its
signature download.  However, this information is not available when we use
an external downloader, resulting in a crash.

Fall back to the old method when the effective URL is unavailable.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17 17:13:48 +10:00
Lukáš Jirkovský
4c1f41a7c1 makepkg: svn: update existing sources in srcdir without removing them first.
This matches the behaviour with non-VCS sources. It also allows incremental
builds when subversion is used to obtain sources.

Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17 14:56:17 +10:00
Andrew Gregory
0d24994934 makepkg: only strip vcs prefixes from front of url
Referenced by FS#41811

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17 13:02:12 +10:00
Andrew Gregory
6949012590 makepkg: do not strip bzr+ from bzr+ssh urls
bzr does not recognize bare ssh:// urls.

Fixes FS#41811

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17 13:01:43 +10:00
Allan McRae
db2562113b makepkg: bzr: update existing sources in srcdir without removing them first.
The local changes are discarded when updating. This matches the behaviour
when non-VCS sources are used. It also allows incremental builds.

This also changes the checkout during bzr source "extraction" to a heavyweight
checkout so that pulling a specific revision does not alter the original
download.

Original-work-by: Lukáš Jirkovský <l.jirkovsky@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17 12:58:06 +10:00
Lukáš Jirkovský
be3ce88bb2 makepkg: hg: update existing sources in srcdir without removing them first.
The local changes are discarded when updating. This matches the behaviour
when non-VCS sources are used. It also allows incremental builds.

Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 18:28:47 +10:00
Lukáš Jirkovský
f66ae5334e makepkg: checkout a revision specified in SVN fragment in download_svn.
Previously the sources were dowloaded in HEAD revision in the download_svn().
If a specific revision was requested in fragment, the code was updated to that
revision in extract_svn(). However, because SVN is a centralized system,
this means that the changed sources has to be downloaded again.

By moving the fragment handling to download_svn(), we get the correct revision
without having to download it later in extract_svn().

Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 17:28:22 +10:00
Lukáš Jirkovský
f6b3c9d803 makepkg: git: update existing sources in srcdir without removing them first.
The local changes are discarded when updating. This matches the behaviour
when non-VCS sources are used. It also allows incremental builds.

Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 16:09:27 +10:00
Allan McRae
ecf0e37fc5 makepkg: improve stripping pkgdesc of whitespace for .PKGINFO
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 15:53:16 +10:00
Dave Reisner
6029a77ac0 makepkg: introduce .SRCINFO files for source packages
Similar to .PKGINFO, .SRCINFO provides structured metadata from the
PKGBUILD to be included with source packages.

The format is structured such that it contains a "pkgbase" and one to
many "pkgname" sections.  Each "pkgname" section represents an "output
package", and inherits all of the attributes of the "pkgbase" section,
and then can define their own additive fields.

For example, a simple PKGBUILD:

  pkgbase=ponies
  pkgname=('applejack' 'pinkiepie')
  pkgver=1.2.3
  pkgrel=1
  arch=('x86_64' 'i686')
  depends=('friendship' 'magic')

  build() { ...; }

  package_applejack() {
    provides=('courage')

    ...;
  }

  package_pinkiepie() {
    provides=('laughter')

    ...;
  }

Would yield the following .SRCINFO file:

  pkgbase = ponies
  	pkgdesc = friendship is magic
  	pkgver = 1.2.3
  	pkgrel = 1
  	arch = x86_64
  	arch = i686
  	depends = friendship
  	depends = magic

  pkgname = applejack
  	provides = courage

  pkgname = pinkiepie
  	provides = laughter

The code to generate this new file is taken a project which I've been
incubating[0] under the guise of 'mkaurball', which creates .AURINFO
files for the AUR. AURINFO is the exactly same file as .SRCINFO, but
named as such to make it clear that this is specific to the AUR.

Because we're parsing shell in the packaging functions rather than
executing it, there *are* some limitations, but these only really crop
up in more "exotic" PKGBUILDs. Smoketesting[1] for accuracy in the Arch
repos yields 100% accuracy for [core] and [extra]. [community] clocks in
at ~98% accuracy (.3% difference per PKGBUILD), largely due to silly
haskell packages calling pacman from inside the PKGBUILD to determine
dependencies. [multilib] currently shows about 92% accuracy -- a
statistic which can be largely improved by utilizing the recently merged
arch-specific attribute work. This is also a smaller repo so the numbers
are somewhat inflated. In reality, this is only a .8% variance per
PKGBUILD.

Together, we can make PKGBUILD better.

[0] https://github.com/falconindy/pkgbuild-introspection
[1] https://github.com/falconindy/pkgbuild-introspection/blob/master/test/smoketest

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 15:41:50 +10:00
Dave Reisner
bd746568f6 makepkg: simplify epoch handling
We can avoid setting a default value for epoch since we intend to mean
unset and "0" as the same thing. This is also a more consistent default
as the display of epoch=0 is no epoch at all in the full package
version.

The extra paranoia in get_full_version can be removed due to lint_epoch
guarding against non-integer values of epoch.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 15:35:12 +10:00
Dave Reisner
03aa44a3ec makepkg: ignore empty global attributes in extraction
This bug isn't currently exposed by any of the existing codepaths, but
an upcoming patch to introduce SRCINFO files to makepkg will expose
this.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 13:46:51 +10:00
Florian Pritz
f77933ea1e Add --assume-installed to shell completion
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09 13:46:23 +10:00
Florian Pritz
9594f513a4 Add --assume-installed to pacman --help
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-05 11:01:09 +10:00
Dave Reisner
37aeb43644 makepkg.8: remove superfluous "::" in envvar description
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-05 11:00:43 +10:00
Dave Reisner
de442b6867 bash_completion: add --noarchive to makepkg's completions
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-05 10:59:57 +10:00
Dave Reisner
167a598265 updpkgsums: avoid exec'ing awk, so the trap actually works
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-05 10:59:30 +10:00
Andrew Gregory
bd744d067d add pacman-db-upgrade-v9.py to check_SCRIPTS
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04 20:11:18 +10:00
Andrew Gregory
8cd41ec62b tests/pacman-db-upgrade-v9: set additional paths
--config does not respect root, causing pacman-db-upgrade to read the
local pacman.conf rather than the one in the test root.

Also add a rule to ensure the ALPM_DB_VERSION file is actually being
created.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04 20:11:18 +10:00
Andrew Gregory
4114e25df1 pmtest: make test paths easily available to tests
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04 20:11:18 +10:00
Andrew Gregory
1e0b2f6629 pacman-db-upgrade: fix --config option typo
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04 20:11:18 +10:00
Eric Schultz
566dc23357 Exit with 0/SUCCESS if there are no packages to remove
Previously the lack of candidate packages was considered an error
and return 1/FAILURE but really this isn't an issue. Also, for
systemd (and others) this flagged the instance as having failed
for no good reason.

Signed-off-by: Eric Schultz <eric@schultzter.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04 20:10:29 +10:00
Dave Reisner
75c80caebc makepkg.8: fix typo in reference to other flag
it's --syncdeps, not --syndeps
2014-10-19 21:36:19 +10:00
Andrew Gregory
82208c0239 testdb: ignore ALPM_DB_VERSION
Replaces the test for hidden files which appears to be leftover from
2e431e1cc before sync db checking was moved to a separate function.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-19 21:32:46 +10:00
Dave Reisner
9d4d81783d paccache: avoid spurious blank line written to stderr
this is just stylistic formatting, so write it to stdout.

ref: https://bugs.archlinux.org/task/42389

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-19 21:32:22 +10:00