Imported from pacman-2.2.tar.gz

This commit is contained in:
Judd Vinet 2002-12-11 21:56:52 +00:00
parent 6a654187b6
commit 9d9b0e8d26
15 changed files with 125 additions and 66 deletions

View file

@ -1,5 +1,10 @@
VERSION DESCRIPTION VERSION DESCRIPTION
------------------------------------------------------------------ ------------------------------------------------------------------
2.2 - More bugfixes
- Added --downloadonly switch to --sync
2.1 - Lots of bugfixes
- Added support for multiple respositories
- Improved the config file layout
- Improved dependency resolution and sorting - Improved dependency resolution and sorting
2.0 - Added dependency functionality 2.0 - Added dependency functionality
- Completely new database format, similar to FreeBSD - Completely new database format, similar to FreeBSD

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.1 PACVER = 2.2
LIBTAR_VERSION = 1.2.5 LIBTAR_VERSION = 1.2.5
TOPDIR = @srcdir@ TOPDIR = @srcdir@

5
README
View file

@ -55,3 +55,8 @@ licensed through the GNU General Public License (see COPYING).
pacman uses "libtar", a library for reading/writing tar-files. This pacman uses "libtar", a library for reading/writing tar-files. This
library is Copyright (c) 1998-2001 Mark D. Roth <roth@uiuc.edu> (see library is Copyright (c) 1998-2001 Mark D. Roth <roth@uiuc.edu> (see
libtar-X.X.X/COPYRIGHT for further details). libtar-X.X.X/COPYRIGHT for further details).
pacman uses "ftplib", a library for sending/receiving files via FTP. This
library is copyright (c) 1996-2000 Thomas Pfau, pfau@cnj.digex.net (see
libftp/ftplib.c for furthur details).

21
TODO
View file

@ -1,27 +1,30 @@
- add a way to clean /var/cache/pacman/src
- add other options to config file: db location, overwrite behaviour, etc.
- don't skip the db update when a package fails to upgrade - we lose the entry
- have "group" designations - have "group" designations
- use 'set -e' in makepkg? ? use 'set -e' in makepkg?
- if a package fails, ask before aborting the full operation x if a package fails, ask before aborting the full operation
- ask, then remove conflicting packages with --sync - can't -- further dependent packages may fail b/c of the first failure
- use a provides tag (instead of an OR operator in depends) ? ask, then remove conflicting packages with --sync
? use a provides tag (instead of an OR operator in depends)
- add a freshen operation - add a freshen operation
- add a 'cascade' option to --remove that will remove a package and - add a 'cascade' option to --remove that will remove a package and
all requiredby packages under it all requiredby packages under it
- check $PACCONF env var - check $PACCONF env var
- ftp transfer progress bar breaks after ~42000 K - ftp transfer progress bar breaks after ~42000 K
- use a 'trust pacman' config option for downgrading? ? use a 'trust pacman' config option for downgrading?
- instead of 'conflicts' use a ! operator in depends - instead of 'conflicts' use a ! operator in depends
- add a --pretend option - add a --pretend option
- add a consistency/sanity check operation - add a consistency/sanity check operation
- add a --dbpath option - add a --dbpath option
- build-time (source) dependencies in makepkg ? build-time (source) dependencies in makepkg
- auto-resolve dependencies in makepkg - auto-resolve dependencies in makepkg
- use package caches more for performance - use package caches more for performance
+ add an "ignore package" option in either pacman.conf or in each package - IgnorePkg option in pacman.conf to ignore updates from the sync repo
record. this will prevent it from being upgraded from the sync set
- if a package is removed with --nodeps and re-installed, the requiredby - if a package is removed with --nodeps and re-installed, the requiredby
fields of it's required packages are not updated fields of it's required packages are not updated
- duplicate dep checks occur with sync (one in sync, one in add) - duplicate dep checks occur with sync (one in sync, one in add)
- clean up output a bit (message queue?) - clean up output a bit (message queue?)
- run ldd on every executable in a newly built package to find required so's ? run ldd on every executable in a newly built package to find required so's
- use a files.cache gdbm (or whatever) for --owns and db_find_conflicts - use a files.cache gdbm (or whatever) for --owns and db_find_conflicts

