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

6126 Commits

Author SHA1 Message Date
Allan McRae
88eedef6c6 add_fileconflict: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
52d2ff648d create_tempfile: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Allan McRae
123ecb8e07 _alpm_split_backup: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
c6dd581ec5 alpm_dep_from_string: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
27506aba8f _alpm_conflict_dup: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
46459da39b local_db_read: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
895780bd9a _alpm_db_new: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
87e55a4ee7 _alpm_db_get_pkgcache_hash: check for error when loading pkgcache
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
cd5e4b89f4 _alpm_delta_parse: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
e892234207 _alpm_dep_dup: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
f4796c905c pacman/util.c: fix potential memory leak in indentprint 2014-12-24 11:19:29 +10:00
Allan McRae
eac09e1d9f Fix memory leak in ALPM_EVENT_OPTDEP_REMOVAL callback
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
c0d9d26070 build_payload: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
32ebd7ad5d depmiss_new: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:29 +10:00
Allan McRae
bf06efaa78 _alpm_delta_dup: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Evangelos Foutras
eb7cc246c6 checkupdates: include package versions in output
Especially useful now that pacman -Qu will also show the new version.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Evangelos Foutras
c9ca363431 checkupdates: show error when fakeroot is missing
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Allan McRae
863cfb5808 Improve db upgrade error message
This message is clearer without (another) error prefix.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:28 +10:00
Dave Reisner
d2d00e4543 makepkg: properly correlate checksums for multiple sources
Previously, we used a single boolean value to determine correlation of
sources to checksums. Since the introduction of arch-specific sources,
this is no longer sufficient, as we must ensure that we have checksums
for (potentially) multiple source arrays.

This change inlines the logic of have_sources to build an associative
array of source array names, unsetting them as we discover their
checksums. The error condition then becomes a non-empty correlation
array.

Fixes: https://bugs.archlinux.org/task/43192

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:38 +10:00
Evangelos Foutras
c07593c64c Use correct mode bits for the log file (0000 -> 0644)
Following commit 086bbc5 (Use O_CLOEXEC as much as possible when opening
files), the log file would be created by pacman with blank permissions.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:25 +10:00
Peter Wu
a1c50a08c9 pacman-db-upgrade: set umask 022
This prevents the database from becoming inaccessible for non-root
users when the script was executed with a umask of 027.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:15 +10:00
Allan McRae
325e20dea1 makepkg: download sources for all architectures when making source package
We validated all sources when making a source package, whether or not they
are included in the tarball.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:15:00 +10:00
Allan McRae
23850c7c99 pacman-db-upgrade: be more verbose
People have mentioned that the silent upgrade to DB version 9 when no
adjustments are needed for directory symlinks is confusion.  Always print
the upgrading message.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:14:50 +10:00
Florian Pritz
c8448bb466 makepkg-template: Remove unused printf format string
I'm pretty sure this is some kind of left over stuff that was supposed
to print the filename, linenumber and line content. This is already
done so just remove it.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22 14:01:43 +10:00
Allan McRae
ec679e09b2 Check architecture specific fields for VCS support
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22 14:01:34 +10:00
Allan McRae
a7c1b7a914 add VCSCLIENTS to etc/makepkg.conf
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22 14:01:27 +10:00
Timothy Redaelli
91a56a7072 Fix double spaces in "Running %s as root is not allowed" message
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-21 16:26:45 +10:00
Evangelos Foutras
d107aced37 paclist: fix myver in usage()
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-21 16:26:36 +10:00
Dave Reisner
565c931e2c updpkgsums: add more error checking before replacement
Re-add some paranoia which was inadvertently lost with 768b65e934. In
case 'makepkg -g' fails to generate new sums (e.g. when a remote
resource cannot be fetched), or awk fails to write the new file (i have
no idea when this would happen), bail out with an error.

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19 14:31:01 +10:00
Allan McRae
bc6ada0877 Release 4.2.0
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19 13:57:21 +10:00
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