mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-14 02:39:03 +08:00
Merge remote-tracking branch 'origin/testing' into testing
This commit is contained in:
commit
93dc1250c4
@ -2,12 +2,12 @@
|
||||
|
||||
pkgname=cmake
|
||||
pkgver=2.8.10.2
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A cross-platform open-source make system"
|
||||
arch=('x86_64')
|
||||
license=('custom')
|
||||
url="http://www.cmake.org"
|
||||
depends=('curl' 'libarchive' 'shared-mime-info')
|
||||
depends=('curl' 'libarchive>=2.3.1' 'shared-mime-info')
|
||||
makedepends=('qt')
|
||||
install=${pkgname}.install
|
||||
source=("http://www.cmake.org/files/v2.8/${pkgname}-${pkgver}.tar.gz")
|
||||
|
@ -1,5 +1,3 @@
|
||||
# Maintainer: abveritas[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=guile
|
||||
pkgver=1.8.8
|
||||
pkgrel=3
|
||||
|
@ -1,28 +1,39 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer abveritas[at]chakra-project[dot]org>
|
||||
|
||||
|
||||
pkgname=libarchive
|
||||
pkgver=3.0.4
|
||||
pkgver=3.1.2
|
||||
pkgrel=1
|
||||
pkgdesc="library that can create and read several streaming archive formats"
|
||||
arch=('x86_64')
|
||||
url="http://libarchive.googlecode.com/"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://libarchive.org/"
|
||||
license=('BSD')
|
||||
depends=('zlib' 'bzip2' 'xz>=5.0.2' 'acl' 'openssl>=1.0.0' 'expat')
|
||||
source=("https://github.com/downloads/libarchive/libarchive/libarchive-${pkgver}.tar.gz")
|
||||
md5sums=('af443ca9a10ddbcbf00f7ae34ca7fc16')
|
||||
depends=('acl' 'attr' 'bzip2' 'expat' 'lzo2>=2.06' 'openssl' 'xz' 'zlib')
|
||||
source=("http://libarchive.org/downloads/$pkgname-$pkgver.tar.gz"
|
||||
'0001-mtree-fix-line-filename-length-calculation.patch')
|
||||
md5sums=('efad5a503f66329bb9d2f4308b5de98a'
|
||||
'fda89c145bbcd793a96b06b463ef6a72')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
# https://code.google.com/p/libarchive/issues/detail?id=301
|
||||
# upstream commit e65bf287f0133426b26611fe3e80b51267987106
|
||||
patch -Np1 -i "$srcdir/0001-mtree-fix-line-filename-length-calculation.patch"
|
||||
|
||||
./configure --prefix=/usr --without-xml2
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
cd "$pkgname-$pkgver"
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
install -D -m644 COPYING "$pkgdir"/usr/share/licenses/libarchive/COPYING
|
||||
|
@ -1,165 +0,0 @@
|
||||
Index: libarchive/archive_read_support_format_zip.c
|
||||
===================================================================
|
||||
--- libarchive/archive_read_support_format_zip.c (revision 4189)
|
||||
+++ libarchive/archive_read_support_format_zip.c (revision 4190)
|
||||
@@ -217,14 +217,13 @@
|
||||
}
|
||||
|
||||
/*
|
||||
- * TODO: This is a performance sink because it forces
|
||||
- * the read core to drop buffered data from the start
|
||||
- * of file, which will then have to be re-read again
|
||||
- * if this bidder loses.
|
||||
+ * TODO: This is a performance sink because it forces the read core to
|
||||
+ * drop buffered data from the start of file, which will then have to
|
||||
+ * be re-read again if this bidder loses.
|
||||
*
|
||||
- * Consider passing in the winning bid value to subsequent
|
||||
- * bidders so that this bidder in particular can avoid
|
||||
- * seeking if it knows it's going to lose anyway.
|
||||
+ * We workaround this a little by passing in the best bid so far so
|
||||
+ * that later bidders can do nothing if they know they'll never
|
||||
+ * outbid. But we can certainly do better...
|
||||
*/
|
||||
static int
|
||||
archive_read_format_zip_seekable_bid(struct archive_read *a, int best_bid)
|
||||
@@ -311,19 +310,29 @@
|
||||
external_attributes = archive_le32dec(p + 38);
|
||||
zip_entry->local_header_offset = archive_le32dec(p + 42);
|
||||
|
||||
+ /* If we can't guess the mode, leave it zero here;
|
||||
+ when we read the local file header we might get
|
||||
+ more information. */
|
||||
+ zip_entry->mode = 0;
|
||||
if (zip_entry->system == 3) {
|
||||
zip_entry->mode = external_attributes >> 16;
|
||||
- } else {
|
||||
- zip_entry->mode = AE_IFREG | 0777;
|
||||
}
|
||||
|
||||
- /* Do we need to parse filename here? */
|
||||
- /* Or can we wait until we read the local header? */
|
||||
+ /* We don't read the filename until we get to the
|
||||
+ local file header. Reading it here would speed up
|
||||
+ table-of-contents operations (removing the need to
|
||||
+ find and read local file header to get the
|
||||
+ filename) at the cost of requiring a lot of extra
|
||||
+ space. */
|
||||
+ /* We don't read the extra block here. We assume it
|
||||
+ will be duplicated at the local file header. */
|
||||
__archive_read_consume(a,
|
||||
46 + filename_length + extra_length + comment_length);
|
||||
}
|
||||
|
||||
- /* TODO: Sort zip entries. */
|
||||
+ /* TODO: Sort zip entries by file offset so that we
|
||||
+ can optimize get_next_header() to use skip instead of
|
||||
+ seek. */
|
||||
|
||||
return ARCHIVE_OK;
|
||||
}
|
||||
@@ -434,6 +443,11 @@
|
||||
return (30);
|
||||
}
|
||||
|
||||
+ /* TODO: It's worth looking ahead a little bit for a valid
|
||||
+ * PK signature. In particular, that would make it possible
|
||||
+ * to read some UUEncoded SFX files or SFX files coming from
|
||||
+ * a network socket. */
|
||||
+
|
||||
return (0);
|
||||
}
|
||||
|
||||
Index: libarchive/test/test_compat_zip_6.zip.uu
|
||||
===================================================================
|
||||
--- libarchive/test/test_compat_zip_6.zip.uu (revision 0)
|
||||
+++ libarchive/test/test_compat_zip_6.zip.uu (revision 4190)
|
||||
@@ -0,0 +1,10 @@
|
||||
+begin 755 test_compat_zip_6.zip
|
||||
+M4$L#!`H``````'@3-T`````````````````6````3F5W($9O;&1E<B].97<@
|
||||
+M1F]L9&5R+U!+`P0*``````!\$S=`%4-8OPL````+````*P```$YE=R!&;VQD
|
||||
+M97(O3F5W($9O;&1E<B].97<@5&5X="!$;V-U;65N="YT>'1S;VUE('1E>'0-
|
||||
+M"E!+`0(4"PH``````'@3-T`````````````````6````````````$```````
|
||||
+M``!.97<@1F]L9&5R+TYE=R!&;VQD97(O4$L!`A0+"@``````?!,W0!5#6+\+
|
||||
+M````"P```"L``````````0`@````-````$YE=R!&;VQD97(O3F5W($9O;&1E
|
||||
+M<B].97<@5&5X="!$;V-U;65N="YT>'102P4&``````(``@"=````B```````
|
||||
+`
|
||||
+end
|
||||
Index: libarchive/test/test_compat_zip.c
|
||||
===================================================================
|
||||
--- libarchive/test/test_compat_zip.c (revision 4189)
|
||||
+++ libarchive/test/test_compat_zip.c (revision 4190)
|
||||
@@ -348,6 +348,53 @@
|
||||
free(p);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Issue 225: Errors extracting MSDOS Zip archives with directories.
|
||||
+ */
|
||||
+static void
|
||||
+compat_zip_6_verify(struct archive *a)
|
||||
+{
|
||||
+ struct archive_entry *ae;
|
||||
+
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
|
||||
+ assertEqualString("New Folder/New Folder/", archive_entry_pathname(ae));
|
||||
+ assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
|
||||
+ assertEqualInt(1327314468, archive_entry_mtime(ae));
|
||||
+ assertEqualInt(0, archive_entry_size(ae));
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
|
||||
+ assertEqualString("New Folder/New Folder/New Text Document.txt", archive_entry_pathname(ae));
|
||||
+ assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
|
||||
+ assertEqualInt(1327314476, archive_entry_mtime(ae));
|
||||
+ assertEqualInt(11, archive_entry_size(ae));
|
||||
+ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+test_compat_zip_6(void)
|
||||
+{
|
||||
+ const char *refname = "test_compat_zip_6.zip";
|
||||
+ struct archive *a;
|
||||
+ void *p;
|
||||
+ size_t s;
|
||||
+
|
||||
+ extract_reference_file(refname);
|
||||
+ p = slurpfile(&s, refname);
|
||||
+
|
||||
+ assert((a = archive_read_new()) != NULL);
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, read_open_memory_seek(a, p, s, 7));
|
||||
+ compat_zip_6_verify(a);
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
|
||||
+
|
||||
+ assert((a = archive_read_new()) != NULL);
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, read_open_memory(a, p, s, 7));
|
||||
+ compat_zip_6_verify(a);
|
||||
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
|
||||
+}
|
||||
+
|
||||
DEFINE_TEST(test_compat_zip)
|
||||
{
|
||||
test_compat_zip_1();
|
||||
@@ -355,6 +402,7 @@
|
||||
test_compat_zip_3();
|
||||
test_compat_zip_4();
|
||||
test_compat_zip_5();
|
||||
+ test_compat_zip_6();
|
||||
}
|
||||
|
||||
|
||||
Index: Makefile.am
|
||||
===================================================================
|
||||
--- Makefile.am (revision 4189)
|
||||
+++ Makefile.am (revision 4190)
|
||||
@@ -462,6 +462,7 @@
|
||||
libarchive/test/test_compat_zip_3.zip.uu \
|
||||
libarchive/test/test_compat_zip_4.zip.uu \
|
||||
libarchive/test/test_compat_zip_5.zip.uu \
|
||||
+ libarchive/test/test_compat_zip_6.zip.uu \
|
||||
libarchive/test/test_fuzz_1.iso.Z.uu \
|
||||
libarchive/test/test_fuzz.cab.uu \
|
||||
libarchive/test/test_fuzz.lzh.uu \
|
@ -1,40 +0,0 @@
|
||||
From 293687358e2c52213a3f077bb3d8f860ea5bfda9 Mon Sep 17 00:00:00 2001
|
||||
From: Michihiro NAKAJIMA <ggcueroad@gmail.com>
|
||||
Date: Mon, 6 Feb 2012 04:51:16 +0900
|
||||
Subject: [PATCH] Fix issue 238. Skip the setup sparse on linux without a
|
||||
check of errno if ioctl(,FS_IOC_FIEMAP,) failed because the
|
||||
errno is not fixed , for example, some file system returns
|
||||
ENOTTY, another returns EOPNOTSUPP, or EINVAL and so on. We
|
||||
cannot decide what errno exactly indicates an unsupported
|
||||
error.
|
||||
|
||||
---
|
||||
libarchive/archive_read_disk_entry_from_file.c | 13 +++----------
|
||||
1 file changed, 3 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
|
||||
index eef42ef74..6415008 100644
|
||||
--- a/libarchive/archive_read_disk_entry_from_file.c
|
||||
+++ b/libarchive/archive_read_disk_entry_from_file.c
|
||||
@@ -859,16 +859,9 @@ setup_sparse(struct archive_read_disk *a,
|
||||
|
||||
r = ioctl(fd, FS_IOC_FIEMAP, fm);
|
||||
if (r < 0) {
|
||||
- /* When errno is ENOTTY, it is better we should
|
||||
- * return ARCHIVE_OK because an earlier version
|
||||
- *(<2.6.28) cannot perfom FS_IOC_FIEMAP.
|
||||
- * We should also check if errno is EOPNOTSUPP,
|
||||
- * it means "Operation not supported". */
|
||||
- if (errno != ENOTTY && errno != EOPNOTSUPP) {
|
||||
- archive_set_error(&a->archive, errno,
|
||||
- "FIEMAP failed");
|
||||
- exit_sts = ARCHIVE_FAILED;
|
||||
- }
|
||||
+ /* When something error happens, it is better we
|
||||
+ * should return ARCHIVE_OK because an earlier
|
||||
+ * version(<2.6.28) cannot perfom FS_IOC_FIEMAP. */
|
||||
goto exit_setup_sparse;
|
||||
}
|
||||
if (fm->fm_mapped_extents == 0)
|
||||
--
|
||||
1.7.9.2
|
@ -1,23 +0,0 @@
|
||||
Index: libarchive/test/test_compat_zip.c
|
||||
===================================================================
|
||||
--- libarchive/test/test_compat_zip.c (revision 4197)
|
||||
+++ libarchive/test/test_compat_zip.c (revision 4198)
|
||||
@@ -359,12 +359,16 @@
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
|
||||
assertEqualString("New Folder/New Folder/", archive_entry_pathname(ae));
|
||||
assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
|
||||
- assertEqualInt(1327314468, archive_entry_mtime(ae));
|
||||
+ /* Zip timestamps are local time, so vary by time zone. */
|
||||
+ /* TODO: A more complex assert would work here; we could
|
||||
+ verify that it's within +/- 24 hours of a particular value. */
|
||||
+ /* assertEqualInt(1327314468, archive_entry_mtime(ae)); */
|
||||
assertEqualInt(0, archive_entry_size(ae));
|
||||
assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
|
||||
assertEqualString("New Folder/New Folder/New Text Document.txt", archive_entry_pathname(ae));
|
||||
assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
|
||||
- assertEqualInt(1327314476, archive_entry_mtime(ae));
|
||||
+ /* Zip timestamps are local time, so vary by time zone. */
|
||||
+ /* assertEqualInt(1327314476, archive_entry_mtime(ae)); */
|
||||
assertEqualInt(11, archive_entry_size(ae));
|
||||
assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
|
||||
}
|
@ -1,15 +1,15 @@
|
||||
|
||||
pkgname=lzo2
|
||||
pkgver=2.04
|
||||
pkgrel=2
|
||||
pkgver=2.06
|
||||
pkgrel=1
|
||||
pkgdesc="Portable lossless data compression library"
|
||||
arch=('i686' 'x86_64')
|
||||
arch=('x86_64')
|
||||
url="http://www.oberhumer.com/opensource/lzo"
|
||||
license=('GPL')
|
||||
depends=('glibc')
|
||||
source=(http://www.oberhumer.com/opensource/lzo/download/lzo-${pkgver}.tar.gz)
|
||||
options=(!libtool)
|
||||
sha1sums=('f5bf5c7ae4116e60513e5788d156ef78946677e7')
|
||||
sha1sums=('a11768b8a168ec607750842bbef406f11547b904')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/lzo-${pkgver}"
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
pkgname=mkinitcpio
|
||||
pkgver=0.11.0
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Modular initramfs image creation utility"
|
||||
arch=('x86_64')
|
||||
url="http://www.archlinux.org/"
|
||||
license=('GPL')
|
||||
depends=('awk' 'mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.21' 'libarchive' 'coreutils'
|
||||
depends=('awk' 'mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.21' 'libarchive=3.1.2-1' 'coreutils'
|
||||
'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'file' 'gzip' 'systemd')
|
||||
optdepends=('xz: Use lzma or xz compression for the initramfs image'
|
||||
'bzip2: Use bzip2 compression for the initramfs image'
|
||||
@ -21,7 +21,7 @@ source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
|
||||
install=mkinitcpio.install
|
||||
sha256sums=('4d65ecb827b9c07955409cdfeab3b64ec2536306961f6050e1a4fbe7ea79d150'
|
||||
'275afca3a4ac0cc5555b5a7d4b89c71ba14ea4a9fbf2dfce63eab6d6d70c831a'
|
||||
'dcc41986dc719a4a46b05763aa8cf29f4368d6c2f1f4286b62b8a90688b59c33')
|
||||
'078737f3b4d22ef905661e9c0e11f4704789d92cac3b25b414ef71f8cc7ff80e')
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
@ -4,40 +4,41 @@
|
||||
# maintainer <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=pacman
|
||||
pkgver=4.0.2
|
||||
pkgrel=10
|
||||
pkgver=4.1.0
|
||||
pkgrel=3
|
||||
pkgdesc="A library-based package manager with dependency support"
|
||||
arch=('x86_64')
|
||||
url="http://www.archlinux.org/pacman/"
|
||||
license=('GPL')
|
||||
groups=('base')
|
||||
depends=('bash' 'glibc' 'libarchive>=3.0.2' 'curl>=7.19.4'
|
||||
'gpgme' 'pacman-mirrorlist' 'pacman-helpme')
|
||||
groups=('base' 'base-devel')
|
||||
depends=('bash>=4.2.042-1' 'glibc>=2.15-2' 'libarchive=3.1.2-1' 'curl>=7.28.1'
|
||||
'gpgme' 'pacman-mirrorlist' )
|
||||
checkdepends=('python2' 'fakechroot')
|
||||
makedepends=('asciidoc')
|
||||
optdepends=('fakeroot: for makepkg usage as normal user')
|
||||
provides=('pacman-contrib')
|
||||
conflicts=('pacman-contrib')
|
||||
replaces=('pacman-contrib')
|
||||
backup=(etc/pacman.conf etc/makepkg.conf)
|
||||
install=pacman.install
|
||||
options=(!libtool)
|
||||
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz
|
||||
pacman.conf.x86_64
|
||||
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
|
||||
pacman.conf
|
||||
makepkg.conf
|
||||
add_categories.patch)
|
||||
md5sums=('289ba4a19a16393096e065cec1cb9b0a'
|
||||
'5b4f1048875e50226071edf7d71ce0fa'
|
||||
'898941a2b58152c45b00a139847606c3'
|
||||
'5beebe36bfc1e1f677d5ae12fcff8083'
|
||||
'a5d5c520ed75311d1875e0835563af33')
|
||||
makepkg.conf)
|
||||
md5sums=('a0f2b3148bee4784f21cf373cf59a0bc'
|
||||
'4959b8d00056398195f4e549e7bdd346'
|
||||
'bc17835d46a16c5946a85a40a47974d6'
|
||||
'5beebe36bfc1e1f677d5ae12fcff8083')
|
||||
|
||||
build() {
|
||||
cd $srcdir/$pkgname-$pkgver
|
||||
|
||||
# add categories array support
|
||||
patch -Np1 -i ../add_categories.patch
|
||||
|
||||
./configure --prefix=/usr --sysconfdir=/etc \
|
||||
--localstatedir=/var --enable-doc
|
||||
--localstatedir=/var --enable-doc \
|
||||
--with-scriptlet-shell=/bin/bash \
|
||||
--with-ldconfig=/usr/bin/ldconfig
|
||||
make
|
||||
make -C contrib
|
||||
}
|
||||
|
||||
check() {
|
||||
@ -47,12 +48,15 @@ check() {
|
||||
package() {
|
||||
cd $srcdir/$pkgname-$pkgver
|
||||
make DESTDIR=$pkgdir install
|
||||
make DESTDIR=$pkgdir -C contrib install
|
||||
|
||||
# install Arch specific stuff
|
||||
install -dm755 $pkgdir/etc
|
||||
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
|
||||
|
||||
mkdir -p $pkgdir/etc
|
||||
install -m644 $srcdir/pacman.conf.x86_64 $pkgdir/etc/pacman.conf
|
||||
mycarch="x86_64"
|
||||
mychost="x86_64-unknown-linux-gnu"
|
||||
myflags="-march=x86-64 "
|
||||
myflags="-march=x86-64"
|
||||
|
||||
install -m644 $srcdir/makepkg.conf $pkgdir/etc/
|
||||
# set things correctly in the default conf file
|
||||
@ -61,11 +65,13 @@ package() {
|
||||
-e "s|@CHOST[@]|$mychost|g" \
|
||||
-e "s|@CARCHFLAGS[@]|$myflags|g"
|
||||
|
||||
# install completion files
|
||||
install -Dm644 contrib/bash_completion "$pkgdir/usr/share/bash-completion/completions/pacman"
|
||||
# put bash_completion in the right location
|
||||
install -dm755 ${pkgdir}/usr/share/bash-completion/completions
|
||||
mv ${pkgdir}/etc/bash_completion.d/pacman \
|
||||
${pkgdir}/usr/share/bash-completion/completions
|
||||
rmdir ${pkgdir}/etc/bash_completion.d
|
||||
|
||||
for f in makepkg pacman-key; do
|
||||
ln -s pacman "$pkgdir/usr/share/bash-completion/completions/$f"
|
||||
done
|
||||
install -Dm644 contrib/zsh_completion $pkgdir/usr/share/zsh/site-functions/_pacman
|
||||
}
|
||||
|
||||
|
@ -1,755 +0,0 @@
|
||||
diff -Naur pacman-4.0.2-orig//contrib/bacman.in pacman-4.0.2/contrib/bacman.in
|
||||
--- pacman-4.0.2-orig//contrib/bacman.in 2011-10-21 19:31:24.000000000 +0200
|
||||
+++ pacman-4.0.2/contrib/bacman.in 2012-03-20 12:51:48.000000000 +0100
|
||||
@@ -227,6 +227,9 @@
|
||||
%GROUPS%)
|
||||
echo "group = $i" >> .PKGINFO
|
||||
;;
|
||||
+ %CATEGORIES%)
|
||||
+ echo "category = $i" >> .PKGINFO
|
||||
+ ;;
|
||||
%REPLACES%)
|
||||
echo "replaces = $i" >> .PKGINFO
|
||||
;;
|
||||
diff -Naur pacman-4.0.2-orig//contrib/bash_completion.in pacman-4.0.2/contrib/bash_completion.in
|
||||
--- pacman-4.0.2-orig//contrib/bash_completion.in 2012-01-19 23:28:04.000000000 +0100
|
||||
+++ pacman-4.0.2/contrib/bash_completion.in 2012-03-20 12:50:54.000000000 +0100
|
||||
@@ -71,10 +71,10 @@
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev
|
||||
database=('asdeps asexplicit')
|
||||
- query=('changelog check deps explicit file foreign groups info list owns
|
||||
+ query=('changelog check deps explicit file foreign groups categories info list owns
|
||||
search unrequired upgrades' 'c e g i k l m o p s t u')
|
||||
remove=('cascade dbonly nodeps nosave print recursive unneeded' 'c n p s u')
|
||||
- sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup
|
||||
+ sync=('asdeps asexplicit clean dbonly downloadonly force groups categories ignore ignoregroup
|
||||
info list needed nodeps print refresh recursive search sysupgrade'
|
||||
'c f g i l p s u w y')
|
||||
upgrade=('asdeps asexplicit force needed nodeps print recursive' 'f p')
|
||||
diff -Naur pacman-4.0.2-orig//contrib/PKGBUILD.vim pacman-4.0.2/contrib/PKGBUILD.vim
|
||||
--- pacman-4.0.2-orig//contrib/PKGBUILD.vim 2011-10-12 21:04:25.000000000 +0200
|
||||
+++ pacman-4.0.2/contrib/PKGBUILD.vim 2012-03-20 12:53:02.000000000 +0100
|
||||
@@ -92,6 +92,11 @@
|
||||
syn match pbValidGroups /\([[:alnum:]]\|+\|-\|_\)*/ contained
|
||||
syn region pbGroupsGroup start=/^groups=(/ end=/)/ contains=pb_k_groups,pbValidGroups,shDoubleQuote,shSingleQuote
|
||||
|
||||
+" categories
|
||||
+syn keyword pb_k_categories categories contained
|
||||
+syn match pbValidCategories /\([[:alnum:]]\|+\|-\|_\)*/ contained
|
||||
+syn region pbCategoriesGroup start=/^categories=(/ end=/)/ contains=pb_k_categories,pbValidCategories,shDoubleQuote,shSingleQuote
|
||||
+
|
||||
" depends
|
||||
syn keyword pb_k_depends depends contained
|
||||
syn match pbValidDepends /\([[:alnum:]]\|+\|-\|_\)*/ contained
|
||||
@@ -235,6 +240,7 @@
|
||||
hi def link pbIllegalArch Error
|
||||
|
||||
hi def link pb_k_groups pbKeywords
|
||||
+hi def link pb_k_categories pbKeywords
|
||||
hi def link pb_k_makedepends pbKeywords
|
||||
hi def link pb_k_optdepends pbKeywords
|
||||
hi def link pb_k_ckdepends pbKeywords
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/alpm.h pacman-4.0.2/lib/libalpm/alpm.h
|
||||
--- pacman-4.0.2-orig//lib/libalpm/alpm.h 2012-02-07 05:09:10.000000000 +0100
|
||||
+++ pacman-4.0.2/lib/libalpm/alpm.h 2012-03-20 13:22:57.000000000 +0100
|
||||
@@ -181,6 +181,14 @@
|
||||
alpm_list_t *packages;
|
||||
} alpm_group_t;
|
||||
|
||||
+/** Package category */
|
||||
+typedef struct _alpm_category_t {
|
||||
+ /** category name */
|
||||
+ char *name;
|
||||
+ /** list of alpm_pkg_t packages */
|
||||
+ alpm_list_t *packages;
|
||||
+} alpm_category_t;
|
||||
+
|
||||
/** Package upgrade delta */
|
||||
typedef struct _alpm_delta_t {
|
||||
/** filename of the delta patch */
|
||||
@@ -643,6 +651,19 @@
|
||||
*/
|
||||
alpm_list_t *alpm_db_get_groupcache(alpm_db_t *db);
|
||||
|
||||
+/** Get a category entry from a package database.
|
||||
+ * @param db pointer to the package database to get the category from
|
||||
+ * @param name of the category
|
||||
+ * @return the categories entry on success, NULL on error
|
||||
+ */
|
||||
+alpm_category_t *alpm_db_readcategory(alpm_db_t *db, const char *name);
|
||||
+
|
||||
+/** Get the category cache of a package database.
|
||||
+ * @param db pointer to the package database to get the category from
|
||||
+ * @return the list of categories on success, NULL on error
|
||||
+ */
|
||||
+alpm_list_t *alpm_db_get_categorycache(alpm_db_t *db);
|
||||
+
|
||||
/** Searches a database with regular expressions.
|
||||
* @param db pointer to the package database to search in
|
||||
* @param needles a list of regular expressions to search for
|
||||
@@ -819,6 +840,12 @@
|
||||
*/
|
||||
alpm_list_t *alpm_pkg_get_groups(alpm_pkg_t *pkg);
|
||||
|
||||
+/** Returns the list of package categories.
|
||||
+ * @param pkg a pointer to package
|
||||
+ * @return a pointer to an internal list of strings.
|
||||
+ */
|
||||
+alpm_list_t *alpm_pkg_get_categories(alpm_pkg_t *pkg);
|
||||
+
|
||||
/** Returns the list of package dependencies as alpm_depend_t.
|
||||
* @param pkg a pointer to package
|
||||
* @return a reference to an internal list of alpm_depend_t structures.
|
||||
@@ -948,6 +975,12 @@
|
||||
alpm_list_t *alpm_find_group_pkgs(alpm_list_t *dbs, const char *name);
|
||||
|
||||
/*
|
||||
+ * Categories
|
||||
+ */
|
||||
+
|
||||
+alpm_list_t *alpm_find_category_pkgs(alpm_list_t *dbs, const char *name);
|
||||
+
|
||||
+/*
|
||||
* Sync
|
||||
*/
|
||||
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/be_local.c pacman-4.0.2/lib/libalpm/be_local.c
|
||||
--- pacman-4.0.2-orig//lib/libalpm/be_local.c 2011-10-12 21:04:25.000000000 +0200
|
||||
+++ pacman-4.0.2/lib/libalpm/be_local.c 2012-03-20 13:34:44.000000000 +0100
|
||||
@@ -117,6 +117,12 @@
|
||||
return pkg->groups;
|
||||
}
|
||||
|
||||
+static alpm_list_t *_cache_get_categories(alpm_pkg_t *pkg)
|
||||
+{
|
||||
+ LAZY_LOAD(INFRQ_DESC, NULL);
|
||||
+ return pkg->categories;
|
||||
+}
|
||||
+
|
||||
static int _cache_has_scriptlet(alpm_pkg_t *pkg)
|
||||
{
|
||||
LAZY_LOAD(INFRQ_SCRIPTLET, NULL);
|
||||
@@ -229,6 +235,7 @@
|
||||
.has_scriptlet = _cache_has_scriptlet,
|
||||
.get_licenses = _cache_get_licenses,
|
||||
.get_groups = _cache_get_groups,
|
||||
+ .get_categories = _cache_get_categories,
|
||||
.get_depends = _cache_get_depends,
|
||||
.get_optdepends = _cache_get_optdepends,
|
||||
.get_conflicts = _cache_get_conflicts,
|
||||
@@ -589,6 +596,8 @@
|
||||
READ_AND_STORE(info->desc);
|
||||
} else if(strcmp(line, "%GROUPS%") == 0) {
|
||||
READ_AND_STORE_ALL(info->groups);
|
||||
+ } else if(strcmp(line, "%CATEGORIES%") == 0) {
|
||||
+ READ_AND_STORE_ALL(info->categories);
|
||||
} else if(strcmp(line, "%URL%") == 0) {
|
||||
READ_AND_STORE(info->url);
|
||||
} else if(strcmp(line, "%LICENSE%") == 0) {
|
||||
@@ -768,6 +777,13 @@
|
||||
}
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
+ if(info->categories) {
|
||||
+ fputs("%CATEGORIES%\n", fp);
|
||||
+ for(lp = info->categories; lp; lp = lp->next) {
|
||||
+ fprintf(fp, "%s\n", (char *)lp->data);
|
||||
+ }
|
||||
+ fprintf(fp, "\n");
|
||||
+ }
|
||||
if(info->replaces) {
|
||||
fputs("%REPLACES%\n", fp);
|
||||
for(lp = info->replaces; lp; lp = lp->next) {
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/be_package.c pacman-4.0.2/lib/libalpm/be_package.c
|
||||
--- pacman-4.0.2-orig//lib/libalpm/be_package.c 2011-10-27 21:39:40.000000000 +0200
|
||||
+++ pacman-4.0.2/lib/libalpm/be_package.c 2012-03-20 13:27:58.000000000 +0100
|
||||
@@ -175,6 +175,8 @@
|
||||
STRDUP(newpkg->desc, ptr, return -1);
|
||||
} else if(strcmp(key, "group") == 0) {
|
||||
newpkg->groups = alpm_list_add(newpkg->groups, strdup(ptr));
|
||||
+ } else if(strcmp(key, "category") == 0) {
|
||||
+ newpkg->categories = alpm_list_add(newpkg->categories, strdup(ptr));
|
||||
} else if(strcmp(key, "url") == 0) {
|
||||
STRDUP(newpkg->url, ptr, return -1);
|
||||
} else if(strcmp(key, "license") == 0) {
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/be_sync.c pacman-4.0.2/lib/libalpm/be_sync.c
|
||||
--- pacman-4.0.2-orig//lib/libalpm/be_sync.c 2011-10-27 21:39:31.000000000 +0200
|
||||
+++ pacman-4.0.2/lib/libalpm/be_sync.c 2012-03-20 13:27:18.000000000 +0100
|
||||
@@ -567,6 +567,8 @@
|
||||
READ_AND_STORE(pkg->desc);
|
||||
} else if(strcmp(line, "%GROUPS%") == 0) {
|
||||
READ_AND_STORE_ALL(pkg->groups);
|
||||
+ } else if(strcmp(line, "%CATEGORIES%") == 0) {
|
||||
+ READ_AND_STORE_ALL(pkg->categories);
|
||||
} else if(strcmp(line, "%URL%") == 0) {
|
||||
READ_AND_STORE(pkg->url);
|
||||
} else if(strcmp(line, "%LICENSE%") == 0) {
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/category.c pacman-4.0.2/lib/libalpm/category.c
|
||||
--- pacman-4.0.2-orig//lib/libalpm/category.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ pacman-4.0.2/lib/libalpm/category.c 2012-03-20 09:56:30.000000000 +0100
|
||||
@@ -0,0 +1,52 @@
|
||||
+/*
|
||||
+ * category.c
|
||||
+ *
|
||||
+ * Copyright (c) 2012 Chakra Linux
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include "config.h"
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+/* libalpm */
|
||||
+#include "category.h"
|
||||
+#include "alpm_list.h"
|
||||
+#include "util.h"
|
||||
+#include "log.h"
|
||||
+#include "alpm.h"
|
||||
+
|
||||
+alpm_category_t *_alpm_category_new(const char *name)
|
||||
+{
|
||||
+ alpm_category_t* ctgr;
|
||||
+
|
||||
+ CALLOC(ctgr, 1, sizeof(alpm_category_t), return NULL);
|
||||
+ STRDUP(ctgr->name, name, free(ctgr); return NULL);
|
||||
+
|
||||
+ return ctgr;
|
||||
+}
|
||||
+
|
||||
+void _alpm_category_free(alpm_category_t *ctgr)
|
||||
+{
|
||||
+ if(ctgr == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ FREE(ctgr->name);
|
||||
+ /* do NOT free the contents of the list, just the nodes */
|
||||
+ alpm_list_free(ctgr->packages);
|
||||
+ FREE(ctgr);
|
||||
+}
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/category.h pacman-4.0.2/lib/libalpm/category.h
|
||||
--- pacman-4.0.2-orig//lib/libalpm/category.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ pacman-4.0.2/lib/libalpm/category.h 2012-03-20 09:58:23.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/*
|
||||
+ * category.h
|
||||
+ *
|
||||
+ * Copyright (c) 2012 Chakra Linux
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+#ifndef _ALPM_CATEGORY_H
|
||||
+#define _ALPM_CATEGORY_H
|
||||
+
|
||||
+#include "alpm.h"
|
||||
+
|
||||
+alpm_category_t *_alpm_category_new(const char *name);
|
||||
+void _alpm_category_free(alpm_category_t *ctgr);
|
||||
+
|
||||
+#endif /* _ALPM_CATEGORY_H */
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/db.c pacman-4.0.2/lib/libalpm/db.c
|
||||
--- pacman-4.0.2-orig//lib/libalpm/db.c 2011-12-29 21:23:11.000000000 +0100
|
||||
+++ pacman-4.0.2/lib/libalpm/db.c 2012-03-20 13:31:07.000000000 +0100
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "alpm.h"
|
||||
#include "package.h"
|
||||
#include "group.h"
|
||||
+#include "category.h"
|
||||
|
||||
/** \addtogroup alpm_databases Database Functions
|
||||
* @brief Functions to query and manipulate the database of libalpm
|
||||
@@ -282,6 +283,26 @@
|
||||
return _alpm_db_get_groupcache(db);
|
||||
}
|
||||
|
||||
+/** Get a category entry from a package database. */
|
||||
+alpm_category_t SYMEXPORT *alpm_db_readcategory(alpm_db_t *db, const char *name)
|
||||
+{
|
||||
+ ASSERT(db != NULL, return NULL);
|
||||
+ db->handle->pm_errno = 0;
|
||||
+ ASSERT(name != NULL && strlen(name) != 0,
|
||||
+ RET_ERR(db->handle, ALPM_ERR_WRONG_ARGS, NULL));
|
||||
+
|
||||
+ return _alpm_db_get_categoryfromcache(db, name);
|
||||
+}
|
||||
+
|
||||
+/** Get the category cache of a package database. */
|
||||
+alpm_list_t SYMEXPORT *alpm_db_get_categorycache(alpm_db_t *db)
|
||||
+{
|
||||
+ ASSERT(db != NULL, return NULL);
|
||||
+ db->handle->pm_errno = 0;
|
||||
+
|
||||
+ return _alpm_db_get_categorycache(db);
|
||||
+}
|
||||
+
|
||||
/** Searches a database. */
|
||||
alpm_list_t SYMEXPORT *alpm_db_search(alpm_db_t *db, const alpm_list_t* needles)
|
||||
{
|
||||
@@ -443,6 +464,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if(!matched) {
|
||||
+ /* check categories */
|
||||
+ for(k = alpm_pkg_get_categories(pkg); k; k = k->next) {
|
||||
+ if(regexec(®, k->data, 0, 0, 0) == 0) {
|
||||
+ matched = k->data;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if(matched != NULL) {
|
||||
_alpm_log(db->handle, ALPM_LOG_DEBUG,
|
||||
@@ -499,6 +530,25 @@
|
||||
db->status &= ~DB_STATUS_GRPCACHE;
|
||||
}
|
||||
|
||||
+static void free_categorycache(alpm_db_t *db)
|
||||
+{
|
||||
+ alpm_list_t *lg;
|
||||
+
|
||||
+ if(db == NULL || !(db->status & DB_STATUS_CTGRCACHE)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ _alpm_log(db->handle, ALPM_LOG_DEBUG,
|
||||
+ "freeing category cache for repository '%s'\n", db->treename);
|
||||
+
|
||||
+ for(lg = db->ctgrcache; lg; lg = lg->next) {
|
||||
+ _alpm_category_free(lg->data);
|
||||
+ lg->data = NULL;
|
||||
+ }
|
||||
+ FREELIST(db->ctgrcache);
|
||||
+ db->status &= ~DB_STATUS_CTGRCACHE;
|
||||
+}
|
||||
+
|
||||
void _alpm_db_free_pkgcache(alpm_db_t *db)
|
||||
{
|
||||
if(db == NULL || !(db->status & DB_STATUS_PKGCACHE)) {
|
||||
@@ -516,6 +566,7 @@
|
||||
db->status &= ~DB_STATUS_PKGCACHE;
|
||||
|
||||
free_groupcache(db);
|
||||
+ free_categorycache(db);
|
||||
}
|
||||
|
||||
alpm_pkghash_t *_alpm_db_get_pkgcache_hash(alpm_db_t *db)
|
||||
@@ -564,6 +615,7 @@
|
||||
db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg);
|
||||
|
||||
free_groupcache(db);
|
||||
+ free_categorycache(db);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -590,6 +642,7 @@
|
||||
_alpm_pkg_free(data);
|
||||
|
||||
free_groupcache(db);
|
||||
+ free_categorycache(db);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -696,4 +749,92 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+/* Returns a new category cache from db.
|
||||
+ */
|
||||
+static int load_ctgrcache(alpm_db_t *db)
|
||||
+{
|
||||
+ alpm_list_t *lp;
|
||||
+
|
||||
+ if(db == NULL) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ _alpm_log(db->handle, ALPM_LOG_DEBUG, "loading category cache for repository '%s'\n",
|
||||
+ db->treename);
|
||||
+
|
||||
+ for(lp = _alpm_db_get_pkgcache(db); lp; lp = lp->next) {
|
||||
+ const alpm_list_t *i;
|
||||
+ alpm_pkg_t *pkg = lp->data;
|
||||
+
|
||||
+ for(i = alpm_pkg_get_categories(pkg); i; i = i->next) {
|
||||
+ const char *ctgrname = i->data;
|
||||
+ alpm_list_t *j;
|
||||
+ alpm_category_t *ctgr = NULL;
|
||||
+ int found = 0;
|
||||
+
|
||||
+ /* first look through the category cache for a category with this name */
|
||||
+ for(j = db->ctgrcache; j; j = j->next) {
|
||||
+ ctgr = j->data;
|
||||
+
|
||||
+ if(strcmp(ctgr->name, ctgrname) == 0
|
||||
+ && !alpm_list_find_ptr(ctgr->packages, pkg)) {
|
||||
+ ctgr->packages = alpm_list_add(ctgr->packages, pkg);
|
||||
+ found = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if(found) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ /* we didn't find the category, so create a new one with this name */
|
||||
+ ctgr = _alpm_category_new(ctgrname);
|
||||
+ if(!ctgr) {
|
||||
+ free_categorycache(db);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ ctgr->packages = alpm_list_add(ctgr->packages, pkg);
|
||||
+ db->ctgrcache = alpm_list_add(db->ctgrcache, ctgr);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ db->status |= DB_STATUS_CTGRCACHE;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+alpm_list_t *_alpm_db_get_categorycache(alpm_db_t *db)
|
||||
+{
|
||||
+ if(db == NULL) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if(!(db->status & DB_STATUS_VALID)) {
|
||||
+ RET_ERR(db->handle, ALPM_ERR_DB_INVALID, NULL);
|
||||
+ }
|
||||
+
|
||||
+ if(!(db->status & DB_STATUS_CTGRCACHE)) {
|
||||
+ load_ctgrcache(db);
|
||||
+ }
|
||||
+
|
||||
+ return db->ctgrcache;
|
||||
+}
|
||||
+
|
||||
+alpm_category_t *_alpm_db_get_categoryfromcache(alpm_db_t *db, const char *target)
|
||||
+{
|
||||
+ alpm_list_t *i;
|
||||
+
|
||||
+ if(db == NULL || target == NULL || strlen(target) == 0) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ for(i = _alpm_db_get_categorycache(db); i; i = i->next) {
|
||||
+ alpm_category_t *info = i->data;
|
||||
+
|
||||
+ if(strcmp(info->name, target) == 0) {
|
||||
+ return info;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
/* vim: set ts=2 sw=2 noet: */
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/db.h pacman-4.0.2/lib/libalpm/db.h
|
||||
--- pacman-4.0.2-orig//lib/libalpm/db.h 2011-10-12 21:04:25.000000000 +0200
|
||||
+++ pacman-4.0.2/lib/libalpm/db.h 2012-03-20 13:33:05.000000000 +0100
|
||||
@@ -53,7 +53,8 @@
|
||||
|
||||
DB_STATUS_LOCAL = (1 << 10),
|
||||
DB_STATUS_PKGCACHE = (1 << 11),
|
||||
- DB_STATUS_GRPCACHE = (1 << 12)
|
||||
+ DB_STATUS_GRPCACHE = (1 << 12),
|
||||
+ DB_STATUS_CTGRCACHE = (1 << 13)
|
||||
};
|
||||
|
||||
struct db_operations {
|
||||
@@ -70,6 +71,7 @@
|
||||
char *_path;
|
||||
alpm_pkghash_t *pkgcache;
|
||||
alpm_list_t *grpcache;
|
||||
+ alpm_list_t *ctgrcache;
|
||||
alpm_list_t *servers;
|
||||
struct db_operations *ops;
|
||||
/* flags determining validity, local, loaded caches, etc. */
|
||||
@@ -106,6 +108,9 @@
|
||||
/* groups */
|
||||
alpm_list_t *_alpm_db_get_groupcache(alpm_db_t *db);
|
||||
alpm_group_t *_alpm_db_get_groupfromcache(alpm_db_t *db, const char *target);
|
||||
+/* categories */
|
||||
+alpm_list_t *_alpm_db_get_categorycache(alpm_db_t *db);
|
||||
+alpm_category_t *_alpm_db_get_categoryfromcache(alpm_db_t *db, const char *target);
|
||||
|
||||
#endif /* _ALPM_DB_H */
|
||||
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/Makefile.am pacman-4.0.2/lib/libalpm/Makefile.am
|
||||
--- pacman-4.0.2-orig//lib/libalpm/Makefile.am 2011-10-12 21:04:25.000000000 +0200
|
||||
+++ pacman-4.0.2/lib/libalpm/Makefile.am 2012-03-20 13:28:28.000000000 +0100
|
||||
@@ -37,6 +37,7 @@
|
||||
error.c \
|
||||
graph.h graph.c \
|
||||
group.h group.c \
|
||||
+ category.h category.c \
|
||||
handle.h handle.c \
|
||||
log.h log.c \
|
||||
package.h package.c \
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/Makefile.in pacman-4.0.2/lib/libalpm/Makefile.in
|
||||
--- pacman-4.0.2-orig//lib/libalpm/Makefile.in 2012-02-11 22:25:16.000000000 +0100
|
||||
+++ pacman-4.0.2/lib/libalpm/Makefile.in 2012-03-20 13:24:36.000000000 +0100
|
||||
@@ -103,14 +103,14 @@
|
||||
package.h package.c pkghash.h pkghash.c rawstr.c remove.h \
|
||||
remove.c signing.c signing.h sync.h sync.c trans.h trans.c \
|
||||
util.h util.c version.c md5.h md5.c sha2.h sha2.c base64.h \
|
||||
- base64.c
|
||||
+ base64.c category.h category.c
|
||||
@HAVE_LIBSSL_FALSE@am__objects_1 = md5.lo sha2.lo
|
||||
@HAVE_LIBGPGME_TRUE@am__objects_2 = base64.lo
|
||||
am_libalpm_la_OBJECTS = add.lo alpm.lo alpm_list.lo backup.lo \
|
||||
be_local.lo be_package.lo be_sync.lo conflict.lo db.lo \
|
||||
delta.lo deps.lo diskspace.lo dload.lo error.lo graph.lo \
|
||||
group.lo handle.lo log.lo package.lo pkghash.lo rawstr.lo \
|
||||
- remove.lo signing.lo sync.lo trans.lo util.lo version.lo \
|
||||
+ remove.lo signing.lo sync.lo trans.lo util.lo version.lo category.lo \
|
||||
$(am__objects_1) $(am__objects_2)
|
||||
libalpm_la_OBJECTS = $(am_libalpm_la_OBJECTS)
|
||||
libalpm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
@@ -343,7 +343,7 @@
|
||||
group.c handle.h handle.c log.h log.c package.h package.c \
|
||||
pkghash.h pkghash.c rawstr.c remove.h remove.c signing.c \
|
||||
signing.h sync.h sync.c trans.h trans.c util.h util.c \
|
||||
- version.c $(am__append_4) $(am__append_5)
|
||||
+ version.c category.h category.c $(am__append_4) $(am__append_5)
|
||||
libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO) @LIBCURL@
|
||||
libalpm_la_LIBADD = $(LTLIBINTL)
|
||||
all: all-recursive
|
||||
@@ -437,6 +437,7 @@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group.Plo@am__quote@
|
||||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/category.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handle.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/package.c pacman-4.0.2/lib/libalpm/package.c
|
||||
--- pacman-4.0.2-orig//lib/libalpm/package.c 2011-11-15 15:40:23.000000000 +0100
|
||||
+++ pacman-4.0.2/lib/libalpm/package.c 2012-03-20 13:00:24.000000000 +0100
|
||||
@@ -97,6 +97,7 @@
|
||||
|
||||
static alpm_list_t *_pkg_get_licenses(alpm_pkg_t *pkg) { return pkg->licenses; }
|
||||
static alpm_list_t *_pkg_get_groups(alpm_pkg_t *pkg) { return pkg->groups; }
|
||||
+static alpm_list_t *_pkg_get_categories(alpm_pkg_t *pkg) { return pkg->categories; }
|
||||
static alpm_list_t *_pkg_get_depends(alpm_pkg_t *pkg) { return pkg->depends; }
|
||||
static alpm_list_t *_pkg_get_optdepends(alpm_pkg_t *pkg) { return pkg->optdepends; }
|
||||
static alpm_list_t *_pkg_get_conflicts(alpm_pkg_t *pkg) { return pkg->conflicts; }
|
||||
@@ -140,6 +141,7 @@
|
||||
|
||||
.get_licenses = _pkg_get_licenses,
|
||||
.get_groups = _pkg_get_groups,
|
||||
+ .get_categories = _pkg_get_categories,
|
||||
.get_depends = _pkg_get_depends,
|
||||
.get_optdepends = _pkg_get_optdepends,
|
||||
.get_conflicts = _pkg_get_conflicts,
|
||||
@@ -284,6 +286,13 @@
|
||||
return pkg->ops->get_groups(pkg);
|
||||
}
|
||||
|
||||
+alpm_list_t SYMEXPORT *alpm_pkg_get_categories(alpm_pkg_t *pkg)
|
||||
+{
|
||||
+ ASSERT(pkg != NULL, return NULL);
|
||||
+ pkg->handle->pm_errno = 0;
|
||||
+ return pkg->ops->get_categories(pkg);
|
||||
+}
|
||||
+
|
||||
alpm_list_t SYMEXPORT *alpm_pkg_get_depends(alpm_pkg_t *pkg)
|
||||
{
|
||||
ASSERT(pkg != NULL, return NULL);
|
||||
@@ -512,8 +521,11 @@
|
||||
for(i = pkg->replaces; i; i = i->next) {
|
||||
newpkg->replaces = alpm_list_add(newpkg->replaces, _alpm_dep_dup(i->data));
|
||||
}
|
||||
+
|
||||
newpkg->groups = alpm_list_strdup(pkg->groups);
|
||||
- if(pkg->files.count) {
|
||||
+ newpkg->categories = alpm_list_strdup(pkg->categories);
|
||||
+
|
||||
+ if(pkg->files.count) {
|
||||
size_t filenum;
|
||||
size_t len = sizeof(alpm_file_t) * pkg->files.count;
|
||||
MALLOC(newpkg->files.files, len, goto cleanup);
|
||||
@@ -582,6 +594,7 @@
|
||||
alpm_list_free_inner(pkg->replaces, (alpm_list_fn_free)_alpm_dep_free);
|
||||
alpm_list_free(pkg->replaces);
|
||||
FREELIST(pkg->groups);
|
||||
+ FREELIST(pkg->categories);
|
||||
if(pkg->files.count) {
|
||||
size_t i;
|
||||
for(i = 0; i < pkg->files.count; i++) {
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/package.h pacman-4.0.2/lib/libalpm/package.h
|
||||
--- pacman-4.0.2-orig//lib/libalpm/package.h 2011-10-12 21:04:25.000000000 +0200
|
||||
+++ pacman-4.0.2/lib/libalpm/package.h 2012-03-20 13:26:25.000000000 +0100
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
alpm_list_t *(*get_licenses) (alpm_pkg_t *);
|
||||
alpm_list_t *(*get_groups) (alpm_pkg_t *);
|
||||
+ alpm_list_t *(*get_categories) (alpm_pkg_t *);
|
||||
alpm_list_t *(*get_depends) (alpm_pkg_t *);
|
||||
alpm_list_t *(*get_optdepends) (alpm_pkg_t *);
|
||||
alpm_list_t *(*get_conflicts) (alpm_pkg_t *);
|
||||
@@ -112,6 +113,7 @@
|
||||
alpm_list_t *licenses;
|
||||
alpm_list_t *replaces;
|
||||
alpm_list_t *groups;
|
||||
+ alpm_list_t *categories;
|
||||
alpm_list_t *backup;
|
||||
alpm_list_t *depends;
|
||||
alpm_list_t *optdepends;
|
||||
diff -Naur pacman-4.0.2-orig//lib/libalpm/sync.c pacman-4.0.2/lib/libalpm/sync.c
|
||||
--- pacman-4.0.2-orig//lib/libalpm/sync.c 2011-11-15 16:06:32.000000000 +0100
|
||||
+++ pacman-4.0.2/lib/libalpm/sync.c 2012-03-20 13:35:28.000000000 +0100
|
||||
@@ -278,6 +278,48 @@
|
||||
return pkgs;
|
||||
}
|
||||
|
||||
+/** Find category members across a list of databases.
|
||||
+ * If a member exists in several databases, only the first database is used.
|
||||
+ * IgnorePkg is also handled.
|
||||
+ * @param dbs the list of alpm_db_t *
|
||||
+ * @param name the name of the category
|
||||
+ * @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free)
|
||||
+ */
|
||||
+alpm_list_t SYMEXPORT *alpm_find_category_pkgs(alpm_list_t *dbs,
|
||||
+ const char *name)
|
||||
+{
|
||||
+ alpm_list_t *i, *j, *pkgs = NULL, *ignorelist = NULL;
|
||||
+
|
||||
+ for(i = dbs; i; i = i->next) {
|
||||
+ alpm_db_t *db = i->data;
|
||||
+ alpm_category_t *ctgr = alpm_db_readcategory(db, name);
|
||||
+
|
||||
+ if(!ctgr)
|
||||
+ continue;
|
||||
+
|
||||
+ for(j = ctgr->packages; j; j = j->next) {
|
||||
+ alpm_pkg_t *pkg = j->data;
|
||||
+
|
||||
+ if(_alpm_pkg_find(ignorelist, pkg->name)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ if(_alpm_pkg_should_ignore(db->handle, pkg)) {
|
||||
+ ignorelist = alpm_list_add(ignorelist, pkg);
|
||||
+ int install = 0;
|
||||
+ QUESTION(db->handle, ALPM_QUESTION_INSTALL_IGNOREPKG, pkg,
|
||||
+ NULL, NULL, &install);
|
||||
+ if(!install)
|
||||
+ continue;
|
||||
+ }
|
||||
+ if(!_alpm_pkg_find(pkgs, pkg->name)) {
|
||||
+ pkgs = alpm_list_add(pkgs, pkg);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ alpm_list_free(ignorelist);
|
||||
+ return pkgs;
|
||||
+}
|
||||
+
|
||||
/** Compute the size of the files that will be downloaded to install a
|
||||
* package.
|
||||
* @param newpkg the new package to upgrade to
|
||||
diff -Naur pacman-4.0.2-orig//scripts/makepkg.sh.in pacman-4.0.2/scripts/makepkg.sh.in
|
||||
--- pacman-4.0.2-orig//scripts/makepkg.sh.in 2012-02-11 21:53:33.000000000 +0100
|
||||
+++ pacman-4.0.2/scripts/makepkg.sh.in 2012-03-20 12:55:50.000000000 +0100
|
||||
@@ -45,7 +45,7 @@
|
||||
packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge' 'upx')
|
||||
other_options=('ccache' 'distcc' 'buildflags' 'makeflags')
|
||||
splitpkg_overrides=('pkgver' 'pkgrel' 'epoch' 'pkgdesc' 'arch' 'license' \
|
||||
- 'groups' 'depends' 'optdepends' 'provides' 'conflicts' \
|
||||
+ 'groups' 'categories' 'depends' 'optdepends' 'provides' 'conflicts' \
|
||||
'replaces' 'backup' 'options' 'install' 'changelog')
|
||||
readonly -a packaging_options other_options splitpkg_overrides
|
||||
|
||||
@@ -1135,6 +1135,7 @@
|
||||
[[ $license ]] && printf "license = %s\n" "${license[@]}"
|
||||
[[ $replaces ]] && printf "replaces = %s\n" "${replaces[@]}"
|
||||
[[ $groups ]] && printf "group = %s\n" "${groups[@]}"
|
||||
+ [[ $categories ]] && printf "category = %s\n" "${categories[@]}"
|
||||
[[ $optdepends ]] && printf "optdepend = %s\n" "${optdepends[@]//+([[:space:]])/ }"
|
||||
[[ $conflicts ]] && printf "conflict = %s\n" "${conflicts[@]}"
|
||||
[[ $backup ]] && printf "backup = %s\n" "${backup[@]}"
|
||||
@@ -2094,7 +2095,7 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
-unset pkgname pkgbase pkgver pkgrel epoch pkgdesc url license groups provides
|
||||
+unset pkgname pkgbase pkgver pkgrel epoch pkgdesc url license groups categories provides
|
||||
unset md5sums replaces depends conflicts backup source install changelog build
|
||||
unset makedepends optdepends options noextract
|
||||
|
||||
diff -Naur pacman-4.0.2-orig//scripts/repo-add.sh.in pacman-4.0.2/scripts/repo-add.sh.in
|
||||
--- pacman-4.0.2-orig//scripts/repo-add.sh.in 2012-01-31 04:27:53.000000000 +0100
|
||||
+++ pacman-4.0.2/scripts/repo-add.sh.in 2012-03-20 12:54:28.000000000 +0100
|
||||
@@ -251,7 +251,7 @@
|
||||
db_write_entry() {
|
||||
# blank out all variables
|
||||
local pkgfile="$1"
|
||||
- local -a _groups _licenses _replaces _depends _conflicts _provides _optdepends
|
||||
+ local -a _groups _categories _licenses _replaces _depends _conflicts _provides _optdepends
|
||||
local pkgname pkgver pkgdesc csize size url arch builddate packager \
|
||||
md5sum sha256sum pgpsig pgpsigsize
|
||||
|
||||
@@ -265,6 +265,7 @@
|
||||
declare "$var=${val//+([[:space:]])/ }"
|
||||
case "$var" in
|
||||
group) _groups+=("$group") ;;
|
||||
+ category) _categories+=("$category") ;;
|
||||
license) _licenses+=("$license") ;;
|
||||
replaces) _replaces+=("$replaces") ;;
|
||||
depend) _depends+=("$depend") ;;
|
||||
@@ -332,6 +333,7 @@
|
||||
format_entry "VERSION" "$pkgver"
|
||||
format_entry "DESC" "$pkgdesc"
|
||||
format_entry "GROUPS" "${_groups[@]}"
|
||||
+ format_entry "CATEGORIES" "${_categories[@]}"
|
||||
format_entry "CSIZE" "$csize"
|
||||
format_entry "ISIZE" "$size"
|
||||
|
||||
diff -Naur pacman-4.0.2-orig//src/pacman/conf.h pacman-4.0.2/src/pacman/conf.h
|
||||
--- pacman-4.0.2-orig//src/pacman/conf.h 2011-10-12 21:04:25.000000000 +0200
|
||||
+++ pacman-4.0.2/src/pacman/conf.h 2012-03-20 12:58:02.000000000 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
unsigned short op_s_upgrade;
|
||||
|
||||
unsigned short group;
|
||||
+ unsigned short category;
|
||||
unsigned short noask;
|
||||
unsigned int ask;
|
||||
alpm_transflag_t flags;
|
||||
diff -Naur pacman-4.0.2-orig//src/pacman/package.c pacman-4.0.2/src/pacman/package.c
|
||||
--- pacman-4.0.2-orig//src/pacman/package.c 2012-02-03 00:18:52.000000000 +0100
|
||||
+++ pacman-4.0.2/src/pacman/package.c 2012-03-20 12:57:01.000000000 +0100
|
||||
@@ -110,6 +110,7 @@
|
||||
string_display(_("URL :"), alpm_pkg_get_url(pkg));
|
||||
list_display(_("Licenses :"), alpm_pkg_get_licenses(pkg));
|
||||
list_display(_("Groups :"), alpm_pkg_get_groups(pkg));
|
||||
+ list_display(_("Categories :"), alpm_pkg_get_categories(pkg));
|
||||
deplist_display(_("Provides :"), alpm_pkg_get_provides(pkg));
|
||||
deplist_display(_("Depends On :"), alpm_pkg_get_depends(pkg));
|
||||
list_display_linebreak(_("Optional Deps :"), alpm_pkg_get_optdepends(pkg));
|
@ -3,36 +3,54 @@
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
|
||||
[options]
|
||||
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
HoldPkg = pacman glibc pacman-helpme
|
||||
# If upgrades are available for these packages they will be asked for first
|
||||
SyncFirst = pacman-helpme pacman
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#XferCommand = /usr/bin/curl -C - %u > %o
|
||||
#CleanMethod = KeepInstalled
|
||||
#UseDelta = 0.7
|
||||
Architecture = auto
|
||||
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
|
||||
# Misc options (all disabled by default)
|
||||
|
||||
#UseSyslog
|
||||
#ShowSize
|
||||
#UseDelta
|
||||
#Color
|
||||
#TotalDownload
|
||||
CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
|
||||
SigLevel = Never
|
||||
LocalFileSigLevel = Never
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
@ -53,12 +71,8 @@ Architecture = auto
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
[lib32]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
@ -75,6 +89,10 @@ Include = /etc/pacman.d/mirrorlist
|
||||
[games]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[unstable]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
|
@ -1,89 +0,0 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
HoldPkg = pacman glibc pacman-helpme
|
||||
# If upgrades are available for these packages they will be asked for first
|
||||
SyncFirst = pacman-helpme pacman
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#XferCommand = /usr/bin/curl -C - %u > %o
|
||||
#CleanMethod = KeepInstalled
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options (all disabled by default)
|
||||
#UseSyslog
|
||||
#ShowSize
|
||||
#UseDelta
|
||||
#TotalDownload
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the lib32 repositories here.
|
||||
#[lib32-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[lib32]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[platform]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[desktop]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[apps]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[games]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#Server = file:///home/custompkgs
|
@ -1,21 +1,29 @@
|
||||
#!/bin/sh
|
||||
# tputcolors
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade() {
|
||||
# one time stuff for md5sum issue with older pacman versions
|
||||
if [ "$(vercmp $2 3.0.2)" -lt 0 ]; then
|
||||
_resetbackups
|
||||
fi
|
||||
# one time stuff for md5sum issue with older pacman versions
|
||||
if [ "$(vercmp $2 3.0.2)" -lt 0 ]; then
|
||||
_resetbackups
|
||||
fi
|
||||
if [ "$(vercmp $2 3.5.0)" -lt 0 ]; then
|
||||
_warnupgrade
|
||||
fi
|
||||
}
|
||||
|
||||
_warnupgrade() {
|
||||
echo ">>> The pacman database format has changed as of pacman 3.5.0."
|
||||
echo ">>> You will need to run \`pacman-db-upgrade\` as root."
|
||||
echo ">>>"
|
||||
}
|
||||
|
||||
_resetbackups() {
|
||||
echo ">>> Performing one-time reset of NoUpgrade md5sums. After this reset"
|
||||
echo ">>> you are able to remove all NoUpgrade lines of already protected"
|
||||
echo ">>> files from pacman.conf."
|
||||
echo ">>>"
|
||||
echo ">>> Performing one-time reset of NoUpgrade md5sums. After this reset"
|
||||
echo ">>> you are able to remove all NoUpgrade lines of already protected"
|
||||
echo ">>> files from pacman.conf."
|
||||
echo ">>>"
|
||||
|
||||
# path variables
|
||||
# path variables
|
||||
pacconf="/etc/pacman.conf"
|
||||
dbpath="/var/lib/pacman/local"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user