Commit 6208a9a9 authored by Bernhard Link's avatar Bernhard Link

record new upstream branch created by importing reprepro_5.3.0.orig.tar.gz and merge it

parents 5e720852 d6b9eef4
2019-02-02 Bernhard R. Link <brlink@debian.org>
* handle a missing Binary field in a .changes file like an empty one.
(So not having one in a source only upload will be ignored,
while a missing one in a binary upload will complain about the
packages not listed in Binary: instead of complaining about not
having a Binary field).
2018-09-23 Bernhard R. Link <brlink@debian.org>
* check command no longer checks if the files
of existing packages are names as they are
expected to be named. (There was no way to
get them wrong apart editing the database and
checking it makes the code more complex).
2018-08-26 Bernhard R. Link <brlink@debian.org>
* mark .lz support as deprecated
......
Updates between 5.2.0 and 5.3.0:
- no Binary field in a .changes file is no longer an error
but handled like an empty Binary field. (Needed to still
accept source only .changes files by dpkg > 1.19.3).
Updates between 5.1.1 and 5.2.0:
- mark .lz support as deprecated
- add _listcodenames command
......
......@@ -443,8 +443,7 @@ static retvalue floodlist_trypackage(struct floodlist *list, struct package *pac
return RET_ERROR_OOM;
}
r = list->target->getinstalldata(list->target,
new->name, new->new_version,
architecture_all, package->control,
package,
&new->new_control, &new->new_filekeys,
&new->new_origfiles);
if (RET_WAS_ERROR(r)) {
......@@ -525,8 +524,7 @@ static retvalue floodlist_trypackage(struct floodlist *list, struct package *pac
return RET_ERROR_OOM;
r = list->target->getinstalldata(list->target,
package->name, package->version,
architecture_all, package->control,
package,
&control, &files, &origfiles);
if (RET_WAS_ERROR(r)) {
free(new_version);
......@@ -634,7 +632,7 @@ static retvalue floodlist_install(struct floodlist *list, struct logger *logger,
logger, pkg->name, pkg->new_version,
pkg->new_control, &pkg->new_filekeys,
false, td, architecture_all,
NULL, NULL, NULL);
NULL, NULL);
RET_UPDATE(result, r);
if (RET_WAS_ERROR(r))
break;
......
......@@ -36,6 +36,7 @@
#include "override.h"
#include "tracking.h"
#include "debfile.h"
#include "package.h"
static const char * const deb_checksum_headers[cs_COUNT] = {
"MD5sum", "SHA1", "SHA256", "Size"};
......@@ -120,39 +121,28 @@ retvalue binaries_getarchitecture(const char *chunk, architecture_t *architectur
/* get somefields out of a "Packages.gz"-chunk.
* returns RET_OK on success, RET_NOTHING if incomplete, error otherwise */
static retvalue binaries_parse_chunk(const char *chunk, const char *packagename, packagetype_t packagetype, architecture_t package_architecture, const char *version, /*@out@*/char **sourcename_p, /*@out@*/char **basename_p) {
static retvalue binaries_calc_basename(struct package *package, /*@out@*/char **basename_p) {
retvalue r;
char *mysourcename, *mybasename;
char *mybasename;
assert(packagename!=NULL);
/* get the sourcename */
r = chunk_getname(chunk, "Source", &mysourcename, true);
if (r == RET_NOTHING) {
mysourcename = strdup(packagename);
if (FAILEDTOALLOC(mysourcename))
r = RET_ERROR_OOM;
}
if (RET_WAS_ERROR(r)) {
return r;
}
assert (package->name != NULL);
assert (package->version != NULL);
r = properpackagename(packagename);
r = properpackagename(package->name);
if (!RET_WAS_ERROR(r))
r = properversion(version);
r = properversion(package->version);
if (RET_WAS_ERROR(r)) {
free(mysourcename);
return r;
}
mybasename = calc_binary_basename(packagename, version,
package_architecture, packagetype);
mybasename = calc_binary_basename(package->name,
package->version,
package->architecture,
package->target->packagetype);
if (FAILEDTOALLOC(mybasename)) {
free(mysourcename);
return RET_ERROR_OOM;
}
*basename_p = mybasename;
*sourcename_p = mysourcename;
return RET_OK;
}
......@@ -231,28 +221,29 @@ retvalue binaries_getversion(const char *control, char **version) {
return r;
}
retvalue binaries_getinstalldata(const struct target *t, const char *packagename, const char *version, architecture_t package_architecture, const char *chunk, char **control, struct strlist *filekeys, struct checksumsarray *origfiles) {
char *sourcename, *basefilename;
retvalue binaries_getinstalldata(const struct target *t, struct package *package, char **control, struct strlist *filekeys, struct checksumsarray *origfiles) {
char *basefilename;
struct checksumsarray origfilekeys;
retvalue r;
const char *chunk = package->control;
r = binaries_parse_chunk(chunk, packagename,
t->packagetype, package_architecture,
version, &sourcename, &basefilename);
if (RET_WAS_ERROR(r)) {
assert (t->packagetype == package->target->packagetype);
r = package_getsource(package);
if (RET_WAS_ERROR(r))
return r;
} else if (r == RET_NOTHING) {
fprintf(stderr, "Does not look like a binary package: '%s'!\n",
chunk);
r = binaries_calc_basename(package, &basefilename);
if (RET_WAS_ERROR(r))
return RET_ERROR;
}
r = binaries_getchecksums(chunk, &origfilekeys);
if (RET_WAS_ERROR(r)) {
free(sourcename); free(basefilename);
free(basefilename);
return r;
}
r = calcnewcontrol(chunk, packagename, sourcename, basefilename,
r = calcnewcontrol(chunk, package->name, package->source,
basefilename,
t->component, filekeys, control);
if (RET_WAS_ERROR(r)) {
checksumsarray_done(&origfilekeys);
......@@ -260,7 +251,7 @@ retvalue binaries_getinstalldata(const struct target *t, const char *packagename
assert (r != RET_NOTHING);
checksumsarray_move(origfiles, &origfilekeys);
}
free(sourcename); free(basefilename);
free(basefilename);
return r;
}
......@@ -500,7 +491,7 @@ void binaries_debdone(struct deb_headers *pkg) {
free(pkg->priority);
}
retvalue binaries_readdeb(struct deb_headers *deb, const char *filename, bool needssourceversion) {
retvalue binaries_readdeb(struct deb_headers *deb, const char *filename) {
retvalue r;
char *architecture;
......@@ -538,11 +529,8 @@ retvalue binaries_readdeb(struct deb_headers *deb, const char *filename, bool ne
if (RET_WAS_ERROR(r))
return r;
/* can be there, otherwise we also know what it is */
if (needssourceversion)
r = chunk_getnameandversion(deb->control, "Source",
&deb->source, &deb->sourceversion);
else
r = chunk_getname(deb->control, "Source", &deb->source, true);
r = chunk_getnameandversion(deb->control, "Source",
&deb->source, &deb->sourceversion);
if (r == RET_NOTHING) {
deb->source = strdup(deb->name);
if (FAILEDTOALLOC(deb->source))
......@@ -550,7 +538,7 @@ retvalue binaries_readdeb(struct deb_headers *deb, const char *filename, bool ne
}
if (RET_WAS_ERROR(r))
return r;
if (needssourceversion && deb->sourceversion == NULL) {
if (deb->sourceversion == NULL) {
deb->sourceversion = strdup(deb->version);
if (FAILEDTOALLOC(deb->sourceversion))
return RET_ERROR_OOM;
......@@ -676,7 +664,7 @@ retvalue binaries_adddeb(const struct deb_headers *deb, const struct atomlist *f
false,
trackingdata,
deb->architecture,
NULL, NULL, NULL);
NULL, NULL);
r2 = target_closepackagesdb(t);
RET_ENDUPDATE(r, r2);
}
......@@ -718,7 +706,7 @@ retvalue binaries_adddeb(const struct deb_headers *deb, const struct atomlist *f
false,
trackingdata,
deb->architecture,
NULL, NULL, NULL);
NULL, NULL);
r2 = target_closepackagesdb(t);
RET_ENDUPDATE(r, r2);
}
......@@ -794,4 +782,3 @@ retvalue binaries_calcfilekeys(component_t component, const struct deb_headers *
free(basefilename);
return r;
}
......@@ -44,7 +44,7 @@ struct deb_headers {
* error returned
* - no checks for sanity of values, left to the caller */
retvalue binaries_readdeb(struct deb_headers *, const char *filename, bool /*needssourceversion*/);
retvalue binaries_readdeb(struct deb_headers *, const char *filename);
void binaries_debdone(struct deb_headers *);
retvalue binaries_calcfilekeys(component_t, const struct deb_headers *, packagetype_t, /*@out@*/struct strlist *);
......
......@@ -452,10 +452,16 @@ static retvalue changes_read(const char *filename, /*@out@*/struct changes **cha
r = properversion(c->sourceversion);
R;
}
r = chunk_getwordlist(c->control, "Binary", &c->binaries);
E("Missing 'Binary' field");
r = chunk_getwordlist(c->control, "Architecture", &c->architectures);
E("Missing 'Architecture' field");
r = chunk_getwordlist(c->control, "Binary", &c->binaries);
if (r == RET_NOTHING) {
/* this could print a waring if architectures
* contains anything but 'source', but the .deb
* files are checked anyway... */
strlist_init(&c->binaries);
}
R;
r = chunk_getvalue(c->control, "Version", &c->changesversion);
E("Missing 'Version' field");
r = properversion(c->changesversion);
......@@ -1577,7 +1583,6 @@ retvalue changes_add(trackingdb const tracks, const struct atomlist *packagetype
assert (logger_isprepared(distribution->logger));
logger_logchanges(distribution->logger, distribution->codename,
changes->source, changes->changesversion,
changes->control,
changesfilename, changes->changesfilekey);
}
/* wait for notify scripts (including those for the packages)
......
......@@ -73,7 +73,7 @@ void deb_free(/*@only@*/struct debpackage *pkg) {
}
/* read the data from a .deb, make some checks and extract some data */
static retvalue deb_read(/*@out@*/struct debpackage **pkg, const char *filename, bool needssourceversion) {
static retvalue deb_read(/*@out@*/struct debpackage **pkg, const char *filename) {
retvalue r;
struct debpackage *deb;
......@@ -81,12 +81,12 @@ static retvalue deb_read(/*@out@*/struct debpackage **pkg, const char *filename,
if (FAILEDTOALLOC(deb))
return RET_ERROR_OOM;
r = binaries_readdeb(&deb->deb, filename, needssourceversion);
r = binaries_readdeb(&deb->deb, filename);
if (RET_IS_OK(r))
r = properpackagename(deb->deb.name);
if (RET_IS_OK(r))
r = propersourcename(deb->deb.source);
if (RET_IS_OK(r) && needssourceversion)
if (RET_IS_OK(r))
r = properversion(deb->deb.sourceversion);
if (RET_IS_OK(r))
r = properversion(deb->deb.version);
......@@ -240,7 +240,7 @@ retvalue deb_prepare(/*@out@*/struct debpackage **deb, component_t forcecomponen
/* First taking a closer look in the file: */
r = deb_read(&pkg, debfilename, true);
r = deb_read(&pkg, debfilename);
if (RET_WAS_ERROR(r)) {
return r;
}
......@@ -341,7 +341,7 @@ retvalue deb_add(component_t forcecomponent, const struct atomlist *forcearchite
causingfile = debfilename;
r = deb_read(&pkg, debfilename, tracks != NULL);
r = deb_read(&pkg, debfilename);
if (RET_WAS_ERROR(r)) {
return r;
}
......
......@@ -147,7 +147,7 @@ retvalue dsc_addprepared(const struct dsc_headers *dsc, component_t component, c
dsc->control, filekeys,
false, trackingdata,
architecture_source,
NULL, NULL, NULL);
NULL, NULL);
r2 = target_closepackagesdb(t);
RET_ENDUPDATE(r, r2);
}
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for reprepro 5.2.0.
# Generated by GNU Autoconf 2.69 for reprepro 5.3.0.
#
# Report bugs to <brlink@debian.org>.
#
......@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='reprepro'
PACKAGE_TARNAME='reprepro'
PACKAGE_VERSION='5.2.0'
PACKAGE_STRING='reprepro 5.2.0'
PACKAGE_VERSION='5.3.0'
PACKAGE_STRING='reprepro 5.3.0'
PACKAGE_BUGREPORT='brlink@debian.org'
PACKAGE_URL=''
......@@ -1292,7 +1292,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures reprepro 5.2.0 to adapt to many kinds of systems.
\`configure' configures reprepro 5.3.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1359,7 +1359,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of reprepro 5.2.0:";;
short | recursive ) echo "Configuration of reprepro 5.3.0:";;
esac
cat <<\_ACEOF
......@@ -1463,7 +1463,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
reprepro configure 5.2.0
reprepro configure 5.3.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1886,7 +1886,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by reprepro $as_me 5.2.0, which was
It was created by reprepro $as_me 5.3.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2750,7 +2750,7 @@ fi
# Define the identity of the package.
PACKAGE='reprepro'
VERSION='5.2.0'
VERSION='5.3.0'
cat >>confdefs.h <<_ACEOF
......@@ -6661,7 +6661,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by reprepro $as_me 5.2.0, which was
This file was extended by reprepro $as_me 5.3.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -6727,7 +6727,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
reprepro config.status 5.2.0
reprepro config.status 5.3.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -2,7 +2,7 @@ dnl
dnl Process this file with autoconf to produce a configure script
dnl
AC_INIT(reprepro, 5.2.0, brlink@debian.org)
AC_INIT(reprepro, 5.3.0, brlink@debian.org)
AC_CONFIG_SRCDIR(main.c)
AC_CONFIG_AUX_DIR(ac)
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability])
......
......@@ -182,8 +182,7 @@ static retvalue list_prepareadd(struct package_list *list, struct target *target
assert (new != NULL);
new->architecture = package->architecture;
r = target->getinstalldata(target, new->name, new->version,
new->architecture, package->control,
r = target->getinstalldata(target, package,
&new->control, &new->filekeys, &new->origfiles);
assert (r != RET_NOTHING);
if (RET_WAS_ERROR(r)) {
......@@ -275,7 +274,7 @@ static retvalue package_add(struct distribution *into, /*@null@*/trackingdb trac
(tracks != NULL)?
&trackingdata:NULL,
package->architecture,
NULL, suitefrom, NULL);
NULL, suitefrom);
RET_UPDATE(into->status, r);
if (tracks != NULL) {
retvalue r2;
......
# see git-dpm(1) from git-dpm package
759040053fb0741f14c80b783fee10235f0b27cf
759040053fb0741f14c80b783fee10235f0b27cf
759040053fb0741f14c80b783fee10235f0b27cf
759040053fb0741f14c80b783fee10235f0b27cf
reprepro_5.2.0.orig.tar.gz
a1abe4d7993f5ed09933249b2f0a84ce21bf70e6
708762
d6b9eef4c7606e9b0e0dff6bea28c7fcc67be818
d6b9eef4c7606e9b0e0dff6bea28c7fcc67be818
d6b9eef4c7606e9b0e0dff6bea28c7fcc67be818
d6b9eef4c7606e9b0e0dff6bea28c7fcc67be818
reprepro_5.3.0.orig.tar.gz
3b486c23893fedc28c0dbef013ed319624430129
681871
signature:81e2dfc05b59900930cc9a6034958b0811bc0903:924223:reprepro_5.3.0.orig.tar.gz.asc
......@@ -99,7 +99,7 @@ static void description_genmd5(const char *description, /*@out@*/ char *d, size_
* the cached description is not yet used, long descriptions are not stored elsewhere
* and thus also no reference counting is done. */
retvalue description_addpackage(struct target *target, const char *package, const char *control, const char *oldcontrol, struct description *cached, char **control_p) {
retvalue description_addpackage(struct target *target, const char *package, const char *control, char **control_p) {
char *description, *description_md5, *deb_description, *newcontrol;
struct fieldtoadd *todo;
size_t dlen;
......@@ -200,8 +200,3 @@ retvalue description_addpackage(struct target *target, const char *package, cons
*control_p = newcontrol;
return RET_OK;
}
retvalue description_preparepackage(UNUSED(struct target *target), UNUSED(const char *package), UNUSED(const char *control), UNUSED(struct description **description_p)) {
/* everything yet done in description_addpackage */
return RET_NOTHING;
}
#ifndef REPREPRO_DESCRIPTIONS_H
#define REPREPRO_DESCRIPTIONS_H
struct description;
retvalue description_preparepackage(struct target*, const char */*package*/, const char */*control*/, /*@out@*/struct description**);
/* Do what is needed description/translation wise for a new package added.
* control is the control chunk of the new package to be normalized
* (depending on the target, towards containing full Description or checksumed),
* oldcontrol is a old version of a package replaced or NULL
* (for repairdescriptions oldcontrol==control).
* newcontrol_p gets the new normalized control chunk.
* description is the data returned by a description_prepareaddpackage or NULL
* if that was not yet called
*/
retvalue description_addpackage(struct target*, const char */*package*/, const char */*control*/,/*@null@*/const char */*oldcontrol*/, /*@null@*/struct description*, /*@out@*/char **/*newcontrol_p*/);
retvalue description_addpackage(struct target*, const char */*package*/, const char */*control*/, /*@out@*/char **/*newcontrol_p*/);
#endif
......@@ -775,10 +775,13 @@ static retvalue candidate_parse(struct incoming *i, struct candidate *c) {
r = properversion(c->sourceversion);
E("Malforce Source Version number!");
}
r = chunk_getwordlist(c->control, "Binary", &c->binaries);
E("Missing 'Binary' field!");
r = chunk_getwordlist(c->control, "Architecture", &c->architectures);
E("Missing 'Architecture' field!");
r = chunk_getwordlist(c->control, "Binary", &c->binaries);
if (r == RET_NOTHING)
strlist_init(&c->binaries);
else if (RET_WAS_ERROR(r))
return r;
r = chunk_getvalue(c->control, "Version", &c->changesversion);
E("Missing 'Version' field!");
r = properversion(c->changesversion);
......@@ -998,7 +1001,7 @@ static retvalue candidate_read_deb(struct incoming *i, struct candidate *c, stru
char *base;
const char *packagenametocheck;
r = binaries_readdeb(&file->deb, file->tempfilename, true);
r = binaries_readdeb(&file->deb, file->tempfilename);
if (RET_WAS_ERROR(r))
return r;
if (strcmp(file->name, file->deb.name) != 0) {
......@@ -1788,7 +1791,7 @@ static retvalue add_dsc(struct distribution *into, struct trackingdata *tracking
&p->filekeys,
false, trackingdata,
architecture_source,
NULL, NULL, NULL);
NULL, NULL);
r2 = target_closepackagesdb(t);
RET_ENDUPDATE(r, r2);
}
......@@ -2268,7 +2271,7 @@ static retvalue candidate_really_add(struct incoming *i, struct candidate *c) {
} else if (d->byhandhookstocall == NULL)
continue;
logger_logchanges(into->logger, into->codename,
c->source, c->changesversion, c->control,
c->source, c->changesversion,
changesfile(c)->tempfilename, changesfilekey);
}
return RET_OK;
......
......@@ -672,7 +672,7 @@ static retvalue startchild(void) {
return RET_OK;
}
static retvalue notificator_enqueuechanges(struct notificator *n, const char *codename, const char *name, const char *version, const char *changeschunk, const char *safefilename, /*@null@*/const char *filekey) {
static retvalue notificator_enqueuechanges(struct notificator *n, const char *codename, const char *name, const char *version, const char *safefilename, /*@null@*/const char *filekey) {
size_t count, i, j;
char **arguments;
struct notification_process *p;
......@@ -744,16 +744,13 @@ static retvalue notificator_enqueuechanges(struct notificator *n, const char *co
p->datalen = 0;
p->datasent = 0;
p->data = NULL;
// TODO: implement --withcontrol
// until that changeschunk is not yet needed:
changeschunk = changeschunk;
if (runningchildren() < 1)
startchild();
return RET_OK;
}
static retvalue notificator_enqueue(struct notificator *n, struct target *target, const char *name, /*@null@*/const char *version, /*@null@*/const char *oldversion, /*@null@*/const char *control, /*@null@*/const char *oldcontrol, /*@null@*/const struct strlist *filekeys, /*@null@*/const struct strlist *oldfilekeys, bool renotification, /*@null@*/const char *causingrule, /*@null@*/ const char *suitefrom) {
static retvalue notificator_enqueue(struct notificator *n, struct target *target, const char *name, /*@null@*/const char *version, /*@null@*/const char *oldversion, /*@null@*/const struct strlist *filekeys, /*@null@*/const struct strlist *oldfilekeys, bool renotification, /*@null@*/const char *causingrule, /*@null@*/ const char *suitefrom) {
size_t count, i;
char **arguments;
const char *action = NULL;
......@@ -909,9 +906,6 @@ static retvalue notificator_enqueue(struct notificator *n, struct target *target
p->datalen = 0;
p->datasent = 0;
p->data = NULL;
// TODO: implement --withcontrol
// until that control is not yet needed:
control = control; oldcontrol = oldcontrol;
if (runningchildren() < 1)
startchild();
return RET_OK;
......@@ -1073,16 +1067,10 @@ bool logger_isprepared(/*@null@*/const struct logger *logger) {
return true;
}
void logger_log(struct logger *log, struct target *target, const char *name, const char *version, const char *oldversion, const char *control, const char *oldcontrol, const struct strlist *filekeys, const struct strlist *oldfilekeys, const char *causingrule, const char *suitefrom) {
void logger_log(struct logger *log, struct target *target, const char *name, const char *version, const char *oldversion, const struct strlist *filekeys, const struct strlist *oldfilekeys, const char *causingrule, const char *suitefrom) {
size_t i;
assert (name != NULL);
assert (control != NULL || oldcontrol != NULL);
assert (version != NULL || control == NULL);
/* so that a replacement can be detected by existence of oldversion */
if (oldcontrol != NULL && oldversion == NULL)
oldversion = "#unparseable#";
assert (version != NULL || oldversion != NULL);
......@@ -1091,13 +1079,12 @@ void logger_log(struct logger *log, struct target *target, const char *name, con
for (i = 0 ; i < log->notificator_count ; i++) {
notificator_enqueue(&log->notificators[i], target,
name, version, oldversion,
control, oldcontrol,
filekeys, oldfilekeys, false,
causingrule, suitefrom);
}
}
void logger_logchanges(struct logger *log, const char *codename, const char *name, const char *version, const char *data, const char *safefilename, const char *changesfilekey) {
void logger_logchanges(struct logger *log, const char *codename, const char *name, const char *version, const char *safefilename, const char *changesfilekey) {
size_t i;
assert (name != NULL);
......@@ -1108,7 +1095,7 @@ void logger_logchanges(struct logger *log, const char *codename, const char *nam
for (i = 0 ; i < log->notificator_count ; i++) {
notificator_enqueuechanges(&log->notificators[i], codename,
name, version, data, safefilename,
name, version, safefilename,
changesfilekey);
}
}
......@@ -1131,20 +1118,18 @@ bool logger_rerun_needs_target(const struct logger *logger, const struct target
return false;
}
retvalue logger_reruninfo(struct logger *logger, struct target *target, const char *name, const char *version, const char *control, /*@null@*/const struct strlist *filekeys) {
retvalue logger_reruninfo(struct logger *logger, struct target *target, const char *name, const char *version, /*@null@*/const struct strlist *filekeys) {
retvalue result, r;
size_t i;
assert (name != NULL);
assert (version != NULL);
assert (control != NULL);
result = RET_NOTHING;
for (i = 0 ; i < logger->notificator_count ; i++) {
r = notificator_enqueue(&logger->notificators[i], target,
name, version, NULL,
control, NULL,
filekeys, NULL, true,
NULL, NULL);
RET_UPDATE(result, r);
......
......@@ -17,12 +17,12 @@ void logger_free(/*@only@*/struct logger *);
retvalue logger_prepare(struct logger *logger);
bool logger_isprepared(/*@null@*/const struct logger *logger);
void logger_logchanges(struct logger *, const char * /*codename*/, const char * /*name*/, const char * /*version*/, const char * /*data*/, const char * /*safefilename*/, /*@null@*/const char * /*changesfilekey*/);
void logger_logchanges(struct logger *, const char * /*codename*/, const char * /*name*/, const char * /*version*/, const char * /*safefilename*/, /*@null@*/const char * /*changesfilekey*/);
void logger_log(struct logger *, struct target *, const char * /*name*/, /*@null@*/const char * /*version*/, /*@null@*/const char */*oldversion*/, /*@null@*/const char * /*control*/, /*@null@*/const char * /*oldcontrol*/, /*@null@*/const struct strlist * /*filekeys*/, /*@null@*/const struct strlist * /*oldfilekeys*/, /*@null@*/const char * /*causingrule*/, /*@null@*/const char * /*suitefrom*/);
void logger_log(struct logger *, struct target *, const char * /*name*/, /*@null@*/const char * /*version*/, /*@null@*/const char */*oldversion*/, /*@null@*/const struct strlist * /*filekeys*/, /*@null@*/const struct strlist * /*oldfilekeys*/, /*@null@*/const char * /*causingrule*/, /*@null@*/const char * /*suitefrom*/);
bool logger_rerun_needs_target(const struct logger *, const struct target *);
retvalue logger_reruninfo(struct logger *, struct target *, const char * /*name*/, const char * /*version*/, const char * /*control*/, /*@null@*/const struct strlist * /*filekeys*/);
retvalue logger_reruninfo(struct logger *, struct target *, const char * /*name*/, const char * /*version*/, /*@null@*/const struct strlist * /*filekeys*/);
/* wait for all jobs to finish */
void logger_wait(void);
......
......@@ -2545,7 +2545,6 @@ static retvalue repair_descriptions(struct target *target) {
/* replace it by itself to normalize the Description field */
r = description_addpackage(target, iterator.current.name,
iterator.current.control,
iterator.current.control, NULL,
&newcontrolchunk);
RET_UPDATE(result, r);
if (RET_WAS_ERROR(r))
......
......@@ -125,7 +125,7 @@ retvalue references_add(const char *identifier, const struct strlist *files) {
/* Remove reference by <identifier> for the given <oldfiles>,
* excluding <exclude>, if it is nonNULL. */
retvalue references_delete(const char *identifier, struct strlist *files, const struct strlist *exclude) {
retvalue references_delete(const char *identifier, const struct strlist *files, const struct strlist *exclude) {
retvalue result, r;
int i;
......
......@@ -30,7 +30,7 @@ retvalue references_add(const char *, const struct strlist *);
/* Remove reference by <identifier> for the given <oldfiles>,
* excluding <exclude>, if it is nonNULL. */
retvalue references_delete(const char *, struct strlist *, /*@null@*/const struct strlist * /*exclude*/);
retvalue references_delete(const char *, const struct strlist *, /*@null@*/const struct strlist * /*exclude*/);
/* add an reference to a file for an identifier. */
retvalue references_increment(const char * /*needed*/, const char * /*needey*/);
......
......@@ -304,6 +304,7 @@ static retvalue parsediff(struct compressedfile *f, /*@null@*/char **section_p,
return RET_NOTHING;
lines_out--;
/* no break */
__attribute__ ((fallthrough));
case '-':
if (unlikely(lines_in == 0))
return RET_NOTHING;
......
......@@ -34,6 +34,7 @@
#include "override.h"
#include "tracking.h"
#include "signature.h"
#include "package.h"
/* split a "<md5> <size> <filename>" into md5sum and filename */
static retvalue calc_parsefileline(const char *fileline, /*@out@*/char **filename) {
......@@ -137,7 +138,7 @@ retvalue sources_getarchitecture(UNUSED(const char *chunk), architecture_t *arch
return RET_OK;
}
retvalue sources_getinstalldata(const struct target *t, const char *packagename, UNUSED(const char *version), architecture_t architecture, const char *chunk, char **control, struct strlist *filekeys, struct checksumsarray *origfiles) {
retvalue sources_getinstalldata(const struct target *t, struct package *package, char **control, struct strlist *filekeys, struct checksumsarray *origfiles) {
retvalue r;
char *origdirectory, *directory, *mychunk;
struct strlist myfilekeys;
......@@ -145,8 +146,9 @@ retvalue sources_getinstalldata(const struct target *t, const char *packagename,
struct checksumsarray files;
enum checksumtype cs;
bool gothash = false;
const char *chunk = package->control;
assert (architecture == architecture_source);
assert (package->architecture == architecture_source);
for (cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++) {
assert (source_checksum_names[cs] != NULL);
......@@ -170,7 +172,7 @@ retvalue sources_getinstalldata(const struct target *t, const char *packagename,
strlist_done(&filelines[cs]);
return RET_ERROR;
}
r = checksumsarray_parse(&files, filelines, packagename);
r = checksumsarray_parse(&files, filelines, package->name);
for (cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++) {
strlist_done(&filelines[cs]);
}
......@@ -192,19 +194,19 @@ retvalue sources_getinstalldata(const struct target *t, const char *packagename,
return r;
}
r = propersourcename(packagename);
r = propersourcename(package->name);
assert (r != RET_NOTHING);
if (RET_IS_OK(r))
r = properfilenames(&files.names);
if (RET_WAS_ERROR(r)) {
fprintf(stderr,
"Forbidden characters in source package '%s'!\n", packagename);
"Forbidden characters in source package '%s'!\n", package->name);
free(origdirectory);
checksumsarray_done(&files);
return r;
}
directory = calc_sourcedir(t->component, packagename);
directory = calc_sourcedir(t->component, package->name);
if (FAILEDTOALLOC(directory))
r = RET_ERROR_OOM;
else
......@@ -220,7 +222,7 @@ retvalue sources_getinstalldata(const struct target *t, const char *packagename,
if (!RET_WAS_ERROR(r)) {