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

6017 Commits

Author SHA1 Message Date
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
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