Imported from pacman-2.7.9.tar.gz

This commit is contained in:
Judd Vinet 2004-04-30 03:37:13 +00:00
parent 4ad8644620
commit a2ee533f84
11 changed files with 28 additions and 13 deletions

View file

@ -1,5 +1,7 @@
VERSION DESCRIPTION VERSION DESCRIPTION
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
2.7.9 - added the "force" option to packages, so --sysupgrade can
downgrade packages when it needs to
2.7.8 - added post_remove scriptlet support 2.7.8 - added post_remove scriptlet support
- added -Qs option (bug #854) - added -Qs option (bug #854)
- a provisio does not imply conflict, to make a provisio target - a provisio does not imply conflict, to make a provisio target

View file

@ -34,7 +34,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
PACVER = 2.7.8 PACVER = 2.7.9
TOPDIR = @srcdir@ TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/ SRCDIR = $(TOPDIR)/src/

View file

@ -1,4 +1,4 @@
.TH makepkg 8 "April 27, 2004" "makepkg #VERSION#" "" .TH makepkg 8 "April 29, 2004" "makepkg #VERSION#" ""
.SH NAME .SH NAME
makepkg \- package build utility makepkg \- package build utility
.SH SYNOPSIS .SH SYNOPSIS
@ -210,6 +210,11 @@ This is the release number specific to Arch Linux packages.
.B pkgdesc .B pkgdesc
This should be a brief description of the package and its functionality. This should be a brief description of the package and its functionality.
.TP
.B force
This is used to force the package to be upgraded by \fB--sysupgrade\fP, even
if its an older version.
.TP .TP
.B url .B url
This field contains an optional URL that is associated with the piece of software This field contains an optional URL that is associated with the piece of software

View file

@ -20,7 +20,7 @@
# USA. # USA.
# #
myver='2.7.8' myver='2.7.9'
usage() { usage() {
echo "gensync $myver" echo "gensync $myver"
@ -63,7 +63,7 @@ get_md5checksum()
db_write_entry() db_write_entry()
{ {
unset pkgname pkgver pkgrel pkgdesc unset pkgname pkgver pkgrel pkgdesc force
unset groups replaces provides depends conflicts unset groups replaces provides depends conflicts
source $1 || return 1 source $1 || return 1
cd $gstmpdir cd $gstmpdir
@ -99,6 +99,10 @@ db_write_entry()
done done
echo "" >>desc echo "" >>desc
fi fi
if [ "$force" = "y" -o "$force" = "Y" ]; then
echo "%FORCE%" >>desc
echo "" >>desc
fi
# depends # depends
: >depends : >depends
if [ ${#depends[*]} -gt 0 ]; then if [ ${#depends[*]} -gt 0 ]; then

View file

@ -20,7 +20,7 @@
# USA. # USA.
# #
myver='2.7.8' myver='2.7.9'
startdir=`pwd` startdir=`pwd`
PKGDEST=$startdir PKGDEST=$startdir
USE_COLOR="n" USE_COLOR="n"
@ -294,7 +294,7 @@ if [ "$CLEANCACHE" = "1" ]; then
fi fi
fi fi
unset pkgname pkgver pkgrel pkgdesc url license groups provides md5sums unset pkgname pkgver pkgrel pkgdesc url license groups provides md5sums force
unset replaces depends conflicts backup source install build makedepends unset replaces depends conflicts backup source install build makedepends
umask 0022 umask 0022

View file

@ -21,7 +21,7 @@
# #
toplevel=`pwd` toplevel=`pwd`
version="2.7.8" version="2.7.9"
usage() { usage() {
echo "makeworld version $version" echo "makeworld version $version"

View file

@ -250,20 +250,22 @@ pkginfo_t* db_read(pacdb_t *db, struct dirent *ent, unsigned int inforeq)
info->size = atol(tmp); info->size = atol(tmp);
} else if(!strcmp(line, "%REPLACES%")) { } else if(!strcmp(line, "%REPLACES%")) {
/* the REPLACES tag is special -- it only appears in sync repositories, /* the REPLACES tag is special -- it only appears in sync repositories,
* not the local one. * not the local one. */
*/
while(fgets(line, 512, fp) && strlen(trim(line))) { while(fgets(line, 512, fp) && strlen(trim(line))) {
char *s = strdup(line); char *s = strdup(line);
info->replaces = list_add(info->replaces, s); info->replaces = list_add(info->replaces, s);
} }
} else if(!strcmp(line, "%MD5SUM%")) { } else if(!strcmp(line, "%MD5SUM%")) {
/* MD5SUM tag only appears in sync repositories, /* MD5SUM tag only appears in sync repositories,
* not the local one. * not the local one. */
*/
if(fgets(info->md5sum, sizeof(info->md5sum), fp) == NULL) { if(fgets(info->md5sum, sizeof(info->md5sum), fp) == NULL) {
FREEPKG(info); FREEPKG(info);
return(NULL); return(NULL);
} }
} else if(!strcmp(line, "%FORCE%")) {
/* FORCE tag only appears in sync repositories,
* not the local one. */
info->force = 1;
} }
} }
fclose(fp); fclose(fp);

View file

@ -241,6 +241,7 @@ pkginfo_t* newpkg()
pkg->md5sum[0] = '\0'; pkg->md5sum[0] = '\0';
pkg->size = 0; pkg->size = 0;
pkg->scriptlet = 0; pkg->scriptlet = 0;
pkg->force = 0;
pkg->requiredby = NULL; pkg->requiredby = NULL;
pkg->conflicts = NULL; pkg->conflicts = NULL;
pkg->files = NULL; pkg->files = NULL;

View file

@ -53,6 +53,7 @@ typedef struct __pkginfo_t {
char md5sum[33]; char md5sum[33];
unsigned long size; unsigned long size;
unsigned short scriptlet; unsigned short scriptlet;
unsigned short force;
PMList *replaces; PMList *replaces;
PMList *groups; PMList *groups;
PMList *files; PMList *files;

View file

@ -667,7 +667,7 @@ int pacman_sync(pacdb_t *db, PMList *targets)
} }
/* compare versions and see if we need to upgrade */ /* compare versions and see if we need to upgrade */
cmp = rpmvercmp(local->version, sync->pkg->version); cmp = rpmvercmp(local->version, sync->pkg->version);
if(cmp > 0) { if(cmp > 0 && !sync->pkg->force) {
/* local version is newer */ /* local version is newer */
fprintf(stderr, ":: %s-%s: local version is newer\n", fprintf(stderr, ":: %s-%s: local version is newer\n",
local->name, local->version); local->name, local->version);

View file

@ -22,7 +22,7 @@
#define _PAC_PACMAN_H #define _PAC_PACMAN_H
#ifndef PACVER #ifndef PACVER
#define PACVER "2.7.8" #define PACVER "2.7.9"
#endif #endif
#ifndef PKGDIR #ifndef PKGDIR