View file

@ -1,4 +1,4 @@
.TH makepkg 8 "July 18, 2002" "makepkg #VERSION#" "" .TH makepkg 8 "November 7, 2002" "makepkg #VERSION#" ""
.SH NAME .SH NAME
makepkg \- package build utility makepkg \- package build utility
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH pacman 8 "August 18, 2002" "pacman #VERSION#" "" .TH pacman 8 "November 7, 2002" "pacman #VERSION#" ""
.SH NAME .SH NAME
pacman \- package manager utility pacman \- package manager utility
.SH SYNOPSIS .SH SYNOPSIS
@ -99,6 +99,9 @@ installed/upgraded if necessary.
This will search each package in the package list for names or descriptions This will search each package in the package list for names or descriptions
that contains <string>. that contains <string>.
.TP .TP
.B "\-w, \-\-downloadonly"
Retrieve all packages from the server, but do not install/upgrade anything.
.TP
.B "\-c, \-\-clean" .B "\-c, \-\-clean"
Remove packages from the cache. When pacman downloads packages, Remove packages from the cache. When pacman downloads packages,
it saves them in \fI/var/cache/pacman/pkg\fP. If you need to free up it saves them in \fI/var/cache/pacman/pkg\fP. If you need to free up

View file

@ -7,42 +7,43 @@
# during an install/upgrade. (note: do not include the leading slash) # during an install/upgrade. (note: do not include the leading slash)
[options] [options]
NoUpgrade = etc/passwd etc/group etc/shadow NoUpgrade = etc/passwd etc/group etc/shadow
NoUpgrade = etc/fstab NoUpgrade = etc/fstab etc/rc.conf etc/rc.local
NoUpgrade = etc/lilo.conf
[current] [current]
Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/current Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/current
Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/current
Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/current Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/current
Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/current Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/current
Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/current Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/current
Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/current
Server = ftp://ftp2.archlinux.org/current
Server = ftp://ftp3.archlinux.org/current
Server = ftp://ftp.archlinux.org/current Server = ftp://ftp.archlinux.org/current
Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/current
Server = ftp://saule.mintis.lt/pub/linux/current
# Uncomment this block to access the 'unofficial' package set # Uncomment this block to access the 'unofficial' package set
# #
#[unofficial] #[unofficial]
#Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/unofficial #Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/unofficial
#Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/unofficial
#Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/unofficial #Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/unofficial
#Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/unofficial #Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/unofficial
#Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/unofficial #Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/unofficial
#Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/unofficial
#Server = ftp://ftp2.archlinux.org/unofficial
#Server = ftp://ftp3.archlinux.org/unofficial
#Server = ftp://ftp.archlinux.org/unofficial #Server = ftp://ftp.archlinux.org/unofficial
#Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/unofficial
#Server = ftp://saule.mintis.lt/pub/linux/unofficial
# If you use the 'stable' tree, you should disable the 'current' # If you use the 'stable' tree, you should disable the 'current'
# tree to avoid conflicts # tree to avoid conflicts
# #
#[stable] #[stable]
#Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/stable #Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/stable
#Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/stable
#Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/stable #Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/stable
#Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/stable #Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/stable
#Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/stable #Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/stable
#Server = ftp://ftp.archlinux.org/stable #Server = ftp://ftp.archlinux.org/stable
#Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/stable #Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/stable
#Server = ftp://ftp2.archlinux.org/stable #Server = ftp://saule.mintis.lt/pub/linux/stable
#Server = ftp://ftp3.archlinux.org/stable
# This is a typical setup for a local package repository. To have pacman # This is a typical setup for a local package repository. To have pacman
# resolve dependencies and install your custom packages with the --sync # resolve dependencies and install your custom packages with the --sync

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
myver='2.1' myver='2.2'
ABS_ROOT=/usr/abs ABS_ROOT=/usr/abs
usage() { usage() {

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
myver='2.1' myver='2.2'
usage() { usage() {
echo "gensync $myver" echo "gensync $myver"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
myver='2.1' myver='2.2'
startdir=`pwd` startdir=`pwd`
[ -f /etc/makepkg.conf ] && source /etc/makepkg.conf [ -f /etc/makepkg.conf ] && source /etc/makepkg.conf
@ -138,6 +138,7 @@ for netfile in ${source[@]}; do
fi fi
mkdir -p /var/cache/pacman/src && cp $file /var/cache/pacman/src mkdir -p /var/cache/pacman/src && cp $file /var/cache/pacman/src
fi fi
unset cmd
case $file in case $file in
*.tar.gz|*.tar.Z|*.tgz) *.tar.gz|*.tar.Z|*.tgz)
cmd="tar --use-compress-program=gzip -xf $file" ;; cmd="tar --use-compress-program=gzip -xf $file" ;;
@ -150,8 +151,10 @@ for netfile in ${source[@]}; do
*.gz) *.gz)
cmd="gunzip $file" ;; cmd="gunzip $file" ;;
esac esac
if [ "$cmd" != "" ]; then
msg "==> $cmd" msg "==> $cmd"
$cmd $cmd
fi
done done
# check for existing pkg directory # check for existing pkg directory

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
toplevel=`pwd` toplevel=`pwd`
version="2.1" version="2.2"
usage() { usage() {
echo "makeworld version $version" echo "makeworld version $version"

View file

@ -62,11 +62,11 @@ pkginfo_t* load_pkg(char *pkgfile, unsigned short output)
/* parse the info file */ /* parse the info file */
parse_descfile(descfile, info, &backup, output); parse_descfile(descfile, info, &backup, output);
if(!strlen(info->name)) { if(!strlen(info->name)) {
fprintf(stderr, "error: missing package name in description file.\n"); fprintf(stderr, "load_pkg: missing package name in %s.\n", pkgfile);
return(NULL); return(NULL);
} }
if(!strlen(info->version)) { if(!strlen(info->version)) {
fprintf(stderr, "error: missing package version in description file.\n"); fprintf(stderr, "load_pkg: missing package version in %s.\n", pkgfile);
return(NULL); return(NULL);
} }
for(lp = backup; lp; lp = lp->next) { for(lp = backup; lp; lp = lp->next) {
@ -85,7 +85,9 @@ pkginfo_t* load_pkg(char *pkgfile, unsigned short output)
} }
if(TH_ISREG(tar) && tar_skip_regfile(tar)) { if(TH_ISREG(tar) && tar_skip_regfile(tar)) {
perror("bad package file"); char errorstr[255];
snprintf(errorstr, 255, "bad package file in %s", pkgfile);
perror(errorstr);
return(NULL); return(NULL);
} }
expath = NULL; expath = NULL;
@ -94,7 +96,7 @@ pkginfo_t* load_pkg(char *pkgfile, unsigned short output)
FREE(descfile); FREE(descfile);
if(!strlen(info->name) || !strlen(info->version)) { if(!strlen(info->name) || !strlen(info->version)) {
fprintf(stderr, "Error: Missing .PKGINFO file in %s\n", pkgfile); fprintf(stderr, "load_pkg: missing package info file in %s\n", pkgfile);
return(NULL); return(NULL);
} }
@ -136,7 +138,8 @@ int parse_descfile(char *descfile, pkginfo_t *info, PMList **backup, int output)
ptr = line; ptr = line;
key = strsep(&ptr, "="); key = strsep(&ptr, "=");
if(key == NULL || ptr == NULL) { if(key == NULL || ptr == NULL) {
fprintf(stderr, "Syntax error in description file line %d\n", linenum); fprintf(stderr, "%s: syntax error in description file line %d\n",
info->name[0] != '\0' ? info->name : "error", linenum);
} else { } else {
trim(key); trim(key);
key = strtoupper(key); key = strtoupper(key);
@ -167,7 +170,8 @@ int parse_descfile(char *descfile, pkginfo_t *info, PMList **backup, int output)
char *s = strdup(ptr); char *s = strdup(ptr);
bak = list_add(bak, s); bak = list_add(bak, s);
} else { } else {
fprintf(stderr, "Syntax error in description file line %d\n", linenum); fprintf(stderr, "%s: syntax error in description file line %d\n",
info->name[0] != '\0' ? info->name : "error", linenum);
} }
} }
line[0] = '\0'; line[0] = '\0';

