summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS13
-rw-r--r--TRANSLATORS6
-rw-r--r--lib/libalpm/be_files.c4
-rw-r--r--lib/libalpm/conflict.c14
-rw-r--r--lib/libalpm/package.c7
-rw-r--r--lib/libalpm/po/LINGUAS6
-rw-r--r--lib/libalpm/po/cs.po (renamed from lib/libalpm/po/cs_CZ.po)0
-rw-r--r--lib/libalpm/po/pl.po (renamed from lib/libalpm/po/pl_PL.po)0
-rw-r--r--lib/libalpm/po/ru.po (renamed from lib/libalpm/po/ru_RU.po)0
-rwxr-xr-xpactest/pmdb.py1
-rw-r--r--pactest/tests/upgrade011.py16
-rw-r--r--pactest/tests/upgrade040.py1
-rw-r--r--pactest/tests/upgrade041.py3
-rw-r--r--pactest/tests/upgrade046.py31
-rw-r--r--po/LINGUAS6
-rw-r--r--po/cs.po (renamed from po/cs_CZ.po)0
-rw-r--r--po/pl.po (renamed from po/pl_PL.po)0
-rw-r--r--po/ru.po (renamed from po/ru_RU.po)0
-rw-r--r--scripts/makepkg.sh.in6
-rw-r--r--src/pacman/pacman.c16
20 files changed, 100 insertions, 30 deletions
diff --git a/NEWS b/NEWS
index 71f56f5b..451cd519 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,18 @@
VERSION DESCRIPTION
-----------------------------------------------------------------------------
+3.1.2 - updates to proto.install, add ChangeLog.proto (FS#7231)
+ - add 'force' option to packages, and have repo-add respect it
+ - mark gensync and updatesync as deprecated
+ - fix pacman -Qo behavior on symlinks (FS#9473)
+ - fix segfault on a broken symlinks in backup code (FS#9235)
+ - fix chk_fileconflicts brokenness, ensure it reads entire list
+ - minor documentation and message updates
+ - moved some translations to their more generic lang codes
+ - makepkg:
+ - check to ensure we have non-URL sources (FS#9208)
+ - ensure we strip binaries in /opt/ dirs (FS#9342)
+ - check for VCS executable before using (FS#9230)
+ - set sane umask before source extraction (FS#9242, FS#9362)
3.1.1 - fix versioned provisions handling- use '=' instead of ' ' which
differs from original spec but better in long run (FS#9171)
- rename query --orphans to --unrequired (FS#9144)
diff --git a/TRANSLATORS b/TRANSLATORS
index d9dea891..249665dd 100644
--- a/TRANSLATORS
+++ b/TRANSLATORS
@@ -12,7 +12,7 @@ your language to the mix.
* indicates the last active translator.
-Czech (cs_CZ):
+Czech (cs):
* Vojtěch Gondžala <vogo@seznam.cz>
German (de):
* Matthias Gorissen <matthias@archlinux.de>
@@ -30,7 +30,7 @@ Italian (it):
* Giovanni 'voidnull' Scafora <linuxmania@gmail.com>
Alessio 'mOLOk' Bolognino <themolok@gmail.com>
Lorenzo '^zanDarK' Masini <lorenxo86@gmail.com>
-Polish (pl_PL):
+Polish (pl):
* Mateusz Jędrasik <m.jedrasik@gmail.com>
Brazilian Portuguese (pt_BR):
* João Felipe Santos <joao.eel@gmail.com>
@@ -38,6 +38,6 @@ Brazilian Portuguese (pt_BR):
Hugo Doria <hugodoria@archlinux-br.org>
Lincoln de Sousa <lincoln@archlinux-br.org>
Leandro Inácio <leandro@archlinux-br.org>
-Russian (ru_RU):
+Russian (ru):
Vladimir Bayrakovskiy <4rayven@gmail.com>
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 724e3c8f..4cd0985e 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -297,10 +297,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
_alpm_strtrim(line);
if(!strcmp(line, "%FILENAME%")) {
- /* filename is _new_ - it provides the real name of the package, on the
- * server, to allow for us to not tie the name of the actual file to the
- * data of the package
- */
if(fgets(info->filename, sizeof(info->filename), fp) == NULL) {
goto error;
}
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index c093705a..3442902c 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -251,10 +251,7 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB)
alpm_list_t *ret = NULL;
alpm_list_t *pA = filesA, *pB = filesB;
- if(pB == NULL) {
- return(alpm_list_strdup(pA));
- }
-
+ /* if both filesA and filesB have entries, do this loop */
while(pA && pB) {
const char *strA = pA->data;
const char *strB = pB->data;
@@ -279,6 +276,15 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB)
}
}
}
+ /* ensure we have completely emptied pA */
+ while(pA) {
+ const char *strA = pA->data;
+ /* skip directories */
+ if(strA[strlen(strA)-1] != '/') {
+ ret = alpm_list_add(ret, strdup(strA));
+ }
+ pA = pA->next;
+ }
return(ret);
}
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 937ee3e0..363cf313 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -162,11 +162,12 @@ const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg)
ASSERT(handle != NULL, return(NULL));
ASSERT(pkg != NULL, return(NULL));
+ if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
+ _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
+ }
+
if(!strlen(pkg->filename)) {
/* construct the file name, it's not in the desc file */
- if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) {
- _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC);
- }
if(pkg->arch && strlen(pkg->arch) > 0) {
snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s-%s" PKGEXT,
pkg->name, pkg->version, pkg->arch);
diff --git a/lib/libalpm/po/LINGUAS b/lib/libalpm/po/LINGUAS
index bf816118..955e1fdb 100644
--- a/lib/libalpm/po/LINGUAS
+++ b/lib/libalpm/po/LINGUAS
@@ -1,11 +1,11 @@
# Set of available languages.
-cs_CZ
+cs
de
en_GB
es
fr
hu
it
-pl_PL
+pl
pt_BR
-ru_RU
+ru
diff --git a/lib/libalpm/po/cs_CZ.po b/lib/libalpm/po/cs.po
index 79931f00..79931f00 100644
--- a/lib/libalpm/po/cs_CZ.po
+++ b/lib/libalpm/po/cs.po
diff --git a/lib/libalpm/po/pl_PL.po b/lib/libalpm/po/pl.po
index 2126d6dd..2126d6dd 100644
--- a/lib/libalpm/po/pl_PL.po
+++ b/lib/libalpm/po/pl.po
diff --git a/lib/libalpm/po/ru_RU.po b/lib/libalpm/po/ru.po
index 57add381..57add381 100644
--- a/lib/libalpm/po/ru_RU.po
+++ b/lib/libalpm/po/ru.po
diff --git a/pactest/pmdb.py b/pactest/pmdb.py
index af392000..e0f328ef 100755
--- a/pactest/pmdb.py
+++ b/pactest/pmdb.py
@@ -261,6 +261,7 @@ class pmdb:
if pkg.reason:
data.append(_mksection("REASON", pkg.reason))
else:
+ data.append(_mksection("FILENAME", pkg.filename()))
if pkg.replaces:
data.append(_mksection("REPLACES", pkg.replaces))
if pkg.force:
diff --git a/pactest/tests/upgrade011.py b/pactest/tests/upgrade011.py
new file mode 100644
index 00000000..d8ed8734
--- /dev/null
+++ b/pactest/tests/upgrade011.py
@@ -0,0 +1,16 @@
+self.description = "Upgrade a package with a filesystem conflict"
+
+p = pmpkg("dummy", "2.0-1")
+p.files = ["bin/dummy", "usr/share/file"]
+self.addpkg(p)
+
+lp = pmpkg("dummy", "1.0-1")
+lp.files = ["bin/dummy"]
+self.addpkg2db("local", lp)
+
+self.filesystem = ["usr/share/file"]
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("PKG_VERSION=dummy|1.0-1")
diff --git a/pactest/tests/upgrade040.py b/pactest/tests/upgrade040.py
index bc40f337..e17c7176 100644
--- a/pactest/tests/upgrade040.py
+++ b/pactest/tests/upgrade040.py
@@ -27,4 +27,5 @@ for p in p1, p2:
self.addrule("PKG_EXIST=%s" % p.name)
self.addrule("FILE_MODIFIED=bin/dummy")
self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_EXIST=usr/share/file")
self.addrule("FILE_MODIFIED=usr/share/file")
diff --git a/pactest/tests/upgrade041.py b/pactest/tests/upgrade041.py
index 347c2c4b..20da4f14 100644
--- a/pactest/tests/upgrade041.py
+++ b/pactest/tests/upgrade041.py
@@ -4,7 +4,7 @@ lp1 = pmpkg("dummy")
lp1.files = ["bin/dummy"]
lp2 = pmpkg("foobar")
-lp2.files = ["bin/foobar"
+lp2.files = ["bin/foobar",
"usr/share/file"]
for p in lp1, lp2:
@@ -27,4 +27,5 @@ for p in p1, p2:
self.addrule("PKG_EXIST=%s" % p.name)
self.addrule("FILE_MODIFIED=bin/dummy")
self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_EXIST=usr/share/file")
self.addrule("FILE_MODIFIED=usr/share/file")
diff --git a/pactest/tests/upgrade046.py b/pactest/tests/upgrade046.py
new file mode 100644
index 00000000..60164b72
--- /dev/null
+++ b/pactest/tests/upgrade046.py
@@ -0,0 +1,31 @@
+self.description = "File relocation between two packages (reverse order, --force)"
+
+lp1 = pmpkg("dummy")
+lp1.files = ["bin/dummy"]
+
+lp2 = pmpkg("foobar")
+lp2.files = ["bin/foobar",
+ "usr/share/file"]
+
+for p in lp1, lp2:
+ self.addpkg2db("local", p)
+
+p1 = pmpkg("dummy")
+p1.files = ["bin/dummy",
+ "usr/share/file"]
+
+p2 = pmpkg("foobar")
+p2.files = ["bin/foobar"]
+
+for p in p1, p2:
+ self.addpkg(p)
+
+self.args = "-Uf %s" % " ".join([p.filename() for p in p1, p2])
+
+self.addrule("PACMAN_RETCODE=0")
+for p in p1, p2:
+ self.addrule("PKG_EXIST=%s" % p.name)
+self.addrule("FILE_MODIFIED=bin/dummy")
+self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_EXIST=usr/share/file")
+self.addrule("FILE_MODIFIED=usr/share/file")
diff --git a/po/LINGUAS b/po/LINGUAS
index bf816118..955e1fdb 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,11 +1,11 @@
# Set of available languages.
-cs_CZ
+cs
de
en_GB
es
fr
hu
it
-pl_PL
+pl
pt_BR
-ru_RU
+ru
diff --git a/po/cs_CZ.po b/po/cs.po
index ea047448..ea047448 100644
--- a/po/cs_CZ.po
+++ b/po/cs.po
diff --git a/po/pl_PL.po b/po/pl.po
index 09b27655..09b27655 100644
--- a/po/pl_PL.po
+++ b/po/pl.po
diff --git a/po/ru_RU.po b/po/ru.po
index ddb319c1..ddb319c1 100644
--- a/po/ru_RU.po
+++ b/po/ru.po
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index cecda1d2..090ba5df 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -675,9 +675,6 @@ run_build() {
msg "$(gettext "Starting build()...")"
cd "$srcdir"
- # ensure we have a sane umask set
- umask 0022
-
# ensure all necessary build variables are exported
export CFLAGS CXXFLAGS MAKEFLAGS CHOST
@@ -1417,6 +1414,9 @@ else
warning "$(gettext "pacman was not found in PATH; skipping dependency checks.")"
fi
+# ensure we have a sane umask set
+umask 0022
+
# get back to our src directory so we can begin with sources
mkdir -p "$srcdir"
cd "$srcdir"
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 27130254..377ea3fe 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -227,11 +227,11 @@ static void cleanup(int signum)
exit(signum);
}
-/** Sets all libalpm required paths in one go. Called after the command line and
- * inital config file parsing. Once this is complete, we can see if any paths were
- * defined. If a rootdir was defined and nothing else, we want all of our paths to
- * live under the rootdir that was specified. Safe to call multiple times (will only
- * do anything the first time).
+/** Sets all libalpm required paths in one go. Called after the command line
+ * and inital config file parsing. Once this is complete, we can see if any
+ * paths were defined. If a rootdir was defined and nothing else, we want all
+ * of our paths to live under the rootdir that was specified. Safe to call
+ * multiple times (will only do anything the first time).
*/
static void setlibpaths(void)
{
@@ -240,6 +240,8 @@ static void setlibpaths(void)
int ret = 0;
pm_printf(PM_LOG_DEBUG, "setlibpaths() called\n");
+ /* Configure root path first. If it is set and dbpath/logfile were not
+ * set, then set those as well to reside under the root. */
if(config->rootdir) {
char path[PATH_MAX];
ret = alpm_option_set_root(config->rootdir);
@@ -254,10 +256,12 @@ static void setlibpaths(void)
}
if(!config->logfile) {
snprintf(path, PATH_MAX, "%s%s", alpm_option_get_root(), LOGFILE);
- ret = alpm_option_set_dbpath(path);
config->logfile = strdup(path);
}
}
+ /* Set other paths if they were configured. Note that unless rootdir
+ * was left undefined, these two paths (dbpath and logfile) will have
+ * been set locally above, so the if cases below will now trigger. */
if(config->dbpath) {
ret = alpm_option_set_dbpath(config->dbpath);
if(ret != 0) {