View file

@ -69,6 +69,7 @@ unsigned short pmo_q_info = 0;
unsigned short pmo_q_list = 0; unsigned short pmo_q_list = 0;
unsigned short pmo_q_owns = 0; unsigned short pmo_q_owns = 0;
unsigned short pmo_s_upgrade = 0; unsigned short pmo_s_upgrade = 0;
unsigned short pmo_s_downloadonly = 0;
unsigned short pmo_s_sync = 0; unsigned short pmo_s_sync = 0;
unsigned short pmo_s_search = 0; unsigned short pmo_s_search = 0;
unsigned short pmo_s_clean = 0; unsigned short pmo_s_clean = 0;
@ -382,13 +383,27 @@ int pacman_sync(pacdb_t *db, PMList *targets)
/* versions are identical */ /* versions are identical */
continue; continue;
} else { } else {
PMList *lp = NULL;
int found = 0;
/* re-fetch the package record with dependency info */ /* re-fetch the package record with dependency info */
sync->pkg = db_scan(sync->dbs->db, sync->pkg->name, INFRQ_DESC | INFRQ_DEPENDS); sync->pkg = db_scan(sync->dbs->db, sync->pkg->name, INFRQ_DESC | INFRQ_DEPENDS);
/* add to the targets list */ /* add to the targets list */
if(!list_isin(final, sync)) { for(found = 0, lp = final; lp && !found; lp = lp->next) {
syncpkg_t *s = (syncpkg_t*)lp->data;
if(s && !strcmp(s->pkg->name, sync->pkg->name)) {
found = 1;
}
}
if(!found) {
allgood = !resolvedeps(db, databases, sync, final, trail); allgood = !resolvedeps(db, databases, sync, final, trail);
/* check again, as resolvedeps could have added our target for us */ /* check again, as resolvedeps could have added our target for us */
if(!list_isin(final, sync)) { for(found = 0, lp = final; lp && !found; lp = lp->next) {
syncpkg_t *s = (syncpkg_t*)lp->data;
if(s && !strcmp(s->pkg->name, sync->pkg->name)) {
found = 1;
}
}
if(!found) {
final = list_add(final, sync); final = list_add(final, sync);
} }
} }
@ -407,7 +422,6 @@ int pacman_sync(pacdb_t *db, PMList *targets)
MALLOC(sync, sizeof(syncpkg_t)); MALLOC(sync, sizeof(syncpkg_t));
local = db_scan(db, (char*)i->data, INFRQ_DESC); local = db_scan(db, (char*)i->data, INFRQ_DESC);
//sync = db_scan(db_sync, (char*)i->data, INFRQ_DESC | INFRQ_DEPENDS);
for(j = databases; !found && j; j = j->next) { for(j = databases; !found && j; j = j->next) {
dbsync_t *dbs = (dbsync_t*)j->data; dbsync_t *dbs = (dbsync_t*)j->data;
for(k = dbs->pkgcache; !found && k; k = k->next) { for(k = dbs->pkgcache; !found && k; k = k->next) {
@ -479,6 +493,7 @@ int pacman_sync(pacdb_t *db, PMList *targets)
list = list_add(list, s->pkg); list = list_add(list, s->pkg);
} }
} }
deps = checkdeps(db, PM_UPGRADE, list); deps = checkdeps(db, PM_UPGRADE, list);
if(deps) { if(deps) {
fprintf(stderr, "error: unresolvable conflicts/dependencies:\n"); fprintf(stderr, "error: unresolvable conflicts/dependencies:\n");
@ -538,9 +553,13 @@ int pacman_sync(pacdb_t *db, PMList *targets)
/* get confirmation */ /* get confirmation */
confirm = 0; confirm = 0;
if(allgood && final && final->data) { if(allgood && final && final->data) {
if(pmo_s_downloadonly) {
confirm = yesno("\nDo you want to download these packages? [Y/n] ");
} else {
confirm = yesno("\nDo you want to install/upgrade these packages? [Y/n] "); confirm = yesno("\nDo you want to install/upgrade these packages? [Y/n] ");
} }
} }
}
if(allgood && confirm && final && final->data) { if(allgood && confirm && final && final->data) {
char ldir[PATH_MAX]; char ldir[PATH_MAX];
@ -625,6 +644,8 @@ int pacman_sync(pacdb_t *db, PMList *targets)
list_free(files); list_free(files);
files = NULL; files = NULL;
} }
if(!pmo_s_downloadonly) {
/* install targets */ /* install targets */
for(i = final; allgood && i; i = i->next) { for(i = final; allgood && i; i = i->next) {
char *str; char *str;
@ -638,8 +659,9 @@ int pacman_sync(pacdb_t *db, PMList *targets)
if(allgood) { if(allgood) {
pacman_upgrade(db, files); pacman_upgrade(db, files);
} }
}
if(!varcache) { if(!varcache && !pmo_s_downloadonly) {
/* delete packages */ /* delete packages */
for(i = files; i; i = i->next) { for(i = files; i; i = i->next) {
unlink(i->data); unlink(i->data);
@ -688,7 +710,8 @@ int pacman_add(pacdb_t *db, PMList *targets)
return(0); return(0);
} }
vprint("Loading all target data...\n"); printf("loading package data... ");
fflush(stdout);
for(targ = targets; targ; targ = targ->next) { for(targ = targets; targ; targ = targ->next) {
/* Populate the package struct */ /* Populate the package struct */
vprint(" %s\n", (char*)targ->data); vprint(" %s\n", (char*)targ->data);
@ -699,9 +722,10 @@ int pacman_add(pacdb_t *db, PMList *targets)
alltargs = list_add(alltargs, info); alltargs = list_add(alltargs, info);
filenames = list_add(filenames, strdup(targ->data)); filenames = list_add(filenames, strdup(targ->data));
} }
printf("done.\n");
if(!pmo_nodeps) { if(!pmo_nodeps) {
vprint("Checking dependencies...\n"); vprint("checking dependencies...\n");
lp = checkdeps(db, (pmo_upgrade ? PM_UPGRADE : PM_ADD), alltargs); lp = checkdeps(db, (pmo_upgrade ? PM_UPGRADE : PM_ADD), alltargs);
if(lp) { if(lp) {
fprintf(stderr, "error: unsatisfied dependencies:\n"); fprintf(stderr, "error: unsatisfied dependencies:\n");
@ -1516,9 +1540,15 @@ PMList* checkdeps(pacdb_t *db, unsigned short op, PMList *targets)
pkginfo_t *p; pkginfo_t *p;
found = 0; found = 0;
if((p = db_scan(db, j->data, INFRQ_DESC | INFRQ_DEPENDS)) == NULL) { if((p = db_scan(db, j->data, INFRQ_DESC | INFRQ_DEPENDS)) == NULL) {
/* hmmm... package isn't installed.. */
continue;
}
if(is_pkgin(p, targets)) {
/* this package is also in the upgrade list, so don't worry about it */
continue; continue;
} }
for(k = p->depends; k && !found; k = k->next) { for(k = p->depends; k && !found; k = k->next) {
/* find the dependency info in p->depends */
if(splitdep(k->data, &depend)) { if(splitdep(k->data, &depend)) {
continue; continue;
} }
@ -1527,6 +1557,7 @@ PMList* checkdeps(pacdb_t *db, unsigned short op, PMList *targets)
} }
} }
if(found == 0) { if(found == 0) {
/* not found */
continue; continue;
} }
found = 0; found = 0;

View file

@ -22,7 +22,7 @@
#define _PAC_PACMAN_H #define _PAC_PACMAN_H
#ifndef PACVER #ifndef PACVER
#define PACVER "2.1" #define PACVER "2.2"
#endif #endif
#ifndef PKGDIR #ifndef PKGDIR

View file

@ -55,6 +55,7 @@ extern unsigned short pmo_s_sync;
extern unsigned short pmo_s_search; extern unsigned short pmo_s_search;
extern unsigned short pmo_s_clean; extern unsigned short pmo_s_clean;
extern unsigned short pmo_s_upgrade; extern unsigned short pmo_s_upgrade;
extern unsigned short pmo_s_downloadonly;
extern PMList *pmo_noupgrade; extern PMList *pmo_noupgrade;
extern PMList *pmc_syncs; extern PMList *pmc_syncs;
@ -156,11 +157,12 @@ int parseargs(int op, int argc, char **argv)
{"file", no_argument, 0, 'p'}, {"file", no_argument, 0, 'p'},
{"info", no_argument, 0, 'i'}, {"info", no_argument, 0, 'i'},
{"sysupgrade", no_argument, 0, 'u'}, {"sysupgrade", no_argument, 0, 'u'},
{"downloadonly", no_argument, 0, 'w'},
{"refresh", no_argument, 0, 'y'}, {"refresh", no_argument, 0, 'y'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
while((opt = getopt_long(argc, argv, "ARUQSTYr:vhscVfnoldpiuy", opts, &option_index))) { while((opt = getopt_long(argc, argv, "ARUQSTYr:vhscVfnoldpiuwy", opts, &option_index))) {
if(opt < 0) { if(opt < 0) {
break; break;
} }
@ -184,6 +186,7 @@ int parseargs(int op, int argc, char **argv)
case 'i': pmo_q_info = 1; break; case 'i': pmo_q_info = 1; break;
case 'o': pmo_q_owns = 1; break; case 'o': pmo_q_owns = 1; break;
case 'u': pmo_s_upgrade = 1; break; case 'u': pmo_s_upgrade = 1; break;
case 'w': pmo_s_downloadonly = 1; break;
case 'y': pmo_s_sync = 1; break; case 'y': pmo_s_sync = 1; break;
case 's': pmo_s_search = 1; break; case 's': pmo_s_search = 1; break;
case 'c': pmo_s_clean = 1; break; case 'c': pmo_s_clean = 1; break;
@ -515,6 +518,7 @@ void usage(int op, char *myname)
printf(" -d, --nodeps skip dependency checks\n"); printf(" -d, --nodeps skip dependency checks\n");
printf(" -y, --refresh download a fresh package sync database from the server\n"); printf(" -y, --refresh download a fresh package sync database from the server\n");
printf(" -u, --sysupgrade upgrade all packages that are out of date\n"); printf(" -u, --sysupgrade upgrade all packages that are out of date\n");
printf(" -w, --downloadonly download packages, but do not install/upgrade anything\n");
printf(" -c, --clean remove packages from cache directory to free up diskspace\n"); printf(" -c, --clean remove packages from cache directory to free up diskspace\n");
} }
printf(" -v, --verbose be verbose\n"); printf(" -v, --verbose be verbose\n");